[INFO] HAL files renaming

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
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:

[INFO] HAL files renaming

Postby Giovanni » Wed Mar 23, 2016 4:21 pm

Hi,

One important problem with HAL is that it uses very generic file names like adc.c, can.h etc. This can create problems when integrating 3rd parties libraries that may use the same names.

Because of this, in HAL 5.0 all file names will be prefixed by "hal_", high level files have already been renamed because there is no impact on ports but also low level files will have to be renamed at some point.

All maintainers please prepare for the transition, I will start with STM32 of course.

Giovanni

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: [INFO] HAL files renaming

Postby barthess » Thu Mar 24, 2016 9:00 am

Good news. It was always bother me when I want to create wrapper on ADC (launch, convertion, etc.) and can not name it just "adc".

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: [INFO] HAL files renaming

Postby Giovanni » Thu Mar 24, 2016 9:23 am

Yes, same here. I want to address all those small annoying things before next release. If there are more please propose changes.

Giovanni

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: [INFO] HAL files renaming

Postby barthess » Mon Mar 28, 2016 9:11 am

Yet another bothering moment is lots of copypaste code in testhal applications.
Did you think about moving of common high level code to separate application
and call it from testhals after platform dependant peripheral init?

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: [INFO] HAL files renaming

Postby Giovanni » Mon Mar 28, 2016 10:26 am

It could be an idea, at least for some of them.

Giovanni

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: [INFO] HAL files renaming

Postby Giovanni » Sat Apr 02, 2016 7:58 pm

Hi,

I renamed files for STM32, LPC214x, AVR and simulator HAL ports. Code in the community repository or other repositories should be updated in a similar way, basically:

1) Prefix LLD file names with hal_, for example from adc_lld.h to hal_lld_adc.h.
2) Change the header guards from _XXXXXX_H_ to XXXXXX_H because some checkers are complaining about _ prefix being reserved. This is optional, up to you.

Giovanni


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 17 guests