diff options
-rw-r--r-- | src/Makefile | 1 | ||||
-rw-r--r-- | src/fox1ihu/.gitignore | 2 | ||||
-rw-r--r-- | src/fox1ihu/Makefile | 89 | ||||
-rw-r--r-- | src/fox1ihu/ao_fox1ihu.c | 56 | ||||
-rw-r--r-- | src/fox1ihu/ao_pins.h | 317 | ||||
-rw-r--r-- | src/fox1ihu/flash-loader/Makefile | 8 | ||||
-rw-r--r-- | src/fox1ihu/flash-loader/ao_pins.h | 48 |
7 files changed, 521 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index 4e8b3c20..a9fe335e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -33,6 +33,7 @@ ARMM3DIRS=\ telegps-v1.0 telegps-v1.0/flash-loader \ telelco-v0.2 telelco-v0.2/flash-loader \ telescience-v0.2 telescience-v0.2/flash-loader \ + fox1ihu fox1ihu/flash-loader \ teleballoon-v2.0 ARMM0DIRS=\ diff --git a/src/fox1ihu/.gitignore b/src/fox1ihu/.gitignore new file mode 100644 index 00000000..538cf8b2 --- /dev/null +++ b/src/fox1ihu/.gitignore @@ -0,0 +1,2 @@ +ao_product.h +fox1ihu-*.elf diff --git a/src/fox1ihu/Makefile b/src/fox1ihu/Makefile new file mode 100644 index 00000000..e3226a24 --- /dev/null +++ b/src/fox1ihu/Makefile @@ -0,0 +1,89 @@ +# +# AltOS build +# +# + +include ../stm/Makefile.defs + +INC = \ + ao.h \ + ao_arch.h \ + ao_arch_funcs.h \ + ao_pins.h \ + ao_product.h \ + ao_watchdog.h \ + ao_storage.h \ + ao_task.h \ + stm32l.h \ + ao_sdcard.h \ + ao_bufio.h \ + ao_fat.h \ + Makefile + +#PROFILE=ao_profile.c +#PROFILE_DEF=-DAO_PROFILE=1 + +#SAMPLE_PROFILE=ao_sample_profile.c \ +# ao_sample_profile_timer.c +#SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1 + +#STACK_GUARD=ao_mpu_stm.c +#STACK_GUARD_DEF=-DHAS_STACK_GUARD=1 + +ALTOS_SRC = \ + ao_boot_chain.c \ + ao_interrupt.c \ + ao_product.c \ + ao_romconfig.c \ + ao_cmd.c \ + ao_task.c \ + ao_led.c \ + ao_stdio.c \ + ao_panic.c \ + ao_timer.c \ + ao_mutex.c \ + ao_dma_stm.c \ + ao_spi_stm.c \ + ao_usb_stm.c \ + ao_exti_stm.c \ + ao_adc_stm.c \ + ao_data.c \ + ao_storage.c \ + ao_mr25.c \ + ao_sdcard.c \ + ao_bufio.c \ + ao_fat.c \ + ao_watchdog.c + +PRODUCT=Fox1IHU-v2 +PRODUCT_DEF=-DFOX +IDPRODUCT=0x0024 + +CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g + +PROGNAME=fox1ihu-v0.1 +PROG=$(PROGNAME)-$(VERSION).elf +HEX=$(PROGNAME)-$(VERSION).ihx + +SRC=$(ALTOS_SRC) ao_fox1ihu.c +OBJ=$(SRC:.c=.o) + +all: $(PROG) $(HEX) + +$(PROG): Makefile $(OBJ) altos.ld + $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS) + +$(OBJ): $(INC) + +ao_product.h: ao-make-product.5c ../Version + $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@ + +distclean: clean + +clean: + rm -f *.o $(PROGNAME)-*.elf + rm -f ao_product.h + +install: + +uninstall: diff --git a/src/fox1ihu/ao_fox1ihu.c b/src/fox1ihu/ao_fox1ihu.c new file mode 100644 index 00000000..2e1a2fdf --- /dev/null +++ b/src/fox1ihu/ao_fox1ihu.c @@ -0,0 +1,56 @@ +/* + * Copyright © 2012 Keith Packard <keithp@keithp.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include <ao.h> +#include <ao_exti.h> +#include <ao_watchdog.h> +#include <ao_storage.h> +#include <ao_fat.h> + +int +main(void) +{ + ao_clock_init(); + +#if HAS_STACK_GUARD + ao_mpu_init(); +#endif + + ao_task_init(); + ao_led_init(LEDS_AVAILABLE); + ao_led_on(AO_LED_RED|AO_LED_GREEN|AO_LED_RED_2|AO_LED_GREEN_2); + ao_timer_init(); + + ao_spi_init(); + ao_dma_init(); + ao_exti_init(); + + ao_adc_init(); + + ao_cmd_init(); + + ao_usb_init(); + + ao_storage_init(); + + ao_watchdog_init(); + + ao_fat_init(); + + ao_start_scheduler(); + return 0; +} diff --git a/src/fox1ihu/ao_pins.h b/src/fox1ihu/ao_pins.h new file mode 100644 index 00000000..b5dd7283 --- /dev/null +++ b/src/fox1ihu/ao_pins.h @@ -0,0 +1,317 @@ +/* + * Copyright © 2012 Keith Packard <keithp@keithp.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#ifndef _AO_PINS_H_ +#define _AO_PINS_H_ + +#define HAS_TASK_QUEUE 1 + +/* 8MHz High speed external crystal */ +#define AO_HSE 8000000 + +/* PLLVCO = 96MHz (so that USB will work) */ +#define AO_PLLMUL 12 +#define AO_RCC_CFGR_PLLMUL (STM_RCC_CFGR_PLLMUL_12) + +/* SYSCLK = 32MHz (no need to go faster than CPU) */ +#define AO_PLLDIV 3 +#define AO_RCC_CFGR_PLLDIV (STM_RCC_CFGR_PLLDIV_3) + +/* HCLK = 32MHz (CPU clock) */ +#define AO_AHB_PRESCALER 1 +#define AO_RCC_CFGR_HPRE_DIV STM_RCC_CFGR_HPRE_DIV_1 + +/* Run APB1 at 16MHz (HCLK/2) */ +#define AO_APB1_PRESCALER 2 +#define AO_RCC_CFGR_PPRE1_DIV STM_RCC_CFGR_PPRE2_DIV_2 + +/* Run APB2 at 16MHz (HCLK/2) */ +#define AO_APB2_PRESCALER 2 +#define AO_RCC_CFGR_PPRE2_DIV STM_RCC_CFGR_PPRE2_DIV_2 + +#define HAS_SERIAL_1 1 +#define USE_SERIAL_1_STDIN 0 +#define SERIAL_1_PB6_PB7 0 +#define SERIAL_1_PA9_PA10 1 + +#define HAS_SERIAL_2 0 +#define USE_SERIAL_2_STDIN 0 +#define SERIAL_2_PA2_PA3 0 +#define SERIAL_2_PD5_PD6 0 + +#define HAS_SERIAL_3 0 +#define USE_SERIAL_3_STDIN 0 +#define SERIAL_3_PB10_PB11 0 +#define SERIAL_3_PC10_PC11 1 +#define SERIAL_3_PD8_PD9 0 + +#define HAS_EEPROM 0 +#define USE_INTERNAL_FLASH 0 +#define HAS_USB 1 +#define HAS_BEEP 0 +#define HAS_RADIO 0 +#define HAS_TELEMETRY 0 + +#define HAS_SPI_1 1 +#define SPI_1_PA5_PA6_PA7 0 +#define SPI_1_PB3_PB4_PB5 0 +#define SPI_1_PE13_PE14_PE15 1 /* */ +#define SPI_1_OSPEEDR STM_OSPEEDR_10MHz + +#define HAS_SPI_2 1 +#define SPI_2_PB13_PB14_PB15 1 /* */ +#define SPI_2_PD1_PD3_PD4 0 +#define SPI_2_OSPEEDR STM_OSPEEDR_10MHz +#define HAS_STORAGE_DEBUG 1 + +#define SPI_2_PORT (&stm_gpiob) +#define SPI_2_SCK_PIN 13 +#define SPI_2_MISO_PIN 14 +#define SPI_2_MOSI_PIN 15 + +#define HAS_I2C_1 1 +#define I2C_1_PB6_PB7 1 +#define I2C_1_PB8_PB9 0 + +#define HAS_I2C_2 1 +#define I2C_2_PB10_PB11 1 + +#define PACKET_HAS_SLAVE 0 +#define PACKET_HAS_MASTER 0 + +#define LOW_LEVEL_DEBUG 0 + +#define LED_PORT_0_ENABLE STM_RCC_AHBENR_GPIOCEN +#define LED_PORT_0 (&stm_gpioc) +#define LED_PORT_0_MASK (0xff) +#define LED_PORT_0_SHIFT 0 +#define LED_PIN_RED 6 +#define LED_PIN_GREEN 7 +#define LED_PIN_RED_2 8 +#define LED_PIN_GREEN_2 9 +#define AO_LED_RED (1 << LED_PIN_RED) +#define AO_LED_GREEN (1 << LED_PIN_GREEN) +#define AO_LED_RED_2 (1 << LED_PIN_RED_2) +#define AO_LED_GREEN_2 (1 << LED_PIN_GREEN_2) + +#define LEDS_AVAILABLE (AO_LED_RED | AO_LED_GREEN | AO_LED_RED_2 | AO_LED_GREEN_2) + +#define HAS_GPS 0 +#define HAS_FLIGHT 0 +#define HAS_ADC 1 +#define HAS_ADC_TEMP 1 +#define HAS_LOG 0 + +/* + * ADC + */ +#define AO_DATA_RING 32 + +struct ao_adc { + int16_t tx_pa_current; /* 0 ADC_IN0 */ + int16_t tx_temp; /* 1 ADC_IN1 */ + int16_t exp4_temp; /* 2 ADC_IN2 */ + int16_t rx_temp; /* 3 ADC_IN3 */ + int16_t tx_analog_1; /* 4 ADC_IN4 */ + int16_t sense_batt; /* 5 ADC_IN5 */ + int16_t rx_analog_1; /* 6 ADC_IN6 */ + int16_t rx_rssi; /* 7 ADC_IN8 */ + int16_t rx_cd; /* 8 ADC_IN9 */ + int16_t ant_sense_1; /* 9 ADC_IN10 */ + int16_t ant_sense_2; /* 10 ADC_IN11 */ + int16_t gyro_x_1; /* 11 ADC_IN12 */ + int16_t gyro_z_1; /* 12 ADC_IN13 */ + int16_t gyro_vref_1; /* 13 ADC_IN24 */ + int16_t gyro_x_2; /* 14 ADC_IN14 */ + int16_t gyro_z_2; /* 15 ADC_IN15 */ + int16_t gyro_vref_2; /* 16 ADC_IN25 */ +}; + +#define AO_ADC_TX_PA_CURRENT 0 +#define AO_ADC_TX_PA_CURRENT_PORT (&stm_gpioa) +#define AO_ADC_TX_PA_CURRENT_PIN 0 + +#define AO_ADC_TX_TEMP 1 +#define AO_ADC_TX_TEMP_PORT (&stm_gpioa) +#define AO_ADC_TX_TEMP_PIN 1 + +#define AO_ADC_EXP4_TEMP 2 +#define AO_ADC_EXP4_TEMP_PORT (&stm_gpioa) +#define AO_ADC_EXP4_TEMP_PIN 2 + +#define AO_ADC_RX_TEMP 3 +#define AO_ADC_RX_TEMP_PORT (&stm_gpioa) +#define AO_ADC_RX_TEMP_PIN 3 + +#define AO_ADC_TX_ANALOG_1 4 +#define AO_ADC_TX_ANALOG_1_PORT (&stm_gpioa) +#define AO_ADC_TX_ANALOG_1_PIN 4 + +#define AO_ADC_SENSE_BATT 5 +#define AO_ADC_SENSE_BATT_PORT (&stm_gpioa) +#define AO_ADC_SENSE_BATT_PIN 5 + +#define AO_ADC_RX_ANALOG_1 6 +#define AO_ADC_RX_ANALOG_1_PORT (&stm_gpioa) +#define AO_ADC_RX_ANALOG_1_PIN 6 + +#define AO_ADC_RX_RSSI 8 +#define AO_ADC_RX_RSSI_PORT (&stm_gpiob) +#define AO_ADC_RX_RSSI_PIN 0 + +#define AO_ADC_RX_CD 9 +#define AO_ADC_RX_CD_PORT (&stm_gpiob) +#define AO_ADC_RX_CD_PIN 1 + +#define AO_ADC_ANT_SENSE_1 10 +#define AO_ADC_ANT_SENSE_1_PORT (&stm_gpioc) +#define AO_ADC_ANT_SENSE_1_PIN 0 + +#define AO_ADC_ANT_SENSE_2 11 +#define AO_ADC_ANT_SENSE_2_PORT (&stm_gpioc) +#define AO_ADC_ANT_SENSE_2_PIN 1 + +#define AO_ADC_GYRO_X_1 12 +#define AO_ADC_GYRO_X_1_PORT (&stm_gpioc) +#define AO_ADC_GYRO_X_1_PIN 2 + +#define AO_ADC_GYRO_Z_1 13 +#define AO_ADC_GYRO_Z_1_PORT (&stm_gpioc) +#define AO_ADC_GYRO_Z_1_PIN 3 + +#define AO_ADC_GYRO_VREF_1 24 +#define AO_ADC_GYRO_VREF_1_PORT (&stm_gpioe) +#define AO_ADC_GYRO_VREF_1_PIN 9 + +#define AO_ADC_GYRO_X_2 14 +#define AO_ADC_GYRO_X_2_PORT (&stm_gpioc) +#define AO_ADC_GYRO_X_2_PIN 4 + +#define AO_ADC_GYRO_Z_2 15 +#define AO_ADC_GYRO_Z_2_PORT (&stm_gpioc) +#define AO_ADC_GYRO_Z_2_PIN 5 + +#define AO_ADC_GYRO_VREF_2 25 +#define AO_ADC_GYRO_VREF_2_PORT (&stm_gpioe) +#define AO_ADC_GYRO_VREF_2_PIN 10 + +#define AO_ADC_TEMP 16 + +#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_GPIOAEN) | \ + (1 << STM_RCC_AHBENR_GPIOBEN) | \ + (1 << STM_RCC_AHBENR_GPIOCEN) | \ + (1 << STM_RCC_AHBENR_GPIOEEN)) + +#define AO_NUM_ADC_PIN (17) + +#define AO_ADC_PIN0_PORT AO_ADC_TX_PA_CURRENT_PORT +#define AO_ADC_PIN0_PIN AO_ADC_TX_PA_CURRENT_PIN +#define AO_ADC_PIN1_PORT AO_ADC_TX_TEMP_PORT +#define AO_ADC_PIN1_PIN AO_ADC_TX_TEMP_PIN +#define AO_ADC_PIN2_PORT AO_ADC_EXP4_TEMP_PORT +#define AO_ADC_PIN2_PIN AO_ADC_EXP4_TEMP_PIN +#define AO_ADC_PIN3_PORT AO_ADC_RX_TEMP_PORT +#define AO_ADC_PIN3_PIN AO_ADC_RX_TEMP_PIN +#define AO_ADC_PIN4_PORT AO_ADC_TX_ANALOG_1_PORT +#define AO_ADC_PIN4_PIN AO_ADC_TX_ANALOG_1_PIN +#define AO_ADC_PIN5_PORT AO_ADC_SENSE_BATT_PORT +#define AO_ADC_PIN5_PIN AO_ADC_SENSE_BATT_PIN +#define AO_ADC_PIN6_PORT AO_ADC_RX_ANALOG_1_PORT +#define AO_ADC_PIN6_PIN AO_ADC_RX_ANALOG_1_PIN +#define AO_ADC_PIN7_PORT AO_ADC_RX_RSSI_PORT +#define AO_ADC_PIN7_PIN AO_ADC_RX_RSSI_PIN +#define AO_ADC_PIN8_PORT AO_ADC_RX_CD_PORT +#define AO_ADC_PIN8_PIN AO_ADC_RX_CD_PIN +#define AO_ADC_PIN9_PORT AO_ADC_ANT_SENSE_1_PORT +#define AO_ADC_PIN9_PIN AO_ADC_ANT_SENSE_1_PIN +#define AO_ADC_PIN10_PORT AO_ADC_ANT_SENSE_2_PORT +#define AO_ADC_PIN10_PIN AO_ADC_ANT_SENSE_2_PIN +#define AO_ADC_PIN11_PORT AO_ADC_GYRO_X_1_PORT +#define AO_ADC_PIN11_PIN AO_ADC_GYRO_X_1_PIN +#define AO_ADC_PIN12_PORT AO_ADC_GYRO_Z_1_PORT +#define AO_ADC_PIN12_PIN AO_ADC_GYRO_Z_1_PIN +#define AO_ADC_PIN13_PORT AO_ADC_GYRO_VREF_1_PORT +#define AO_ADC_PIN13_PIN AO_ADC_GYRO_VREF_1_PIN +#define AO_ADC_PIN14_PORT AO_ADC_GYRO_X_2_PORT +#define AO_ADC_PIN14_PIN AO_ADC_GYRO_X_2_PIN +#define AO_ADC_PIN15_PORT AO_ADC_GYRO_Z_2_PORT +#define AO_ADC_PIN15_PIN AO_ADC_GYRO_Z_2_PIN +#define AO_ADC_PIN16_PORT AO_ADC_GYRO_VREF_2_PORT +#define AO_ADC_PIN16_PIN AO_ADC_GYRO_VREF_2_PIN + +#define AO_NUM_ADC (AO_NUM_ADC_PIN + 1) /* Add internal temp sensor */ + +#define AO_ADC_SQ1 AO_ADC_TX_PA_CURRENT +#define AO_ADC_SQ1_NAME "tx_pa_current" +#define AO_ADC_SQ2 AO_ADC_TX_TEMP +#define AO_ADC_SQ2_NAME "tx_temp" +#define AO_ADC_SQ3 AO_ADC_EXP4_TEMP +#define AO_ADC_SQ3_NAME "expr_temp" +#define AO_ADC_SQ4 AO_ADC_RX_TEMP +#define AO_ADC_SQ4_NAME "rx_temp" +#define AO_ADC_SQ5 AO_ADC_TX_ANALOG_1 +#define AO_ADC_SQ5_NAME "tx_analog_1" +#define AO_ADC_SQ6 AO_ADC_SENSE_BATT +#define AO_ADC_SQ6_NAME "sense_batt" +#define AO_ADC_SQ7 AO_ADC_RX_ANALOG_1 +#define AO_ADC_SQ7_NAME "rx_analog_1" +#define AO_ADC_SQ8 AO_ADC_RX_RSSI +#define AO_ADC_SQ8_NAME "rx_rssi" +#define AO_ADC_SQ9 AO_ADC_RX_CD +#define AO_ADC_SQ9_NAME "rx_cd" +#define AO_ADC_SQ10 AO_ADC_ANT_SENSE_1 +#define AO_ADC_SQ10_NAME "ant_sense_1" +#define AO_ADC_SQ11 AO_ADC_ANT_SENSE_2 +#define AO_ADC_SQ11_NAME "ant_sense_2" +#define AO_ADC_SQ12 AO_ADC_GYRO_X_1 +#define AO_ADC_SQ12_NAME "gyro_x_1" +#define AO_ADC_SQ13 AO_ADC_GYRO_Z_1 +#define AO_ADC_SQ13_NAME "gyro_z_1" +#define AO_ADC_SQ14 AO_ADC_GYRO_VREF_1 +#define AO_ADC_SQ14_NAME "gyro_vref_1" +#define AO_ADC_SQ15 AO_ADC_GYRO_X_2 +#define AO_ADC_SQ15_NAME "gyro_x_2" +#define AO_ADC_SQ16 AO_ADC_GYRO_Z_2 +#define AO_ADC_SQ16_NAME "gyro_z_2" +#define AO_ADC_SQ17 AO_ADC_GYRO_VREF_2 +#define AO_ADC_SQ17_NAME "gyro_vref_2" +#define AO_ADC_SQ18 AO_ADC_TEMP +#define AO_ADC_SQ18_NAME "temp" + +/* Watchdog timer */ + +#define AO_WATCHDOG_INTERVAL AO_MS_TO_TICKS(40) +#define AO_WATCHDOG_PORT (&stm_gpiod) +#define AO_WATCHDOG_BIT 3 + +/* MRAM device */ + +#define AO_MR25_SPI_CS_PORT (&stm_gpiod) +#define AO_MR25_SPI_CS_PIN 0 +#define AO_MR25_SPI_BUS AO_SPI_2_PB13_PB14_PB15 + +/* SD card */ + +#define AO_SDCARD_SPI_CS_PORT (&stm_gpiod) +#define AO_SDCARD_SPI_CS_PIN 1 +#define AO_SDCARD_SPI_BUS AO_SPI_2_PB13_PB14_PB15 +#define AO_SDCARD_SPI_PORT (&stm_gpiob) +#define AO_SDCARD_SPI_SCK_PIN 13 +#define AO_SDCARD_SPI_MISO_PIN 14 +#define AO_SDCARD_SPI_MOSI_PIN 15 + +#endif /* _AO_PINS_H_ */ diff --git a/src/fox1ihu/flash-loader/Makefile b/src/fox1ihu/flash-loader/Makefile new file mode 100644 index 00000000..454bc6fb --- /dev/null +++ b/src/fox1ihu/flash-loader/Makefile @@ -0,0 +1,8 @@ +# +# AltOS flash loader build +# +# + +TOPDIR=../.. +HARDWARE=fox1ihu +include $(TOPDIR)/stm/Makefile-flash.defs diff --git a/src/fox1ihu/flash-loader/ao_pins.h b/src/fox1ihu/flash-loader/ao_pins.h new file mode 100644 index 00000000..31201eb0 --- /dev/null +++ b/src/fox1ihu/flash-loader/ao_pins.h @@ -0,0 +1,48 @@ +/* + * Copyright © 2013 Keith Packard <keithp@keithp.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#ifndef _AO_PINS_H_ +#define _AO_PINS_H_ + +/* External crystal at 8MHz */ +#define AO_HSE 8000000 + +#define AO_WATCHDOG_PORT (&stm_gpiod) +#define AO_WATCHDOG_BIT 3 + +#define AO_FLASH_LOADER_INIT do { \ + ao_enable_output(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, AO_WATCHDOG, 0); \ + } while (0) + +#define AO_TIMER_HOOK do { \ + static uint8_t watchdog; \ + ao_gpio_set(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, AO_WATCHDOG_PIN, watchdog); \ + watchdog ^= 1; \ + } while (0) + +#define HAS_TICK 1 +#include <ao_flash_stm_pins.h> + +/* Attached signal, PB8 */ + +#define AO_BOOT_PIN 1 +#define AO_BOOT_APPLICATION_GPIO stm_gpiob +#define AO_BOOT_APPLICATION_PIN 8 +#define AO_BOOT_APPLICATION_VALUE 0 +#define AO_BOOT_APPLICATION_MODE 0 + +#endif /* _AO_PINS_H_ */ |