You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[REFACTOR] Extract peripheral initialisations to relevant drivers
Summary
Currently, many of the STM32 peripherals initialisation code (e.g. GPIO bringup, peripheral config) are isolated in monolithic functions that bring-up all used ports in one go. This refactor aims to extract individual initialisations to the relevant drivers of the devices that require it.
contains startup for all peripheral RCC, SPI for flash and LoRa, UART for GPS, and GPIO for buzzers and outputs
RCC, GPIO and relevant peripheral initialisation should be extracted to related device drivers
Motivation
This refactor not only benefits the overall readability and ease of maintenance of the system, but it also allows for greater portability as each device driver can have its initialisation parameters passed to it for startup.
This means that the parameters may be supplied as pre-processor definitions to allow for configurations to be easily adjusted (i.e. in the case of changes to hardware port connections).
[REFACTOR] Extract peripheral initialisations to relevant drivers
Summary
Currently, many of the STM32 peripherals initialisation code (e.g. GPIO bringup, peripheral config) are isolated in monolithic functions that bring-up all used ports in one go. This refactor aims to extract individual initialisations to the relevant drivers of the devices that require it.
Detailed Description
Current problem areas for initialisation are:
RCC
,SPI
for flash and LoRa,UART
for GPS, andGPIO
for buzzers and outputsRCC
,GPIO
and relevant peripheral initialisation should be extracted to related device driversMotivation
This refactor not only benefits the overall readability and ease of maintenance of the system, but it also allows for greater portability as each device driver can have its initialisation parameters passed to it for startup.
This means that the parameters may be supplied as pre-processor definitions to allow for configurations to be easily adjusted (i.e. in the case of changes to hardware port connections).
Dependencies
Other Considerations
N/A
The text was updated successfully, but these errors were encountered: