107 #ifdef __USBD_CDC_IF_H__
108 CDC_Transmit_FS(TX_Buffer, Size);
118 for(uint32_t _b = 0 ; _b < *Len ; _b++)
void AppendToBuffer(uint8_t byte)
Appends a byte to the RX ring buffer.
HIERODULE_USB_Wrapper Wrapper
Actual declaration for the Wrapper in the source file.
uint8_t HIERODULE_USB_GetNextByte(void)
Fetches the next byte in the RX ring buffer.
void HIERODULE_USB_InitWrapper(uint16_t RX_BufferSize, void(*TC_Handler)(void))
Initializes the wrapper for the USB peripheral.
void HIERODULE_USB_TransmitPackage(uint8_t *TX_Buffer, uint32_t Size)
Sets up the data to be transmitted.
void HIERODULE_USB_Receive_Callback(uint8_t *Buf, uint32_t *Len)
Callback function that updates the ring buffer and invokes TC_Handler if it's not NULL.
void HIERODULE_USB_ReleaseWrapper(void)
De-initializes the wrapper for the USB peripheral.
: Header file for the USB module.
Struct that keeps variables for the ring buffer and a pointer to the transmission end callback routin...
uint8_t * RX_Buffer
The ring buffer where the data received is appended.
uint32_t RX_New
Number of new bytes in the ring buffer.
uint16_t RX_BufferSize
Number of elements in the ring buffer.
void(* TC_Handler)(void)
Pointer to the callback function to be called on a completed transmission.
uint32_t RX_Index
Index of next-byte-to-be-received in the ring buffer.