add gpio mapping

This commit is contained in:
Morgan 'ARR\!' Allen 2020-10-12 21:33:29 -07:00
parent 3d9883caae
commit 8ae325fbab

View file

@ -3,17 +3,11 @@
#include "nvs_flash.h" #include "nvs_flash.h"
#include "esp32-lora.h" #define PUMP_COUNT (4)
extern uint8_t mac[6]; extern uint8_t mac[6];
extern lora32_cfg_t lora; static uint8_t pump_gpio_map[] = { 27, 26, 25, 23 };
struct lorcomm_cfg {
char *hostname;
lora32_cfg_t *lora;
nvs_handle_t nvs_handle;
} lorcomm_cfg;
#define GPIO_PUMP_PIN_SEL ((1ULL<<pump_gpio_map[0]) | (1ULL<<pump_gpio_map[1]) | (1ULL<<pump_gpio_map[2]) | (1ULL<<pump_gpio_map[3]));
#endif #endif