Merge pull request #19 from n0xa/refactor

Refactor
This commit is contained in:
Noah Axon 2023-11-13 22:38:47 -06:00 committed by GitHub
commit f133b0c2e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 764 additions and 46638 deletions

View File

@ -1,14 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Example OpenOCD configuration file for ESP32-WROVER-KIT board.
#
# For example, OpenOCD can be started for ESP32 debugging on
#
# openocd -f board/esp32-wrover-kit-3.3v.cfg
#
# Source the JTAG interface configuration file
source [find interface/ftdi/esp32_devkitj_v1.cfg]
set ESP32_FLASH_VOLTAGE 3.3
# Source the ESP32 configuration file
source [find target/esp32.cfg]

View File

@ -1,19 +0,0 @@
{
"name":"Arduino on ESP32",
"toolchainPrefix":"xtensa-esp32-elf",
"svdFile":"esp32.svd",
"request":"attach",
"postAttachCommands":[
"set remote hardware-watchpoint-limit 2",
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
],
"overrideRestartCommands":[
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
]
}

46087
esp32.svd

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4
tvbg.h
View File

@ -14,8 +14,6 @@ By Anton Grimpelhuber (anton.grimpelhuber@gmail.com)
// What pins do what // What pins do what
#define LED 10 //LED indicator pin (built-in LED) #define LED 10 //LED indicator pin (built-in LED)
#define IRLED 9 //the IR sender LED / D5 on wemos D1 mini #define IRLED 9 //the IR sender LED / D5 on wemos D1 mini
#define TRIGGER 37 //the button pin / D6 on wemos D1 mini
#define REGIONSWITCH 39 //HIGH (1) = NA, LOW (0) = EU; Pin 5 / D1 (REGIONSWITCH) is HIGH (via in input pullup resistor) for North America, or you (the user) must wire it to ground to set the codes for Europe.
// Lets us calculate the size of the NA/EU databases // Lets us calculate the size of the NA/EU databases
#define NUM_ELEM(x) (sizeof (x) / sizeof (*(x))); #define NUM_ELEM(x) (sizeof (x) / sizeof (*(x)));
@ -77,8 +75,6 @@ uint8_t read_bits(uint8_t count)
} }
return tmp; return tmp;
} }
#define BUTTON_PRESSED LOW
#define BUTTON_RELEASED HIGH
uint16_t ontime, offtime; uint16_t ontime, offtime;
uint8_t i, num_codes; uint8_t i, num_codes;
uint8_t region; uint8_t region;

View File

@ -93,12 +93,12 @@ char* randomSSID(){
} }
ssid[p++] = possible[r]; ssid[p++] = possible[r];
} }
ssid[SSIDLEN] = '\n'; M5.Lcd.setTextSize(1); ssid[SSIDLEN] = '\n'; DISP.setTextSize(1);
M5.Lcd.fillScreen(BLACK); DISP.fillScreen(BLACK);
M5.Lcd.setCursor(0, 0, 1); DISP.setCursor(0, 0, 1);
M5.Lcd.println("Spamming Random SSIDs:"); DISP.println("Spamming Random SSIDs:");
// Maximum broadcast SSID length is 32, but the strings might show longer in the output. Sorry. // Maximum broadcast SSID length is 32, but the strings might show longer in the output. Sorry.
M5.Lcd.print(ssid); DISP.print(ssid);
return ssid; return ssid;
} }