pins_arduino.h 1.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
/*
 * Copyright (c) 2006-2022, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-08-05     liYony       first version
 */

#ifndef Pins_Arduino_h
#define Pins_Arduino_h

/* pins alias. Must keep in sequence */
#define D0   (0)
#define D1   (1)
#define D2   (2)
#define D3   (3)
#define D4   (4)
#define D5   (5)
#define D6   (6)
#define D7   (7)
#define D8   (8)
#define D9   (9)
#define D10  (10)
#define D11  (11)
#define D12  (12)
#define D13  (13)
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
#define D14  (14)
#define D15  (15)
#define D16  (16)
#define D17  (17)
#define D18  (18)
#define D19  (19)
#define D20  (20)
#define D21  (21)
#define D22  (22)
#define D23  (23)
#define D24  (24)
#define D25  (25)
#define D26  (26)
#define A0   (27)
#define A1   (28)
#define A2   (29)
#define A3   (30)
#define A4   (31)
#define A5   (32)
#define A6   (33)
49 50

#define F_CPU  72000000L /* CPU: 72MHz */
51
#define LED_BUILTIN  D8 /* Default Built-in LED */
52

53
/* i2c1 - PB9-SDA PB8-SCL */
54 55
#define RTDUINO_DEFAULT_IIC_BUS_NAME            "i2c1"

56
/* uart2 - PA2-TX  PA3-RX */
57
#define RTDUINO_SERIAL2_DEVICE_NAME             "uart2"
58 59

/* uart3 - PB10-TX PB11-RX */
60 61
#define RTDUINO_SERIAL3_DEVICE_NAME             "uart3"

62
/* spi2 - PB13-SCK  PB14-MISO  PB15-MOSI */
63
#define SS  D7 /* Chip select pin of default spi */
L
liyangyang 已提交
64 65
#define RTDUINO_DEFAULT_SPI_BUS_NAME            "spi2"

66
#endif /* Pins_Arduino_h */