lpc1768 in usb is uğrasıyorum lpcxpresso ide'side cmsis2 lib'i denedim ancak
**** Build of configuration Debug for project RDB1768cmsis2_usb_hid ****
make all
Building file: ../src/cr_startup_lpc176x.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -DDEBUG -D__USE_CMSIS=CMSISv2p00_LPC17xx -D__CODE_RED -D__REDLIB__ -O0 -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/cr_startup_lpc176x.d" -MT"src/cr_startup_lpc176x.d" -o"src/cr_startup_lpc176x.o" "../src/cr_startup_lpc176x.c"
Finished building: ../src/cr_startup_lpc176x.c
Building file: ../src/main_hid.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -DDEBUG -D__USE_CMSIS=CMSISv2p00_LPC17xx -D__CODE_RED -D__REDLIB__ -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/main_hid.d" -MT"src/main_hid.d" -o"src/main_hid.o" "../src/main_hid.c"
In file included from ../src/main_hid.c:40:0:
../src/usbapi.h:68:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'USBHwInit'
../src/usbapi.h:73:26: error: expected ')' before 'fConnect'
../src/usbapi.h:76:30: error: expected ')' before 'fConfigured'
../src/usbapi.h:82:29: error: expected declaration specifiers or '...' before 'BOOL'
../src/usbapi.h:103:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'USBInit'
../src/usbapi.h:106:9: warning: type defaults to 'int' in declaration of 'BOOL'
../src/usbapi.h:106:9: error: 'BOOL' declared as function returning a function
../src/usbapi.h:106:1: warning: parameter names (without types) in function declaration
../src/usbapi.h:107:43: error: expected declaration specifiers or '...' before 'TFnHandleRequest'
../src/usbapi.h:108:51: error: expected ')' before '*' token
../src/usbapi.h:111:15: error: 'TFnGetDescriptor' declared as function returning a function
../src/usbapi.h:114:6: error: 'USBHandleStandardRequest' declared as function returning a function
../src/usbapi.h:121:6: error: 'USBGetDescriptor' declared as function returning a function
../src/main_hid.c:191:13: error: 'HandleClassRequest' declared as function returning a function
../src/main_hid.c:229:13: error: 'HIDHandleStdReq' declared as function returning a function
../src/main_hid.c: In function 'main':
../src/main_hid.c:292:2: warning: implicit declaration of function 'USBInit'
../src/main_hid.c:298:2: warning: implicit declaration of function 'USBRegisterCustomReqHandler'
../src/main_hid.c:301:2: warning: passing argument 2 of 'USBRegisterRequestHandler' from incompatible pointer type
../src/usbapi.h:107:6: note: expected 'U8 *' but argument is of type 'int (*)(struct TSetupPacket *, int *, U8 **)'
../src/main_hid.c:301:2: error: too many arguments to function 'USBRegisterRequestHandler'
../src/usbapi.h:107:6: note: declared here
../src/main_hid.c:312:2: warning: implicit declaration of function 'USBHwConnect'
make: *** [src/main_hid.o] Error 1
hatasını aldım
daha once çalışmış olan arkadaşlar başka bir lib'de olsa yardımcı olabilirmisiniz zira, daha sonra kodu keil'e aktarmam gerekecek
keil mdk-arm ile gelen ve de nxp lpc1768 code buddle içersinde hid uygulaması var. denedim güzel çalışıyorlar. onları deneyin derim.
mcb1700 board'u için yazılmış örnek kodu denemeyi düşünüyorum
bir kaç güne boş zaman bulurum burdan sorun olursa paylaşıtrım, yoksa zaten sorunsuzca kulanılabilir demektir :)