All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
arduino_iomap.h File Reference

Mapping from MCU pins to Arduino pins. More...

Detailed Description

Mapping from MCU pins to Arduino pins.

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

Author
Mikolai Gütschow mikol.nosp@m.ai.g.nosp@m.uetsc.nosp@m.how@.nosp@m.tu-dr.nosp@m.esde.nosp@m.n.de

Definition in file arduino_iomap.h.

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

Go to the source code of this file.

XIAO's UART devices

Arduino's Serial uses USB-CDC-ACM stdio by default

#define ARDUINO_UART_DEV   UART_UNDEF
 

XIAO's SPI buses

#define ARDUINO_SPI_DEV   SPI_DEV(0)
 

XIAO's I2C buses

#define ARDUINO_I2C_DEV   I2C_DEV(0)
 

XIAO's on-board LED (LED_BUILTIN)

#define ARDUINO_LED   (11)
 

Mapping of MCU pins to Arduino pins

#define ARDUINO_PIN_0   GPIO_PIN(0, 2)
 
#define ARDUINO_PIN_1   GPIO_PIN(0, 3)
 
#define ARDUINO_PIN_2   GPIO_PIN(0, 28)
 
#define ARDUINO_PIN_3   GPIO_PIN(0, 29)
 
#define ARDUINO_PIN_4   GPIO_PIN(0, 4)
 
#define ARDUINO_PIN_5   GPIO_PIN(0, 5)
 
#define ARDUINO_PIN_6   GPIO_PIN(1, 11)
 
#define ARDUINO_PIN_7   GPIO_PIN(1, 12)
 
#define ARDUINO_PIN_8   GPIO_PIN(1, 13)
 
#define ARDUINO_PIN_9   GPIO_PIN(1, 14)
 
#define ARDUINO_PIN_10   GPIO_PIN(1, 15)
 
#define ARDUINO_PIN_11   GPIO_PIN(0, 26)
 
#define ARDUINO_PIN_12   GPIO_PIN(0, 6)
 
#define ARDUINO_PIN_13   GPIO_PIN(0, 30)
 
#define ARDUINO_PIN_LAST   13
 

Aliases for analog pins

#define ARDUINO_PIN_A0   ARDUINO_PIN_0
 
#define ARDUINO_PIN_A1   ARDUINO_PIN_1
 
#define ARDUINO_PIN_A2   ARDUINO_PIN_2
 
#define ARDUINO_PIN_A3   ARDUINO_PIN_3
 
#define ARDUINO_PIN_A4   ARDUINO_PIN_4
 
#define ARDUINO_PIN_A5   ARDUINO_PIN_5
 

Mapping of Arduino analog pins to RIOT ADC lines

#define ARDUINO_A0   ADC_LINE(0)
 
#define ARDUINO_A1   ADC_LINE(1)
 
#define ARDUINO_A2   ADC_LINE(4)
 
#define ARDUINO_A3   ADC_LINE(5)
 
#define ARDUINO_A4   ADC_LINE(2)
 
#define ARDUINO_A5   ADC_LINE(3)
 
#define ARDUINO_ANALOG_PIN_LAST   5
 

Macro Definition Documentation

◆ ARDUINO_A0

#define ARDUINO_A0   ADC_LINE(0)

Definition at line 117 of file arduino_iomap.h.

◆ ARDUINO_A1

#define ARDUINO_A1   ADC_LINE(1)

Definition at line 118 of file arduino_iomap.h.

◆ ARDUINO_A2

#define ARDUINO_A2   ADC_LINE(4)

Definition at line 119 of file arduino_iomap.h.

◆ ARDUINO_A3

#define ARDUINO_A3   ADC_LINE(5)

Definition at line 120 of file arduino_iomap.h.

◆ ARDUINO_A4

#define ARDUINO_A4   ADC_LINE(2)

Definition at line 121 of file arduino_iomap.h.

◆ ARDUINO_A5

#define ARDUINO_A5   ADC_LINE(3)

Definition at line 122 of file arduino_iomap.h.

◆ ARDUINO_ANALOG_PIN_LAST

#define ARDUINO_ANALOG_PIN_LAST   5

