Skip to content

Commit

Permalink
rpi: add uart device_path
Browse files Browse the repository at this point in the history
Currently there is no device_path registered for UART in Raspberry Pi
source. This will hinder the working of UART driver in mraa.

So, register the device_path with '/dev/serial0' as most of the
raspbian images make this as a soft link to _real_ UART port by
default.

Tested-on: Raspberry pi 3 model B

Signed-off-by: Manivannan Sadhasivam <[email protected]>
  • Loading branch information
Mani-Sadhasivam committed Nov 14, 2017
1 parent 02963b7 commit 96a4ca7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/arm/raspberry_pi.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@ mraa_raspberry_pi()
b->def_uart_dev = 0;
b->uart_dev[0].rx = 10;
b->uart_dev[0].tx = 8;
b->uart_dev[0].device_path = "/dev/serial0";

if ((platform_detected == PLATFORM_RASPBERRY_PI_A_PLUS_REV_1) ||
(platform_detected == PLATFORM_RASPBERRY_PI_B_PLUS_REV_1) ||
Expand Down

0 comments on commit 96a4ca7

Please sign in to comment.