mirror of
				https://github.com/manuelbl/ttn-esp32.git
				synced 2025-10-31 18:50:33 +01:00 
			
		
		
		
	New config option: TTN_RADIO_RST_KEEP_ASSERTED
This commit is contained in:
		
							
								
								
									
										7
									
								
								Kconfig
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								Kconfig
									
									
									
									
									
								
							| @ -55,6 +55,13 @@ config TTN_SPI_FREQ | ||||
|     help | ||||
|         SPI frequency to communicate between ESP32 and SX127x radio chip | ||||
|  | ||||
| config TTN_RADIO_RST_KEEP_ASSERTED | ||||
|         bool "Keep RST pin asserted instead of floating" | ||||
|         default n | ||||
|         help | ||||
|           Some hardware needs RST pin to be always high for LoRa chip to function | ||||
|  | ||||
|  | ||||
| config TTN_BG_TASK_PRIO | ||||
|     int "Background task priority" | ||||
|     default 10 | ||||
|  | ||||
| @ -128,9 +128,16 @@ void hal_pin_rst(u1_t val) | ||||
|         gpio_set_direction(ttn_hal.pinRst, GPIO_MODE_OUTPUT); | ||||
|     } | ||||
|     else | ||||
|     { // keep pin floating | ||||
|     { | ||||
| #ifdef CONFIG_TTN_RADIO_RST_KEEP_ASSERTED | ||||
|       // drive up the pin because the hardware is nonstandard | ||||
|         gpio_set_level(ttn_hal.pinRst, 1); | ||||
|         gpio_set_direction(ttn_hal.pinRst, GPIO_MODE_OUTPUT); | ||||
| #else | ||||
|       // keep pin floating | ||||
|         gpio_set_level(ttn_hal.pinRst, val); | ||||
|         gpio_set_direction(ttn_hal.pinRst, GPIO_MODE_INPUT); | ||||
| #endif | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user