-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[add][RTduino] Fitter RTduino in frdm-mcxa346 #11067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
597ac31
6d0732e
9c3acc6
2345544
41a7835
2d62f61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* | ||
| * Copyright (c) 2006-2023, RT-Thread Development Team | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Change Logs: | ||
| * Date Author Notes | ||
| * 2025-12-08 westcity-yolo first version | ||
| * | ||
| */ | ||
|
|
||
| #include <Arduino.h> | ||
|
|
||
| void setup(void) | ||
| { | ||
| /* put your setup code here, to run once: */ | ||
| Serial.begin(); | ||
| Serial.println("Hello RTduino!"); | ||
| } | ||
|
|
||
| void loop(void) | ||
| { | ||
| /* put your main code here, to run repeatedly: */ | ||
| delay(1000); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| from building import * | ||
|
|
||
| cwd = GetCurrentDir() | ||
| src = Glob('*.c') + Glob('*.cpp') | ||
| inc = [cwd] | ||
|
|
||
| group = DefineGroup('RTduino-pinout', src, depend = ['PKG_USING_RTDUINO'], CPPPATH = inc) | ||
|
|
||
| Return('group') |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||||||
| /* | ||||||||||
| * Copyright (c) 2006-2023, RT-Thread Development Team | ||||||||||
| * | ||||||||||
| * SPDX-License-Identifier: Apache-2.0 | ||||||||||
| * | ||||||||||
| * Change Logs: | ||||||||||
| * Date Author Notes | ||||||||||
| * 2023-02-22 ChuShicheng first version | ||||||||||
| * 2023-02-23 Wangyuqiang second version | ||||||||||
| */ | ||||||||||
|
|
||||||||||
| #include <Arduino.h> | ||||||||||
| #include <board.h> | ||||||||||
| #include <drv_pin.h> | ||||||||||
| #include "pins_arduino.h" | ||||||||||
|
|
||||||||||
| /* | ||||||||||
| * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} | ||||||||||
| * [] means optional | ||||||||||
| * Digital pins must NOT give the device name and channel. | ||||||||||
| * Analog pins MUST give the device name and channel(ADC, PWM or DAC). | ||||||||||
| * Arduino Pin must keep in sequence. | ||||||||||
| */ | ||||||||||
| const pin_map_t pin_map_table[]= | ||||||||||
| { | ||||||||||
| {D0, GET_PINS(2,3), "uart2"}, /* Serial2-RX */ | ||||||||||
| {D1, GET_PINS(2,2), "uart2"}, /* Serial2-TX */ | ||||||||||
| {D2, GET_PINS(3,31)}, | ||||||||||
| {D3, GET_PINS(3,14), "pwm1", 1}, /* PWM */ | ||||||||||
| {D4, GET_PINS(4,7)}, | ||||||||||
| {D5, GET_PINS(3,1), "pwm0", 0}, /* PWM */ | ||||||||||
| {D6, GET_PINS(3,17), "pwm1", 0}, /* PWM */ | ||||||||||
| {D7, GET_PINS(3,22)}, | ||||||||||
| {D8, GET_PINS(4,3)}, | ||||||||||
| {D9, GET_PINS(3,13), "pwm1", 2}, /* PWM */ | ||||||||||
| {D10, GET_PINS(3,11),"spi1"}, /* SPI-SS */ | ||||||||||
| {D11, GET_PINS(3,8), "spi1"}, /* SPI-SDO */ | ||||||||||
| {D12, GET_PINS(3,9), "spi1"}, /* SPI-SDI */ | ||||||||||
| {D13, GET_PINS(3,10),"spi1"}, /* SPI-SCK */ | ||||||||||
| {D18, GET_PINS(1,8),"i2c2"}, /* I2C-SDA (Wire) */ | ||||||||||
| {D19, GET_PINS(1,9),"i2c2"}, /* I2C-SCL (Wire) */ | ||||||||||
| {A0, GET_PINS(1,14),"adc1", 12}, /* ADC */ | ||||||||||
| {A1, GET_PINS(2,5), "adc1", 1}, /* ADC */ | ||||||||||
| {A2, GET_PINS(2,7),"adc0", 7}, /* ADC */ | ||||||||||
| {A3, GET_PINS(3,30),"adc1", 21}, | ||||||||||
| {A4, GET_PINS(1,0),"i2c1"}, /* I2C-SDA (Wire) */ | ||||||||||
| {A5, GET_PINS(1,1),"i2c1"}, /* I2C-SCL (Wire) */ | ||||||||||
|
||||||||||
| {A5, GET_PINS(1,1),"i2c1"}, /* I2C-SCL (Wire) */ | |
| {A5, GET_PINS(1,1),"i2c1"}, /* I2C-SCL (Wire) */ | |
| {A6, GET_PINS(1,14),"adc1", 12}, /* ADC (alias of A0 to keep sequence) */ | |
| {A7, GET_PINS(2,5), "adc1", 1}, /* ADC (alias of A1 to keep sequence) */ |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,58 @@ | ||||||
| /* | ||||||
| * Copyright (c) 2006-2023, RT-Thread Development Team | ||||||
| * | ||||||
| * SPDX-License-Identifier: Apache-2.0 | ||||||
| * | ||||||
| * Change Logs: | ||||||
| * Date Author Notes | ||||||
| * 2025-12-08 westcity-yolo first version | ||||||
|
||||||
| * 2025-12-08 westcity-yolo first version | |
| * 2024-12-08 westcity-yolo first version |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,6 +123,23 @@ menu "On-chip Peripheral Drivers" | |
| endif | ||
| endmenu | ||
|
|
||
| menu "Onboard Peripheral Drivers" | ||
|
||
| config BSP_USING_ARDUINO | ||
| bool "Compatible with Arduino Ecosystem (RTduino)" | ||
| select PKG_USING_RTDUINO | ||
| select BSP_USING_UART2 | ||
| select BSP_USING_GPIO | ||
| select BSP_USING_ADC | ||
|
||
| select BSP_USING_ADC0 | ||
| select BSP_USING_ADC0_CH0 | ||
|
||
| select BSP_USING_PWM | ||
| select BSP_USING_I2C | ||
| select BSP_USING_I2C1 | ||
| select RTDUINO_USING_WIRE | ||
| imply RTDUINO_USING_SERVO | ||
| default n | ||
| endmenu | ||
|
|
||
|
|
||
| menu "Board extended module Drivers" | ||
| menuconfig BSP_USING_RW007 | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date format is incorrect - same issue. Should be corrected to "2024-12-08" or current date.
日期格式不正确 - 相同的问题。应更正为"2024-12-08"或当前日期。