Public initialization functions for shared dependencies.
More...
Public initialization functions for shared dependencies.
◆ init_log()
Initializes the logging subsystem.
Configures the log module with a fixed hardware target: USART1 at 115200 baud on GPIOA pin 9 (alternate function AF7).
- Returns
- ERR_OK on success
- Propagated error from log_init on failure
- See also
- init_log
Definition at line 25 of file init.c.
25 {
27
35
36 return err;
37}
ERR_te
Standard return type used by all public API functions.
ERR_te log_init(LOG_HANDLE_ts *log_handle)
Initializes the log subsystem.
@ GPIO_ALTERNATE_FUNCTION_AF7
Configuration handle for initializing the log subsystem.
GPIO_REGDEF_ts * gpio_port
GPIO_ALTERNATE_FUNCTION_te gpio_alternate_function
USART_BAUD_RATE_te usart_baud_rate
USART_REGDEF_ts * usart_instance
◆ init_systick()
Initializes the SysTick timer.
Configures SysTick to use the processor clock source with interrupt generation enabled, providing the system millisecond tick used by systick_get_ms.
- Returns
- ERR_OK on success
- Propagated error from systick_init on failure
- See also
- init_systick
Definition at line 40 of file init.c.
40 {
42
47
48 return err;
49}
ERR_te systick_init(SYSTICK_CFG_ts const *systick_cfg)
Initializes and starts the SysTick timer.
@ SYSTICK_CLK_SOURCE_PROCESSOR
Configuration structure for initializing the SysTick timer.
SYSTICK_CLK_SOURCE_te clk_source
◆ init_neo6()
Initializes the NEO-6 GPS module.
Initializes the NEO-6 subsystem and registers a handle configured for USART6 at 9600 baud, with RX on GPIOA pin 12 and TX on GPIOA pin 11 (alternate function AF8). Starts the subsystem after handle initialization.
- Returns
- ERR_OK on success
- Propagated error from the last failing NEO-6 call on failure
- Note
- Errors from intermediate steps (subsys init, handle init) are overwritten by subsequent calls. Only the last error is returned.
- See also
- init_neo6
Definition at line 52 of file init.c.
52 {
55
67
68 return err;
69}
ERR_te neo6_start_subsys(void)
Starts the NEO-6 subsystem.
ERR_te neo6_init_handle(NEO6_CFG_ts *neo6_cfg, NEO6_HANDLE_ts **neo6_handle_o)
Initializes the NEO-6 hardware handle.
ERR_te neo6_init_subsys(void)
Initializes the NEO-6 subsystem.
struct neo6_handle_s NEO6_HANDLE_ts
Opaque handle representing the NEO-6 hardware instance.
@ GPIO_ALTERNATE_FUNCTION_AF8
NEO6_HANDLE_ts * neo6_handle
Configuration structure for initializing a NEO-6 handle.
USART_REGDEF_ts * usart_instance
GPIO_REGDEF_ts * rx_gpio_port
GPIO_REGDEF_ts * tx_gpio_port
USART_BAUD_RATE_te usart_baud_rate
GPIO_ALTERNATE_FUNCTION_te gpio_alternate_function
◆ init_rtc()
Initializes the RTC peripheral and sets a default calendar and time.
Initializes the RTC hardware. If the RTC is already initialized (ERR_MODULE_ALREADY_INITIALIZED), the function returns immediately without overwriting the current time, preserving any previously set value.
If initialization succeeds, sets the calendar to Thursday, 29 January 2026 and the time to 00:00:00 as a compile-time default.
- Returns
- ERR_OK on success
- ERR_MODULE_ALREADY_INITIALIZED if the RTC was already initialized
- Propagated error from rtc_init on failure
- See also
- init_rtc
Definition at line 72 of file init.c.
72 {
74
76
78 return err;
79 }
80
82 rtc_calendar.
date = 29;
85 rtc_calendar.
year = 2026;
87
93
95}
@ ERR_MODULE_ALREADY_INITIALIZED
void rtc_set_calendar(CALENDAR_ts const *date)
Sets the RTC calendar (date and weekday).
void rtc_set_time(TIME_ts const *time)
Sets the RTC time (hours, minutes, seconds).
ERR_te rtc_init(void)
Initializes the RTC peripheral.
Holds a calendar date (year, month, day, weekday).
Holds a time-of-day value (hours, minutes, seconds).