Loading...
Searching...
No Matches
arduino_iomap.h File Reference

Mapping from MCU pins to Arduino pins for Pro Micro nRF52840 boards. More...

Detailed Description

Mapping from MCU pins to Arduino pins for Pro Micro nRF52840 boards.

You can use the defines in this file for simplified interaction with the Arduino specific pin numbers.

Author
Bas Stottelaar basst.nosp@m.otte.nosp@m.laar@.nosp@m.gmai.nosp@m.l.com

Definition in file arduino_iomap.h.

#include "periph/adc.h"
#include "periph/gpio.h"
#include "periph/i2c.h"
#include "periph/spi.h"
+ Include dependency graph for arduino_iomap.h:

Go to the source code of this file.

Pro Micro's UART devices

#define ARDUINO_UART_DEV   UART_UNDEF
 Board uses USB-CDC-ACM by default.
 

Pro Micro's SPI buses

#define ARDUINO_SPI_DEV   SPI_DEV(0)
 Standard SPI bus for general purpose use.
 

Pro Micro's I2C buses

#define ARDUINO_I2C_DEV   I2C_DEV(0)
 Standard I2C bus for general purpose use.
 

Pro Micro's on-board LED (LED_BUILTIN)

#define ARDUINO_LED   (13)
 Internal LED pin (not on header)
 

Mapping of MCU pins to Arduino pins

#define ARDUINO_PIN_0   GPIO_PIN(0, 8)
 Pin definition for D0 (RX)
 
#define ARDUINO_PIN_1   GPIO_PIN(0, 6)
 Pin definition for D1 (TX)
 
#define ARDUINO_PIN_2   GPIO_PIN(0, 17)
 Pin definition for D2 (SDA)
 
#define ARDUINO_PIN_3   GPIO_PIN(0, 20)
 Pin definition for D3 (SCL)
 
#define ARDUINO_PIN_4   GPIO_PIN(0, 22)
 Pin definition for D4.
 
#define ARDUINO_PIN_5   GPIO_PIN(0, 24)
 Pin definition for D5.
 
#define ARDUINO_PIN_6   GPIO_PIN(1, 0)
 Pin definition for D6.
 
#define ARDUINO_PIN_7   GPIO_PIN(0, 11)
 Pin definition for D7.
 
#define ARDUINO_PIN_8   GPIO_PIN(1, 4)
 Pin definition for D8.
 
#define ARDUINO_PIN_9   GPIO_PIN(1, 6)
 Pin definition for D9.
 
#define ARDUINO_PIN_10   GPIO_PIN(0, 9)
 Pin definition for D10.
 
#define ARDUINO_PIN_11   GPIO_UNDEF
 Pin undefined.
 
#define ARDUINO_PIN_12   GPIO_UNDEF
 Pin undefined.
 
#define ARDUINO_PIN_13   GPIO_PIN(0, 15)
 Pin definition for D13 (LED)
 
#define ARDUINO_PIN_14   GPIO_PIN(1, 11)
 Pin definition for D14 (MISO)
 
#define ARDUINO_PIN_15   GPIO_PIN(1, 13)
 Pin definition for D15 (SCLK)
 
#define ARDUINO_PIN_16   GPIO_PIN(0, 10)
 Pin definition for D11 (MOSI)
 
#define ARDUINO_PIN_17   GPIO_UNDEF
 Pin undefined.
 
#define ARDUINO_PIN_18   GPIO_PIN(1, 15)
 Pin definition for D18.
 
#define ARDUINO_PIN_19   GPIO_PIN(0, 2)
 Pin definition for D19.
 
#define ARDUINO_PIN_20   GPIO_PIN(0, 29)
 Pin definition for D20.
 
#define ARDUINO_PIN_21   GPIO_PIN(0, 31)
 Pin definition for D21.
 
#define ARDUINO_PIN_LAST   21
 Last Arduino Pin.
 

Macro Definition Documentation

◆ ARDUINO_I2C_DEV

#define ARDUINO_I2C_DEV   I2C_DEV(0)

Standard I2C bus for general purpose use.

Definition at line 48 of file arduino_iomap.h.

◆ ARDUINO_LED

#define ARDUINO_LED   (13)

Internal LED pin (not on header)

Definition at line 55 of file arduino_iomap.h.

◆ ARDUINO_PIN_0

#define ARDUINO_PIN_0   GPIO_PIN(0, 8)

Pin definition for D0 (RX)

Definition at line 62 of file arduino_iomap.h.

◆ ARDUINO_PIN_1

#define ARDUINO_PIN_1   GPIO_PIN(0, 6)

