picoAPI
1.0.0
|
Typedefs | |
typedef enum picoUART_e | picoUART_e |
Enumerations | |
enum | picoUART_e { UART1 =1, UART2, UART3 } |
Functions | |
void | debugInit (void) |
uint32_t | debugSend (void *data, size_t len) |
uint32_t | debugRecv (void *data, size_t len) |
void | printString (char *string) |
void | printInteger (int32_t number) |
void | printHex (uint32_t number) |
void | picoUARTInit (picoUART_e u, picoPin_e txpin, picoPin_e rxpin, uint32_t baudrate) |
uint32_t | picoUARTSend (picoUART_e u, void *data, size_t len) |
uint32_t | picoUARTRecv (picoUART_e u, void *data, size_t len) |
UART communication
typedef enum picoUART_e picoUART_e |
Available UARTs
enum picoUART_e |
void debugInit | ( | void | ) |
initialize USART0 using ring buffers
uint32_t debugRecv | ( | void * | data, |
size_t | len | ||
) |
receive data from debug interface (USART0)
data | buffer to store data |
len | buffer size |
uint32_t debugSend | ( | void * | data, |
size_t | len | ||
) |
send data through debug interface (USART0)
data | pointer to data |
len | data length in bytes |
void picoUARTInit | ( | picoUART_e | u, |
picoPin_e | txpin, | ||
picoPin_e | rxpin, | ||
uint32_t | baudrate | ||
) |
uint32_t picoUARTRecv | ( | picoUART_e | u, |
void * | data, | ||
size_t | len | ||
) |
receive data from UART
u | picoUART_e UART number (UART1, UART2 or UART3) |
data | buffer to store data |
len | buffer size |
uint32_t picoUARTSend | ( | picoUART_e | u, |
void * | data, | ||
size_t | len | ||
) |
send data through UART
u | picoUART_e UART number (UART1, UART2 or UART3) |
data | pointer to data |
len | data length in bytes |
void printHex | ( | uint32_t | number | ) |
convert integer to hexadecimal string and send through debug interface
number | integer to convert and send |
void printInteger | ( | int32_t | number | ) |
convert integer to decimal string and send through debug interface
number | integer to convert and send |
void printString | ( | char * | string | ) |
send a string through debug interface
string | null-terminated string to send |