projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Add SPI bus parameter to ao_spi_speed
[fw/altos]
/
src
/
stm32l0
/
ao_timer.c
diff --git
a/src/stm32l0/ao_timer.c
b/src/stm32l0/ao_timer.c
index d2e581469f57c20b89ac593020820bd0681e98a1..6d447fc96cc3324d0598ec71a21eb809153d3be9 100644
(file)
--- a/
src/stm32l0/ao_timer.c
+++ b/
src/stm32l0/ao_timer.c
@@
-62,12
+62,9
@@
void stm_systick_isr(void)
{
if (stm_systick.csr & (1 << STM_SYSTICK_CSR_COUNTFLAG)) {
++ao_tick_count;
{
if (stm_systick.csr & (1 << STM_SYSTICK_CSR_COUNTFLAG)) {
++ao_tick_count;
-#if HAS_TASK_QUEUE
- if (ao_task_alarm_tick && (int16_t) (ao_tick_count - ao_task_alarm_tick) >= 0)
- ao_task_check_alarm((uint16_t) ao_tick_count);
-#endif
+ ao_task_check_alarm();
#if AO_DATA_ALL
#if AO_DATA_ALL
- if (++ao_data_count == ao_data_interval) {
+ if (++ao_data_count == ao_data_interval
&& ao_data_interval
) {
ao_data_count = 0;
#if HAS_ADC
#if HAS_FAKE_FLIGHT
ao_data_count = 0;
#if HAS_ADC
#if HAS_FAKE_FLIGHT
@@
-101,4
+98,10
@@
ao_timer_init(void)
(STM_SYSTICK_CSR_CLKSOURCE_HCLK_8 << STM_SYSTICK_CSR_CLKSOURCE));
}
(STM_SYSTICK_CSR_CLKSOURCE_HCLK_8 << STM_SYSTICK_CSR_CLKSOURCE));
}
+void
+ao_timer_stop(void)
+{
+ stm_systick.csr = 0;
+}
+
#endif
#endif