Pin definition for D1 (TX)

Definition at line 63 of file arduino_iomap.h.

◆ ARDUINO_PIN_10

#define ARDUINO_PIN_10   GPIO_PIN(0, 9)

Pin definition for D10.

Definition at line 72 of file arduino_iomap.h.

◆ ARDUINO_PIN_11

#define ARDUINO_PIN_11   GPIO_UNDEF

Pin undefined.

Definition at line 73 of file arduino_iomap.h.

◆ ARDUINO_PIN_12

#define ARDUINO_PIN_12   GPIO_UNDEF

Pin undefined.

Definition at line 74 of file arduino_iomap.h.

◆ ARDUINO_PIN_13

#define ARDUINO_PIN_13   GPIO_PIN(0, 15)

Pin definition for D13 (LED)

Definition at line 75 of file arduino_iomap.h.

◆ ARDUINO_PIN_14

#define ARDUINO_PIN_14   GPIO_PIN(1, 11)

Pin definition for D14 (MISO)

Definition at line 76 of file arduino_iomap.h.

◆ ARDUINO_PIN_15

#define ARDUINO_PIN_15   GPIO_PIN(1, 13)

Pin definition for D15 (SCLK)

Definition at line 77 of file arduino_iomap.h.

◆ ARDUINO_PIN_16

#define ARDUINO_PIN_16   GPIO_PIN(0, 10)

Pin definition for D11 (MOSI)

Definition at line 78 of file arduino_iomap.h.

◆ ARDUINO_PIN_17

#define ARDUINO_PIN_17   GPIO_UNDEF

Pin undefined.

Definition at line 79 of file arduino_iomap.h.

◆ ARDUINO_PIN_18

#define ARDUINO_PIN_18   GPIO_PIN(1, 15)

Pin definition for D18.

Definition at line 80 of file arduino_iomap.h.

◆ ARDUINO_PIN_19

#define ARDUINO_PIN_19   GPIO_PIN(0, 2)

Pin definition for D19.

Definition at line 81 of file arduino_iomap.h.

◆ ARDUINO_PIN_2

#define ARDUINO_PIN_2   GPIO_PIN(0, 17)

Pin definition for D2 (SDA)

Definition at line 64 of file arduino_iomap.h.

◆ ARDUINO_PIN_20

#define ARDUINO_PIN_20   GPIO_PIN(0, 29)

Pin definition for D20.

Definition at line 82 of file arduino_iomap.h.

◆ ARDUINO_PIN_21

#define ARDUINO_PIN_21   GPIO_PIN(0, 31)

Pin definition for D21.

Definition at line 83 of file arduino_iomap.h.

◆ ARDUINO_PIN_3

#define ARDUINO_PIN_3   GPIO_PIN(0, 20)

Pin definition for D3 (SCL)

Definition at line 65 of file arduino_iomap.h.

◆ ARDUINO_PIN_4

#define ARDUINO_PIN_4   GPIO_PIN(0, 22)

Pin definition for D4.

Definition at line 66 of file arduino_iomap.h.

◆ ARDUINO_PIN_5

#define ARDUINO_PIN_5   GPIO_PIN(0, 24)

Pin definition for D5.

Definition at line 67 of file arduino_iomap.h.

◆ ARDUINO_PIN_6

#define ARDUINO_PIN_6   GPIO_PIN(1, 0)

Pin definition for D6.

Definition at line 68 of file arduino_iomap.h.

◆ ARDUINO_PIN_7

#define ARDUINO_PIN_7   GPIO_PIN(0, 11)

Pin definition for D7.

Definition at line 69 of file arduino_iomap.h.

◆ ARDUINO_PIN_8

#define ARDUINO_PIN_8   GPIO_PIN(1, 4)

Pin definition for D8.

Definition at line 70 of file arduino_iomap.h.

◆ ARDUINO_PIN_9

#define ARDUINO_PIN_9   GPIO_PIN(1, 6)

Pin definition for D9.

Definition at line 71 of file arduino_iomap.h.

◆ ARDUINO_PIN_LAST

#define ARDUINO_PIN_LAST   21

Last Arduino Pin.

Definition at line 85 of file arduino_iomap.h.

◆ ARDUINO_SPI_DEV

#define ARDUINO_SPI_DEV   SPI_DEV(0)

Standard SPI bus for general purpose use.

Definition at line 41 of file arduino_iomap.h.

◆ ARDUINO_UART_DEV

#define ARDUINO_UART_DEV   UART_UNDEF

Board uses USB-CDC-ACM by default.

Definition at line 34 of file arduino_iomap.h.