[boards] Add WB02A board (#332)
This commit is contained in:
93
boards/_base/pcb/wb02a-test.json
Normal file
93
boards/_base/pcb/wb02a-test.json
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"pcb": {
|
||||
"test_pads": {
|
||||
"TA9": "wb02a.back.a9.anchor",
|
||||
"TGND": "wb02a.back.gnd.anchor",
|
||||
"TRX1": "wb02a.back.rx1.anchor",
|
||||
"TTX1": "wb02a.back.tx1.anchor",
|
||||
},
|
||||
"back": [
|
||||
{
|
||||
"type": "text",
|
||||
"pos": "0.5,2.3",
|
||||
"text": "WB02A-0882H-1518D1",
|
||||
"font_size": 1.4,
|
||||
"fill": {
|
||||
"color": "${SILK_COLOR}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "circle",
|
||||
"pos": "11.6,6.4",
|
||||
"d": 4.5,
|
||||
"preset": "copper1"
|
||||
},
|
||||
{
|
||||
"type": "rect",
|
||||
"pos": "3.5,8.5",
|
||||
"size": "4.2,3.7",
|
||||
"preset": "copper1"
|
||||
},
|
||||
{
|
||||
"id": "a9",
|
||||
"name": "label_line_up",
|
||||
"pos": "1.9,12.3",
|
||||
"vars": {
|
||||
"DIR": "left",
|
||||
"W": 1.3,
|
||||
"H": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "2.5,12.3"
|
||||
},
|
||||
{
|
||||
"id": "gnd",
|
||||
"name": "label_line_up",
|
||||
"pos": ".6,6.6",
|
||||
"vars": {
|
||||
"DIR": "left",
|
||||
"W": 0,
|
||||
"H": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "1.2,6.6"
|
||||
},
|
||||
{
|
||||
"id": "rx1",
|
||||
"name": "label_line_up",
|
||||
"pos": "3.2,6",
|
||||
"vars": {
|
||||
"DIR": "left",
|
||||
"W": 2.6,
|
||||
"H": 1.4
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "3.2,6.6"
|
||||
},
|
||||
{
|
||||
"id": "tx1",
|
||||
"name": "label_line_up",
|
||||
"pos": "5.2,6",
|
||||
"vars": {
|
||||
"DIR": "left",
|
||||
"W": 4.6,
|
||||
"H": 3.4
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "5.2,6.6"
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "8.5,12.3"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
75
boards/_base/pcb/wb02a.json
Normal file
75
boards/_base/pcb/wb02a.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"pcb": {
|
||||
"templates": [
|
||||
"tuya2",
|
||||
"pcb-blue-light",
|
||||
"rf-type1"
|
||||
],
|
||||
"scale": 10.5,
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI,I2C",
|
||||
"pinout": {
|
||||
"1": {
|
||||
"PWR": 3.3
|
||||
},
|
||||
"2": {
|
||||
"IC": 15,
|
||||
"ARD": "D0"
|
||||
},
|
||||
"3": {
|
||||
"GND": null
|
||||
},
|
||||
"4": {
|
||||
"IC": 13,
|
||||
"ARD": "D1"
|
||||
},
|
||||
"5": {
|
||||
"IC": 11,
|
||||
"ARD": "D2"
|
||||
},
|
||||
"6": {
|
||||
"IC": 21,
|
||||
"ARD": "D3"
|
||||
},
|
||||
"7": {
|
||||
"IC": 10,
|
||||
"ARD": "D4"
|
||||
},
|
||||
"8": {
|
||||
"IC": 9,
|
||||
"ARD": [
|
||||
"D5",
|
||||
"A0"
|
||||
]
|
||||
},
|
||||
"9": {
|
||||
"IC": 12,
|
||||
"ARD": [
|
||||
"D6",
|
||||
"A1"
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"IC": 7
|
||||
},
|
||||
"11": {
|
||||
"IC": 13,
|
||||
"ARD": "D1"
|
||||
},
|
||||
"TA9": {
|
||||
"IC": 17,
|
||||
"ARD": "D7"
|
||||
},
|
||||
"TGND": {
|
||||
"GND": null
|
||||
},
|
||||
"TRX1": {
|
||||
"IC": 29,
|
||||
"ARD": "D8"
|
||||
},
|
||||
"TTX1": {
|
||||
"IC": 30,
|
||||
"ARD": "D9"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
45
boards/variants/wb02a.c
Normal file
45
boards/variants/wb02a.c
Normal file
@@ -0,0 +1,45 @@
|
||||
/* This file was auto-generated from wb02a.json using boardgen */
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#ifdef LT_VARIANT_INCLUDE
|
||||
#include LT_VARIANT_INCLUDE
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
PinInfo lt_arduino_pin_info_list[PINS_COUNT] = {
|
||||
// D0: PA07, SD_D3, I2S0_RX, I2C0_SCL, I2C0_SDA
|
||||
{PA_7, , PIN_NONE, 0},
|
||||
// D1: PA05, I2C0_SCL, I2C0_SDA
|
||||
{PA_5, , PIN_NONE, 0},
|
||||
// D2: PA03, UART0_RX, I2C0_SCL, I2C0_SDA
|
||||
{PA_3, , PIN_NONE, 0},
|
||||
// D3: PA10, SD_D0, I2S0_TX, I2C0_SCL, I2C0_SDA
|
||||
{PA_10, , PIN_NONE, 0},
|
||||
// D4: PA02, UART0_TX, I2C0_SCL, I2C0_SDA
|
||||
{PA_2, , PIN_NONE, 0},
|
||||
// D5: PA01, ADC3, SWDIO, I2C0_SCL, I2C0_SDA
|
||||
{PA_1, , PIN_NONE, 0},
|
||||
// D6: PA04, ADC4, SWCLK, I2C0_SCL, I2C0_SDA
|
||||
{PA_4, , PIN_NONE, 0},
|
||||
// D7: PA09, BOOT1, SD_CLK, I2S0_SCLK, I2C0_SCL, I2C0_SDA
|
||||
{PA_9, , PIN_NONE, 0},
|
||||
// D8: PB08, UART1_RX, I2C0_SCL, I2C0_SDA
|
||||
{PB_8, , PIN_NONE, 0},
|
||||
// D9: PB09, UART1_TX, I2C0_SCL, I2C0_SDA
|
||||
{PB_9, , PIN_NONE, 0},
|
||||
};
|
||||
|
||||
PinInfo *lt_arduino_pin_gpio_map[] = {
|
||||
[1] = &(lt_arduino_pin_info_list[5]), // PA_1 (D5)
|
||||
[2] = &(lt_arduino_pin_info_list[4]), // PA_2 (D4)
|
||||
[3] = &(lt_arduino_pin_info_list[2]), // PA_3 (D2)
|
||||
[4] = &(lt_arduino_pin_info_list[6]), // PA_4 (D6)
|
||||
[5] = &(lt_arduino_pin_info_list[1]), // PA_5 (D1)
|
||||
[7] = &(lt_arduino_pin_info_list[0]), // PA_7 (D0)
|
||||
[9] = &(lt_arduino_pin_info_list[7]), // PA_9 (D7)
|
||||
[10] = &(lt_arduino_pin_info_list[3]), // PA_10 (D3)
|
||||
[24] = &(lt_arduino_pin_info_list[8]), // PB_8 (D8)
|
||||
[25] = &(lt_arduino_pin_info_list[9]), // PB_9 (D9)
|
||||
};
|
||||
// clang-format on
|
||||
110
boards/variants/wb02a.h
Normal file
110
boards/variants/wb02a.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/* This file was auto-generated from wb02a.json using boardgen */
|
||||
|
||||
#pragma once
|
||||
|
||||
// clang-format off
|
||||
|
||||
// Pins
|
||||
// ----
|
||||
#define PINS_COUNT 10 // Total GPIO count
|
||||
#define NUM_DIGITAL_PINS 10 // Digital inputs/outputs
|
||||
#define NUM_ANALOG_INPUTS 2 // ADC inputs
|
||||
#define NUM_ANALOG_OUTPUTS 0 // PWM & DAC outputs
|
||||
#define PINS_GPIO_MAX 25 // Last usable GPIO number
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE0_SCL_0 7u // PA_7
|
||||
#define PIN_WIRE0_SCL_1 5u // PA_5
|
||||
#define PIN_WIRE0_SCL_2 3u // PA_3
|
||||
#define PIN_WIRE0_SCL_3 10u // PA_10
|
||||
#define PIN_WIRE0_SCL_4 2u // PA_2
|
||||
#define PIN_WIRE0_SCL_5 1u // PA_1
|
||||
#define PIN_WIRE0_SCL_6 4u // PA_4
|
||||
#define PIN_WIRE0_SCL_7 5u // PA_5
|
||||
#define PIN_WIRE0_SCL_8 9u // PA_9
|
||||
#define PIN_WIRE0_SCL_9 24u // PB_8
|
||||
#define PIN_WIRE0_SCL_10 25u // PB_9
|
||||
#define PIN_WIRE0_SDA_0 7u // PA_7
|
||||
#define PIN_WIRE0_SDA_1 5u // PA_5
|
||||
#define PIN_WIRE0_SDA_2 3u // PA_3
|
||||
#define PIN_WIRE0_SDA_3 10u // PA_10
|
||||
#define PIN_WIRE0_SDA_4 2u // PA_2
|
||||
#define PIN_WIRE0_SDA_5 1u // PA_1
|
||||
#define PIN_WIRE0_SDA_6 4u // PA_4
|
||||
#define PIN_WIRE0_SDA_7 5u // PA_5
|
||||
#define PIN_WIRE0_SDA_8 9u // PA_9
|
||||
#define PIN_WIRE0_SDA_9 24u // PB_8
|
||||
#define PIN_WIRE0_SDA_10 25u // PB_9
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){7u, 5u, 3u, 10u, 2u, 1u, 4u, 5u, 9u, 24u, 25u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){7u, 5u, 3u, 10u, 2u, 1u, 4u, 5u, 9u, 24u, 25u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_RX 3u // PA_3
|
||||
#define PIN_SERIAL0_TX 2u // PA_2
|
||||
#define PIN_SERIAL1_RX 24u // PB_8
|
||||
#define PIN_SERIAL1_TX 25u // PB_9
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){3u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){2u}
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){24u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){25u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
#define PIN_ADC3 1u // PA_1
|
||||
#define PIN_ADC4 4u // PA_4
|
||||
#define PIN_PA01 1u // PA_1
|
||||
#define PIN_PA02 2u // PA_2
|
||||
#define PIN_PA03 3u // PA_3
|
||||
#define PIN_PA04 4u // PA_4
|
||||
#define PIN_PA05 5u // PA_5
|
||||
#define PIN_PA07 7u // PA_7
|
||||
#define PIN_PA09 9u // PA_9
|
||||
#define PIN_PA10 10u // PA_10
|
||||
#define PIN_PB08 24u // PB_8
|
||||
#define PIN_PB09 25u // PB_9
|
||||
#define PIN_RX0 3u // PA_3
|
||||
#define PIN_RX1 24u // PB_8
|
||||
#define PIN_SCL0 25u // PB_9
|
||||
#define PIN_SDA0 25u // PB_9
|
||||
#define PIN_TX0 2u // PA_2
|
||||
#define PIN_TX1 25u // PB_9
|
||||
|
||||
// Port availability
|
||||
// -----------------
|
||||
#define HAS_SERIAL0 1
|
||||
#define HAS_SERIAL1 1
|
||||
#define HAS_WIRE0 1
|
||||
#define SERIAL_INTERFACES_COUNT 2
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
// Arduino pin names
|
||||
// -----------------
|
||||
#define PIN_D0 7u // PA_7
|
||||
#define PIN_D1 5u // PA_5
|
||||
#define PIN_D2 3u // PA_3
|
||||
#define PIN_D3 10u // PA_10
|
||||
#define PIN_D4 2u // PA_2
|
||||
#define PIN_D5 1u // PA_1
|
||||
#define PIN_D6 4u // PA_4
|
||||
#define PIN_D7 9u // PA_9
|
||||
#define PIN_D8 24u // PB_8
|
||||
#define PIN_D9 25u // PB_9
|
||||
#define PIN_A0 1u // PA_1
|
||||
#define PIN_A1 4u // PA_4
|
||||
|
||||
// Static pin names
|
||||
// ----------------
|
||||
static const unsigned char A0 = PIN_A0;
|
||||
static const unsigned char A1 = PIN_A1;
|
||||
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;
|
||||
static const unsigned char D5 = PIN_D5;
|
||||
static const unsigned char D6 = PIN_D6;
|
||||
static const unsigned char D7 = PIN_D7;
|
||||
static const unsigned char D8 = PIN_D8;
|
||||
static const unsigned char D9 = PIN_D9;
|
||||
22
boards/wb02a.json
Normal file
22
boards/wb02a.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"_base": [
|
||||
"lightning-ln882x",
|
||||
"lightning-ln882hki",
|
||||
"ic/ln882hk",
|
||||
"pcb/wb02a",
|
||||
"pcb/wb02a-test"
|
||||
],
|
||||
"build": {
|
||||
"mcu": "ln882hk",
|
||||
"variant": "wb02a"
|
||||
},
|
||||
"name": "WB02A Wi-Fi/BLE Module",
|
||||
"url": "https://docs.libretiny.eu/boards/wb02a/",
|
||||
"vendor": "Unknown",
|
||||
"doc": {
|
||||
"fccid": ""
|
||||
},
|
||||
"pcb": {
|
||||
"symbol": ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user