fix compile bug

This commit is contained in:
Jeremy 2023-04-20 18:02:50 +08:00
parent 5677cd0768
commit 692e010e0d
16 changed files with 30 additions and 27 deletions

View File

@ -18,10 +18,10 @@
* @date: 2022/1/7
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
void TestAdc(void)
{

View File

@ -18,11 +18,10 @@
* @date: 2022/12/7
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
static uint16_t image_buff[384000];

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2023/2/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
void TestCAN(void)

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/1/11
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
void TestDac(void)
{

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
#include <socket.h>

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
void TestFlash(void)
{

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/11/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
#define MAX_READ_LENGTH 1000

View File

@ -17,19 +17,24 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
#ifdef BOARD_EDU_RISCV64_EVB
#define BSP_LED_PIN 29
#define BSP_KEY_PIN 31
#elif defined BOARD_HC32F4A0_EVB
#define BSP_LED_PIN 134
#define BSP_KEY_PIN 176
#endif
#define NULL_PARAMETER 0
void TestGpio(void)
{
int pin_fd = PrivOpen(GPIO_DEV_DRIVER, O_RDWR);
if(pin_fd<0){
if(pin_fd < 0) {
printf("open pin fd error:%d\n",pin_fd);
return;
}
@ -51,8 +56,8 @@ void TestGpio(void)
}
//config key pin in board
parameter.pin = BSP_KEY_PIN;
parameter.mode = GPIO_CFG_INPUT;
parameter.pin = BSP_KEY_PIN;
parameter.mode = GPIO_CFG_INPUT;
if (0 != PrivIoctl(pin_fd, OPE_CFG, &ioctl_cfg)) {
printf("ioctl pin fd error %d\n", pin_fd);
@ -68,7 +73,7 @@ void TestGpio(void)
//recycle read pin and write pin until key break
while(1){
if(0>PrivRead(pin_fd,&pin_key,NULL_PARAMETER)){
if(0 > PrivRead(pin_fd, &pin_key, NULL_PARAMETER)) {
printf("read pin fd error %d\n", pin_fd);
PrivClose(pin_fd);
return;
@ -81,12 +86,11 @@ void TestGpio(void)
pin_led.val = GPIO_LOW;
}
if(0>PrivWrite(pin_fd,&pin_led,NULL_PARAMETER)){
printf("write pin fd error %d\n", pin_fd);
PrivClose(pin_fd);
return;
}
if(0 > PrivWrite(pin_fd, &pin_led, NULL_PARAMETER)) {
printf("write pin fd error %d\n", pin_fd);
PrivClose(pin_fd);
return;
}
}
}

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
#define BSP_LED_PIN 134
#define NULL_PARAMETER 0

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
#define I2C_SLAVE_ADDRESS 0x0012U

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
#define GRAPHIC_CTRL_RECT_UPDATE 0x00
#define LCD_STRING_TYPE 0

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
#define NULL_PARAMETER 0
#define E220_CFG_LENGTH

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
#define BSP_485_DIR_PIN 24

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
void TestRTC(int argc,char *argv[])
{

View File

@ -48,7 +48,7 @@ void TestTouch(void)
#define LCD_DOT_TYPE 1
#define LCD_SIZE 320
#elif ADD_XIZI_FETURES
#elif defined ADD_XIZI_FETURES
void TestTouch(void)
{

View File

@ -17,10 +17,10 @@
* @author: AIIT XUOS Lab
* @date: 2022/12/17
*/
#ifdef ADD_XIZI_FETURES
#include <stdio.h>
#include <string.h>
#include <transform.h>
#ifdef ADD_XIZI_FETURES
void TestWDT(int argc, char *agrv[])
{