Definition at line 124 of file arduino_iomap.h.

◆ ARDUINO_I2C_DEV

#define ARDUINO_I2C_DEV   I2C_DEV(0)

Definition at line 51 of file arduino_iomap.h.

◆ ARDUINO_LED

#define ARDUINO_LED   (11)

Definition at line 58 of file arduino_iomap.h.

◆ ARDUINO_PIN_0

#define ARDUINO_PIN_0   GPIO_PIN(0, 2)

Definition at line 66 of file arduino_iomap.h.

◆ ARDUINO_PIN_1

#define ARDUINO_PIN_1   GPIO_PIN(0, 3)

Definition at line 67 of file arduino_iomap.h.

◆ ARDUINO_PIN_10

#define ARDUINO_PIN_10   GPIO_PIN(1, 15)

Definition at line 78 of file arduino_iomap.h.

◆ ARDUINO_PIN_11

#define ARDUINO_PIN_11   GPIO_PIN(0, 26)

Definition at line 81 of file arduino_iomap.h.

◆ ARDUINO_PIN_12

#define ARDUINO_PIN_12   GPIO_PIN(0, 6)

Definition at line 82 of file arduino_iomap.h.

◆ ARDUINO_PIN_13

#define ARDUINO_PIN_13   GPIO_PIN(0, 30)

Definition at line 83 of file arduino_iomap.h.

◆ ARDUINO_PIN_2

#define ARDUINO_PIN_2   GPIO_PIN(0, 28)

Definition at line 68 of file arduino_iomap.h.

◆ ARDUINO_PIN_3

#define ARDUINO_PIN_3   GPIO_PIN(0, 29)

Definition at line 69 of file arduino_iomap.h.

◆ ARDUINO_PIN_4

#define ARDUINO_PIN_4   GPIO_PIN(0, 4)

Definition at line 70 of file arduino_iomap.h.

◆ ARDUINO_PIN_5

#define ARDUINO_PIN_5   GPIO_PIN(0, 5)

Definition at line 71 of file arduino_iomap.h.

◆ ARDUINO_PIN_6

#define ARDUINO_PIN_6   GPIO_PIN(1, 11)

Definition at line 72 of file arduino_iomap.h.

◆ ARDUINO_PIN_7

#define ARDUINO_PIN_7   GPIO_PIN(1, 12)

Definition at line 75 of file arduino_iomap.h.

◆ ARDUINO_PIN_8

#define ARDUINO_PIN_8   GPIO_PIN(1, 13)

Definition at line 76 of file arduino_iomap.h.

◆ ARDUINO_PIN_9

#define ARDUINO_PIN_9   GPIO_PIN(1, 14)

Definition at line 77 of file arduino_iomap.h.

◆ ARDUINO_PIN_A0

#define ARDUINO_PIN_A0   ARDUINO_PIN_0

Definition at line 92 of file arduino_iomap.h.

◆ ARDUINO_PIN_A1

#define ARDUINO_PIN_A1   ARDUINO_PIN_1

Definition at line 93 of file arduino_iomap.h.

◆ ARDUINO_PIN_A2

#define ARDUINO_PIN_A2   ARDUINO_PIN_2

Definition at line 94 of file arduino_iomap.h.

◆ ARDUINO_PIN_A3

#define ARDUINO_PIN_A3   ARDUINO_PIN_3

Definition at line 95 of file arduino_iomap.h.

◆ ARDUINO_PIN_A4

#define ARDUINO_PIN_A4   ARDUINO_PIN_4

Definition at line 96 of file arduino_iomap.h.

◆ ARDUINO_PIN_A5

#define ARDUINO_PIN_A5   ARDUINO_PIN_5

Definition at line 97 of file arduino_iomap.h.

◆ ARDUINO_PIN_LAST

#define ARDUINO_PIN_LAST   13

Definition at line 85 of file arduino_iomap.h.

◆ ARDUINO_SPI_DEV

#define ARDUINO_SPI_DEV   SPI_DEV(0)

Definition at line 44 of file arduino_iomap.h.

◆ ARDUINO_UART_DEV

#define ARDUINO_UART_DEV   UART_UNDEF

Definition at line 37 of file arduino_iomap.h.