diff --git a/src/main/application/buzzer.h b/src/main/application/buzzer.h index 41b3a86..48353ef 100644 --- a/src/main/application/buzzer.h +++ b/src/main/application/buzzer.h @@ -67,6 +67,9 @@ bool buzzer_get_on( void ); /** * @fn buzzer_init( void ) * @brief Initializes the buzzer driver module. + * @note Requires that the following modules have been initialized: + * - `config` + * - `blah` */ void buzzer_init( void ); diff --git a/src/main/application/config.h b/src/main/application/config.h index 26c8ca0..3d40c44 100644 --- a/src/main/application/config.h +++ b/src/main/application/config.h @@ -96,6 +96,9 @@ void config_get( config_t * config ); /** * @fn config_init( void ) * @brief Initializes the system's configuration. + * @note Requires that the following modules have been initialized: + * - `storage` + * - `sys` */ void config_init( void ); diff --git a/src/main/application/debug_port.h b/src/main/application/debug_port.h index 169ab10..2376add 100644 --- a/src/main/application/debug_port.h +++ b/src/main/application/debug_port.h @@ -30,6 +30,7 @@ /** * @fn debug_port_init( void ) * @brief Initializes the debug port. + * @note The debug port should be initialized after all other modules. */ void debug_port_init( void ); diff --git a/src/main/application/io.h b/src/main/application/io.h index de8a69e..aa3cba8 100644 --- a/src/main/application/io.h +++ b/src/main/application/io.h @@ -126,6 +126,9 @@ io_type_t io_get_type( io_pin_t pin ); /** * @fn io_init( void ) * @brief Initializes the keyer input / output module. + * @note Requires that the following modules have been initialized: + * - `config` + * - `sys` */ void io_init( void ); diff --git a/src/main/application/keyer.c b/src/main/application/keyer.c index 6003a48..b1ee040 100644 --- a/src/main/application/keyer.c +++ b/src/main/application/keyer.c @@ -20,7 +20,6 @@ #include "application/led.h" #include "application/wpm.h" #include "core/sys.h" -#include "drivers/gpio.h" #include "utility/debug.h" #include "utility/types.h" #include "utility/utility.h" diff --git a/src/main/application/keyer.h b/src/main/application/keyer.h index c0809ee..6167975 100644 --- a/src/main/application/keyer.h +++ b/src/main/application/keyer.h @@ -89,6 +89,12 @@ keyer_paddle_mode_t keyer_get_paddle_mode( void ); /** * @fn keyer_init( void ) * @brief Initializes the keyer module. + * @note Requires that the following modules have been initialized: + * - `buzzer` + * - `config` + * - `io` + * - `led` + * - `sys` */ void keyer_init( void ); diff --git a/src/main/application/led.h b/src/main/application/led.h index 72f45b1..05f8ac0 100644 --- a/src/main/application/led.h +++ b/src/main/application/led.h @@ -49,6 +49,7 @@ bool led_get_on( led_t led ); /** * @fn led_init( void ) * @brief Initializes the LED driver module. + * @note Requires that the `config` module has been initialized. */ void led_init( void ); diff --git a/src/main/application/storage.h b/src/main/application/storage.h index 0b7269f..22aa624 100644 --- a/src/main/application/storage.h +++ b/src/main/application/storage.h @@ -31,6 +31,7 @@ bool storage_get_config( config_version_t version, size_t size, void * config ); /** * @fn storage_init( void ) * @brief Initializes the storage module. + * @note Does not currently depend on any other modules being initialized. */ void storage_init( void ); diff --git a/src/main/core/main.c b/src/main/core/main.c index 7031c1e..594bdda 100644 --- a/src/main/core/main.c +++ b/src/main/core/main.c @@ -207,8 +207,8 @@ static void init( void ) led_init(); io_init(); buzzer_init(); - debug_port_init(); keyer_init(); + debug_port_init(); // Flash LEDs to indicate successful startup startup_display(); diff --git a/src/main/core/sys.h b/src/main/core/sys.h index 15225a7..191a84a 100644 --- a/src/main/core/sys.h +++ b/src/main/core/sys.h @@ -120,6 +120,7 @@ tick_t sys_get_tick( void ); /** * @fn sys_init( void ) * @brief Initializes the system module. + * @note `sys` should always be the first module initialized. */ void sys_init( void );