This commit is contained in:
greedyhao 2019-10-05 20:44:28 +08:00
parent f97e223929
commit 071d438d59
5 changed files with 13 additions and 26 deletions

View File

@ -1,6 +1,6 @@
{
"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"
},
"files.associations": {

View File

@ -112,16 +112,16 @@ void LCD_ShowLogo(void);
#define BLACK 0x0000
#define BLUE 0x001F
#define BRED 0XF81F
#define GRED 0XFFE0
#define GBLUE 0X07FF
#define GRED 0XFFE0
#define GBLUE 0X07FF
#define RED 0xF800
#define MAGENTA 0xF81F
#define GREEN 0x07E0
#define CYAN 0x7FFF
#define YELLOW 0xFFE0
#define BROWN 0XBC40 //棕色
#define BRRED 0XFC07 //棕红色
#define GRAY 0X8430 //灰色
#define BROWN 0XBC40 //棕色
#define BRRED 0XFC07 //棕红色
#define GRAY 0X8430 //灰色
//GUI颜色
#define DARKBLUE 0X01CF //深蓝色

View File

@ -11,5 +11,5 @@
[env:sipeed-longan-nano]
platform = gd32v
board = sipeed-longan-nano
framework = gd32vf103_firmware_library
framework = gd32vf103-sdk
upload_protocol = dfu

View File

@ -107,24 +107,6 @@ void rcvr_spi_multi (
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
{
*buff = xchg_spi(0xff);

View File

@ -104,6 +104,11 @@ int main(void)
}
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)
{
LEDR_TOG;