mirror of
				https://github.com/liberatedsystems/RNode_Firmware_CE.git
				synced 2024-07-02 14:34:13 +02:00 
			
		
		
		
	Merge branch 'master' into master
This commit is contained in:
		
						commit
						30fb26e1a8
					
				
							
								
								
									
										13
									
								
								Boards.h
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Boards.h
									
									
									
									
									
								
							| @ -79,6 +79,7 @@ | |||||||
|   #define HAS_EEPROM false |   #define HAS_EEPROM false | ||||||
|   #define HAS_INPUT false |   #define HAS_INPUT false | ||||||
|   #define HAS_SLEEP false |   #define HAS_SLEEP false | ||||||
|  |   #define PIN_DISP_SLEEP -1 | ||||||
|   #define VALIDATE_FIRMWARE true |   #define VALIDATE_FIRMWARE true | ||||||
| 
 | 
 | ||||||
|   #if defined(ENABLE_TCXO) |   #if defined(ENABLE_TCXO) | ||||||
| @ -353,11 +354,13 @@ | |||||||
|       #define HAS_SD false |       #define HAS_SD false | ||||||
|       #define HAS_EEPROM true |       #define HAS_EEPROM true | ||||||
| 
 | 
 | ||||||
|       // #define HAS_INPUT true
 |       #define HAS_INPUT true | ||||||
|       // #define HAS_SLEEP true
 |       #define HAS_SLEEP true | ||||||
|       // #define PIN_WAKEUP GPIO_NUM_0
 |       #define PIN_WAKEUP GPIO_NUM_0 | ||||||
|       // #define WAKEUP_LEVEL 0
 |       #define WAKEUP_LEVEL 0 | ||||||
|       // const int pin_btn_usr1 = 0;
 |       // #define PIN_DISP_SLEEP 21
 | ||||||
|  |       // #define DISP_SLEEP_LEVEL HIGH
 | ||||||
|  |       const int pin_btn_usr1 = 0; | ||||||
| 
 | 
 | ||||||
