Linux Reading Data from UART

后端 未结 3 425
一个人的身影
一个人的身影 2021-01-21 16:45

I want to read data from UART, i followed this tutorial, the write function works as expected, however i\'am getting problem with the read function :

This is the uart_in

3条回答
  •  無奈伤痛
    2021-01-21 17:18

    There's an error in the read function

    bytes_read = read(fd,&read_buffer,10); /* Read the data 
    

    should be

    bytes_read = read(fd,read_buffer,10); /* Read the data 
    

提交回复
热议问题