1 Reply Latest reply on Jan 11, 2015 10:21 PM by shopitham.ram

    some problems of using CYRF69213-40LFXC

    benlin.liu
              the problem is how to use some API functions of USB in the chip 69213 the datashet said: void USB_XLoadEP(BYTE*pSrc) Loads and enables the specified USB endpoint for an IN transfer. Note USB_XLoadEP should not be call directly. Rather, the macro USB_LoadEP should be used. it said again: C Macro USB_LoadEP(BYTE bEP, BYTE *pSrc, BYTE count) Loads and enables the specified USB endpoint for an IN transfer. we write program in our project: #include        // part specific constants and macros #include "PSoCAPI.h" // PSoC API definitions for all User Modules keyboard_report[8] = {0,0,0,0,0,0,0,0}; int usb_send_flag,usbloadin_clr_flag = 0; BYTE spi_receive_num,spi_rec_flag; BYTE spi_rec_value0,spi_rec_value1,spi_rec_value2; void delay(void) { int j,k; for(k=0;k<=22;k++) { for(j=0;j<=1000;j++) asm("NOP"); //397 } } void main(void) { BYTE bUsbActive; // M8C_EnableGInt ; // Uncomment this line to enable Global Interrupts M8C_EnableGInt; //Enable Global Interrupts // Insert your main routine code here. USB_Start(0); USB_Stop(); USB_Start(0); USB_bCheckActivity(); while(1) { keyboard_report[2]=6; USB_LoadEP(1, keyboard_report, 8); delay(); keyboard_report[2]=7; USB_LoadEP(1, keyboard_report, 8); delay(); keyboard_report[2]=8; USB_LoadEP(1, keyboard_report, 8); delay();delay();delay(); } } the result of compile is as below: !E D:\1PSOC2~1\WIRELESS\F18_WL~1\F18_WL~1\F18_WL~1\main.c(38): type error in argument 1 to `USB_XLoadEP'; found `pointer to int' expected `pointer to unsigned char' !E D:\1PSOC2~1\WIRELESS\F18_WL~1\F18_WL~1\F18_WL~1\main.c(42): type error in argument 1 to `USB_XLoadEP'; found `pointer to int' expected `pointer to unsigned char' !E D:\1PSOC2~1\WIRELESS\F18_WL~1\F18_WL~1\F18_WL~1\main.c(46): type error in argument 1 to `USB_XLoadEP'; found `pointer to int' expected `pointer to unsigned char' make: *** [obj/main.o] Error 1 main.o - 4 error(s) 0 warning(s) 10:24:26 how can we pass the project?