AnsweredAssumed Answered

Transmitting variable to UART ?

Question asked by H.Rick on Feb 12, 2016
Latest reply on Feb 12, 2016 by AvaTar
Guys,
I want to transmit "res" into UART buffer :

FRESULT f_open (
    FIL* fp,            /* Pointer to the blank file object */
    const TCHAR* path,    /* Pointer to the file name */
    BYTE mode            /* Access mode and file open mode flags */
)
{
    FRESULT res;



I want to print "res" to UART buffer
void Transmit_String_ff(unsigned char *s)
{
  HAL_UART_Transmit(&huart1, s, strlen(s), 1000); // As a pointer, with a length
}


I can't do

Transmit_String_ff(res)

I got this error,
error:  #167: argument of type "FRESULT" is incompatible with parameter of type "unsigned char *"

How can I fix it ? thanks

Outcomes