delay_init(); //延时函数初始化
uart_init(115200);
LCD12864_All_Init(); // 12864初始化
LCM_clr(); //清屏
SPI2_Init(); //初始化SPI
SPI2_SetSpeed(SPI_BaudRatePrescaler_128);//设置为18M时钟,高速模式
//电源检测初始化
CS5463_IO_Init();
CS5463_Init();
LCD_Write_String(1,0,"电器A");
LCD_Write_String(1,3,"电压 V");
LCD_Write_String(2,0,"电流 mA");
LCD_Write_String(3,0,"功率 W");
LCD_Write_String(4,0,"功率因数 %");
printf("start to check current \r\n");
|