extern BYTE SOF_Flag; BYTE Count; BYTE OutReport[2]; //unsigned char Power void main() {
M8C_EnableGInt; USB_Start(0,USB_5V_OPERATION); DAC8_Start(DAC8_HIGHPOWER); DAC8_1_Start(DAC8_1_HIGHPOWER); DAC8_1_WriteBlind(0); while (!USB_bGetConfiguration()); USB_INT_REG |= USB_INT_SOF_MASK; USB_EnableOutEP(4);
while(1) { if (SOF_Flag) { SOF_Flag = 0; if (USB_bGetEPAckState(4)) { Count = USB_bReadOutEP(4, OutReport, 2); DAC8_WriteBlind(OutReport);
USB_EnableOutEP(4); } } } }
编译出错: !EC:\Documents and Settings\Administrator\桌面\w6\w6\main.c(40): type error in argument 1 to `DAC8_WriteBlind'; found `pointer to unsigned char' expected `unsigned char' C:\PROGRA~1\Cypress\Common\CY3E64~1\tools\make: *** [obj/main.o] Error 1 |