APM:Libraries
|
Go to the source code of this file.
Functions | |
void | emerg_delay (uint32_t) |
void | systick_init (uint32_t reload_val) |
Initialize and enable SysTick. More... | |
static void | systick_enable () |
static void | systick_disable () |
static uint64_t | systick_uptime (void) |
Returns the system uptime, in milliseconds. More... | |
static uint32_t | systick_get_count (void) |
Returns the current value of the SysTick counter. More... | |
static uint32_t | systick_check_underflow (void) |
Check for underflow. More... | |
void | systick_attach_callback (Handler callback) |
Attach a callback to be called from the SysTick exception handler. More... | |
void | systick_detach_callback (Handler callback) |
uint32_t | systick_micros (void) |
void | SysTick_Handler (void) |
void | __attribute__ ((noreturn)) __error(uint32_t pc |
Variables | |
volatile uint64_t | systick_uptime_millis |
voidFuncPtr | boardEmergencyHandler |
void uint32_t | num |
void uint32_t uint32_t | lr |
void uint32_t uint32_t uint32_t | flag |
void __attribute__ | ( | (noreturn) | ) |
void emerg_delay | ( | uint32_t | ) |
Definition at line 257 of file boards.cpp.
Referenced by __attribute__().
void systick_attach_callback | ( | Handler | callback | ) |
Attach a callback to be called from the SysTick exception handler.
To detach a callback, call this function again with a null argument.
Definition at line 28 of file systick.c.
Referenced by systick_check_underflow().
|
inlinestatic |
Check for underflow.
This function returns 1 if the SysTick timer has counted to 0 since the last time it was called. However, any reads of any part of the SysTick Control and Status Register SYSTICK_BASE->CSR will interfere with this functionality. See the ARM Cortex M3 Technical Reference Manual for more details (e.g. Table 8-3 in revision r1p1).
Definition at line 59 of file systick.h.
void systick_detach_callback | ( | Handler | callback | ) |
Definition at line 34 of file systick.c.
Referenced by systick_check_underflow().
|
inlinestatic |
|
inlinestatic |
Clock the system timer with the core clock and turn it on; interrupt every 1 ms, for systick_timer_millis.
Definition at line 33 of file systick.h.
Referenced by systick_init().
|
inlinestatic |
void SysTick_Handler | ( | void | ) |
Definition at line 63 of file systick.c.
Referenced by systick_check_underflow().
void systick_init | ( | uint32_t | reload_val | ) |
Initialize and enable SysTick.
Clocks the system timer with the core clock, turns it on, and enables interrupts.
reload_val | Appropriate reload counter to tick every 1 ms. |
Definition at line 50 of file systick.c.
Referenced by init().
uint32_t systick_micros | ( | void | ) |
|
inlinestatic |
Returns the system uptime, in milliseconds.
Definition at line 44 of file systick.h.
Referenced by F4Light::Scheduler::_millis(), F4Light::Scheduler::_millis64(), F4Light::PPM_parser::_process_dsm_pulse(), F4Light::PPM_parser::_process_ppmsum_pulse(), F4Light::PPM_parser::_process_sbus_pulse(), Soft_I2C::bus_reset(), i2c_bus_reset(), F4Light::DSM_parser::init(), millis(), pwmIRQHandler(), and F4Light::RCInput::read().
voidFuncPtr boardEmergencyHandler |
void uint32_t uint32_t uint32_t flag |
Definition at line 80 of file systick.h.
Referenced by __cxa_pure_virtual(), Linux::UARTDriver::_parseDevicePath(), dma_attach_interrupt(), posix_fopen_modes_to_open(), AP_HAL::Device::set_read_flag(), SystemCoreClockUpdate(), and systemInit().
void uint32_t uint32_t lr |
Definition at line 80 of file systick.h.
Referenced by __cxa_pure_virtual(), SystemCoreClockUpdate(), and systemInit().
void uint32_t num |
Definition at line 80 of file systick.h.
Referenced by __attribute__(), __cxa_pure_virtual(), Vector2< int32_t >::circle_segment_intersection(), Vector3< int32_t >::distance_to_segment(), exti_attach_interrupt(), exti_attach_interrupt_pri(), exti_detach_interrupt(), exti_enable_interrupt(), exti_serv(), Linux::ToneAlarm::init_tune(), DataFlash_Class::multiplier(), Vector2< int32_t >::operator()(), Vector3< int32_t >::operator()(), Vector2< int32_t >::operator*(), Vector3< int32_t >::operator*(), VectorN< float, N >::operator*(), Matrix3< float >::operator*(), Vector2< int32_t >::operator*=(), Vector3< int32_t >::operator*=(), Matrix3< float >::operator*=(), VectorN< float, N >::operator*=(), Vector2< int32_t >::operator/(), Vector3< int32_t >::operator/(), VectorN< float, N >::operator/(), Matrix3< float >::operator/(), Vector2< int32_t >::operator/=(), Vector3< int32_t >::operator/=(), Matrix3< float >::operator/=(), VectorN< float, N >::operator/=(), F4Light::AnalogIn::power_status_flags(), Linux::ToneAlarm::set_note(), DataFlash_Class::structure(), SystemCoreClockUpdate(), systemInit(), DataFlash_Class::unit(), and USB_OTG_FlushTxFifo().
volatile uint64_t systick_uptime_millis |
System elapsed time, in milliseconds
Referenced by SysTick_Handler(), systick_init(), and systick_uptime().