Question
Transmit Single Byte Using UART
Posted on September 02, 2016 at 20:13
I am working on STM32F0. I am suing Uart HAL API to send a command to transmit data over UART which is
char *TxBuffer=''ABCD\n\r''; int len = strlen(TxBuffer); HAL_UART_Transmit_IT(&huart,(uint8_t*)TxBuffer,len);However I am unable to send single byte using above Command. If I want to send 'A' , It shows the warning that ''incompatible integer to pointer conversion passing int to parameter type 'uint8_t *'.How can I pass unsigned char values over UART or integer values? I am able to pass string over uart. #stm32 #learn-c #learn-c #cubemx #!stm32 #uart #hal