X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fmicropeak%2Fao_pins.h;h=63e9cb1b26663ce0259d2134003d8fa334b54ae0;hb=77dc89ed5b7bf8f5b3fa3b6131660f1a98f583ea;hp=67de1a8e8667cfd09fe355dfaced85908b592c97;hpb=e9ea0ad4024532fd6f87bb6708bf76b0c7aa1c5b;p=fw%2Faltos diff --git a/src/micropeak/ao_pins.h b/src/micropeak/ao_pins.h index 67de1a8e..63e9cb1b 100644 --- a/src/micropeak/ao_pins.h +++ b/src/micropeak/ao_pins.h @@ -19,10 +19,11 @@ #define _AO_PINS_H_ #include -#define AO_LED_BLUE (1<<4) +#define AO_LED_ORANGE (1<<4) #define AO_LED_SERIAL 4 -#define AO_LED_PANIC AO_LED_BLUE -#define LEDS_AVAILABLE (AO_LED_BLUE) +#define AO_LED_PANIC AO_LED_ORANGE +#define AO_LED_REPORT AO_LED_ORANGE +#define LEDS_AVAILABLE (AO_LED_ORANGE) #define USE_SERIAL_1_STDIN 0 #define HAS_USB 0 #define PACKET_HAS_SLAVE 0 @@ -32,7 +33,7 @@ #define HAS_MS5611 0 #define HAS_EEPROM 0 #define HAS_BEEP 0 -#define AVR_CLOCK 8000000UL +#define AVR_CLOCK 250000UL /* SPI */ #define SPI_PORT PORTB @@ -41,9 +42,12 @@ #define AO_MS5607_CS_PORT PORTB #define AO_MS5607_CS_PIN 3 +/* MS5607 */ #define AO_MS5607_SPI_INDEX 0 #define AO_MS5607_MISO_PORT PORTB #define AO_MS5607_MISO_PIN 0 +#define AO_MS5607_BARO_OVERSAMPLE 4096 +#define AO_MS5607_TEMP_OVERSAMPLE 1024 /* I2C */ #define I2C_PORT PORTB @@ -53,8 +57,9 @@ #define I2C_PIN_SDA PINB0 #define AO_CONST_ATTRIB PROGMEM +typedef int32_t alt_t; #define FETCH_ALT(o) ((alt_t) pgm_read_dword(&altitude_table[o])) -#define AO_ALT_VALUE(x) ((x) * 10) +#define AO_ALT_VALUE(x) ((x) * (alt_t) 10) #endif /* _AO_PINS_H_ */