projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stm32f4: Use full printf/scanf (including floats)
[fw/altos]
/
src
/
stm
/
ao_adc_stm.c
diff --git
a/src/stm/ao_adc_stm.c
b/src/stm/ao_adc_stm.c
index 77f121dcae435289faa3a71cba15627143d905b0..2399e6a281bf7196f1e75474d89fb84d77b056c6 100644
(file)
--- a/
src/stm/ao_adc_stm.c
+++ b/
src/stm/ao_adc_stm.c
@@
-57,6
+57,9
@@
static void ao_adc_done(int index)
#endif
#if HAS_MPU6000
ao_data_ring[ao_data_head].mpu6000 = ao_mpu6000_current;
#endif
#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);
#endif
ao_data_ring[ao_data_head].tick = ao_tick_count;
ao_data_head = ao_data_ring_next(ao_data_head);
@@
-97,7
+100,7
@@
ao_adc_poll(void)
* Fetch a copy of the most recent ADC data
*/
void
* Fetch a copy of the most recent ADC data
*/
void
-ao_adc_get(
__xdata
struct ao_adc *packet)
+ao_adc_get(struct ao_adc *packet)
{
#if HAS_FLIGHT
uint8_t i = ao_data_ring_prev(ao_sample_data);
{
#if HAS_FLIGHT
uint8_t i = ao_data_ring_prev(ao_sample_data);
@@
-174,7
+177,7
@@
static const char *ao_adc_name[AO_NUM_ADC] = {
#endif
static void
#endif
static void
-ao_adc_dump(void)
__reentrant
+ao_adc_dump(void)
{
struct ao_data packet;
#ifndef AO_ADC_DUMP
{
struct ao_data packet;
#ifndef AO_ADC_DUMP
@@
-200,7
+203,7
@@
ao_adc_dump(void) __reentrant
#endif
}
#endif
}
-
__code
struct ao_cmds ao_adc_cmds[] = {
+
const
struct ao_cmds ao_adc_cmds[] = {
{ ao_adc_dump, "a\0Display current ADC values" },
{ 0, NULL },
};
{ ao_adc_dump, "a\0Display current ADC values" },
{ 0, NULL },
};
@@
-377,7
+380,7
@@
ao_adc_init(void)
#if AO_NUM_ADC > 18
#error "need to finish stm_adc.sqr settings"
#endif
#if AO_NUM_ADC > 18
#error "need to finish stm_adc.sqr settings"
#endif
-
+
/* Turn ADC on */
stm_adc.cr2 = AO_ADC_CR2_VAL;
/* Turn ADC on */
stm_adc.cr2 = AO_ADC_CR2_VAL;