mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-11 07:19:34 -05:00
Add API to stop HAL SysTick counter.
This commit is contained in:
parent
bd791a8512
commit
5978c99c31
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user