CLEON
Version 1
Cloud-Offloaded GPS Receiver
|
USB related functions. More...
Go to the source code of this file.
Data Structures | |
struct | usb_frame_s |
union | usb_frame_u |
Macros | |
#define | USB_FRAME_HEADER 0x55 |
#define | USB_FRAME_FOOTER 0xAA |
#define | USB_FRAME_DATA_FIELD_LENGTH 29 |
#define | USB_FRAME_COMMAND_AND_DATA_FIELD_LENGTH 30 |
#define | USB_FRAME_LENGTH 36 |
#define | USB_FRAME_COMMAND_CONNECT 0x01 |
#define | USB_FRAME_COMMAND_UPDATE_RTC_TIME 0x02 |
#define | USB_FRAME_COMMAND_UPDATE_TIME_TICK 0x03 |
#define | USB_FRAME_COMMAND_UPDATE_SAMPLE_COUNT 0x04 |
#define | USB_FRAME_COMMAND_UPDATE_SAMPLE_GAP 0x05 |
#define | USB_FRAME_COMMAND_UPDATE_CHUNK_COUNT 0x06 |
#define | USB_FRAME_COMMAND_UPDATE_CHUNK_GAP 0x07 |
#define | USB_FRAME_COMMAND_ACK 0xFF |
#define | SYS_USB_IsUSBConnected() ((USB_STATUS_PORT(IN) & BV(USB_STATUS_PIN)) >> USB_STATUS_PIN) |
Functions | |
void | SYS_USB_Init (void) |
Initializing USB. | |
void | SYS_USB_SendACK (unsigned char ucCommand) |
Sending USB frame ACK. | |
int | SYS_USB_Printf (char *format,...) |
Mimic the standard 'printf' with USB as output device. | |
void | SYS_USB_ReceiveFrame (unsigned char ucData) |
Receiving a bayte and test whether correct frame has been received. | |
unsigned char | SYS_USB_BuildCRC (usb_frame_u *uniUSBFrame) |
Building CRC out of USB frame. | |
void | SYS_USB_TransmitSingleByte (unsigned char ucData) |
Transmit a byte vis USB. | |
USB related functions.
Definition in file sys_usb.h.
#define SYS_USB_IsUSBConnected | ( | ) | ((USB_STATUS_PORT(IN) & BV(USB_STATUS_PIN)) >> USB_STATUS_PIN) |
unsigned char SYS_USB_BuildCRC | ( | usb_frame_u * | uniUSBFrame | ) |
Building CRC out of USB frame.
void |
Definition at line 215 of file sys_usb.c.
void SYS_USB_Init | ( | void | ) |
int SYS_USB_Printf | ( | char * | format, |
... | |||
) |
Mimic the standard 'printf' with USB as output device.
- Sending a byte (stream) to USB
data | - a byte to be sent to USB |
Definition at line 91 of file sys_usb.c.
void SYS_USB_ReceiveFrame | ( | unsigned char | ucData | ) |
Receiving a bayte and test whether correct frame has been received.
ucData | - recived single byte from USB |
Definition at line 138 of file sys_usb.c.
void SYS_USB_SendACK | ( | unsigned char | ucCommand | ) |
void SYS_USB_TransmitSingleByte | ( | unsigned char | ucData | ) |