In testhal, the various HAL peripheral configuration structures are continuously redefined in the portab.c/h files. The configuration structures should be defined in the actual application code (main.c in all the testhal applications I've seen ...), and the non-portable board specific parts of the struct should be defined as a macro in portab.h (as is the intended function of portab.c/.h). Thus, main.c would contain the platform agnostic portions of the configuration struct, and portab.h would contain non-portable parts.
This would demonstrate the true portable nature of the HAL, and show a clean separation between the upper layer and the lower layer.
From a maintainer's standpoint (that's you Giovanni ), it is less burden on ensuring all the peripheral configurations are the same between the various boards a particular multi testhal application supports.
See this post for an example:
Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests