mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-13 22:17:46 +00:00
Add API to stop HAL SysTick counter.
This commit is contained in:
@@ -89,6 +89,10 @@ void systick_adjust_period(const uint32_t counts_per_tick) {
|
||||
ritimer_start();
|
||||
}
|
||||
|
||||
void systick_stop() {
|
||||
ritimer_stop();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Low level HAL driver initialization.
|
||||
*
|
||||
|
@@ -145,6 +145,7 @@ typedef uint32_t halrtcnt_t;
|
||||
extern "C" {
|
||||
#endif
|
||||
void hal_lld_init(void);
|
||||
void systick_stop(void);
|
||||
void systick_adjust_period(const uint32_t counts_per_tick);
|
||||
halclock_t halLPCGetSystemClock(void);
|
||||
void halLPCSetSystemClock(const halclock_t new_frequency);
|
||||
|
@@ -63,6 +63,10 @@ void halLPCSetSystemClock(const halclock_t new_frequency) {
|
||||
hal_clock_f = new_frequency;
|
||||
}
|
||||
|
||||
void systick_stop() {
|
||||
SysTick->CTRL &= ~(SysTick_CTRL_ENABLE_Msk | SysTick_CTRL_TICKINT_Msk);
|
||||
}
|
||||
|
||||
void systick_adjust_period(const uint32_t counts_per_tick) {
|
||||
SysTick->LOAD = counts_per_tick;
|
||||
}
|
||||
|
@@ -164,6 +164,7 @@ typedef uint32_t halrtcnt_t;
|
||||
extern "C" {
|
||||
#endif
|
||||
void hal_lld_init(void);
|
||||
void systick_stop(void);
|
||||
void systick_adjust_period(const uint32_t counts_per_tick);
|
||||
halclock_t halLPCGetSystemClock(void);
|
||||
void halLPCSetSystemClock(const halclock_t new_frequency);
|
||||
|
Reference in New Issue
Block a user