fix #1
This commit is contained in:
parent
f97e223929
commit
071d438d59
2
gd32v_lcd/.vscode/settings.json
vendored
2
gd32v_lcd/.vscode/settings.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"terminal.integrated.env.windows": {
|
"terminal.integrated.env.windows": {
|
||||||
"PATH": "C:\\Users\\greedyhao\\.platformio\\penv\\Scripts;C:\\Users\\greedyhao\\.platformio\\penv;D:\\Softwares\\Python37\\Scripts\\;D:\\Softwares\\Python37\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;D:\\Softwares\\Java\\jdk1.8.0_191\\bin;D:\\Softwares\\Java\\jdk1.8.0_191\\jre\\bin;D:\\Softwares\\Putty\\;D:\\Softwares\\mingw64\\bin;D:\\Softwares\\Git\\cmd;C:\\Program Files (x86)\\ZeroTier\\One\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Users\\greedyhao\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\greedyhao\\AppData\\Local\\GitHubDesktop\\bin;C:\\Program Files\\Bandizip\\;D:\\Softwares\\Microsoft VS Code\\bin;D:\\Softwares\\intelFPGA\\10.1\\modelsim_ase\\win32aloem;D:\\Softwares\\Python37\\Scripts\\;D:\\Softwares\\Python37\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;D:\\Softwares\\Java\\jdk1.8.0_191\\bin;D:\\Softwares\\Java\\jdk1.8.0_191\\jre\\bin;D:\\Softwares\\Putty\\;D:\\Softwares\\mingw64\\bin;D:\\Softwares\\Git\\cmd;C:\\Program Files (x86)\\ZeroTier\\One\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Users\\greedyhao\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\greedyhao\\AppData\\Local\\GitHubDesktop\\bin;C:\\Program Files\\Bandizip\\;D:\\Softwares\\Microsoft VS Code\\bin;D:\\Softwares\\intelFPGA\\10.1\\modelsim_ase\\win32aloem",
|
"PATH": "C:\\Users\\greedyhao\\.platformio\\penv\\Scripts;C:\\Users\\greedyhao\\.platformio\\penv;D:\\Softwares\\Python37\\Scripts\\;D:\\Softwares\\Python37\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;D:\\Softwares\\Java\\jdk1.8.0_191\\bin;D:\\Softwares\\Java\\jdk1.8.0_191\\jre\\bin;D:\\Softwares\\Putty\\;D:\\Softwares\\mingw64\\bin;D:\\Softwares\\Git\\cmd;C:\\Program Files (x86)\\ZeroTier\\One\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;D:\\Softwares\\nodejs\\;D:\\Softwares\\PowerShell\\6\\;C:\\Users\\greedyhao\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\greedyhao\\AppData\\Local\\GitHubDesktop\\bin;C:\\Program Files\\Bandizip\\;D:\\Softwares\\Microsoft VS Code\\bin;D:\\Softwares\\intelFPGA\\10.1\\modelsim_ase\\win32aloem;C:\\Users\\greedyhao\\AppData\\Roaming\\npm;D:\\Softwares\\intelFPGA\\18.1\\modelsim_ase\\win32aloem;C:\\Users\\greedyhao\\AppData\\Local\\Microsoft\\WindowsApps;D:\\Softwares\\SDCC\\bin;D:\\Softwares\\Python37\\Scripts\\;D:\\Softwares\\Python37\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;D:\\Softwares\\Java\\jdk1.8.0_191\\bin;D:\\Softwares\\Java\\jdk1.8.0_191\\jre\\bin;D:\\Softwares\\Putty\\;D:\\Softwares\\mingw64\\bin;D:\\Softwares\\Git\\cmd;C:\\Program Files (x86)\\ZeroTier\\One\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;D:\\Softwares\\nodejs\\;D:\\Softwares\\PowerShell\\6\\;C:\\Users\\greedyhao\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\greedyhao\\AppData\\Local\\GitHubDesktop\\bin;C:\\Program Files\\Bandizip\\;D:\\Softwares\\Microsoft VS Code\\bin;D:\\Softwares\\intelFPGA\\10.1\\modelsim_ase\\win32aloem;C:\\Users\\greedyhao\\AppData\\Roaming\\npm;D:\\Softwares\\intelFPGA\\18.1\\modelsim_ase\\win32aloem;C:\\Users\\greedyhao\\AppData\\Local\\Microsoft\\WindowsApps;D:\\Softwares\\SDCC\\bin",
|
||||||
"PLATFORMIO_CALLER": "vscode"
|
"PLATFORMIO_CALLER": "vscode"
|
||||||
},
|
},
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
[env:sipeed-longan-nano]
|
[env:sipeed-longan-nano]
|
||||||
platform = gd32v
|
platform = gd32v
|
||||||
board = sipeed-longan-nano
|
board = sipeed-longan-nano
|
||||||
framework = gd32vf103_firmware_library
|
framework = gd32vf103-sdk
|
||||||
|
upload_protocol = dfu
|
||||||
|
@ -107,24 +107,6 @@ void rcvr_spi_multi (
|
|||||||
UINT btr /* Number of bytes to receive (even number) */
|
UINT btr /* Number of bytes to receive (even number) */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// WORD d;
|
|
||||||
|
|
||||||
// SPI_CTL0(SPI1) = (SPI_CTL0(SPI1) & ~0x800) | 0x800; /* Put SPI into 16-bit mode */
|
|
||||||
|
|
||||||
// spi_i2s_data_transmit(SPI1, 0xFFFF); /* Start the first SPI transaction */
|
|
||||||
// btr -= 2;
|
|
||||||
// do { /* Receive the data block into buffer */
|
|
||||||
// while(RESET == spi_i2s_flag_get(SPI1, SPI_FLAG_RBNE)); /* Wait for end of the SPI transaction */
|
|
||||||
// d = spi_i2s_data_receive(SPI1); /* Get received word */
|
|
||||||
// spi_i2s_data_transmit(SPI1, 0xFFFF); /* Start next transaction */
|
|
||||||
// buff[1] = d; buff[0] = d >> 8; /* Store received data */
|
|
||||||
// buff += 2;
|
|
||||||
// } while (btr -= 2);
|
|
||||||
// while(RESET == spi_i2s_flag_get(SPI1, SPI_FLAG_RBNE)); /* Wait for end of the SPI transaction */
|
|
||||||
// d = spi_i2s_data_receive(SPI1); /* Get last word received */
|
|
||||||
// buff[1] = d; buff[0] = d >> 8; /* Store it */
|
|
||||||
|
|
||||||
// SPI_CTL0(SPI1) = (SPI_CTL0(SPI1) & ~0x800) | 0x00; /* Put SPI into 8-bit mode */
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
*buff = xchg_spi(0xff);
|
*buff = xchg_spi(0xff);
|
||||||
|
@ -104,6 +104,11 @@ int main(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
LCD_ShowString(24, 0, (u8 *)("no card found!"), BLACK);
|
||||||
|
LCD_ShowString(24, 16, (u8 *)("no card found!"), BLUE);
|
||||||
|
LCD_ShowString(24, 32, (u8 *)("no card found!"), BRED);
|
||||||
|
LCD_ShowString(24, 48, (u8 *)("no card found!"), GBLUE);
|
||||||
|
LCD_ShowString(24, 64, (u8 *)("no card found!"), RED);
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
LEDR_TOG;
|
LEDR_TOG;
|
||||||
|
Loading…
Reference in New Issue
Block a user