librpipUartWrite
uint32_t librpipUartWrite(uint32_t id, void* buf, uint16_t len);
Description
Writes a buffer to the UART.
Parameters
- uint32_t id
The UART to write to. TheUART needs to have been detected during the librpipInit(). - void* buf
A pointer to data which will be written to the UART. Data needs to be 8 bit, e.g. char, unsigned char, uint8_t, int8_t. - uint16_t len
The length of the buffer to write.
Returns
0 on failure or 1 on success.
Example
Write ‘Hello’ out of UART0:
uint32_t feature_set; feature_set = librpipInit(LIBRPIP_BOARD_DETECT, LIBRPIP_FLAG_DEBUG_ON, 0); if(feature_set & LIBRPIP_FEATURE_UART0) { char buf[6]; strcpy(buf,"Hello"); librpipUartWrite(0, buf, sizeof(buf)); } librpipClose();