Possible bug on Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Possible bug on

Postby tfAteba » Wed Jan 24, 2018 8:32 pm

Hi all,

Giovanni, thanks for the templates files, it is a very useful starting point.
In the template hal_uart_lld.c, at line 85, I think that the comparison must be between pointer of the UART driver and the pointer to the UART registers block. Whereas here it is between pointer to the UART driver and pointer to the UART driver object.

Code: Select all

 82   if (uartp->state == UART_STOP) {
 83     /* Enables the peripheral.*/
 84 #if PLATFORM_UART_USE_UART1 == TRUE
 85     if (&UARTD1 == uartp) {
 86
 87     }
 88 #endif


It should be some thing like:

Code: Select all

 82   if (uartp->state == UART_STOP) {
 83     /* Enables the peripheral.*/
 84 #if PLATFORM_UART_USE_UART1 == TRUE
 85     if (&UARTD1 == uartp->uart) {
 86
 87     }
 88 #endif


If you are ok with that, I can make the change on the trunk.

Thanks.
regards,

Theo.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Possible bug on  Topic is solved

Postby Giovanni » Wed Jan 24, 2018 9:33 pm

Hi,

It is correct, look better. UARTD1 is the type pointed by uartp.

Giovanni

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Re: Possible bug on

Postby tfAteba » Thu Jan 25, 2018 9:20 am

Hi, Giovanni,

Correct you are right. Sorry for that.
regards,

Theo.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 9 guests