I want to send a string over UART but the function that sends data over UART accepts uint8_t as an argument.
The function prototype: UART2_Write(uint8_t txData);
I wish to send an 8-character long string such as "12345678" and I have tried the following ways:
#define UID ("12345678")
UART2_Write(UID);
char UID[8] = "12345678";
UART2_Write(UID);
const char *UID = "12345678";
UART2_Write(UID);
Unfortunately, none of the above-mentioned methods yielded a successful result.
If there is a way to send a string in this situation, kindly let me know.
Thanks
UART2_Writemultiple times, once for each character.