mbeduino shield.h - ピン番号変換定義ファイル

mbeduino Arduino shield.h - ピン番号変換定義ファイル

mbeduino - mbed用マザーボード(ベースボード)
を使うにあたり、mbedとArduino Shield部とのピン番号の変換定義ファイル。

shield.h

#define ARD_D0 p27
#define ARD_D1 p28
#define ARD_D2 p29
#define ARD_D3 p21
#define ARD_D4 p30
#define ARD_D5 p22
#define ARD_D6 p23
#define ARD_D7 p11
#define ARD_D8 p12
#define ARD_D9 p24
#define ARD_D10 p25
#define ARD_D11 p5
#define ARD_D12 p6
#define ARD_D13 p7

#define ARD_D14 ARD_A0
#define ARD_D15 ARD_A1
#define ARD_D16 ARD_A2
#define ARD_D17 ARD_A3
#define ARD_D18 ARD_SDA
#define ARD_D19 ARD_SCL

#define ARD_A0 p15
#define ARD_A1 p16
#define ARD_A2 p17
#define ARD_A3 p18
#define ARD_A4 p19
#define ARD_A5 p20

#define ARD_PWM0 ARD_D3
#define ARD_PWM1 ARD_D5
#define ARD_PWM2 ARD_D6
#define ARD_PWM3 ARD_D9
#define ARD_PWM4 ARD_D10
#define ARD_PWM5 p26

#define ARD_RX ARD_D0
#define ARD_TX ARD_D1
#define ARD_SDA p9
#define ARD_SCL p10
#define ARD_MOSI p5
#define ARD_MISO p6
#define ARD_SCK p7

DigitalOut shield_d13(ARD_D13);

AnalogIn shield_a0(ARD_A0);

履歴


0 comments

Please log in to post a comment.