提交 7f9546ad 编写于 作者: mysterywolf's avatar mysterywolf

[l475][arduino] 增加ADC PWM管脚定义

上级 c26f6648
from building import *
cwd = GetCurrentDir()
src = ['arduino_layout.c']
src = ['arduino_pinout.c']
inc = [cwd]
group = DefineGroup('Arduino', src, depend = ['RT_USING_ARDUINO'], CPPPATH = inc)
......
......@@ -9,8 +9,9 @@
*/
#include <Arduino.h>
#include <board.h>
#include "arduino_pinout.h"
const pin_map_t pin_map_table[ARDUINO_LAYOUT_PIN_MAX]=
const pin_map_t pin_map_table[ARDUINO_PINOUT_PIN_MAX]=
{
/*
{Arduino Pin, RT-Thread Pin [, Device Name(PWM or ADC), Channel]}
......
......@@ -7,15 +7,16 @@
* Date Author Notes
* 2021-12-10 Meco Man first version
*/
#ifndef __UNO_LAYOUT_H__
#define __UNO_LAYOUT_H__
#include <rtconfig.h>
#ifndef __UNO_PINOUT_H__
#define __UNO_PINOUT_H__
#define LED_BUILTIN 13 /* Built-in LED */
#define ARDUINO_PWM_HZ 500 /* Arduino UNO's PWM is around 500Hz */
#define ARDUINO_LAYOUT_PIN_MAX 20
#define ARDUINO_PINOUT_PIN_MAX 20 /* Arduino UNO has 20 pins in total*/
#define ARDUINO_PINOUT_ADC_MAX 6 /* Arduino UNO has 5 ADC pins */
#define ARDUINO_PINOUT_PWM_MAX 5 /* Arduino UNO has 5 PWM pins */
#define A0 (14)
#define A1 (15)
......@@ -23,7 +24,5 @@
#define A3 (17)
#define A4 (18)
#define A5 (19)
#define A6 (20)
#define A7 (21)
#endif
#endif /* __UNO_PINOUT_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册