|       const int pin_cs = 7; |       const int pin_cs = 7; | ||||||
|       const int pin_reset = 8; |       const int pin_reset = 8; | ||||||
|  | |||||||
							
								
								
									
										21
									
								
								Display.h
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								Display.h
									
									
									
									
									
								
							| @ -564,17 +564,26 @@ void update_disp_area() { | |||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void update_display() { | void update_display(bool blank = false) { | ||||||
|   if (millis()-last_disp_update >= disp_update_interval) { |   if (blank) { | ||||||
|     if (display_contrast != display_intensity) { |     if (display_contrast != display_intensity) { | ||||||
|       display_contrast = display_intensity; |       display_contrast = display_intensity; | ||||||
|       set_contrast(&display, display_contrast); |       set_contrast(&display, display_contrast); | ||||||
|     } |     } | ||||||
|     display.clearDisplay(); |     display.clearDisplay(); | ||||||
|     update_stat_area(); |     display.display();     | ||||||
|     update_disp_area(); |   } else { | ||||||
|     display.display(); |     if (millis()-last_disp_update >= disp_update_interval) { | ||||||
|     last_disp_update = millis(); |       if (display_contrast != display_intensity) { | ||||||
|  |         display_contrast = display_intensity; | ||||||
|  |         set_contrast(&display, display_contrast); | ||||||
|  |       } | ||||||
|  |       display.clearDisplay(); | ||||||
|  |       update_stat_area(); | ||||||
|  |       update_disp_area(); | ||||||
|  |       display.display(); | ||||||
|  |       last_disp_update = millis(); | ||||||
|  |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								Makefile
									
									
									
									
									
								
							| @ -176,11 +176,17 @@ upload-rnode_ng_21: | |||||||
| 	python ./Release/esptool/esptool.py --chip esp32 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin | 	python ./Release/esptool/esptool.py --chip esp32 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin | ||||||
| 
 | 
 | ||||||
| upload-t3s3: | upload-t3s3: | ||||||
|  | 	@echo | ||||||
|  | 	@echo Put board into flashing mode by holding BOOT button while momentarily pressing the RESET button. Hit enter when done. | ||||||
|  | 	@read | ||||||
| 	arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:esp32s3 | 	arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:esp32s3 | ||||||
|  | 	@sleep 2 | ||||||
|  | 	python ./Release/esptool/esptool.py --chip esp32s3 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin | ||||||
|  | 	@echo | ||||||
|  | 	@echo Press the RESET button on the board now, and hit enter | ||||||
|  | 	@read | ||||||
| 	@sleep 1 | 	@sleep 1 | ||||||
| 	rnodeconf /dev/ttyACM0 --firmware-hash $$(./partition_hashes ./build/esp32.esp32.esp32s3/RNode_Firmware.ino.bin) | 	rnodeconf /dev/ttyACM0 --firmware-hash $$(./partition_hashes ./build/esp32.esp32.esp32s3/RNode_Firmware.ino.bin) | ||||||
| 	@sleep 3 |  | ||||||
| 	python ./Release/esptool/esptool.py --chip esp32s3 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin |  | ||||||
| 
 | 
 | ||||||
| upload-featheresp32: | upload-featheresp32: | ||||||
| 	arduino-cli upload -p /dev/ttyUSB0 --fqbn esp32:esp32:featheresp32 | 	arduino-cli upload -p /dev/ttyUSB0 --fqbn esp32:esp32:featheresp32 | ||||||
|  | |||||||
| @ -77,12 +77,13 @@ void setup() { | |||||||
|   fifo_init(&serialFIFO, serialBuffer, CONFIG_UART_BUFFER_SIZE); |   fifo_init(&serialFIFO, serialBuffer, CONFIG_UART_BUFFER_SIZE); | ||||||
| 
 | 
 | ||||||
|   Serial.begin(serial_baudrate); |   Serial.begin(serial_baudrate); | ||||||
|   #if BOARD_MODEL != BOARD_RAK4631 | 
 | ||||||
|  |   #if BOARD_MODEL != BOARD_RAK4631 && BOARD_MODEL != BOARD_RNODE_NG_22 | ||||||
|   // Some boards need to wait until the hardware UART is set up before booting
 |   // Some boards need to wait until the hardware UART is set up before booting
 | ||||||
|   // the full firmware. In the case of the RAK4631, the line below will wait
 |   // the full firmware. In the case of the RAK4631, the line below will wait
 | ||||||
|   // until a serial connection is actually established with a master. Thus, it
 |   // until a serial connection is actually established with a master. Thus, it
 | ||||||
|   // is disabled on this platform.
 |   // is disabled on this platform.
 | ||||||
|   while (!Serial); |     while (!Serial); | ||||||
|   #endif |   #endif | ||||||
| 
 | 
 | ||||||
|   serial_interrupt_init(); |   serial_interrupt_init(); | ||||||
| @ -1311,6 +1312,14 @@ void loop() { | |||||||
| 
 | 
 | ||||||
| void sleep_now() { | void sleep_now() { | ||||||
|   #if HAS_SLEEP == true |   #if HAS_SLEEP == true | ||||||
|  |     #if BOARD_MODEL == BOARD_RNODE_NG_22 | ||||||
|  |       display_intensity = 0; | ||||||
|  |       update_display(true); | ||||||
|  |     #endif | ||||||
|  |     #if PIN_DISP_SLEEP >= 0 | ||||||
|  |       pinMode(PIN_DISP_SLEEP, OUTPUT); | ||||||
|  |       digitalWrite(PIN_DISP_SLEEP, DISP_SLEEP_LEVEL); | ||||||
|  |     #endif | ||||||
|     esp_sleep_enable_ext0_wakeup(PIN_WAKEUP, WAKEUP_LEVEL); |     esp_sleep_enable_ext0_wakeup(PIN_WAKEUP, WAKEUP_LEVEL); | ||||||
|     esp_deep_sleep_start(); |     esp_deep_sleep_start(); | ||||||
|   #endif |   #endif | ||||||
|  | |||||||
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user