1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #21004 from maribu/boards/common/arduino-zero/arduino-iomap

boards/wemos-zero: fix Arduio I/O Map
This commit is contained in:
mguetschow 2024-11-19 15:15:19 +00:00 committed by GitHub
commit 89b5169037
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 4 deletions

View File

@ -64,11 +64,22 @@ extern "C" {
* @name Mapping of MCU pins to Arduino pins
* @{
*/
/* The WeMos Zero / HW-819 has D2 and D4 swapped compared to official Arduino
* Zero, so we have to handle D2 and D4 differently depending on board */
#ifdef BOARD_WEMOS_ZERO
# define ARDUINO_PIN_2 GPIO_PIN(PA, 8)
# define ARDUINO_PIN_4 GPIO_PIN(PA, 14)
#else /* Official Arduino Zero or fully compatible: */
# define ARDUINO_PIN_2 GPIO_PIN(PA, 14)
# define ARDUINO_PIN_4 GPIO_PIN(PA, 8)
#endif
/* all other pins are identical for all currently supported Arduino Zero
* compatible boards */
#define ARDUINO_PIN_0 GPIO_PIN(PA, 11)
#define ARDUINO_PIN_1 GPIO_PIN(PA, 10)
#define ARDUINO_PIN_2 GPIO_PIN(PA, 14)
#define ARDUINO_PIN_3 GPIO_PIN(PA, 9)
#define ARDUINO_PIN_4 GPIO_PIN(PA, 8)
#define ARDUINO_PIN_5 GPIO_PIN(PA, 15)
#define ARDUINO_PIN_6 GPIO_PIN(PA, 20)
#define ARDUINO_PIN_7 GPIO_PIN(PA, 21)

View File

@ -6,13 +6,14 @@
## Overview
The WeMos Zero is a cheap clone of Arduino Zero featuring a ATSAMD21G18A.
These boards either have a silkscreen "WeMos" or "HW-910" label on their back.
Unlike the original Zero, it does not include an embedded debugger/programmer.
Instead, the [UF2 Bootloader](https://github.com/microsoft/uf2-samdx1) is
used to program this board. The SAMD21 is a ARM Cortex-M0+ micro-controller.
It has 256KiB of flash memory and 32KiB of RAM.
Note: The official Arduino Zero using the native USB port and the Adafruit
Metro M0 Express should also work with board definition.
@note The official Arduino Zero using the native USB port and the Adafruit
Metro M0 Express should also work with this board definition.
## Hardware