Timer unit test declarations for NAVHAL. More...
#include "unity.h"#include <stdint.h>

Go to the source code of this file.
Functions | |
| void | test_timer_init_sets_prescaler_and_arr (void) |
| Test timer initialization. | |
| void | test_timer_start_sets_CEN_bit (void) |
| Test timer start functionality. | |
| void | test_timer_stop_clears_CEN_bit (void) |
| Test timer stop functionality. | |
| void | test_timer_reset_clears_count (void) |
| Test timer counter reset. | |
| void | test_timer_set_compare_and_get_compare (void) |
| Test compare register operations. | |
| void | test_timer_enable_and_disable_channel (void) |
| Test channel enable/disable. | |
| void | test_timer_enable_and_disable_interrupt (void) |
| Test interrupt control. | |
| void | test_timer_clear_interrupt_flag_clears_UIF (void) |
| Test interrupt flag clearing. | |
| void | test_timer_get_arr_returns_arr_value (void) |
| Test auto-reload register access. | |
| void | test_timer_get_count_returns_count_value (void) |
| Test counter value access. | |
Timer unit test declarations for NAVHAL.
This header defines the test cases for verifying Timer peripheral functionality in the NAVHAL hardware abstraction layer. It includes tests for:
| void test_timer_clear_interrupt_flag_clears_UIF | ( | void | ) |
Test interrupt flag clearing.
Verifies timer_clear_interrupt_flag() clears the update interrupt flag
Verifies that timer_clear_interrupt_flag() clears the Update Interrupt Flag (UIF) in the SR register
| void test_timer_enable_and_disable_channel | ( | void | ) |
Test channel enable/disable.
Verifies timer_enable_channel() and timer_disable_channel() functions
Verifies:
| void test_timer_enable_and_disable_interrupt | ( | void | ) |
Test interrupt control.
Verifies timer interrupt enable/disable functionality
Test interrupt control.
Verifies that timer_enable_interrupt() sets the Update Interrupt Enable (UIE) bit in the DIER register
| void test_timer_get_arr_returns_arr_value | ( | void | ) |
Test auto-reload register access.
Verifies timer_get_arr() returns the correct auto-reload value
Verifies that timer_get_arr() correctly returns the value from the ARR register
| void test_timer_get_count_returns_count_value | ( | void | ) |
Test counter value access.
Verifies timer_get_count() returns the current counter value
Verifies that timer_get_count() correctly returns the current counter value from the CNT register
| void test_timer_init_sets_prescaler_and_arr | ( | void | ) |
Test timer initialization.
Verifies timer_init() correctly sets prescaler and auto-reload values
Verifies that timer_init() correctly sets:
| void test_timer_reset_clears_count | ( | void | ) |
Test timer counter reset.
Verifies timer_reset() clears the counter value to zero
Verifies that timer_reset() clears the counter value to zero by checking the CNT register
| void test_timer_set_compare_and_get_compare | ( | void | ) |
Test compare register operations.
Verifies timer_set_compare() and timer_get_compare() functionality
Verifies:
| void test_timer_start_sets_CEN_bit | ( | void | ) |
Test timer start functionality.
Verifies timer_start() properly sets the counter enable (CEN) bit
Verifies that timer_start() sets the Counter ENable (CEN) bit in the CR1 register
| void test_timer_stop_clears_CEN_bit | ( | void | ) |
Test timer stop functionality.
Verifies timer_stop() properly clears the counter enable (CEN) bit
Verifies that timer_stop() clears the Counter ENable (CEN) bit in the CR1 register