mirror of
				https://github.com/liberatedsystems/RNode_Firmware_CE.git
				synced 2024-07-02 14:34:13 +02:00 
			
		
		
		
	RGB led pin remap
This commit is contained in:
		
							parent
							
								
									0d59b6b672
								
							
						
					
					
						commit
						18c0f65295
					
				
							
								
								
									
										11
									
								
								Config.h
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								Config.h
									
									
									
									
									
								
							@ -201,13 +201,20 @@
 | 
			
		||||
			#define HAS_CONSOLE true
 | 
			
		||||
            #define HAS_PMU true
 | 
			
		||||
			#define HAS_NP true
 | 
			
		||||
			#define HAS_SD true
 | 
			
		||||
			const int pin_cs = 18;
 | 
			
		||||
			const int pin_reset = 23;
 | 
			
		||||
			const int pin_dio = 26;
 | 
			
		||||
			const int pin_np = 15;
 | 
			
		||||
			const int pin_np = 12;
 | 
			
		||||
			const int pin_dac = 25;
 | 
			
		||||
			const int pin_adc = 34;
 | 
			
		||||
			const int SD_MISO = 2;
 | 
			
		||||
			const int SD_MOSI = 15;
 | 
			
		||||
			const int SD_CLK = 14;
 | 
			
		||||
			const int SD_CS = 13;
 | 
			
		||||
			#if HAS_NP == false
 | 
			
		||||
				#if defined(EXTERNAL_LEDS)
 | 
			
		||||
					const int pin_led_rx = 15;
 | 
			
		||||
					const int pin_led_rx = 12;
 | 
			
		||||
					const int pin_led_tx = 4;
 | 
			
		||||
				#else
 | 
			
		||||
					const int pin_led_rx = 25;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										34
									
								
								Console.h
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								Console.h
									
									
									
									
									
								
							@ -3,6 +3,14 @@
 | 
			
		||||
#include <WiFi.h>
 | 
			
		||||
#include <WebServer.h>
 | 
			
		||||
 | 
			
		||||
#include "SD.h"
 | 
			
		||||
#include "SPI.h"
 | 
			
		||||
  
 | 
			
		||||
#if HAS_SD
 | 
			
		||||
  SPIClass *spi = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if CONFIG_IDF_TARGET_ESP32
 | 
			
		||||
#include "esp32/rom/rtc.h"
 | 
			
		||||
#elif CONFIG_IDF_TARGET_ESP32S2
 | 
			
		||||
@ -116,6 +124,32 @@ void console_start() {
 | 
			
		||||
    console_dbg("SPIFFS Ready");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  #if HAS_SD
 | 
			
		||||
    spi = new SPIClass(HSPI);
 | 
			
		||||
    spi->begin(SD_CLK, SD_MISO, SD_MOSI, SD_CS);
 | 
			
		||||
    if(!SD.begin(SD_CS, *spi)){
 | 
			
		||||
      console_dbg("No SD card inserted");
 | 
			
		||||
    } else {
 | 
			
		||||
      uint8_t cardType = SD.cardType();
 | 
			
		||||
      if(cardType == CARD_NONE){
 | 
			
		||||
        console_dbg("No SD card type");
 | 
			
		||||
      } else {
 | 
			
		||||
        console_dbg("SD Card Type: ");
 | 
			
		||||
        if(cardType == CARD_MMC){
 | 
			
		||||
          console_dbg("MMC");
 | 
			
		||||
        } else if(cardType == CARD_SD){
 | 
			
		||||
          console_dbg("SDSC");
 | 
			
		||||
        } else if(cardType == CARD_SDHC){
 | 
			
		||||
          console_dbg("SDHC");
 | 
			
		||||
        } else {
 | 
			
		||||
          console_dbg("UNKNOWN");
 | 
			
		||||
        }
 | 
			
		||||
        uint64_t cardSize = SD.cardSize() / (1024 * 1024);
 | 
			
		||||
        Serial.printf("SD Card Size: %lluMB\n", cardSize);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  console_register_pages();
 | 
			
		||||
  server.begin();
 | 
			
		||||
  led_indicate_console();
 | 
			
		||||
 | 
			
		||||
@ -989,7 +989,7 @@ void loop() {
 | 
			
		||||
      if (console_active) {
 | 
			
		||||
        console_loop();
 | 
			
		||||
      } else {
 | 
			
		||||
        led_indicate_standby();
 | 
			
		||||
        //led_indicate_standby();
 | 
			
		||||
      }
 | 
			
		||||
    } else {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user