Add TMC header read and write functions, so that TMC data can now be exchanged in both directions.
Minor update to the LowLevel MassStorage device demo, so that the ReadInCommandBlock() performs the data OUT endpoint selection and packet arrival test.
This commit is contained in:
parent
059307d89c
commit
9a97f16b07
3 changed files with 87 additions and 51 deletions
|
@ -45,17 +45,20 @@
|
|||
|
||||
/* Macros: */
|
||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||
#define LEDMASK_USB_NOTREADY LEDS_LED1
|
||||
#define LEDMASK_USB_NOTREADY LEDS_LED1
|
||||
|
||||
/** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
|
||||
#define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
|
||||
#define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
|
||||
|
||||
/** LED mask for the library LED driver, to indicate that the USB interface is ready. */
|
||||
#define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
|
||||
#define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
|
||||
|
||||
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
|
||||
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
|
||||
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
|
||||
|
||||
/** LED mask for the library LED driver, to indicate that the USB interface is busy. */
|
||||
#define LEDMASK_USB_BUSY LEDS_LED2
|
||||
|
||||
#define Req_InitiateAbortBulkOut 0x01
|
||||
#define Req_CheckAbortBulkOutStatus 0x02
|
||||
#define Req_InitiateAbortBulkIn 0x03
|
||||
|
@ -139,6 +142,8 @@
|
|||
/* Function Prototypes: */
|
||||
void SetupHardware(void);
|
||||
void TMC_Task(void);
|
||||
bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader);
|
||||
bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader);
|
||||
|
||||
void EVENT_USB_Device_Connect(void);
|
||||
void EVENT_USB_Device_Disconnect(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue