cancel
Showing results for 
Search instead for 
Did you mean: 

invalid conversion from 'uint8_t*' {aka 'unsigned char*'} to 'const char*' [-fpermissive]

DDurk.1
Associate II

I have tried everything to clear this error. Does anyone know what I am doing wrong and how to fix it? The error if pointing to the HAL_UART_Transmit_DMA call.

uint8_t SPI_data[SPI_Buffer_Size] = {};

HAL_UART_Transmit_DMA(RS485_1, SPI_data, strlen(SPI_data));

Thank you all!

2 REPLIES 2
LCE
Principal

I guess it's the string length which needs "char", so try:

HAL_UART_Transmit_DMA(RS485_1, SPI_data, strlen((char *)SPI_data));

DDurk.1
Associate II

Thank you thank you thank you!

That was it.