X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fmicropeak-v2.0%2Fao_pins.h;h=951083bd19ea2d7aca468088880faae5ef24596c;hb=cea0f40fff14b9d2085e0026a68b742a4b114cb9;hp=69e8eb64bd4fc6f135aa1aee901016ba5bd5a0f0;hpb=eea198932b8f12d4729f6138a40489d954d6f93a;p=fw%2Faltos diff --git a/src/micropeak-v2.0/ao_pins.h b/src/micropeak-v2.0/ao_pins.h index 69e8eb64..951083bd 100644 --- a/src/micropeak-v2.0/ao_pins.h +++ b/src/micropeak-v2.0/ao_pins.h @@ -20,7 +20,10 @@ extern uint8_t ao_on_battery; -#define AO_SYSCLK STM_MSI_FREQ +#define HAS_TASK 0 + +#define AO_SYSCLK STM_MSI_FREQ_524288 +#define AO_MSI_RANGE STM_RCC_ICSCR_MSIRANGE_524288 #define LED_0_PORT (&stm_gpioa) #define LED_0_PIN 1 @@ -49,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 @@ -112,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 @@ -137,4 +140,6 @@ extern uint32_t __flash_end__[]; #define AO_BOOT_APPLICATION_BOUND ((uint32_t *) __flash__) #define USE_STORAGE_CONFIG 0 +#define HAS_STORAGE_DEBUG 1 + #endif /* _AO_PINS_H_ */