[boards] Add WB2L variant definition
This commit is contained in:
1
boards/wb2l/pins_arduino.h
Normal file
1
boards/wb2l/pins_arduino.h
Normal file
@@ -0,0 +1 @@
|
||||
#include "variant.h"
|
||||
38
boards/wb2l/variant.cpp
Normal file
38
boards/wb2l/variant.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* This file was auto-generated from wb2l.json using boardgen */
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
// clang-format off
|
||||
PinInfo pinTable[PINS_COUNT] = {
|
||||
// D0: P8, PWM2
|
||||
{GPIO8, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D1: P7, PWM1
|
||||
{GPIO7, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D2: P6, PWM0
|
||||
{GPIO6, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D3: P26, PWM5, IRDA
|
||||
{GPIO26, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D4: P24, PWM4
|
||||
{GPIO24, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D5: P10, UART1_RX
|
||||
{GPIO10, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
|
||||
// D6: P11, UART1_TX
|
||||
{GPIO11, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
|
||||
// D7: P1, UART2_RX, I2C2_SDA
|
||||
{GPIO1, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
|
||||
// D8: P0, UART2_TX, I2C2_SCL
|
||||
{GPIO0, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
|
||||
// D9: P20, I2C1_SCL, TCK, FSCK
|
||||
{GPIO20, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_JTAG, PIN_NONE, 0},
|
||||
// D10: P21, I2C1_SDA, TMS, MCLK, ^FCS
|
||||
{GPIO21, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_JTAG, PIN_NONE, 0},
|
||||
// D11: P23, ADC3, TDO, FSO
|
||||
{GPIO23, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_JTAG, PIN_NONE, 0},
|
||||
// D12: P22, TDI, FSI
|
||||
{GPIO22, PIN_GPIO | PIN_IRQ | PIN_JTAG, PIN_NONE, 0},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
} // extern "C"
|
||||
39
boards/wb2l/variant.h
Normal file
39
boards/wb2l/variant.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/* This file was auto-generated from wb2l.json using boardgen */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <WVariant.h>
|
||||
|
||||
// clang-format off
|
||||
|
||||
// Pins
|
||||
// ----
|
||||
#define PINS_COUNT 13
|
||||
#define NUM_DIGITAL_PINS 13
|
||||
#define NUM_ANALOG_INPUTS 1
|
||||
#define NUM_ANALOG_OUTPUTS 0
|
||||
|
||||
// Analog pins
|
||||
// -----------
|
||||
#define PIN_A0 11u // GPIO23
|
||||
#define A0 PIN_A0
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define SPI_INTERFACES_COUNT 0
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define WIRE_INTERFACES_COUNT 2
|
||||
#define PIN_WIRE1_SCL 9u // GPIO20
|
||||
#define PIN_WIRE1_SDA 10u // GPIO21
|
||||
#define PIN_WIRE2_SCL 8u // GPIO0
|
||||
#define PIN_WIRE2_SDA 7u // GPIO1
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define SERIAL_INTERFACES_COUNT 2
|
||||
#define PIN_SERIAL1_RX 5u // GPIO10
|
||||
#define PIN_SERIAL1_TX 6u // GPIO11
|
||||
#define PIN_SERIAL2_RX 7u // GPIO1
|
||||
#define PIN_SERIAL2_TX 8u // GPIO0
|
||||
Reference in New Issue
Block a user