Hi Carl
Demo UART: In some SP versions of the project doesn't compile/link when the define
DEMO_UART is removed. This has been solved in the development project but will only be fully integrated in future SPs. However this is easy to fix: when the linker is failing due to a routine being missing, add the conditional statement around this routine:
#if defined SERIAL_INTERFACE && defined DEMO_UART
extern QUEUE_HANDLE fnSetNewSerialMode(unsigned char ucDriverMode)
{
...
}
#endifThis will allow you to free up all UARTs for your own use.
USB CDC:Did you already check out the
USB User's Guide:
http://www.utasker.com/docs/uTasker/USB_User_Guide.PDF ?
The USB interface, as configured in the demo project, can be used (almost) identically to a UART interface. When the enumeration is successful you can then use the interface handle (
USBPortID_comms) to write data to and read data from the USB connection using the same
fnWrite() and
fnRead() functions.
In the USB task (
extern void fnTaskUSB(TTASKTABLE *ptrTaskTable)) USB receptions are being handled by passing them to the command line menu input. This is taking place in the block beginning with
while (fnMsgs(USBPortID_comms) != 0) { // reception from endpoint 1you can remove the content of this block and add your own protocol handling there, in the same manner as you do from the serial interface - it should be compatible. In your protocol transmission routines simply replace the serial handle with the usb handle and this should also be compatible.
Regards
Mark