add gpio mapping
This commit is contained in:
		
							parent
							
								
									3d9883caae
								
							
						
					
					
						commit
						8ae325fbab
					
				
					 1 changed files with 3 additions and 9 deletions
				
			
		|  | @ -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 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue