Skip to content

Commit 6d0732e

Browse files
committed
add Rtduino.attach
1 parent 597ac31 commit 6d0732e

File tree

5 files changed

+23
-7
lines changed

5 files changed

+23
-7
lines changed

bsp/nxp/mcx/mcxa/Libraries/drivers/drv_pin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <rtthread.h>
1717
#include <rtdevice.h>
1818

19+
#define GET_PINS(PORTx, PINx) (32 * PORTx + PINx)
1920

2021
extern int rt_hw_pin_init(void);
2122

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CONFIG_PKG_USING_RTDUINO=y
2+
CONFIG_PKG_RTDUINO_PATH="/packages/arduino/RTduino"
3+
CONFIG_RTDUINO_THREAD_SIZE=2048
4+
CONFIG_RTDUINO_THREAD_PRIO=30
5+
CONFIG_RTDUINO_SUPPORT_HIGH_PRECISION_MICROS=y
6+
CONFIG_PKG_USING_RTDUINO_LATEST_VERSION=y
7+
CONFIG_PKG_RTDUINO_VER="latest"
8+
CONFIG_BSP_USING_I2C=y
9+
CONFIG_BSP_USING_I2C3=y
10+
CONFIG_BSP_USING_SPI=y
11+
CONFIG_BSP_USING_SPI1=y
12+
CONFIG_BSP_USING_ADC=y
13+
CONFIG_BSP_USING_PWM=y
14+
CONFIG_BSP_USING_ARDUINO=y

bsp/nxp/mcx/mcxa/frdm-mcxa346/applications/arduino_pinout/pins_arduino.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*
66
* Change Logs:
77
* Date Author Notes
8-
* 2023-02-22 ChuShicheng first version
9-
* 2023-02-23 Wangyuqiang second version
8+
* 2025-12-08 westcity-yolo first version
9+
*
1010
*/
1111

1212
#include <Arduino.h>

bsp/nxp/mcx/mcxa/frdm-mcxa346/applications/arduino_pinout/pins_arduino.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef Pins_Arduino_h
1313
#define Pins_Arduino_h
1414

15-
#define GET_PINS(PORTx, PINx) (32 * PORTx + PINx)
15+
1616

1717
/* pins alias. Must keep in sequence */
1818
#define D0 (0)

bsp/nxp/mcx/mcxa/frdm-mcxa346/board/Kconfig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,15 @@ menu "Onboard Peripheral Drivers"
129129
select PKG_USING_RTDUINO
130130
select BSP_USING_UART2
131131
select BSP_USING_GPIO
132+
select BSP_USING_PWM
132133
select BSP_USING_ADC
133134
select BSP_USING_ADC0
134-
select BSP_USING_ADC0_CH0
135-
select BSP_USING_PWM
135+
select BSP_USING_ADC1
136136
select BSP_USING_I2C
137137
select BSP_USING_I2C1
138-
select RTDUINO_USING_WIRE
139-
imply RTDUINO_USING_SERVO
138+
select BSP_USING_I2C2
139+
select BSP_USING_SPI
140+
select BSP_USING_SPI1
140141
default n
141142
endmenu
142143

0 commit comments

Comments
 (0)