TheThingsIndustries / generic-node-se

Generic Node Sensor Edition
https://www.genericnode.com
Other
108 stars 31 forks source link

Generalized system clock call and error handler #207

Closed mcserved closed 2 years ago

mcserved commented 2 years ago

Summary:

This PR makes most (baremetal) applications use a single system clock configuration and error handler. These were previously included with the main.c. Related to #57.

Changes:

Notes for Reviewers:

I excluded the RTOS applications as I think they are more suited with their own unique clock config and error handling method. Same for app_template.

One thing that could also be changed is that the error handler is used for the systemclock config. I wanted to replicate the functionality completely but maybe it is kinda out of place with the other function calls that also don't use the error handler,

mcserved commented 2 years ago

Reminder that the Error Handler would have to be updated when #205 is merged

elsalahy commented 2 years ago

@marnixcro this PR will be merged after #205, as 205 came first

elsalahy commented 2 years ago

@marnixcro Couldn't we just add the the error and CLK_Init functions under GNSE_hal.c instead of creating 4 more file to maintain. Do you see GNSE_clk.c or .h and GNSE_error.c or .h expanding in functionality?

mcserved commented 2 years ago

@marnixcro Couldn't we just add the the error and CLK_Init functions under GNSE_hal.c instead of creating 4 more file to maintain. Do you see GNSE_clk.c or .h and GNSE_error.c or .h expanding in functionality?

Good point, I'll update this