Inconsistent location of HAL driver object declaration

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Inconsistent location of HAL driver object declaration

Postby faisal » Mon Oct 29, 2018 2:43 am

The HAL driver object is defined in either in the top level hal_xxx.h file, or the hal_xxx_lld.h file depending on the driver. There should be one consistent pattern across all drivers.

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: Inconsistent location of HAL driver object declaration

Postby Giovanni » Mon Oct 29, 2018 5:02 am

It is being moved at top level in new drivers, old drivers will be updated but it is not high priority.

Giovanni

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: Inconsistent location of HAL driver object declaration

Postby faisal » Mon Oct 29, 2018 5:18 am

Giovanni wrote:It is being moved at top level in new drivers, old drivers will be updated but it is not high priority.

Giovanni


Cool, so the new standard is to have the definition in the top level header file, with platform specific structure members included as macros defined in the lld driver?

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: Inconsistent location of HAL driver object declaration

Postby Giovanni » Mon Oct 29, 2018 5:20 am

Correct, I made the change in order to avoid duplicating the structures and related types in all LLDs.

This thing has an impact on other platforms: AVR, e200 etc so I am not pushing it for older drivers.

Giovanni


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 7 guests