Library Functions.
More...
Library Functions.
| uint8_t TM_USB_VCP_BufferEmpty |
( |
void |
| ) |
|
Checks if receive buffer is empty.
- Parameters
-
- Return values
-
| Buffer | status:
- 0: Buffer is not empty
- > 0: Buffer is empty
|
| uint8_t TM_USB_VCP_BufferFull |
( |
void |
| ) |
|
Checks if receive buffer is fukk.
- Parameters
-
- Return values
-
| Buffer | status:
- 0: Buffer is not full
- > 0: Buffer is full
|
| uint8_t TM_USB_VCP_FindCharacter |
( |
volatile char |
c | ) |
|
Checks if character is in buffer.
- Parameters
-
| c | Character to be checked if available in buffer |
- Return values
-
| Character | status:
- 0: Character is not in buffer
- > 0: Character is in buffer
|
Gets received character from internal buffer.
- Parameters
-
| *c | pointer to store new character to |
- Return values
-
| Character | status:
- TM_USB_VCP_DATA_OK: Character is valid inside *c_str
- TM_USB_VCP_DATA_EMPTY: No character in *c
|
| uint16_t TM_USB_VCP_Gets |
( |
char * |
buffer, |
|
|
uint16_t |
bufsize |
|
) |
| |
Gets string from VCP port.
- Note
- To use this method, you have to send
(0x0D) at the end of your string, otherwise data can be lost and you will fall in infinite loop.
- Parameters
-
| *buffer | Pointer to buffer variable where to save string |
| bufsize | Maximum buffer size |
- Return values
-
| Number | of characters in buffer:
- 0: String not valid
- > 0: String valid, number of characters inside string
|
Reads settings from user.
- Note
- These settings are set in terminal on PC
- Parameters
-
- Return values
-
Gets VCP status.
- Parameters
-
- Return values
-
| Device | status:
- TM_USB_VCP_CONNECTED: Connected to computer
- other: Not connected and not ready to communicate
|
Initializes USB VCP.
- Parameters
-
- Return values
-
Puts character to USB VCP.
- Parameters
-
| c | character to send over USB |
- Return values
-
Puts string to USB VCP.
- Parameters
-
| *str | Pointer to string variable |
- Return values
-
Sends array of data to USB VCP.
- Parameters
-
| *DataArray | Pointer to 8-bit data array to be sent over USB |
| Length | Number of elements to sent in units of bytes |
- Return values
-