X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fmicropeak-v2.0%2Fao_pins.h;h=951083bd19ea2d7aca468088880faae5ef24596c;hb=52eaf4a2480ac0fd367978e423e2f252949f978b;hp=bfccfa10f45b09c9c0543d8907114a72791310b0;hpb=2cd7ecf437bec322e6a201992d0404f31207bd68;p=fw%2Faltos diff --git a/src/micropeak-v2.0/ao_pins.h b/src/micropeak-v2.0/ao_pins.h index bfccfa10..951083bd 100644 --- a/src/micropeak-v2.0/ao_pins.h +++ b/src/micropeak-v2.0/ao_pins.h @@ -52,6 +52,12 @@ extern uint8_t ao_on_battery; #define USE_SERIAL_2_SW_FLOW 0 #define SERIAL_2_PA9_PA10 1 +#define HAS_LPUART_1 1 +#define LPUART_1_PA0_PA1 1 +#define USE_LPUART_1_STDIN 0 +#define USE_LPUART_1_FLOW 0 +#define USE_LPUART_1_SW_FLOW 0 + #define IS_FLASH_LOADER 0 #define HAS_MS5607 1 @@ -115,22 +121,16 @@ ao_power_off(void) { extern alt_t ao_max_height; -#define ao_async_stop() do { \ - ao_serial2_drain(); \ - stm_moder_set(&stm_gpioa, 2, STM_MODER_OUTPUT); \ - ao_serial_shutdown(); \ - } while (0) +#define ao_async_stop() +#define ao_async_start() -#define ao_async_start() do { \ - ao_serial_init(); \ - stm_moder_set(&stm_gpioa, 2, STM_MODER_ALTERNATE); \ - ao_delay(AO_MS_TO_TICKS(100)); \ - } while (0) +#define LOG_MICRO_ASYNC 0 -#define ao_async_byte(b) ao_serial2_putchar((char) (b)) +void ao_async_byte(char c); -#define ao_eeprom_read(pos, ptr, size) ao_storage_read(pos, ptr, size) -#define ao_eeprom_write(pos, ptr, size) ao_storage_write(pos, ptr, size) +#define ao_eeprom_read(pos, ptr, size) ao_storage_device_read(pos, ptr, size) +#define ao_eeprom_write(pos, ptr, size) ao_storage_device_write(pos, ptr, size) +#define N_SAMPLES_TYPE uint32_t #define MAX_LOG_OFFSET ao_storage_total #define ao_storage_log_max ao_storage_total