12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- /*
- * board.h
- *
- * Created on: Jan 11, 2019
- * Author: curiousmuch
- */
- #ifndef MAIN_BOARD_H_
- #define MAIN_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 1
- #define CC1120 1
- #if CC1120
- // CC1120 - ESP32 I/O
- // NOTE: Logic Probe is connecting to RESET - Pin1
- #define CC1120_RESET 22
- #define CC1120_CS 5
- #define CC1120_SCLK 18
- #define CC1120_MOSI 23
- #define CC1120_MISO 19
- #define CC1120_GPIO0 36
- #define CC1120_GPIO0_RTC 0
- #define CC1120_GPIO2 39
- #define CC1120_GPIO2_RTC 3
- #define CC1120_GPIO3 34
- #define CC1120_GPIO3_RTC 4
- #endif
- #if CC1200
- // CC1120 - ESP32 I/O
- // NOTE: Logic Probe is connecting to RESET - Pin1
- #define CC1120_RESET 22
- #define CC1120_CS 5
- #define CC1120_SCLK 18
- #define CC1120_MOSI 23
- #define CC1120_MISO 19
- #define CC1120_GPIO0 36
- #define CC1120_GPIO0_RTC 0
- #define CC1120_GPIO2 39
- #define CC1120_GPIO2_RTC 3
- #define CC1120_GPIO3 34
- #define CC1120_GPIO3_RTC 4
- #endif
- #define DEBUG_0 16
- #define DEBUG_1 4
- 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_ */
|