Skip to content

Commit c1979cb

Browse files
committed
Missing added user button.
1 parent 98afe7a commit c1979cb

File tree

2 files changed

+37
-30
lines changed

2 files changed

+37
-30
lines changed

variants/THINGPLUS_RA6M5/pins_arduino.h

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ static const uint8_t D6 = PIN_D6;
6868
#define LED_BUILTIN PIN_LED
6969
#define LED_RGB (13u)
7070

71+
/****** BUTTON DEFINES *******/
72+
#define USR_BTN (31u)
73+
7174

7275
/****** RTC CORE DEFINES *******/
7376
#define RTC_HOWMANY 1
@@ -77,10 +80,10 @@ static const uint8_t D6 = PIN_D6;
7780
#define SERIAL_HOWMANY 2
7881
#define UART1_TX_PIN 20
7982
#define UART1_RX_PIN 21
80-
#define UART2_TX_PIN 31
81-
#define UART2_RX_PIN 32
82-
#define UART2_RTS_PIN 33
83-
#define UART2_CTS_PIN 34
83+
#define UART2_TX_PIN 32
84+
#define UART2_RX_PIN 33
85+
#define UART2_RTS_PIN 34
86+
#define UART2_CTS_PIN 35
8487

8588
/****** WIRE CORE DEFINES ******/
8689

@@ -141,12 +144,12 @@ static const uint8_t PICO = PIN_SPI_MOSI;
141144

142145
/****** QSPI CORE DEFINES ******/
143146

144-
#define PIN_QSPI_CLK (40)
145-
#define PIN_QSPI_SS (41)
146-
#define PIN_QSPI_D0 (42)
147-
#define PIN_QSPI_D1 (43)
148-
#define PIN_QSPI_D2 (44)
149-
#define PIN_QSPI_D3 (45)
147+
#define PIN_QSPI_CLK (41)
148+
#define PIN_QSPI_SS (42)
149+
#define PIN_QSPI_D0 (43)
150+
#define PIN_QSPI_D1 (44)
151+
#define PIN_QSPI_D2 (45)
152+
#define PIN_QSPI_D3 (46)
150153

151154
#define HAS_QSPI
152155

@@ -156,12 +159,12 @@ static const uint8_t PICO = PIN_SPI_MOSI;
156159
#define QSPI_WRITE_BLOCK_SIZE (0x1)
157160

158161
/****** MISC GPIO CORE DEFINES ******/
159-
#define EXT_INTERRUPTS_HOWMANY 14
162+
#define EXT_INTERRUPTS_HOWMANY 15
160163

161-
#define SD_NEN (35)
162-
#define BLE_NRST (36)
163-
#define VREF_EN (37)
164-
#define PWR_STAT (38)
164+
#define SD_NEN (36)
165+
#define BLE_NRST (37)
166+
#define VREF_EN (38)
167+
#define PWR_STAT (39)
165168

166169
#define HAS_SDHI
167170

variants/THINGPLUS_RA6M5/variant.cpp

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,31 +49,32 @@ extern "C" const PinMuxCfg_t g_pin_cfg[] = {
4949

5050
// Other GPIO
5151
{ BSP_IO_PORT_03_PIN_04, P304 }, /* D30 | FREE/IRQ */
52+
{ BSP_IO_PORT_04_PIN_15, P415 }, /* D31 | !USRBTN/IRQ */
5253

5354
/// ###### FROM HERE, INTERNAL STUFF ONLY
5455

5556
// DA14531 BLE UART
56-
{ BSP_IO_PORT_06_PIN_02, P602 }, /* D31 | TX1 */
57-
{ BSP_IO_PORT_06_PIN_01, P601 }, /* D32 | RX1 */
58-
{ BSP_IO_PORT_03_PIN_01, P301 }, /* D33 | RTS1 */
59-
{ BSP_IO_PORT_03_PIN_03, P303 }, /* D34 | CTS1 */
57+
{ BSP_IO_PORT_06_PIN_02, P602 }, /* D32 | TX1 */
58+
{ BSP_IO_PORT_06_PIN_01, P601 }, /* D33 | RX1 */
59+
{ BSP_IO_PORT_03_PIN_01, P301 }, /* D34 | RTS1 */
60+
{ BSP_IO_PORT_03_PIN_03, P303 }, /* D35 | CTS1 */
6061

6162
// Dedicated GPIO pins
62-
{ BSP_IO_PORT_07_PIN_08, P708 }, /* D35 | !SDEN */
63-
{ BSP_IO_PORT_01_PIN_15, P115 }, /* D36 | BLE !RESET */
64-
{ BSP_IO_PORT_05_PIN_00, P500 }, /* D37 | VREF_EN */
65-
{ BSP_IO_PORT_00_PIN_01, P001 }, /* D38 | PWR_STATUS */
63+
{ BSP_IO_PORT_07_PIN_08, P708 }, /* D36 | !SDEN */
64+
{ BSP_IO_PORT_01_PIN_15, P115 }, /* D37 | BLE !RESET */
65+
{ BSP_IO_PORT_05_PIN_00, P500 }, /* D38 | VREF_EN */
66+
{ BSP_IO_PORT_00_PIN_01, P001 }, /* D39 | PWR_STATUS */
6667

6768
// Onboard Interrupts
68-
{ BSP_IO_PORT_00_PIN_00, P000 }, /* D39 | !FUEL_GAUGE/IRQ */
69+
{ BSP_IO_PORT_00_PIN_00, P000 }, /* D40 | !FUEL_GAUGE/IRQ */
6970

7071
// QSPI
71-
{ BSP_IO_PORT_01_PIN_00, P100 }, /* D40 | QSPI CLK */
72-
{ BSP_IO_PORT_05_PIN_01, P501 }, /* D41 | QSPI SS */
73-
{ BSP_IO_PORT_01_PIN_02, P102 }, /* D42 | QSPI IO0 */
74-
{ BSP_IO_PORT_01_PIN_01, P101 }, /* D43 | QSPI IO1 */
75-
{ BSP_IO_PORT_01_PIN_04, P104 }, /* D44 | QSPI IO2 */
76-
{ BSP_IO_PORT_01_PIN_03, P103 }, /* D45 | QSPI IO3 */
72+
{ BSP_IO_PORT_01_PIN_00, P100 }, /* D41 | QSPI CLK */
73+
{ BSP_IO_PORT_05_PIN_01, P501 }, /* D42 | QSPI SS */
74+
{ BSP_IO_PORT_01_PIN_02, P102 }, /* D43 | QSPI IO0 */
75+
{ BSP_IO_PORT_01_PIN_01, P101 }, /* D44 | QSPI IO1 */
76+
{ BSP_IO_PORT_01_PIN_04, P104 }, /* D45 | QSPI IO2 */
77+
{ BSP_IO_PORT_01_PIN_03, P103 }, /* D46 | QSPI IO3 */
7778
};
7879

7980
extern "C" {
@@ -99,6 +100,9 @@ void initVariant() {
99100
// bootloader configures LED_BUILTIN as PWM output, deconfigure it to avoid spurious signals
100101
pinMode(LED_BUILTIN, INPUT);
101102

103+
// Setup user button
104+
pinMode(USER_BTN, INPUT_PULLUP);
105+
102106
// Set internal gpio pins.
103107
// Enable SD Card Power
104108
pinMode(SD_NEN, OUTPUT_OPENDRAIN);

0 commit comments

Comments
 (0)