summaryrefslogtreecommitdiff
path: root/src/stm
diff options
context:
space:
mode:
Diffstat (limited to 'src/stm')
-rw-r--r--src/stm/Makefile.defs2
-rw-r--r--src/stm/ao_adc_stm.c5
-rw-r--r--src/stm/ao_exti.h1
-rw-r--r--src/stm/ao_serial_stm.c8
4 files changed, 10 insertions, 6 deletions
diff --git a/src/stm/Makefile.defs b/src/stm/Makefile.defs
index 66ed4be8..4d0d27c7 100644
--- a/src/stm/Makefile.defs
+++ b/src/stm/Makefile.defs
@@ -1,4 +1,4 @@
-vpath % ../stm:../product:../drivers:../kernel:../util:../kalman:../aes:../math:../draw:../lisp:..
+vpath % ../stm:../product:../drivers:../kernel:../util:../kalman:../aes:../math:../draw:../scheme:..
vpath make-altitude ../util
vpath make-kalman ../util
vpath kalman.5c ../kalman
diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c
index 77f121dc..24912bb2 100644
--- a/src/stm/ao_adc_stm.c
+++ b/src/stm/ao_adc_stm.c
@@ -58,6 +58,9 @@ static void ao_adc_done(int index)
#if HAS_MPU6000
ao_data_ring[ao_data_head].mpu6000 = ao_mpu6000_current;
#endif
+#if HAS_MPU9250
+ ao_data_ring[ao_data_head].mpu9250 = ao_mpu9250_current;
+#endif
ao_data_ring[ao_data_head].tick = ao_tick_count;
ao_data_head = ao_data_ring_next(ao_data_head);
ao_wakeup((void *) &ao_data_head);
@@ -377,7 +380,7 @@ ao_adc_init(void)
#if AO_NUM_ADC > 18
#error "need to finish stm_adc.sqr settings"
#endif
-
+
/* Turn ADC on */
stm_adc.cr2 = AO_ADC_CR2_VAL;
diff --git a/src/stm/ao_exti.h b/src/stm/ao_exti.h
index 4f3e6132..8aa2bdca 100644
--- a/src/stm/ao_exti.h
+++ b/src/stm/ao_exti.h
@@ -21,6 +21,7 @@
#define AO_EXTI_MODE_RISING 1
#define AO_EXTI_MODE_FALLING 2
+#define AO_EXTI_MODE_PULL_NONE 0
#define AO_EXTI_MODE_PULL_UP 4
#define AO_EXTI_MODE_PULL_DOWN 8
#define AO_EXTI_PRIORITY_LOW 16
diff --git a/src/stm/ao_serial_stm.c b/src/stm/ao_serial_stm.c
index ef562313..2afee5b5 100644
--- a/src/stm/ao_serial_stm.c
+++ b/src/stm/ao_serial_stm.c
@@ -60,13 +60,13 @@ _ao_usart_cts(struct ao_stm_usart *usart)
#endif
static void
-_ao_usart_rx(struct ao_stm_usart *usart, int stdin)
+_ao_usart_rx(struct ao_stm_usart *usart, int is_stdin)
{
if (usart->reg->sr & (1 << STM_USART_SR_RXNE)) {
if (!ao_fifo_full(usart->rx_fifo)) {
ao_fifo_insert(usart->rx_fifo, usart->reg->dr);
ao_wakeup(&usart->rx_fifo);
- if (stdin)
+ if (is_stdin)
ao_wakeup(&ao_stdin_ready);
#if HAS_SERIAL_SW_FLOW
/* If the fifo is nearly full, turn off RTS and wait
@@ -84,9 +84,9 @@ _ao_usart_rx(struct ao_stm_usart *usart, int stdin)
}
static void
-ao_usart_isr(struct ao_stm_usart *usart, int stdin)
+ao_usart_isr(struct ao_stm_usart *usart, int is_stdin)
{
- _ao_usart_rx(usart, stdin);
+ _ao_usart_rx(usart, is_stdin);
if (!_ao_usart_tx_start(usart))
usart->reg->cr1 &= ~(1<< STM_USART_CR1_TXEIE);