Skip to content

Commit fa56eee

Browse files
committed
ci(pre-commit): Fix whitespace, EOLs and codespell 'Analog'
1 parent f3bac28 commit fa56eee

File tree

4 files changed

+65
-56
lines changed

4 files changed

+65
-56
lines changed

boards.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50392,8 +50392,8 @@ kodedot.build.core=esp32
5039250392
kodedot.build.variant=kodedot
5039350393
kodedot.build.board=KODE_DOT
5039450394

50395-
kodedot.build.usb_mode=1
50396-
kodedot.build.cdc_on_boot=1
50395+
kodedot.build.usb_mode=1
50396+
kodedot.build.cdc_on_boot=1
5039750397
kodedot.build.msc_on_boot=0
5039850398
kodedot.build.dfu_on_boot=0
5039950399

tools/partitions/kodedot_partitions.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ phy_init, data, phy, 0xf000, 0x1000,
44
otadata, data, ota, 0x10000, 0x2000,
55
ota_0, app, ota_0, 0x20000, 0x3E0000,
66
ota_1, app, ota_1, 0x400000, 0x800000,
7-
storage, data, spiffs, 0xC00000, 0x400000,
7+
storage, data, spiffs, 0xC00000, 0x400000,
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
extern "C" bool verifyRollbackLater() {
2-
// Returning true prevents the OTA image from being marked as valid
3-
// until you explicitly confirm it after the first boot.
4-
return true;
5-
}
1+
// custom_ota_override.cpp
2+
// This function overrides the weak definition of `verifyRollbackLater()` in the kode dot board.
3+
4+
extern "C" {
5+
// Declare the weak function symbol to override it
6+
bool verifyRollbackLater() __attribute__((weak));
7+
}
8+
9+
// Custom implementation of verifyRollbackLater()
10+
// Returning `true` prevents the OTA image from being automatically marked as valid.
11+
// This ensures that the system will roll back to the previous image unless it is explicitly validated later.
12+
bool verifyRollbackLater() {
13+
return true;
14+
}

variants/kodedot/pins_arduino.h

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,27 @@
1717
#include <stdbool.h>
1818

1919
/*──────────────── USB device descriptor ────────────────*/
20-
#define USB_VID 0x303A // Espressif Systems VID
21-
#define USB_PID 0x1001 // Product ID: KodeDot-S3
20+
#define USB_VID 0x303A // Espressif Systems VID
21+
#define USB_PID 0x1001 // Product ID: KodeDot-S3
2222

2323
/*──────────────── UART0 (Arduino Serial) ────────────────*/
2424
static const uint8_t TX = 43; // U0TXD – PIN16 on the 2×10 header
2525
static const uint8_t RX = 44; // U0RXD – PIN18 on the 2×10 header
2626

2727
/*──────────────── I²C buses ─────────────────────────────*/
2828
/* External expansion bus → header pins 11/13 */
29-
static const uint8_t SCL = 37; // GPIO37 – PIN12
30-
static const uint8_t SDA = 36; // GPIO36 – PIN14
29+
static const uint8_t SCL = 37; // GPIO37 – PIN12
30+
static const uint8_t SDA = 36; // GPIO36 – PIN14
3131

3232
/* Internal sensor/touch bus (not on header) */
33-
#define INT_I2C_SCL 47 // GPIO47
34-
#define INT_I2C_SDA 48 // GPIO48
33+
#define INT_I2C_SCL 47 // GPIO47
34+
#define INT_I2C_SDA 48 // GPIO48
3535

3636
/*──────────────── SPI2 – micro-SD ───────────────────────*/
37-
static const uint8_t SS = 15; // SD_CS
38-
static const uint8_t MOSI = 16; // SD_MOSI
39-
static const uint8_t MISO = 18; // SD_MISO
40-
static const uint8_t SCK = 17; // SD_CLK
37+
static const uint8_t SS = 15; // SD_CS
38+
static const uint8_t MOSI = 16; // SD_MOSI
39+
static const uint8_t MISO = 18; // SD_MISO
40+
static const uint8_t SCK = 17; // SD_CLK
4141
#define BOARD_HAS_SD_SPI
4242
#define SD_CS SS
4343

@@ -47,60 +47,60 @@ static const uint8_t SCK = 17; // SD_CLK
4747
* Clock: 40 MHz
4848
*/
4949
#define BOARD_HAS_SPI_LCD
50-
#define LCD_MODEL ST7789
51-
#define LCD_WIDTH 410
52-
#define LCD_HEIGHT 502
50+
#define LCD_MODEL ST7789
51+
#define LCD_WIDTH 410
52+
#define LCD_HEIGHT 502
5353

54-
#define LCD_HOST SPI3_HOST
55-
#define LCD_SCK 35 // GPIO35 • QSPI_CLK
56-
#define LCD_MOSI 33 // GPIO33 • QSPI_IO0 (D0)
57-
#define LCD_IO1 34 // GPIO34 • QSPI_IO1 (D1)
58-
#define LCD_IO2 37 // GPIO37 • QSPI_IO2 (D2)
59-
#define LCD_IO3 36 // GPIO36 • QSPI_IO3 (D3)
60-
#define LCD_CS 10 // GPIO10
61-
#define LCD_RST 9 // GPIO09
62-
#define LCD_DC -1 // not used in 4-line SPI
54+
#define LCD_HOST SPI3_HOST
55+
#define LCD_SCK 35 // GPIO35 • QSPI_CLK
56+
#define LCD_MOSI 33 // GPIO33 • QSPI_IO0 (D0)
57+
#define LCD_IO1 34 // GPIO34 • QSPI_IO1 (D1)
58+
#define LCD_IO2 37 // GPIO37 • QSPI_IO2 (D2)
59+
#define LCD_IO3 36 // GPIO36 • QSPI_IO3 (D3)
60+
#define LCD_CS 10 // GPIO10
61+
#define LCD_RST 9 // GPIO09
62+
#define LCD_DC -1 // not used in 4-line SPI
6363
/* Optional: back-light enable shares the NeoPixel pin */
64-
#define LCD_BL 5 // GPIO05 (same as NEOPIXEL)
64+
#define LCD_BL 5 // GPIO05 (same as NEOPIXEL)
6565

66-
/*──────────────── Analogue / Touch pads ────────────────*/
66+
/*──────────────── Analog / Touch pads ────────────────*/
6767
static const uint8_t A0 = 11; // PIN4 – GPIO11 / TOUCH11 / ADC2_CH0
6868
static const uint8_t A1 = 12; // PIN6 – GPIO12 / TOUCH12 / ADC2_CH1
6969
static const uint8_t A2 = 13; // PIN8 – GPIO13 / TOUCH13 / ADC2_CH2
7070
static const uint8_t A3 = 14; // PIN10 – GPIO14 / TOUCH14 / ADC2_CH3
7171
static const uint8_t T0 = A0, T1 = A1, T2 = A2, T3 = A3;
7272

7373
/*──────────────── On-board controls & indicator ─────────*/
74-
#define BUTTON_TOP 0 // GPIO00 – BOOT • active-LOW
75-
#define BUTTON_BOTTOM 6 // GPIO06 • active-LOW
76-
#define NEOPIXEL_PIN 5 // GPIO05 – WS2812
77-
#define LED_BUILTIN NEOPIXEL_PIN
74+
#define BUTTON_TOP 0 // GPIO00 – BOOT • active-LOW
75+
#define BUTTON_BOTTOM 6 // GPIO06 • active-LOW
76+
#define NEOPIXEL_PIN 5 // GPIO05 – WS2812
77+
#define LED_BUILTIN NEOPIXEL_PIN
7878

7979
/*──────────────── JTAG (also on connector) ──────────────*/
80-
#define MTCK 39 // PIN11 – GPIO39
81-
#define MTDO 40 // PIN13 – GPIO40
82-
#define MTDI 41 // PIN15 – GPIO41
83-
#define MTMS 42 // PIN17 – GPIO42
80+
#define MTCK 39 // PIN11 – GPIO39
81+
#define MTDO 40 // PIN13 – GPIO40
82+
#define MTDI 41 // PIN15 – GPIO41
83+
#define MTMS 42 // PIN17 – GPIO42
8484

8585
/*──────────────── 2×10 header: simple aliases ───────────
8686
NOTE: power pins (1 = 5 V, 2 = 3 V3, 19/20 = GND) are **not**
8787
exposed as GPIO numbers – they remain undefined here. */
88-
#define PIN3 1 // GPIO01 / TOUCH1 / ADC1_CH0
89-
#define PIN4 11 // GPIO11 / TOUCH11 / ADC2_CH0
90-
#define PIN5 2 // GPIO02 / TOUCH2 / ADC1_CH1
91-
#define PIN6 12 // GPIO12 / TOUCH12 / ADC2_CH1
92-
#define PIN7 3 // GPIO03 / TOUCH3 / ADC1_CH2
93-
#define PIN8 13 // GPIO13 / TOUCH13 / ADC2_CH2
94-
#define PIN9 4 // GPIO04 / TOUCH4 / ADC1_CH3
95-
#define PIN10 14 // GPIO14 / TOUCH14 / ADC2_CH3
96-
#define PIN11 39 // MTCK
97-
#define PIN12 37 // SCL (external I²C)
98-
#define PIN13 40 // MTDO
99-
#define PIN14 36 // SDA (external I²C)
100-
#define PIN15 41 // MTDI
101-
#define PIN16 43 // TX (U0TXD)
102-
#define PIN17 42 // MTMS
103-
#define PIN18 44 // RX (U0RXD)
88+
#define PIN3 1 // GPIO01 / TOUCH1 / ADC1_CH0
89+
#define PIN4 11 // GPIO11 / TOUCH11 / ADC2_CH0
90+
#define PIN5 2 // GPIO02 / TOUCH2 / ADC1_CH1
91+
#define PIN6 12 // GPIO12 / TOUCH12 / ADC2_CH1
92+
#define PIN7 3 // GPIO03 / TOUCH3 / ADC1_CH2
93+
#define PIN8 13 // GPIO13 / TOUCH13 / ADC2_CH2
94+
#define PIN9 4 // GPIO04 / TOUCH4 / ADC1_CH3
95+
#define PIN10 14 // GPIO14 / TOUCH14 / ADC2_CH3
96+
#define PIN11 39 // MTCK
97+
#define PIN12 37 // SCL (external I²C)
98+
#define PIN13 40 // MTDO
99+
#define PIN14 36 // SDA (external I²C)
100+
#define PIN15 41 // MTDI
101+
#define PIN16 43 // TX (U0TXD)
102+
#define PIN17 42 // MTMS
103+
#define PIN18 44 // RX (U0RXD)
104104
/* PIN1, PIN2, PIN19, PIN20 are power/ground and deliberately
105105
left undefined – they are **not** usable as GPIO. */
106106

0 commit comments

Comments
 (0)