7
7
#define USB_VID 0x303a
8
8
#define USB_PID 0x1001
9
9
10
-
11
10
static const uint8_t LED_BUILTIN = 21 ;
12
11
#define BUILTIN_LED LED_BUILTIN // backward compatibility
13
12
#define LED_BUILTIN LED_BUILTIN
14
- #define RGB_BUILTIN LED_BUILTIN
15
- #define RGB_BRIGHTNESS 64
16
13
17
14
18
15
static const uint8_t TX = 43 ;
@@ -26,43 +23,73 @@ static const uint8_t MOSI = 6;
26
23
static const uint8_t MISO = 8 ;
27
24
static const uint8_t SCK = 7 ;
28
25
29
- // Fri3d Badge 2024 LCD
30
- #define X_BOARD_HAS_SPI_LCD
31
- #define X_LCD_MODEL ST7789
32
- #define X_LCD_WIDTH 240
33
- #define X_LCD_HEIGHT 296
34
- #define X_LCD_MISO MISO
35
- #define X_LCD_DC 4
36
- #define X_LCD_CS 5
37
- #define X_LCD_CLK SCK // SCLK
38
- #define X_LCD_MOSI MOSI
39
- #define X_LCD_RST 48 // used to reset LCD, low level to reset.
40
-
41
- // Fri3d Badge 2024 WS2812
42
- #define X_WS2812_LED 12
43
- #define X_BATTERY_MONITOR 13
44
- #define X_BLASTER 10
45
- #define X_BUZZER 46
46
- #define X_IR_RECEIVER 11
47
-
48
- // Fri3d Badge 2024 Buttons
49
- #define X_BUTTON_A 39
50
- #define X_BUTTON_B 40
51
- #define X_BUTTON_X 38
52
- #define X_BUTTON_Y 41
53
- #define X_BUTTON_MENU 45
54
- #define X_BUTTON_START 0
55
-
56
- // Fri3d Badge 2024 Joystick
57
- #define X_JOYSTICK_VERTICAL 3
58
- #define X_JOYSTICK_HORIZONTAL 1
59
-
60
- // Fri3d Badge 2024 Aux Pwr
61
- #define X_AUX_PWR 42
26
+ #define X_FRI3D_BADGE_2024 // General Define for use in sketches or lib files
27
+ #define X_WS2812_NUM_LEDS 5 // Number of RBG LEDs
28
+
29
+ #define PIN_I2C_SDA SDA
30
+ #define PIN_I2C_SCL SCL
31
+ #define PIN_WS2812 12
32
+ #define X_WS2812_NUM_LEDS 5
33
+
34
+ #define PIN_LED 21
35
+ #define PIN_IR_RECEIVER 11
36
+ #define PIN_BLASTER 10
37
+ #define PIN_BUZZER 46
38
+ #define PIN_BATTERY 13
39
+
40
+ #define PIN_SDCARD_CS SS
41
+
42
+ #define PIN_JOY_X 1
43
+ #define PIN_JOY_Y 3
44
+
45
+ #define PIN_A 39
46
+ #define PIN_B 40
47
+ #define PIN_X 38
48
+ #define PIN_Y 41
49
+ #define PIN_MENU 45
50
+ #define PIN_START 0
51
+
52
+ #define PIN_AUX 42 // Fri3d Badge 2024 Aux Pwr
53
+
54
+ #define CHANNEL_BUZZER 0
62
55
63
56
// Fri3d Badge 2024 Accelero Gyro
64
57
#define X_ACCELERO_GYRO 21
65
58
59
+ // I2S microphone on communicator addon
60
+ #define I2S_MIC_CHANNEL I2S_CHANNEL_FMT_ONLY_LEFT
61
+ #define I2S_MIC_SERIAL_CLOCK 17 //serial clock SCLK: pin SCK
62
+ #define I2S_MIC_LEFT_RIGHT_CLOCK 47 //left/right clock LRCK: pin WS
63
+ #define I2S_MIC_SERIAL_DATA 15 //serial data DIN: pin SD
64
+
65
+
66
+ // Fri3d Badge 2024 LCD
67
+ // For using display with TFT_eSPI library
68
+ #define USER_SETUP_LOADED
69
+ #define SPI_FREQUENCY 80000000
70
+ #define ST7789_DRIVER
71
+ #define USE_HSPI_PORT
72
+
73
+ #define TFT_RGB_ORDER TFT_BGR //# swap red and blue byte order
74
+ #define TFT_INVERSION_OFF
75
+ #define TFT_WIDTH 296 //;setting these will init the eSPI lib with correct dimensions
76
+ #define TFT_HEIGHT 240 //;setting these will init the eSPI lib with correct dimensions
77
+ #define TFT_MISO MISO
78
+ #define TFT_MOSI MOSI
79
+ #define TFT_SCLK SCK
80
+ #define TFT_CS 5
81
+ #define TFT_DC 4
82
+ #define TFT_RST 48
83
+ #define LOAD_GLCD 1
84
+ #define LOAD_FONT2
85
+ #define LOAD_FONT4
86
+ #define LOAD_FONT6
87
+ #define LOAD_FONT7
88
+ #define LOAD_FONT8
89
+ #define LOAD_GFXFF
90
+ #define SMOOTH_FONT
91
+ #define SPI_FREQUENCY 80000000
92
+
66
93
static const uint8_t A0 = 1 ;
67
94
static const uint8_t A1 = 2 ;
68
95
static const uint8_t A2 = 3 ;
0 commit comments