Files
libretiny/boards/variants/wr2l.h
2023-03-20 21:28:50 +01:00

49 lines
1.3 KiB
C

/* This file was auto-generated from wr2l.json using boardgen */
#pragma once
// clang-format off
// Pins
// ----
#define PINS_COUNT 5 // Total GPIO count
#define NUM_DIGITAL_PINS 5 // Digital inputs/outputs
#define NUM_ANALOG_INPUTS 1 // ADC inputs
#define NUM_ANALOG_OUTPUTS 4 // PWM & DAC outputs
#define PINS_GPIO_MAX 19 // Last usable GPIO number
// Pin function macros
// -------------------
#define PIN_ADC1 19u // PA_19
#define PIN_CS0 19u // PA_19
#define PIN_CS1 19u // PA_19
#define PIN_CTS0 19u // PA_19
#define PIN_PA05 5u // PA_5
#define PIN_PA12 12u // PA_12
#define PIN_PA14 14u // PA_14
#define PIN_PA15 15u // PA_15
#define PIN_PA19 19u // PA_19
#define PIN_PWM0 14u // PA_14
#define PIN_PWM1 15u // PA_15
#define PIN_PWM3 12u // PA_12
#define PIN_PWM4 5u // PA_5
#define PIN_SDA0 19u // PA_19
// Arduino pin names
// -----------------
#define PIN_D0 15u // PA_15
#define PIN_D1 14u // PA_14
#define PIN_D2 5u // PA_5
#define PIN_D3 19u // PA_19
#define PIN_D4 12u // PA_12
#define PIN_A0 19u // PA_19
// Static pin names
// ----------------
static const unsigned char A0 = PIN_A0;
static const unsigned char D0 = PIN_D0;
static const unsigned char D1 = PIN_D1;
static const unsigned char D2 = PIN_D2;
static const unsigned char D3 = PIN_D3;
static const unsigned char D4 = PIN_D4;