Skip to content

Commit abeca95

Browse files
Add variants files
1 parent 45d8afa commit abeca95

File tree

4 files changed

+218
-0
lines changed

4 files changed

+218
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
//TODO fri3d_2020
4+
#endif /* Pins_Arduino_h */
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#ifndef X_FRI3D_BADGE_2024
2+
#define X_FRI3D_BADGE_2024 // General Define for use in sketches or lib files
3+
#define X_WS2812_NUM_LEDS 5 // Number of RBG LEDs
4+
5+
#define PIN_I2C_SDA 9
6+
#define PIN_I2C_SCL 18
7+
#define PIN_WS2812 12
8+
#define X_WS2812_NUM_LEDS 5
9+
10+
#define PIN_LED 21
11+
#define PIN_IR_RECEIVER 11
12+
#define PIN_BLASTER 10
13+
#define PIN_BUZZER 46
14+
#define PIN_BATTERY 13
15+
16+
#define PIN_SDCARD_CS 14
17+
18+
#define PIN_JOY_X 1
19+
#define PIN_JOY_Y 3
20+
21+
#define PIN_A 39
22+
#define PIN_B 40
23+
#define PIN_X 38
24+
#define PIN_Y 41
25+
#define PIN_MENU 45
26+
#define PIN_START 0
27+
28+
#define PIN_AUX 42 // Fri3d Badge 2024 Aux Pwr
29+
30+
#define CHANNEL_BUZZER 0
31+
32+
// Fri3d Badge 2024 Accelero Gyro
33+
#define X_ACCELERO_GYRO 21
34+
35+
// I2S microphone on communicator addon
36+
#define I2S_MIC_CHANNEL I2S_CHANNEL_FMT_ONLY_LEFT
37+
#define I2S_MIC_SERIAL_CLOCK 17 //serial clock SCLK: pin SCK
38+
#define I2S_MIC_LEFT_RIGHT_CLOCK 47 //left/right clock LRCK: pin WS
39+
#define I2S_MIC_SERIAL_DATA 15 //serial data DIN: pin SD
40+
41+
42+
// Fri3d Badge 2024 LCD
43+
// For using display with TFT_eSPI library
44+
#define USER_SETUP_LOADED // TODO check if this is really needed
45+
#define SPI_FREQUENCY 80000000
46+
#define ST7789_DRIVER
47+
#define USE_HSPI_PORT
48+
49+
#define TFT_RGB_ORDER TFT_BGR //# swap red and blue byte order
50+
#define TFT_INVERSION_OFF
51+
#define TFT_WIDTH 296 //;setting these will init the eSPI lib with correct dimensions
52+
#define TFT_HEIGHT 240 //;setting these will init the eSPI lib with correct dimensions
53+
#define TFT_MISO MISO
54+
#define TFT_MOSI MOSI
55+
#define TFT_SCLK SCK
56+
#define TFT_CS 5
57+
#define TFT_DC 4
58+
#define TFT_RST 48
59+
#define LOAD_GLCD 1
60+
#define LOAD_FONT2
61+
#define LOAD_FONT4
62+
#define LOAD_FONT6
63+
#define LOAD_FONT7
64+
#define LOAD_FONT8
65+
#define LOAD_GFXFF
66+
#define SMOOTH_FONT
67+
#define SPI_FREQUENCY 80000000
68+
#endif //X_FRI3D_BADGE_2024
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
#include "soc/soc_caps.h"
6+
#include "Fri3dBadge_pins.h"
7+
8+
#undef CONFIG_APP_ROLLBACK_ENABLE // Disable this because otherwise cancel_rollback will be added to the arduino programs
9+
#undef CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
10+
11+
#define USB_VID 0x303a
12+
#define USB_PID 0x1001
13+
14+
#define EXTERNAL_NUM_INTERRUPTS 46
15+
#define NUM_DIGITAL_PINS 48
16+
#define NUM_ANALOG_INPUTS 20
17+
18+
static const uint8_t LED_BUILTIN = 21;
19+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
20+
#define LED_BUILTIN LED_BUILTIN
21+
22+
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
23+
#define digitalPinToInterrupt(p) (((p)<49)?(p):-1)
24+
#define digitalPinHasPWM(p) (p < 46)
25+
26+
static const uint8_t TX = 43;
27+
static const uint8_t RX = 44;
28+
29+
static const uint8_t SDA = 9;
30+
static const uint8_t SCL = 18;
31+
32+
static const uint8_t SS = 14;
33+
static const uint8_t MOSI = 6;
34+
static const uint8_t MISO = 8;
35+
static const uint8_t SCK = 7;
36+
37+
38+
static const uint8_t A0 = 1;
39+
static const uint8_t A1 = 2;
40+
static const uint8_t A2 = 3;
41+
static const uint8_t A3 = 4;
42+
static const uint8_t A4 = 5;
43+
static const uint8_t A5 = 6;
44+
static const uint8_t A6 = 7;
45+
static const uint8_t A7 = 8;
46+
static const uint8_t A8 = 9;
47+
static const uint8_t A9 = 10;
48+
static const uint8_t A10 = 11;
49+
static const uint8_t A11 = 12;
50+
static const uint8_t A12 = 13;
51+
static const uint8_t A13 = 14;
52+
static const uint8_t A14 = 15;
53+
static const uint8_t A15 = 16;
54+
static const uint8_t A16 = 17;
55+
static const uint8_t A17 = 18;
56+
static const uint8_t A18 = 19;
57+
static const uint8_t A19 = 20;
58+
59+
static const uint8_t T1 = 1;
60+
static const uint8_t T2 = 2;
61+
static const uint8_t T3 = 3;
62+
static const uint8_t T4 = 4;
63+
static const uint8_t T5 = 5;
64+
static const uint8_t T6 = 6;
65+
static const uint8_t T7 = 7;
66+
static const uint8_t T8 = 8;
67+
static const uint8_t T9 = 9;
68+
static const uint8_t T10 = 10;
69+
static const uint8_t T11 = 11;
70+
static const uint8_t T12 = 12;
71+
static const uint8_t T13 = 13;
72+
static const uint8_t T14 = 14;
73+
74+
#endif /* Pins_Arduino_h */
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
#include "soc/soc_caps.h"
6+
7+
#define EXTERNAL_NUM_INTERRUPTS 46
8+
#define NUM_DIGITAL_PINS 48
9+
#define NUM_ANALOG_INPUTS 20
10+
11+
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+18; // GPIO pin for Saola-1 & DevKitM-1 = 18
12+
//static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+45; // GPIO pin for Kaluga = 45
13+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
14+
#define LED_BUILTIN LED_BUILTIN
15+
#define RGB_BUILTIN LED_BUILTIN
16+
#define RGB_BRIGHTNESS 64
17+
18+
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
19+
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
20+
#define digitalPinHasPWM(p) (p < 46)
21+
22+
static const uint8_t TX = 43;
23+
static const uint8_t RX = 44;
24+
25+
static const uint8_t SDA = 8;
26+
static const uint8_t SCL = 9;
27+
28+
static const uint8_t SS = 34;
29+
static const uint8_t MOSI = 35;
30+
static const uint8_t MISO = 37;
31+
static const uint8_t SCK = 36;
32+
33+
static const uint8_t A0 = 1;
34+
static const uint8_t A1 = 2;
35+
static const uint8_t A2 = 3;
36+
static const uint8_t A3 = 4;
37+
static const uint8_t A4 = 5;
38+
static const uint8_t A5 = 6;
39+
static const uint8_t A6 = 7;
40+
static const uint8_t A7 = 8;
41+
static const uint8_t A8 = 9;
42+
static const uint8_t A9 = 10;
43+
static const uint8_t A10 = 11;
44+
static const uint8_t A11 = 12;
45+
static const uint8_t A12 = 13;
46+
static const uint8_t A13 = 14;
47+
static const uint8_t A14 = 15;
48+
static const uint8_t A15 = 16;
49+
static const uint8_t A16 = 17;
50+
static const uint8_t A17 = 18;
51+
static const uint8_t A18 = 19;
52+
static const uint8_t A19 = 20;
53+
54+
static const uint8_t T1 = 1;
55+
static const uint8_t T2 = 2;
56+
static const uint8_t T3 = 3;
57+
static const uint8_t T4 = 4;
58+
static const uint8_t T5 = 5;
59+
static const uint8_t T6 = 6;
60+
static const uint8_t T7 = 7;
61+
static const uint8_t T8 = 8;
62+
static const uint8_t T9 = 9;
63+
static const uint8_t T10 = 10;
64+
static const uint8_t T11 = 11;
65+
static const uint8_t T12 = 12;
66+
static const uint8_t T13 = 13;
67+
static const uint8_t T14 = 14;
68+
69+
static const uint8_t DAC1 = 17;
70+
static const uint8_t DAC2 = 18;
71+
72+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)