1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- /*
- * board.h
- *
- * Created on: Jan 11, 2019
- * Author: curiousmuch
- */
- #ifndef BOARD_H_
- #define BOARD_H_
- // Battery Measurement
- #define ENABLE_VOLTAGE_DIVIDER 25
- #define BATTERY_ADC 35
- #define BATTERY_ADC_CHANNEL ADC1_CHANNEL_7
- // LEDs
- #define RED_LED 21
- #define GREEN_LED 2
- // Radio Selection
- #define CC1200_RESET 22
- #define CC1200_CS 5
- #define CC1200_SCLK 18
- #define CC1200_MOSI 23
- #define CC1200_MISO 19
- #define CC1200_GPIO0 36
- #define CC1200_GPIO0_RTC 0
- #define CC1200_GPIO2 39
- #define CC1200_GPIO2_RTC 3
- #define CC1200_GPIO3 34
- #define CC1200_GPIO3_RTC 4
- // Debugging
- #define DEBUG_0 16
- #define DEBUG_1 4
- #define DEBUG_2 32
- #define DEBUG_3 33
- // Function Protoypes
- void enable_red_led(void);
- void enable_green_led(void);
- void disable_red_led(void);
- void disable_green_led(void);
- void enable_debug_IO(uint32_t io_num);
- void disable_debug_IO(uint32_t io_num);
- void board_init(void);
- int32_t battery_measure(void);
- #endif /* MAIN_BOARD_H_ */
|