Compare commits
77 Commits
v1.2.0
...
d967be0245
| Author | SHA1 | Date | |
|---|---|---|---|
| d967be0245 | |||
| b040f336d4 | |||
| 1bf1ea7596 | |||
|
|
29303f7ec9 | ||
|
|
c6b06d4be6 | ||
|
|
c9b2f9dd23 | ||
|
|
40590d174f | ||
|
|
780fb72bba | ||
|
|
e9977a26e4 | ||
|
|
1d97f0ce84 | ||
|
|
895b6e89c5 | ||
|
|
9114bc4c49 | ||
|
|
9eae0cd253 | ||
|
|
37f096d3b5 | ||
|
|
6bf549b104 | ||
|
|
3054db9d9b | ||
|
|
69e7e2debe | ||
|
|
6083cca72e | ||
|
|
d17ea4da0f | ||
|
|
2ea0066536 | ||
|
|
3d23211c1e | ||
|
|
1769680d9e | ||
|
|
92351c0b92 | ||
|
|
0f6c31386b | ||
|
|
a9009a8cee | ||
|
|
31e1d51dbd | ||
|
|
41819f2fd6 | ||
|
|
17043f634f | ||
|
|
e1c5761df9 | ||
|
|
fbaae21011 | ||
|
|
fa2064b957 | ||
|
|
21a194f43d | ||
|
|
b255402659 | ||
|
|
dfabfbb921 | ||
|
|
3b36a70c9a | ||
|
|
d1386a8e9d | ||
|
|
67b92b7f56 | ||
|
|
a1f8516e60 | ||
|
|
cf52021d38 | ||
|
|
b78c9387a6 | ||
|
|
b748d99437 | ||
|
|
9a33fc0a69 | ||
|
|
4cddc01f22 | ||
|
|
1d80b5fff7 | ||
|
|
140cf07173 | ||
|
|
1e3a82f439 | ||
|
|
c90794e9f5 | ||
|
|
03c723c73d | ||
|
|
bad2ffdd07 | ||
|
|
eed39c9cfb | ||
|
|
7bd6d1d815 | ||
|
|
bb7fcd5c4d | ||
|
|
9b8e00c7fa | ||
|
|
b97825d552 | ||
|
|
085b5aed16 | ||
|
|
7f43624824 | ||
|
|
1ed0000819 | ||
|
|
3b79636d00 | ||
|
|
5a4b932a37 | ||
|
|
dd2ae149ad | ||
|
|
0f5d0a8889 | ||
|
|
3750ae6953 | ||
|
|
5be993f9eb | ||
|
|
57c43ce515 | ||
|
|
159ffa76fd | ||
|
|
1ac3d30d84 | ||
|
|
631ef6ba59 | ||
|
|
27393e47c3 | ||
|
|
bd47772c04 | ||
|
|
f3871388ce | ||
|
|
62874bebf4 | ||
|
|
2ca368305c | ||
|
|
f697ae6f11 | ||
|
|
ef6dd35977 | ||
|
|
ccf21b4eab | ||
|
|
e99c6124e7 | ||
|
|
5721bd74d7 |
@@ -1,11 +1,14 @@
|
||||
# 2025-02-12
|
||||
Language: Cpp
|
||||
BasedOnStyle: LLVM
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlignArrayOfStructures: Left
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveMacros: AcrossComments
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
@@ -21,7 +24,7 @@ IndentCaseLabels: true
|
||||
IndentWidth: 4
|
||||
LambdaBodyIndentation: Signature
|
||||
MaxEmptyLinesToKeep: 1
|
||||
# PointerAlignment: Left # TODO enable this and reformat project
|
||||
PenaltyReturnTypeOnItsOwnLine: 1000
|
||||
QualifierAlignment: Left
|
||||
ReflowComments: true
|
||||
SeparateDefinitionBlocks: Always
|
||||
|
||||
35
.github/workflows/lint.yml
vendored
35
.github/workflows/lint.yml
vendored
@@ -1,35 +0,0 @@
|
||||
name: Lint check
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint-clang-format:
|
||||
name: Lint with clang-format
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Check code with clang-format
|
||||
uses: jidicula/clang-format-action@v4.5.0
|
||||
with:
|
||||
clang-format-version: "14"
|
||||
lint-black:
|
||||
name: Lint with black
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.9"
|
||||
- name: Install test dependencies
|
||||
uses: BSFishy/pip-action@v1
|
||||
with:
|
||||
packages: |
|
||||
black
|
||||
isort
|
||||
- name: Check code with black
|
||||
run: black --check .
|
||||
- name: Check code with isort
|
||||
run: isort --profile black . --check-only
|
||||
46
.github/workflows/platformio-publish.yml
vendored
46
.github/workflows/platformio-publish.yml
vendored
@@ -1,46 +0,0 @@
|
||||
name: PlatformIO Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*.*.*
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install --upgrade platformio
|
||||
- name: Publish PlatformIO package
|
||||
run: pio package publish --non-interactive
|
||||
env:
|
||||
CI: true
|
||||
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
|
||||
- name: Get latest version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||
- name: Release on GitHub
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ steps.get_version.outputs.VERSION }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
13
.github/workflows/push-dev.yml
vendored
Normal file
13
.github/workflows/push-dev.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: Push (dev), Pull Request
|
||||
on:
|
||||
push:
|
||||
branches: ["**"]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
lint-clang:
|
||||
name: Run Clang lint
|
||||
uses: kuba2k2/kuba2k2/.github/workflows/lint-clang.yml@master
|
||||
lint-python:
|
||||
name: Run Python lint
|
||||
uses: kuba2k2/kuba2k2/.github/workflows/lint-python.yml@master
|
||||
@@ -1,10 +1,8 @@
|
||||
name: Deploy docs on GitHub Pages
|
||||
|
||||
name: Push (master)
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
branches: ["master"]
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
docs:
|
||||
name: Deploy docs
|
||||
@@ -19,7 +17,7 @@ jobs:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install docs dependencies
|
||||
run: pip install -U ltchiptool boardgen
|
||||
run: pip install -U ltchiptool "boardgen>=0.11.0"
|
||||
|
||||
- name: Generate docs and static JSON files
|
||||
run: |
|
||||
22
.github/workflows/release.yml
vendored
Normal file
22
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags: ["v*.*.*"]
|
||||
jobs:
|
||||
lint-clang:
|
||||
name: Run Clang lint
|
||||
uses: kuba2k2/kuba2k2/.github/workflows/lint-clang.yml@master
|
||||
publish-pio-platform:
|
||||
name: Publish PlatformIO platform
|
||||
needs:
|
||||
- lint-clang
|
||||
uses: kuba2k2/kuba2k2/.github/workflows/publish-pio-platform.yml@master
|
||||
secrets:
|
||||
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
|
||||
gh-release:
|
||||
name: Publish GitHub release
|
||||
needs:
|
||||
- publish-pio-platform
|
||||
uses: kuba2k2/kuba2k2/.github/workflows/gh-release.yml@master
|
||||
permissions:
|
||||
contents: write
|
||||
72
README.md
72
README.md
@@ -1,9 +1,11 @@
|
||||
# LibreTiny
|
||||
|
||||
<small>(formerly LibreTuya)</small>
|
||||
|
||||
<div align="center" markdown>
|
||||
|
||||
[](https://kuba2k2.github.io/libretiny/)
|
||||

|
||||
[](https://docs.libretiny.eu/)
|
||||

|
||||
|
||||
[](.clang-format)
|
||||
[](https://github.com/psf/black)
|
||||
@@ -13,16 +15,11 @@
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
</div>
|
||||
|
||||
## LibreTuya is now LibreTiny! 🎉
|
||||
|
||||
We have [renamed the project](https://github.com/kuba2k2/libretiny/issues/92) to LibreTiny, also marking the very first v1.0.0 release, along with a huge structure refactor. While some care has been taken to ensure that things don't break, you may still need to update some references in your code to use the new name.
|
||||
|
||||
---
|
||||
|
||||
PlatformIO development platform for IoT modules manufactured by Tuya Inc.
|
||||
PlatformIO development platform for BK7231, RTL8710 and LN882H IoT chips.
|
||||
|
||||
The main goal of this project is to provide a usable build environment for IoT developers. While also providing vendor SDKs as PlatformIO cores,
|
||||
the project focuses on developing working Arduino-compatible cores for supported families. The cores are inspired by Espressif's official core for ESP32,
|
||||
@@ -32,62 +29,11 @@ which should make it easier to port/run existing ESP apps on less-common, unsupp
|
||||
|
||||
**Note:** this project is work-in-progress.
|
||||
|
||||
## Usage
|
||||
<div align="center" markdown>
|
||||
|
||||
1. [Install PlatformIO](https://platformio.org/platformio-ide)
|
||||
2. `platformio platform install -f https://github.com/kuba2k2/libretiny`
|
||||
3. Create a project, build it and upload!
|
||||
4. See the [docs](https://docs.libretiny.eu/) for any questions/problems.
|
||||
## [⭐ Getting started ⭐](https://docs.libretiny.eu/docs/getting-started/)
|
||||
|
||||
<!--
|
||||
## Arduino Core support status
|
||||
|
||||
Note: this list will probably change with each functionality update.
|
||||
|
||||
| `realtek-ambz` | `beken-72xx`
|
||||
--------------------|----------------|-------------
|
||||
Core functions | ✔️ | ✔️
|
||||
GPIO/PWM/IRQ | ✔️/✔️/✔️ | ✔️/✔️/✔️
|
||||
Analog input (ADC) | ✔️ | ✔️
|
||||
Serial | ✔️ | ✔️
|
||||
Serial (extra) | 0, 1, 2 | 1, 2
|
||||
Flash I/O | ✔️ | ✔️
|
||||
**CORE LIBRARIES** | |
|
||||
SoftwareSerial | ✔️ | ❌
|
||||
SPI | ❌ | ❌
|
||||
Wire | ❗ | ❌
|
||||
**OTHER LIBRARIES** | |
|
||||
Wi-Fi STA/AP/Mixed | ✔️ | ✔️
|
||||
Wi-Fi Events | ✔️ | ✔️
|
||||
TCP Client (SSL) | ✔️ (✔️) | ✔️ (❗)
|
||||
TCP Server | ✔️ | ✔️
|
||||
IPv6 | ❌ | ❌
|
||||
HTTP Client (SSL) | ✔️ (✔️) | ❓
|
||||
HTTP Server | ✔️ | ✔️
|
||||
NVS / Preferences | ✔️ | ✔️
|
||||
SPIFFS | ❌ | ❌
|
||||
BLE | - | ❌
|
||||
NTP | ✔️ | ✔️
|
||||
OTA | ✔️ | ✔️
|
||||
MDNS | ✔️ | ✔️
|
||||
MQTT | ✅ | ❌
|
||||
SD | ❌ | ❌
|
||||
|
||||
Symbols:
|
||||
|
||||
- ✔️ working
|
||||
- ✅ tested, external library
|
||||
- ❓ untested
|
||||
- ❗ broken
|
||||
- ❌ not implemented (yet?)
|
||||
- \- not applicable
|
||||
|
||||
Names:
|
||||
|
||||
- Core functions - stuff like delay(), millis(), yield(), etc.
|
||||
- **CORE LIBRARIES** - included normally in all Arduino cores
|
||||
- **OTHER LIBRARIES** - included in ESP32 core or downloadable
|
||||
-->
|
||||
</div>
|
||||
|
||||
## License
|
||||
|
||||
|
||||
12
SUMMARY.md
12
SUMMARY.md
@@ -1,19 +1,25 @@
|
||||
* [Home](README.md)
|
||||
* [](SUMMARY.md)
|
||||
* [😊 Getting started](docs/getting-started/README.md)
|
||||
* [➡️ Info on accessing GPIOs](docs/getting-started/gpio.md)
|
||||
* [](SUMMARY.md)
|
||||
* [📺 Cloudcutter & ESPHome video guide](https://www.youtube.com/watch?v=sSj8f-HCHQ0)
|
||||
* [💡 ESPHome setup guide](docs/projects/esphome.md)
|
||||
* [🛖 ESPHome Hassio Add-On](https://github.com/libretiny-eu/esphome-hass-addon/pkgs/container/libretiny-esphome-hassio)
|
||||
* [](SUMMARY.md)
|
||||
* [📲 Flashing/dumping guide](docs/flashing/)
|
||||
* [🔌 How to connect the chip in download mode?](docs/flashing/chip-connection/)
|
||||
* [💻 Supported chips](docs/status/supported.md)
|
||||
* [🔌 How to flash/enter download mode?](docs/platform/)
|
||||
* [](SUMMARY.md)
|
||||
* [💻 Chips, boards, features](docs/status/supported.md)
|
||||
* [All boards](boards/)
|
||||
* [](SUMMARY.md)
|
||||
* 🍪 Chip family docs & info
|
||||
* [Beken BK72xx](docs/platform/beken-72xx/README.md)
|
||||
* [Finding encryption keys](docs/platform/beken-72xx/keys.md)
|
||||
* [Realtek Ameba - info](docs/platform/realtek-amb/README.md)
|
||||
* [Realtek AmebaZ](docs/platform/realtek-ambz/README.md)
|
||||
* [Debugging](docs/platform/realtek-ambz/debugging.md)
|
||||
* [Exception decoder](docs/platform/realtek-ambz/exception-decoder.md)
|
||||
* [Lightning LN882x](docs/platform/lightning-ln882x/README.md)
|
||||
* [🔧 LT Configuration](docs/dev/config.md)
|
||||
* 🧑 Programmer's manual
|
||||
* [⚠️ Migration guide](docs/dev/migration_v1.0.0.md)
|
||||
|
||||
@@ -41,8 +41,7 @@
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"General info": "../../docs/platform/beken-72xx/README.md",
|
||||
"Flashing guide": "../../docs/platform/beken-72xx/flashing.md"
|
||||
"Info & flashing guide": "../../docs/platform/beken-72xx/README.md"
|
||||
},
|
||||
"extra": [
|
||||
"Bootloader and app partitions contain CRC16 sums every 32 bytes. That results in the actual flash offsets/sizes not aligned to sector boundaries. To simplify calculations, the values shown in the table (extracted from bootloader's partition table) were aligned to 4096 bytes."
|
||||
|
||||
221
boards/_base/ic/ln882hk.json
Normal file
221
boards/_base/ic/ln882hk.json
Normal file
@@ -0,0 +1,221 @@
|
||||
{
|
||||
"pcb": {
|
||||
"ic": {
|
||||
"7": {
|
||||
"IO": "I",
|
||||
"CTRL": "CEN"
|
||||
},
|
||||
"8": {
|
||||
"C_NAME": "PA_0",
|
||||
"GPIO": "PA00",
|
||||
"IRQ": null,
|
||||
"ADC": 2,
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"9": {
|
||||
"C_NAME": "PA_1",
|
||||
"GPIO": "PA01",
|
||||
"IRQ": null,
|
||||
"ADC": 3,
|
||||
"SWD": "DIO",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"C_NAME": "PA_2",
|
||||
"GPIO": "PA02",
|
||||
"IRQ": null,
|
||||
"UART": "0_TX",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"11": {
|
||||
"C_NAME": "PA_3",
|
||||
"GPIO": "PA03",
|
||||
"IRQ": null,
|
||||
"UART": "0_RX",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"12": {
|
||||
"C_NAME": "PA_4",
|
||||
"GPIO": "PA04",
|
||||
"IRQ": null,
|
||||
"ADC": 4,
|
||||
"SWD": "CLK",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"13": {
|
||||
"C_NAME": "PA_5",
|
||||
"GPIO": "PA05",
|
||||
"IRQ": null,
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"14": {
|
||||
"C_NAME": "PA_6",
|
||||
"GPIO": "PA06",
|
||||
"IRQ": null,
|
||||
"SD": "D2",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"15": {
|
||||
"C_NAME": "PA_7",
|
||||
"GPIO": "PA07",
|
||||
"IRQ": null,
|
||||
"SD": "D3",
|
||||
"I2S": "0_RX",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"16": {
|
||||
"C_NAME": "PA_8",
|
||||
"GPIO": "PA08",
|
||||
"IRQ": null,
|
||||
"CTRL": "BOOT0",
|
||||
"SD": "CMD",
|
||||
"I2S": "0_WS",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"17": {
|
||||
"C_NAME": "PA_9",
|
||||
"GPIO": "PA09",
|
||||
"IRQ": null,
|
||||
"CTRL": "BOOT1",
|
||||
"SD": "CLK",
|
||||
"I2S": "0_SCLK",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"21": {
|
||||
"C_NAME": "PA_10",
|
||||
"GPIO": "PA10",
|
||||
"IRQ": null,
|
||||
"SD": "D0",
|
||||
"I2S": "0_TX",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"22": {
|
||||
"C_NAME": "PA_11",
|
||||
"GPIO": "PA11",
|
||||
"IRQ": null,
|
||||
"SD": "D1",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"23": {
|
||||
"C_NAME": "PA_12",
|
||||
"GPIO": "PA12",
|
||||
"IRQ": null,
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"24": {
|
||||
"C_NAME": "PB_3",
|
||||
"GPIO": "PB03",
|
||||
"GPIONUM": 19,
|
||||
"IRQ": null,
|
||||
"ADC": 5,
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"25": {
|
||||
"C_NAME": "PB_4",
|
||||
"GPIO": "PB04",
|
||||
"GPIONUM": 20,
|
||||
"IRQ": null,
|
||||
"ADC": 6,
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"26": {
|
||||
"C_NAME": "PB_5",
|
||||
"GPIO": "PB05",
|
||||
"GPIONUM": 21,
|
||||
"IRQ": null,
|
||||
"ADC": 7,
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"27": {
|
||||
"C_NAME": "PB_6",
|
||||
"GPIO": "PB06",
|
||||
"GPIONUM": 22,
|
||||
"IRQ": null,
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"28": {
|
||||
"C_NAME": "PB_7",
|
||||
"GPIO": "PB07",
|
||||
"GPIONUM": 23,
|
||||
"IRQ": null,
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"29": {
|
||||
"C_NAME": "PB_8",
|
||||
"GPIO": "PB08",
|
||||
"GPIONUM": 24,
|
||||
"IRQ": null,
|
||||
"UART": "1_RX",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
},
|
||||
"30": {
|
||||
"C_NAME": "PB_9",
|
||||
"GPIO": "PB09",
|
||||
"GPIONUM": 25,
|
||||
"IRQ": null,
|
||||
"UART": "1_TX",
|
||||
"I2C": [
|
||||
"0_SCL",
|
||||
"0_SDA"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
31
boards/_base/lightning-ln882hki.json
Normal file
31
boards/_base/lightning-ln882hki.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"build": {
|
||||
"family": "LN882H",
|
||||
"ldscript": "ln882hki_bsp.ld",
|
||||
"bootfile": "boot_ln882h.bin"
|
||||
},
|
||||
"flash": {
|
||||
"boot": "0x000000+0x06000",
|
||||
"part_tab": "0x006000+0x01000",
|
||||
"app": "0x007000+0x12C000",
|
||||
"ota": "0x133000+0xAA000",
|
||||
"nvds": "0x1DD000+0x03000",
|
||||
"kv": "0x1E0000+0x04000",
|
||||
"kvs": "0x1E4000+0x08000",
|
||||
"user": "0x1EC000+0x14000"
|
||||
},
|
||||
"upload": {
|
||||
"flash_size": 2097152,
|
||||
"maximum_size": 1228800
|
||||
},
|
||||
"connectivity": [
|
||||
"ble"
|
||||
],
|
||||
"doc": {
|
||||
"params": {
|
||||
"extra": {
|
||||
"Bluetooth": "BLE v5.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
43
boards/_base/lightning-ln882x.json
Normal file
43
boards/_base/lightning-ln882x.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"build": {
|
||||
"f_cpu": "160000000L",
|
||||
"prefix": "arm-none-eabi-"
|
||||
},
|
||||
"flash": {},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"protocol": "openocd",
|
||||
"protocols": [
|
||||
"openocd"
|
||||
],
|
||||
"openocd_config": "ln882x.cfg",
|
||||
"gdb_init": [
|
||||
"mem 0x00000000 0x10000000 ro"
|
||||
]
|
||||
},
|
||||
"upload": {
|
||||
"maximum_ram_size": 302080,
|
||||
"require_upload_port": true,
|
||||
"speed": 115200,
|
||||
"protocol": "uart",
|
||||
"protocols": [
|
||||
"uart"
|
||||
]
|
||||
},
|
||||
"doc": {
|
||||
"params": {
|
||||
"manufacturer": "Lightning",
|
||||
"series": "LN882X",
|
||||
"voltage": "3.0V - 3.6V",
|
||||
"extra": {
|
||||
"Wi-Fi": "802.11 b/g/n"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"Info & flashing guide": "../../docs/platform/lightning-ln882x/README.md",
|
||||
"Debugging": "../../docs/platform/lightning-ln882x/debugging.md"
|
||||
}
|
||||
}
|
||||
}
|
||||
90
boards/_base/pcb/afw121t.json
Normal file
90
boards/_base/pcb/afw121t.json
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"pcb": {
|
||||
"templates": [
|
||||
"99iot-21p",
|
||||
"pcb-blue-light",
|
||||
"rf-type1"
|
||||
],
|
||||
"scale": 16,
|
||||
"vars": {
|
||||
"TRACE_COLOR": "#FAFD9D"
|
||||
},
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD",
|
||||
"pinout": {
|
||||
"1": {
|
||||
"GND": null
|
||||
},
|
||||
"2": {
|
||||
"CTRL": "RF_O"
|
||||
},
|
||||
"3": {
|
||||
"GND": null
|
||||
},
|
||||
"4": {
|
||||
"NC": null
|
||||
},
|
||||
"5": {
|
||||
"CTRL": "CEN"
|
||||
},
|
||||
"6": {
|
||||
"IC": 13,
|
||||
"ARD": "D0"
|
||||
},
|
||||
"7": {
|
||||
"IC": 14,
|
||||
"ARD": "D1"
|
||||
},
|
||||
"8": {
|
||||
"IC": 16,
|
||||
"ARD": "D2"
|
||||
},
|
||||
"9": {
|
||||
"IC": 17,
|
||||
"ARD": "D3"
|
||||
},
|
||||
"10": {
|
||||
"GND": null
|
||||
},
|
||||
"11": {
|
||||
"PWR": 3.3
|
||||
},
|
||||
"12": {
|
||||
"GND": null
|
||||
},
|
||||
"13": {
|
||||
"NC": null
|
||||
},
|
||||
"14": {
|
||||
"IC": 28,
|
||||
"ARD": "D5"
|
||||
},
|
||||
"15": {
|
||||
"IC": 29,
|
||||
"ARD": "D6"
|
||||
},
|
||||
"16": {
|
||||
"IC": 30,
|
||||
"ARD": "D7"
|
||||
},
|
||||
"17": {
|
||||
"IC": 31,
|
||||
"ARD": "D8"
|
||||
},
|
||||
"18": {
|
||||
"IC": 32,
|
||||
"ARD": "D9"
|
||||
},
|
||||
"19": {
|
||||
"IC": 1,
|
||||
"ARD": "D10"
|
||||
},
|
||||
"20": {
|
||||
"IC": 2,
|
||||
"ARD": "D4"
|
||||
},
|
||||
"21": {
|
||||
"GND": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"pcb": {
|
||||
"scale": 10,
|
||||
"scale": 14,
|
||||
"test_pads": {
|
||||
"TSCK": "cb1s.back.sck.anchor",
|
||||
"TCSN": "cb1s.back.csn.anchor",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"pcb": {
|
||||
"scale": 11,
|
||||
"test_pads": {
|
||||
"TRST": "cb2l.back.rst.anchor",
|
||||
"TRX1": "cb2l.back.u1_rxd.anchor",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"pcb": {
|
||||
"scale": 11,
|
||||
"test_pads": {
|
||||
"TTX2": "cb2s.back.u2_txd.anchor",
|
||||
"TRX2": "cb2s.back.u2_rxd.anchor",
|
||||
|
||||
23
boards/_base/pcb/ln-02-test.json
Normal file
23
boards/_base/pcb/ln-02-test.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"pcb": {
|
||||
"test_pads": {
|
||||
"TBOOT": "ln-02.back.boot.anchor"
|
||||
},
|
||||
"back": [
|
||||
{
|
||||
"id": "boot",
|
||||
"name": "label_line_up",
|
||||
"pos": "12,12.1",
|
||||
"vars": {
|
||||
"DIR": "right",
|
||||
"W": 2.5,
|
||||
"H": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "11,12"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
67
boards/_base/pcb/ln-02.json
Normal file
67
boards/_base/pcb/ln-02.json
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"pcb": {
|
||||
"templates": [
|
||||
"tuya2",
|
||||
"pcb-black",
|
||||
"rf-type1"
|
||||
],
|
||||
"scale": 10.5,
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI,I2C",
|
||||
"pinout": {
|
||||
"1": {
|
||||
"PWR": 3.3
|
||||
},
|
||||
"2": {
|
||||
"IC": 22,
|
||||
"ARD": "D0"
|
||||
},
|
||||
"3": {
|
||||
"GND": null
|
||||
},
|
||||
"4": {
|
||||
"IC": 24,
|
||||
"ARD": [
|
||||
"D1",
|
||||
"A0"
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"IC": 11,
|
||||
"ARD": "D2"
|
||||
},
|
||||
"6": {
|
||||
"IC": 29,
|
||||
"ARD": "D3"
|
||||
},
|
||||
"7": {
|
||||
"IC": 10,
|
||||
"ARD": "D4"
|
||||
},
|
||||
"8": {
|
||||
"IC": 30,
|
||||
"ARD": "D5"
|
||||
},
|
||||
"9": {
|
||||
"IC": 9,
|
||||
"ARD": [
|
||||
"D6",
|
||||
"A1"
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"IC": 7
|
||||
},
|
||||
"11": {
|
||||
"IC": 8,
|
||||
"ARD": [
|
||||
"D7",
|
||||
"A2"
|
||||
]
|
||||
},
|
||||
"TBOOT": {
|
||||
"IC": 17,
|
||||
"ARD": "D8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,8 @@
|
||||
"rf-type1"
|
||||
],
|
||||
"scale": 10.5,
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI",
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD",
|
||||
"drawing_hidden": "SPI",
|
||||
"pinout": {
|
||||
"1": {
|
||||
"PWR": 3.3
|
||||
|
||||
70
boards/_base/pcb/t112.json
Normal file
70
boards/_base/pcb/t112.json
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"pcb": {
|
||||
"templates": [
|
||||
"esp01m-14",
|
||||
"pcb-blue-light",
|
||||
"rf-type1"
|
||||
],
|
||||
"scale": 10.5,
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD",
|
||||
"drawing_hidden": "I2C,SPI",
|
||||
"pinout": {
|
||||
"1": {
|
||||
"PWR": 3.3
|
||||
},
|
||||
"2": {
|
||||
"IC": 2,
|
||||
"ARD": "D0"
|
||||
},
|
||||
"3": {
|
||||
"IC": 30,
|
||||
"ARD": [
|
||||
"D1",
|
||||
"A0"
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"IC": 14,
|
||||
"ARD": "D2"
|
||||
},
|
||||
"5": {
|
||||
"IC": 13,
|
||||
"ARD": "D3"
|
||||
},
|
||||
"6": {
|
||||
"IC": 16,
|
||||
"ARD": "D4"
|
||||
},
|
||||
"7": {
|
||||
"NC": null
|
||||
},
|
||||
"8": {
|
||||
"IC": 28,
|
||||
"ARD": "D5"
|
||||
},
|
||||
"9": {
|
||||
"IC": 29,
|
||||
"ARD": "D6"
|
||||
},
|
||||
"10": {
|
||||
"IC": 17,
|
||||
"ARD": "D7"
|
||||
},
|
||||
"11": {
|
||||
"IC": 32,
|
||||
"ARD": "D8"
|
||||
},
|
||||
"12": {
|
||||
"IC": 31,
|
||||
"ARD": "D9"
|
||||
},
|
||||
"13": {
|
||||
"IC": 1,
|
||||
"ARD": "D10"
|
||||
},
|
||||
"14": {
|
||||
"GND": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"pcb": {
|
||||
"scale": 10.5,
|
||||
"scale": 11,
|
||||
"templates": [
|
||||
"tuya2",
|
||||
"pcb-blue-light",
|
||||
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"pcb": {
|
||||
"scale": 11,
|
||||
"test_pads": {
|
||||
"TRST": "wb2l.back.rst.anchor",
|
||||
"TRX1": "wb2l.back.u1_rxd.anchor",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"pcb": {
|
||||
"scale": 10.5,
|
||||
"templates": [
|
||||
"tuya2",
|
||||
"pcb-blue-light",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"vars": {
|
||||
"PINHOLE": 0
|
||||
},
|
||||
"pinout_hidden": "I2S,SD,SPI",
|
||||
"pinout_hidden": "I2S,SD",
|
||||
"pinout": {
|
||||
"1": {
|
||||
"NC": null
|
||||
|
||||
98
boards/_base/pcb/wl2s-test.json
Normal file
98
boards/_base/pcb/wl2s-test.json
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"pcb": {
|
||||
"test_pads": {
|
||||
"TA9": "wl2s.back.a9.anchor",
|
||||
"TGND": "wl2s.back.gnd.anchor",
|
||||
"TRX1": "wl2s.back.rx1.anchor",
|
||||
"TTX1": "wl2s.back.tx1.anchor",
|
||||
"TSCLK": "wl2s.back.sclk.anchor",
|
||||
"TSWD": "wl2s.back.swd.anchor"
|
||||
},
|
||||
"back": [
|
||||
{
|
||||
"id": "a9",
|
||||
"name": "label_line_up",
|
||||
"pos": "2.8,11.8",
|
||||
"vars": {
|
||||
"DIR": "left",
|
||||
"W": 2.5,
|
||||
"H": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "3,12"
|
||||
},
|
||||
{
|
||||
"id": "gnd",
|
||||
"name": "label_line_up",
|
||||
"pos": "0.8,8.3",
|
||||
"vars": {
|
||||
"DIR": "left",
|
||||
"W": 0.5,
|
||||
"H": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "1,8.5"
|
||||
},
|
||||
{
|
||||
"id": "rx1",
|
||||
"name": "label_line_up",
|
||||
"pos": "3,5.8",
|
||||
"vars": {
|
||||
"DIR": "left",
|
||||
"W": 2.6,
|
||||
"H": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "3.2,6"
|
||||
},
|
||||
{
|
||||
"id": "tx1",
|
||||
"name": "label_line_up",
|
||||
"pos": "5,5.8",
|
||||
"vars": {
|
||||
"DIR": "left",
|
||||
"W": 4.5,
|
||||
"H": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "5.2,6"
|
||||
},
|
||||
{
|
||||
"id": "swd",
|
||||
"name": "label_line_up",
|
||||
"pos": "10.2,11.1",
|
||||
"vars": {
|
||||
"DIR": "right",
|
||||
"W": 3.0,
|
||||
"H": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "10,11"
|
||||
},
|
||||
{
|
||||
"id": "sclk",
|
||||
"name": "label_line_up",
|
||||
"pos": "5.2,12.2",
|
||||
"vars": {
|
||||
"DIR": "right",
|
||||
"W": 8.0,
|
||||
"H": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "test_pad_1mm",
|
||||
"pos": "5,12"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
86
boards/_base/pcb/wl2s.json
Normal file
86
boards/_base/pcb/wl2s.json
Normal file
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"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": 23,
|
||||
"ARD": "D1"
|
||||
},
|
||||
"5": {
|
||||
"IC": 11,
|
||||
"ARD": "D2"
|
||||
},
|
||||
"6": {
|
||||
"IC": 21,
|
||||
"ARD": "D3"
|
||||
},
|
||||
"7": {
|
||||
"IC": 10,
|
||||
"ARD": "D4"
|
||||
},
|
||||
"8": {
|
||||
"IC": 8,
|
||||
"ARD": [
|
||||
"D5",
|
||||
"A0"
|
||||
]
|
||||
},
|
||||
"9": {
|
||||
"IC": 24,
|
||||
"ARD": [
|
||||
"D6",
|
||||
"A1"
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"IC": 7
|
||||
},
|
||||
"11": {
|
||||
"IC": 22,
|
||||
"ARD": "D7"
|
||||
},
|
||||
"TA9": {
|
||||
"IC": 17,
|
||||
"ARD": "D8"
|
||||
},
|
||||
"TGND": {
|
||||
"GND": null
|
||||
},
|
||||
"TRX1": {
|
||||
"IC": 29,
|
||||
"ARD": "D9"
|
||||
},
|
||||
"TTX1": {
|
||||
"IC": 30,
|
||||
"ARD": "D10"
|
||||
},
|
||||
"TSCLK": {
|
||||
"IC": 13,
|
||||
"ARD": "D11"
|
||||
},
|
||||
"TSWD": {
|
||||
"IC": 9,
|
||||
"ARD": [
|
||||
"D12",
|
||||
"A2"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"pcb": {
|
||||
"scale": 10.5,
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI",
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD",
|
||||
"drawing_hidden": "SPI",
|
||||
"pinout": {
|
||||
"1": {
|
||||
"PWR": 3.3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"pcb": {
|
||||
"scale": 10.5,
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI,SDA0",
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SDA0",
|
||||
"drawing_hidden": "SPI",
|
||||
"pinout": {
|
||||
"1": {
|
||||
"PWR": 3.3
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"templates": [
|
||||
"pcb-black"
|
||||
],
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI",
|
||||
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD",
|
||||
"pinout": {
|
||||
"1": {
|
||||
"NC": null
|
||||
|
||||
16
boards/_base/realtek-ambz-1mb-468k.json
Normal file
16
boards/_base/realtek-ambz-1mb-468k.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"build": {
|
||||
"amb_boot_all": "boot_all_77F7.bin"
|
||||
},
|
||||
"flash": {
|
||||
"ota1": "0x00B000+0x75000",
|
||||
"ota2": "0x080000+0x75000",
|
||||
"kvs": "0x0F5000+0x4000",
|
||||
"userdata": "0x0F9000+0x7000"
|
||||
},
|
||||
"upload": {
|
||||
"flash_size": 1048576,
|
||||
"maximum_size": 479232
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"General info": "../../docs/platform/realtek-amb/README.md",
|
||||
"Flashing guide": "../../docs/platform/realtek-ambz/flashing.md",
|
||||
"Info & flashing guide": "../../docs/platform/realtek-ambz/README.md",
|
||||
"Debugging": "../../docs/platform/realtek-ambz/debugging.md"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
"flash": {
|
||||
"ota1": "0x010000+0xE0000",
|
||||
"ota2": "0x0F0000+0xE0000",
|
||||
"kvs": "0x1D0000+0x8000",
|
||||
"userdata": "0x1D8000+0x28000"
|
||||
"kvs": "0x1F8000+0x8000"
|
||||
},
|
||||
"upload": {
|
||||
"flash_size": 2097152,
|
||||
24
boards/afw121t.json
Normal file
24
boards/afw121t.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"_base": [
|
||||
"realtek-ambz",
|
||||
"realtek-ambz-1mb-468k",
|
||||
"realtek-ambz-bx",
|
||||
"ic/rtl8710bn",
|
||||
"pcb/afw121t"
|
||||
],
|
||||
"build": {
|
||||
"mcu": "rtl8710bx",
|
||||
"variant": "afw121t"
|
||||
},
|
||||
"name": "AFW121T",
|
||||
"url": "https://item.szlcsc.com/357903.html?fromZone=l_b__%2522brand%2522",
|
||||
"vendor": "99iot(Shenzhen)co.,ltd",
|
||||
"pcb": {
|
||||
"symbol": "AFW121T"
|
||||
},
|
||||
"doc": {
|
||||
"links": {
|
||||
"Vendor datasheet": "https://item.szlcsc.com/datasheet/AFW121TI-AY1LED1/357903.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
118
boards/generic-ln882hki.json
Normal file
118
boards/generic-ln882hki.json
Normal file
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"_base": [
|
||||
"generic",
|
||||
"lightning-ln882x",
|
||||
"lightning-ln882hki",
|
||||
"ic/ln882hk"
|
||||
],
|
||||
"build": {
|
||||
"mcu": "ln882hk",
|
||||
"variant": "generic-ln882hki"
|
||||
},
|
||||
"name": "Generic - LN882HKI",
|
||||
"symbol": "LN882HKI",
|
||||
"url": "https://docs.libretiny.eu/boards/generic-ln882hki/",
|
||||
"vendor": "Generic",
|
||||
"pcb": {
|
||||
"pinout": {
|
||||
"1": {
|
||||
"IC": 8,
|
||||
"ARD": [
|
||||
"D0",
|
||||
"A2"
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"IC": 9,
|
||||
"ARD": [
|
||||
"D1",
|
||||
"A3"
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"IC": 10,
|
||||
"ARD": "D2"
|
||||
},
|
||||
"4": {
|
||||
"IC": 11,
|
||||
"ARD": "D3"
|
||||
},
|
||||
"5": {
|
||||
"IC": 12,
|
||||
"ARD": [
|
||||
"D4",
|
||||
"A4"
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"IC": 13,
|
||||
"ARD": "D5"
|
||||
},
|
||||
"7": {
|
||||
"IC": 14,
|
||||
"ARD": "D6"
|
||||
},
|
||||
"8": {
|
||||
"IC": 15,
|
||||
"ARD": "D7"
|
||||
},
|
||||
"9": {
|
||||
"IC": 16,
|
||||
"ARD": "D8"
|
||||
},
|
||||
"10": {
|
||||
"IC": 17,
|
||||
"ARD": "D9"
|
||||
},
|
||||
"11": {
|
||||
"IC": 21,
|
||||
"ARD": "D10"
|
||||
},
|
||||
"12": {
|
||||
"IC": 22,
|
||||
"ARD": "D11"
|
||||
},
|
||||
"13": {
|
||||
"IC": 23,
|
||||
"ARD": "D12"
|
||||
},
|
||||
"14": {
|
||||
"IC": 24,
|
||||
"ARD": [
|
||||
"D13",
|
||||
"A5"
|
||||
]
|
||||
},
|
||||
"15": {
|
||||
"IC": 25,
|
||||
"ARD": [
|
||||
"D14",
|
||||
"A6"
|
||||
]
|
||||
},
|
||||
"16": {
|
||||
"IC": 26,
|
||||
"ARD": [
|
||||
"D15",
|
||||
"A7"
|
||||
]
|
||||
},
|
||||
"17": {
|
||||
"IC": 27,
|
||||
"ARD": "D16"
|
||||
},
|
||||
"18": {
|
||||
"IC": 28,
|
||||
"ARD": "D17"
|
||||
},
|
||||
"19": {
|
||||
"IC": 29,
|
||||
"ARD": "D18"
|
||||
},
|
||||
"20": {
|
||||
"IC": 30,
|
||||
"ARD": "D19"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
"extra": [
|
||||
"## Information",
|
||||
"This is a generic board definition for RTL8710BX with 4 MiB of flash. It has a bigger application partition size (980 KiB). The used bootloader is also different from the standard Tuya one.",
|
||||
"It can be found in [Ezviz T31 smart plug](https://www.ezviz.com/product/T31/2021) - bare chip soldered onto the manufacturer-made PCB. The plug is not Tuya/SmartLife-compatible and has a 25Q32CSIG flash chip. Refer to [libretiny#23](https://github.com/kuba2k2/libretiny/issues/23) for photos and more information.",
|
||||
"It can be found in [Ezviz T31 smart plug](https://www.ezviz.com/product/T31/2021) - bare chip soldered onto the manufacturer-made PCB. The plug is not Tuya/SmartLife-compatible and has a 25Q32CSIG flash chip. Refer to [libretiny#23](https://github.com/libretiny-eu/libretiny/issues/23) for photos and more information.",
|
||||
"Note that stock firmware seems to use smaller app images (0x80000 / 512 KiB). After 0x180000 some product-test data and device logs can be found. Because the OTA2 offset is 0x100000, the board definition was configured to use all available space."
|
||||
]
|
||||
},
|
||||
|
||||
102
boards/generic-rtl8720cf-2mb-896k.json
Normal file
102
boards/generic-rtl8720cf-2mb-896k.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"_base": [
|
||||
"generic",
|
||||
"realtek-ambz2",
|
||||
"realtek-ambz2-8720",
|
||||
"realtek-ambz2-image",
|
||||
"realtek-ambz2-2mb-896k",
|
||||
"ic/rtl8720cf"
|
||||
],
|
||||
"build": {
|
||||
"mcu": "rtl8720cf",
|
||||
"variant": "generic-rtl8720cf-2mb-896k"
|
||||
},
|
||||
"name": "Generic - RTL8720CF (2M/896k)",
|
||||
"symbol": "RTL8720CF (2M/896k)",
|
||||
"url": "https://docs.libretiny.eu/boards/generic-rtl8720cf-2mb-896k/",
|
||||
"vendor": "Generic",
|
||||
"pcb": {
|
||||
"pinout": {
|
||||
"1": {
|
||||
"IC": 15,
|
||||
"ARD": "D0"
|
||||
},
|
||||
"2": {
|
||||
"IC": 16,
|
||||
"ARD": "D1"
|
||||
},
|
||||
"3": {
|
||||
"IC": 18,
|
||||
"ARD": "D2"
|
||||
},
|
||||
"4": {
|
||||
"IC": 19,
|
||||
"ARD": "D3"
|
||||
},
|
||||
"5": {
|
||||
"IC": 20,
|
||||
"ARD": "D4"
|
||||
},
|
||||
"6": {
|
||||
"IC": 21,
|
||||
"ARD": "D5"
|
||||
},
|
||||
"7": {
|
||||
"IC": 22,
|
||||
"ARD": "D6"
|
||||
},
|
||||
"8": {
|
||||
"IC": 23,
|
||||
"ARD": "D7"
|
||||
},
|
||||
"9": {
|
||||
"IC": 24,
|
||||
"ARD": "D8"
|
||||
},
|
||||
"10": {
|
||||
"IC": 25,
|
||||
"ARD": "D9"
|
||||
},
|
||||
"11": {
|
||||
"IC": 26,
|
||||
"ARD": "D10"
|
||||
},
|
||||
"12": {
|
||||
"IC": 33,
|
||||
"ARD": "D11"
|
||||
},
|
||||
"13": {
|
||||
"IC": 34,
|
||||
"ARD": "D12"
|
||||
},
|
||||
"14": {
|
||||
"IC": 36,
|
||||
"ARD": "D13"
|
||||
},
|
||||
"15": {
|
||||
"IC": 37,
|
||||
"ARD": "D14"
|
||||
},
|
||||
"16": {
|
||||
"IC": 38,
|
||||
"ARD": "D15"
|
||||
},
|
||||
"17": {
|
||||
"IC": 39,
|
||||
"ARD": "D16"
|
||||
},
|
||||
"18": {
|
||||
"IC": 40,
|
||||
"ARD": "D17"
|
||||
},
|
||||
"19": {
|
||||
"IC": 1,
|
||||
"ARD": "D18"
|
||||
},
|
||||
"20": {
|
||||
"IC": 3,
|
||||
"ARD": "D19"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
22
boards/ln-02.json
Normal file
22
boards/ln-02.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"_base": [
|
||||
"lightning-ln882x",
|
||||
"lightning-ln882hki",
|
||||
"ic/ln882hk",
|
||||
"pcb/ln-02",
|
||||
"pcb/ln-02-test"
|
||||
],
|
||||
"build": {
|
||||
"mcu": "ln882hk",
|
||||
"variant": "ln-02"
|
||||
},
|
||||
"name": "LN-02 Wi-Fi/BLE Module",
|
||||
"url": "https://docs.libretiny.eu/boards/ln-02/",
|
||||
"vendor": "Unknown",
|
||||
"doc": {
|
||||
"fccid": ""
|
||||
},
|
||||
"pcb": {
|
||||
"symbol": "LN-02"
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,8 @@
|
||||
"url": "https://docs.libretiny.eu/boards/t102-v1.1/",
|
||||
"vendor": "Unknown",
|
||||
"doc": {
|
||||
"fccid": "2AU7O-T102V11"
|
||||
"fccid": "2AU7O-T102V11",
|
||||
"mcu": "w302"
|
||||
},
|
||||
"pcb": {
|
||||
"symbol": "T102_V1.1"
|
||||
|
||||
22
boards/t112-v1.1.json
Normal file
22
boards/t112-v1.1.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"_base": [
|
||||
"realtek-ambz",
|
||||
"realtek-ambz-2mb-788k",
|
||||
"ic/rtl8710bn",
|
||||
"pcb/t112"
|
||||
],
|
||||
"build": {
|
||||
"mcu": "rtl8710bn",
|
||||
"variant": "t112-v1.1"
|
||||
},
|
||||
"name": "T112_V1.1",
|
||||
"url": "https://docs.libretiny.eu/boards/t112-v1.1/",
|
||||
"vendor": "Unknown",
|
||||
"doc": {
|
||||
"fccid": "2AU7O-T102V11",
|
||||
"mcu": "w302"
|
||||
},
|
||||
"pcb": {
|
||||
"symbol": "T112_V1.1"
|
||||
}
|
||||
}
|
||||
142
boards/templates/99iot-21p.json
Normal file
142
boards/templates/99iot-21p.json
Normal file
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"name": "99iot-21p",
|
||||
"title": "99iot 21-pin modules",
|
||||
"width": 18,
|
||||
"height": 22,
|
||||
"vars": {
|
||||
"PINTYPE_VERT": "pin_vert_cast_nohole",
|
||||
"PINTYPE_HORZ": "pin_horz_cast_nohole",
|
||||
"RASTER": 1.2,
|
||||
"RF_W": 18,
|
||||
"RF_H": 3.9
|
||||
},
|
||||
"front": [
|
||||
{
|
||||
"comment": "PCB soldermask",
|
||||
"type": "rect",
|
||||
"pos": "0,0",
|
||||
"size": "18,22",
|
||||
"preset": "${MASK_PRESET}"
|
||||
},
|
||||
{
|
||||
"comment": "Metal shielding",
|
||||
"type": "rect",
|
||||
"pos": "1.105,7",
|
||||
"size": "15.79,14.58",
|
||||
"preset": "shield"
|
||||
},
|
||||
{
|
||||
"comment": "Pins (1-3)",
|
||||
"id": "left_t",
|
||||
"name": "r_pins_vert",
|
||||
"repeat": 3,
|
||||
"pos": "0,3.9",
|
||||
"vars": {
|
||||
"PINDIR": "left"
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "Pins (3-10)",
|
||||
"id": "left_b",
|
||||
"name": "r_pins_vert",
|
||||
"repeat": 7,
|
||||
"pos": "0,12.8",
|
||||
"vars": {
|
||||
"PINDIR": "left"
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "Pins (10-20)",
|
||||
"id": "right_b",
|
||||
"name": "r_pins_vert",
|
||||
"repeat": 10,
|
||||
"pos": "18,9.2",
|
||||
"vars": {
|
||||
"PINDIR": "right"
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "Pin 21",
|
||||
"id": "right_t",
|
||||
"name": "r_pins_vert",
|
||||
"repeat": 1,
|
||||
"pos": "18,7",
|
||||
"vars": {
|
||||
"PINDIR": "right"
|
||||
}
|
||||
}
|
||||
],
|
||||
"back": [
|
||||
{
|
||||
"comment": "PCB soldermask",
|
||||
"type": "rect",
|
||||
"pos": "0,0",
|
||||
"size": "18,22",
|
||||
"preset": "${MASK_PRESET}"
|
||||
},
|
||||
{
|
||||
"comment": "Pins (1-3)",
|
||||
"id": "left_t",
|
||||
"name": "r_pins_vert",
|
||||
"repeat": 3,
|
||||
"pos": "0,3.9",
|
||||
"vars": {
|
||||
"PINDIR": "left"
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "Pins (3-10)",
|
||||
"id": "left_b",
|
||||
"name": "r_pins_vert",
|
||||
"repeat": 7,
|
||||
"pos": "0,12.8",
|
||||
"vars": {
|
||||
"PINDIR": "left"
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "Pins (10-20)",
|
||||
"id": "right_b",
|
||||
"name": "r_pins_vert",
|
||||
"repeat": 10,
|
||||
"pos": "18,9.2",
|
||||
"vars": {
|
||||
"PINDIR": "right"
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "Pin 21",
|
||||
"id": "right_t",
|
||||
"name": "r_pins_vert",
|
||||
"repeat": 1,
|
||||
"pos": "18,7",
|
||||
"vars": {
|
||||
"PINDIR": "right"
|
||||
}
|
||||
}
|
||||
],
|
||||
"pads": {
|
||||
"1": "99iot-21p.front.left_t.pin1",
|
||||
"2": "99iot-21p.front.left_t.pin2",
|
||||
"3": "99iot-21p.front.left_t.pin3",
|
||||
"4": "99iot-21p.front.left_b.pin1",
|
||||
"5": "99iot-21p.front.left_b.pin2",
|
||||
"6": "99iot-21p.front.left_b.pin3",
|
||||
"7": "99iot-21p.front.left_b.pin4",
|
||||
"8": "99iot-21p.front.left_b.pin5",
|
||||
"9": "99iot-21p.front.left_b.pin6",
|
||||
"10": "99iot-21p.front.left_b.pin7",
|
||||
"11": "99iot-21p.front.right_b.pin10",
|
||||
"12": "99iot-21p.front.right_b.pin9",
|
||||
"13": "99iot-21p.front.right_b.pin8",
|
||||
"14": "99iot-21p.front.right_b.pin7",
|
||||
"15": "99iot-21p.front.right_b.pin6",
|
||||
"16": "99iot-21p.front.right_b.pin5",
|
||||
"17": "99iot-21p.front.right_b.pin4",
|
||||
"18": "99iot-21p.front.right_b.pin3",
|
||||
"19": "99iot-21p.front.right_b.pin2",
|
||||
"20": "99iot-21p.front.right_b.pin1",
|
||||
"21": "99iot-21p.front.right_t.pin1"
|
||||
},
|
||||
"test_pads": {}
|
||||
}
|
||||
@@ -37,7 +37,7 @@
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"pos": "7.0,5.0",
|
||||
"pos": "6.0,5.5",
|
||||
"text": "${SYMBOL}",
|
||||
"font_size": 1.0,
|
||||
"fill": {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"pos": "4.0,5.5",
|
||||
"pos": "6.0,5.5",
|
||||
"text": "${SYMBOL}",
|
||||
"font_size": 1.0,
|
||||
"fill": {
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"pos": "4.0,5.5",
|
||||
"pos": "6.5,5.0",
|
||||
"text": "${SYMBOL}",
|
||||
"font_size": 1.0,
|
||||
"fill": {
|
||||
|
||||
48
boards/variants/afw121t.c
Normal file
48
boards/variants/afw121t.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/* This file was auto-generated from afw121t.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: PA14, PWM0, SWCLK
|
||||
{PA_14, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
|
||||
// D1: PA15, PWM1, SWDIO
|
||||
{PA_15, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
|
||||
// D2: PA00, PWM2
|
||||
{PA_0, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D3: PA12, PWM3
|
||||
{PA_12, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D4: PA29, UART2_RX, I2C0_SCL, PWM4
|
||||
{PA_29, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_UART, PIN_NONE, 0},
|
||||
// D5: PA05, PWM4, WAKE1
|
||||
{PA_5, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D6: PA18, UART0_RX, SPI0_SCK, SPI1_SCK, I2C1_SCL, SD_D2, TMR4_TRIG, I2S0_MCK, WAKE0
|
||||
{PA_18, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
|
||||
// D7: PA19, ADC1, UART0_CTS, SPI0_CS, SPI1_CS, I2C0_SDA, SD_D3, TMR5_TRIG, I2S0_TX
|
||||
{PA_19, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
|
||||
// D8: PA22, UART0_RTS, SPI0_MISO, SPI1_MISO, I2C0_SCL, SD_D0, PWM5, I2S0_WS, WAKE2
|
||||
{PA_22, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
|
||||
// D9: PA23, UART0_TX, SPI0_MOSI, SPI1_MOSI, I2C1_SDA, SD_D1, PWM0, WAKE3
|
||||
{PA_23, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_SPI | PIN_UART, PIN_NONE, 0},
|
||||
// D10: PA30, UART2_TX, I2C0_SDA, PWM4
|
||||
{PA_30, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_UART, PIN_NONE, 0},
|
||||
};
|
||||
|
||||
PinInfo *lt_arduino_pin_gpio_map[] = {
|
||||
[0] = &(lt_arduino_pin_info_list[2]), // PA_0 (D2)
|
||||
[5] = &(lt_arduino_pin_info_list[5]), // PA_5 (D5)
|
||||
[12] = &(lt_arduino_pin_info_list[3]), // PA_12 (D3)
|
||||
[14] = &(lt_arduino_pin_info_list[0]), // PA_14 (D0)
|
||||
[15] = &(lt_arduino_pin_info_list[1]), // PA_15 (D1)
|
||||
[18] = &(lt_arduino_pin_info_list[6]), // PA_18 (D6)
|
||||
[19] = &(lt_arduino_pin_info_list[7]), // PA_19 (D7)
|
||||
[22] = &(lt_arduino_pin_info_list[8]), // PA_22 (D8)
|
||||
[23] = &(lt_arduino_pin_info_list[9]), // PA_23 (D9)
|
||||
[29] = &(lt_arduino_pin_info_list[4]), // PA_29 (D4)
|
||||
[30] = &(lt_arduino_pin_info_list[10]), // PA_30 (D10)
|
||||
};
|
||||
// clang-format on
|
||||
136
boards/variants/afw121t.h
Normal file
136
boards/variants/afw121t.h
Normal file
@@ -0,0 +1,136 @@
|
||||
/* This file was auto-generated from afw121t.json using boardgen */
|
||||
|
||||
#pragma once
|
||||
|
||||
// clang-format off
|
||||
|
||||
// Pins
|
||||
// ----
|
||||
#define PINS_COUNT 11 // Total GPIO count
|
||||
#define NUM_DIGITAL_PINS 11 // Digital inputs/outputs
|
||||
#define NUM_ANALOG_INPUTS 0 // ADC inputs
|
||||
#define NUM_ANALOG_OUTPUTS 9 // PWM & DAC outputs
|
||||
#define PINS_GPIO_MAX 30 // Last usable GPIO number
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE0_SCL_0 22u // PA_22
|
||||
#define PIN_WIRE0_SCL_1 29u // PA_29
|
||||
#define PIN_WIRE0_SDA_0 19u // PA_19
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){22u, 29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// 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_MISO0 22u // PA_22
|
||||
#define PIN_MISO1 22u // PA_22
|
||||
#define PIN_MOSI0 23u // PA_23
|
||||
#define PIN_MOSI1 23u // PA_23
|
||||
#define PIN_PA00 0u // PA_0
|
||||
#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_PA18 18u // PA_18
|
||||
#define PIN_PA19 19u // PA_19
|
||||
#define PIN_PA22 22u // PA_22
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
#define PIN_PWM4 29u // PA_29
|
||||
#define PIN_PWM5 22u // PA_22
|
||||
#define PIN_RTS0 22u // PA_22
|
||||
#define PIN_RX0 18u // PA_18
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
// Port availability
|
||||
// -----------------
|
||||
#define HAS_SERIAL0 1
|
||||
#define HAS_SERIAL2 1
|
||||
#define HAS_SPI0 1
|
||||
#define HAS_SPI1 1
|
||||
#define HAS_WIRE0 1
|
||||
#define HAS_WIRE1 1
|
||||
#define SERIAL_INTERFACES_COUNT 2
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
#define WIRE_INTERFACES_COUNT 2
|
||||
|
||||
// Arduino pin names
|
||||
// -----------------
|
||||
#define PIN_D0 14u // PA_14
|
||||
#define PIN_D1 15u // PA_15
|
||||
#define PIN_D2 0u // PA_0
|
||||
#define PIN_D3 12u // PA_12
|
||||
#define PIN_D4 29u // PA_29
|
||||
#define PIN_D5 5u // PA_5
|
||||
#define PIN_D6 18u // PA_18
|
||||
#define PIN_D7 19u // PA_19
|
||||
#define PIN_D8 22u // PA_22
|
||||
#define PIN_D9 23u // PA_23
|
||||
#define PIN_D10 30u // PA_30
|
||||
|
||||
// Static pin names
|
||||
// ----------------
|
||||
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;
|
||||
static const unsigned char D10 = PIN_D10;
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u, 22u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -62,7 +80,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
@@ -73,9 +90,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 22u // PA_22
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 30u // PA_30
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
#define PIN_SPI0_MOSI_1 19u // PIN_A19
|
||||
#define PIN_SPI0_SCK_0 16u // PIN_A16
|
||||
#define PIN_SPI0_SCK_1 3u // PIN_A3
|
||||
#define PINS_SPI0_CS (pin_size_t[]){2u, 15u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){20u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){4u, 19u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){16u, 3u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -30,6 +34,8 @@
|
||||
#define PIN_WIRE0_SDA_0 20u // PIN_A20
|
||||
#define PIN_WIRE0_SDA_1 16u // PIN_A16
|
||||
#define PIN_WIRE0_SDA_2 3u // PIN_A3
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){2u, 15u, 19u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){20u, 16u, 3u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
@@ -44,14 +50,21 @@
|
||||
#define PIN_SERIAL2_RTS 20u // PIN_A20
|
||||
#define PIN_SERIAL2_RX 15u // PIN_A15
|
||||
#define PIN_SERIAL2_TX 16u // PIN_A16
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){13u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){14u}
|
||||
#define PINS_SERIAL1_CTS (pin_size_t[]){4u}
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){2u, 0u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){3u, 1u}
|
||||
#define PINS_SERIAL2_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL2_RTS (pin_size_t[]){20u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){15u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){16u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
#define PIN_CS0 15u // PIN_A15
|
||||
#define PIN_CTS1 4u // PIN_A4
|
||||
#define PIN_CTS2 19u // PIN_A19
|
||||
#define PIN_MISO0 20u // PIN_A20
|
||||
#define PIN_MOSI0 19u // PIN_A19
|
||||
#define PIN_PA00 0u // PIN_A0
|
||||
#define PIN_PA01 1u // PIN_A1
|
||||
#define PIN_PA02 2u // PIN_A2
|
||||
@@ -65,23 +78,15 @@
|
||||
#define PIN_PA18 18u // PIN_A18
|
||||
#define PIN_PA19 19u // PIN_A19
|
||||
#define PIN_PA20 20u // PIN_A20
|
||||
#define PIN_PWM0 0u // PIN_A0
|
||||
#define PIN_PWM1 1u // PIN_A1
|
||||
#define PIN_PWM2 14u // PIN_A14
|
||||
#define PIN_PWM3 3u // PIN_A3
|
||||
#define PIN_PWM4 16u // PIN_A16
|
||||
#define PIN_PWM5 17u // PIN_A17
|
||||
#define PIN_PWM6 18u // PIN_A18
|
||||
#define PIN_PWM7 13u // PIN_A13
|
||||
#define PIN_RTS2 20u // PIN_A20
|
||||
#define PIN_RX0 13u // PIN_A13
|
||||
#define PIN_RX1 0u // PIN_A0
|
||||
#define PIN_RX2 15u // PIN_A15
|
||||
#define PIN_SCK0 3u // PIN_A3
|
||||
#define PIN_SCL0 19u // PIN_A19
|
||||
#define PIN_SDA0 3u // PIN_A3
|
||||
#define PIN_TX0 14u // PIN_A14
|
||||
#define PIN_TX1 1u // PIN_A1
|
||||
#define PIN_TX2 16u // PIN_A16
|
||||
|
||||
// Port availability
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,9 +14,12 @@
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,15 +14,21 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,9 +14,12 @@
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -17,12 +17,17 @@
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA_0 21u // GPIO21
|
||||
#define PIN_WIRE1_SDA_1 21u // GPIO21
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u, 21u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,15 +14,21 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,15 +14,21 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,19 +14,29 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_CTS 12u // GPIO12
|
||||
#define PIN_SERIAL1_RTS 13u // GPIO13
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_CTS 12u // GPIO12
|
||||
#define PIN_SERIAL1_RTS 13u // GPIO13
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_CTS (pin_size_t[]){12u}
|
||||
#define PINS_SERIAL1_RTS (pin_size_t[]){13u}
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
75
boards/variants/generic-ln882hki.c
Normal file
75
boards/variants/generic-ln882hki.c
Normal file
@@ -0,0 +1,75 @@
|
||||
/* This file was auto-generated from generic-ln882hki.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: PA00, ADC2, I2C0_SCL, I2C0_SDA
|
||||
{PA_0, PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D1: PA01, ADC3, SWDIO, I2C0_SCL, I2C0_SDA
|
||||
{PA_1, PIN_SWD | PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D2: PA02, UART0_TX, I2C0_SCL, I2C0_SDA
|
||||
{PA_2, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D3: PA03, UART0_RX, I2C0_SCL, I2C0_SDA
|
||||
{PA_3, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D4: PA04, ADC4, SWCLK, I2C0_SCL, I2C0_SDA
|
||||
{PA_4, PIN_SWD | PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D5: PA05, I2C0_SCL, I2C0_SDA
|
||||
{PA_5, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D6: PA06, SD_D2, I2C0_SCL, I2C0_SDA
|
||||
{PA_6, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D7: PA07, SD_D3, I2S0_RX, I2C0_SCL, I2C0_SDA
|
||||
{PA_7, PIN_I2S | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D8: PA08, BOOT0, SD_CMD, I2S0_WS, I2C0_SCL, I2C0_SDA
|
||||
{PA_8, PIN_I2S | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D9: PA09, BOOT1, SD_CLK, I2S0_SCLK, I2C0_SCL, I2C0_SDA
|
||||
{PA_9, PIN_I2S | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D10: PA10, SD_D0, I2S0_TX, I2C0_SCL, I2C0_SDA
|
||||
{PA_10, PIN_I2S | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D11: PA11, SD_D1, I2C0_SCL, I2C0_SDA
|
||||
{PA_11, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D12: PA12, I2C0_SCL, I2C0_SDA
|
||||
{PA_12, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D13: PB03, ADC5, I2C0_SCL, I2C0_SDA
|
||||
{PB_3, PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D14: PB04, ADC6, I2C0_SCL, I2C0_SDA
|
||||
{PB_4, PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D15: PB05, ADC7, I2C0_SCL, I2C0_SDA
|
||||
{PB_5, PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D16: PB06, I2C0_SCL, I2C0_SDA
|
||||
{PB_6, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D17: PB07, I2C0_SCL, I2C0_SDA
|
||||
{PB_7, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D18: PB08, UART1_RX, I2C0_SCL, I2C0_SDA
|
||||
{PB_8, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D19: PB09, UART1_TX, I2C0_SCL, I2C0_SDA
|
||||
{PB_9, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
};
|
||||
|
||||
PinInfo *lt_arduino_pin_gpio_map[] = {
|
||||
[0] = &(lt_arduino_pin_info_list[0]), // PA_0 (D0)
|
||||
[1] = &(lt_arduino_pin_info_list[1]), // PA_1 (D1)
|
||||
[2] = &(lt_arduino_pin_info_list[2]), // PA_2 (D2)
|
||||
[3] = &(lt_arduino_pin_info_list[3]), // PA_3 (D3)
|
||||
[4] = &(lt_arduino_pin_info_list[4]), // PA_4 (D4)
|
||||
[5] = &(lt_arduino_pin_info_list[5]), // PA_5 (D5)
|
||||
[6] = &(lt_arduino_pin_info_list[6]), // PA_6 (D6)
|
||||
[7] = &(lt_arduino_pin_info_list[7]), // PA_7 (D7)
|
||||
[8] = &(lt_arduino_pin_info_list[8]), // PA_8 (D8)
|
||||
[9] = &(lt_arduino_pin_info_list[9]), // PA_9 (D9)
|
||||
[10] = &(lt_arduino_pin_info_list[10]), // PA_10 (D10)
|
||||
[11] = &(lt_arduino_pin_info_list[11]), // PA_11 (D11)
|
||||
[12] = &(lt_arduino_pin_info_list[12]), // PA_12 (D12)
|
||||
[19] = &(lt_arduino_pin_info_list[13]), // PB_3 (D13)
|
||||
[20] = &(lt_arduino_pin_info_list[14]), // PB_4 (D14)
|
||||
[21] = &(lt_arduino_pin_info_list[15]), // PB_5 (D15)
|
||||
[22] = &(lt_arduino_pin_info_list[16]), // PB_6 (D16)
|
||||
[23] = &(lt_arduino_pin_info_list[17]), // PB_7 (D17)
|
||||
[24] = &(lt_arduino_pin_info_list[18]), // PB_8 (D18)
|
||||
[25] = &(lt_arduino_pin_info_list[19]), // PB_9 (D19)
|
||||
};
|
||||
// clang-format on
|
||||
168
boards/variants/generic-ln882hki.h
Normal file
168
boards/variants/generic-ln882hki.h
Normal file
@@ -0,0 +1,168 @@
|
||||
/* This file was auto-generated from generic-ln882hki.json using boardgen */
|
||||
|
||||
#pragma once
|
||||
|
||||
// clang-format off
|
||||
|
||||
// Pins
|
||||
// ----
|
||||
#define PINS_COUNT 20 // Total GPIO count
|
||||
#define NUM_DIGITAL_PINS 20 // Digital inputs/outputs
|
||||
#define NUM_ANALOG_INPUTS 6 // 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 0u // PA_0
|
||||
#define PIN_WIRE0_SCL_1 1u // PA_1
|
||||
#define PIN_WIRE0_SCL_2 2u // PA_2
|
||||
#define PIN_WIRE0_SCL_3 3u // PA_3
|
||||
#define PIN_WIRE0_SCL_4 4u // PA_4
|
||||
#define PIN_WIRE0_SCL_5 5u // PA_5
|
||||
#define PIN_WIRE0_SCL_6 6u // PA_6
|
||||
#define PIN_WIRE0_SCL_7 7u // PA_7
|
||||
#define PIN_WIRE0_SCL_8 8u // PA_8
|
||||
#define PIN_WIRE0_SCL_9 9u // PA_9
|
||||
#define PIN_WIRE0_SCL_10 10u // PA_10
|
||||
#define PIN_WIRE0_SCL_11 11u // PA_11
|
||||
#define PIN_WIRE0_SCL_12 12u // PA_12
|
||||
#define PIN_WIRE0_SCL_13 19u // PB_3
|
||||
#define PIN_WIRE0_SCL_14 20u // PB_4
|
||||
#define PIN_WIRE0_SCL_15 21u // PB_5
|
||||
#define PIN_WIRE0_SCL_16 22u // PB_6
|
||||
#define PIN_WIRE0_SCL_17 23u // PB_7
|
||||
#define PIN_WIRE0_SCL_18 24u // PB_8
|
||||
#define PIN_WIRE0_SCL_19 25u // PB_9
|
||||
#define PIN_WIRE0_SDA_0 0u // PA_0
|
||||
#define PIN_WIRE0_SDA_1 1u // PA_1
|
||||
#define PIN_WIRE0_SDA_2 2u // PA_2
|
||||
#define PIN_WIRE0_SDA_3 3u // PA_3
|
||||
#define PIN_WIRE0_SDA_4 4u // PA_4
|
||||
#define PIN_WIRE0_SDA_5 5u // PA_5
|
||||
#define PIN_WIRE0_SDA_6 6u // PA_6
|
||||
#define PIN_WIRE0_SDA_7 7u // PA_7
|
||||
#define PIN_WIRE0_SDA_8 8u // PA_8
|
||||
#define PIN_WIRE0_SDA_9 9u // PA_9
|
||||
#define PIN_WIRE0_SDA_10 10u // PA_10
|
||||
#define PIN_WIRE0_SDA_11 11u // PA_11
|
||||
#define PIN_WIRE0_SDA_12 12u // PA_12
|
||||
#define PIN_WIRE0_SDA_13 19u // PB_3
|
||||
#define PIN_WIRE0_SDA_14 20u // PB_4
|
||||
#define PIN_WIRE0_SDA_15 21u // PB_5
|
||||
#define PIN_WIRE0_SDA_16 22u // PB_6
|
||||
#define PIN_WIRE0_SDA_17 23u // PB_7
|
||||
#define PIN_WIRE0_SDA_18 24u // PB_8
|
||||
#define PIN_WIRE0_SDA_19 25u // PB_9
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u, 10u, 11u, 12u, 19u, 20u, 21u, 22u, 23u, 24u, 25u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u, 10u, 11u, 12u, 19u, 20u, 21u, 22u, 23u, 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_ADC2 0u // PA_0
|
||||
#define PIN_ADC3 1u // PA_1
|
||||
#define PIN_ADC4 4u // PA_4
|
||||
#define PIN_ADC5 19u // PB_3
|
||||
#define PIN_ADC6 20u // PB_4
|
||||
#define PIN_ADC7 21u // PB_5
|
||||
#define PIN_PA00 0u // PA_0
|
||||
#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_PA06 6u // PA_6
|
||||
#define PIN_PA07 7u // PA_7
|
||||
#define PIN_PA08 8u // PA_8
|
||||
#define PIN_PA09 9u // PA_9
|
||||
#define PIN_PA10 10u // PA_10
|
||||
#define PIN_PA11 11u // PA_11
|
||||
#define PIN_PA12 12u // PA_12
|
||||
#define PIN_PB03 19u // PB_3
|
||||
#define PIN_PB04 20u // PB_4
|
||||
#define PIN_PB05 21u // PB_5
|
||||
#define PIN_PB06 22u // PB_6
|
||||
#define PIN_PB07 23u // PB_7
|
||||
#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_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 0u // PA_0
|
||||
#define PIN_D1 1u // PA_1
|
||||
#define PIN_D2 2u // PA_2
|
||||
#define PIN_D3 3u // PA_3
|
||||
#define PIN_D4 4u // PA_4
|
||||
#define PIN_D5 5u // PA_5
|
||||
#define PIN_D6 6u // PA_6
|
||||
#define PIN_D7 7u // PA_7
|
||||
#define PIN_D8 8u // PA_8
|
||||
#define PIN_D9 9u // PA_9
|
||||
#define PIN_D10 10u // PA_10
|
||||
#define PIN_D11 11u // PA_11
|
||||
#define PIN_D12 12u // PA_12
|
||||
#define PIN_D13 19u // PB_3
|
||||
#define PIN_D14 20u // PB_4
|
||||
#define PIN_D15 21u // PB_5
|
||||
#define PIN_D16 22u // PB_6
|
||||
#define PIN_D17 23u // PB_7
|
||||
#define PIN_D18 24u // PB_8
|
||||
#define PIN_D19 25u // PB_9
|
||||
#define PIN_A2 0u // PA_0
|
||||
#define PIN_A3 1u // PA_1
|
||||
#define PIN_A4 4u // PA_4
|
||||
#define PIN_A5 19u // PB_3
|
||||
#define PIN_A6 20u // PB_4
|
||||
#define PIN_A7 21u // PB_5
|
||||
|
||||
// Static pin names
|
||||
// ----------------
|
||||
static const unsigned char A2 = PIN_A2;
|
||||
static const unsigned char A3 = PIN_A3;
|
||||
static const unsigned char A4 = PIN_A4;
|
||||
static const unsigned char A5 = PIN_A5;
|
||||
static const unsigned char A6 = PIN_A6;
|
||||
static const unsigned char A7 = PIN_A7;
|
||||
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;
|
||||
static const unsigned char D10 = PIN_D10;
|
||||
static const unsigned char D11 = PIN_D11;
|
||||
static const unsigned char D12 = PIN_D12;
|
||||
static const unsigned char D13 = PIN_D13;
|
||||
static const unsigned char D14 = PIN_D14;
|
||||
static const unsigned char D15 = PIN_D15;
|
||||
static const unsigned char D16 = PIN_D16;
|
||||
static const unsigned char D17 = PIN_D17;
|
||||
static const unsigned char D18 = PIN_D18;
|
||||
static const unsigned char D19 = PIN_D19;
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){22u, 29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -75,7 +93,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
@@ -86,9 +103,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 29u // PA_29
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 30u // PA_30
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){22u, 29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -75,7 +93,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
@@ -86,9 +103,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 29u // PA_29
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 30u // PA_30
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){22u, 29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -74,7 +92,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
@@ -85,9 +102,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 29u // PA_29
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 30u // PA_30
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
#define PIN_SPI0_SCK_0 3u // PIN_A3
|
||||
#define PIN_SPI0_SCK_1 8u // PIN_A8
|
||||
#define PIN_SPI0_SCK_2 16u // PIN_A16
|
||||
#define PINS_SPI0_CS (pin_size_t[]){2u, 7u, 15u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){10u, 20u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){4u, 9u, 19u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){3u, 8u, 16u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -36,6 +40,8 @@
|
||||
#define PIN_WIRE0_SDA_1 12u // PIN_A12
|
||||
#define PIN_WIRE0_SDA_2 16u // PIN_A16
|
||||
#define PIN_WIRE0_SDA_3 20u // PIN_A20
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){2u, 11u, 15u, 19u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){3u, 12u, 16u, 20u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
@@ -54,6 +60,17 @@
|
||||
#define PIN_SERIAL2_RTS 20u // PIN_A20
|
||||
#define PIN_SERIAL2_RX 15u // PIN_A15
|
||||
#define PIN_SERIAL2_TX 16u // PIN_A16
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){9u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){12u, 13u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){11u, 14u}
|
||||
#define PINS_SERIAL1_CTS (pin_size_t[]){4u}
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){0u, 2u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){1u, 3u}
|
||||
#define PINS_SERIAL2_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL2_RTS (pin_size_t[]){20u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){15u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){16u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -61,7 +78,6 @@
|
||||
#define PIN_CTS0 10u // PIN_A10
|
||||
#define PIN_CTS1 4u // PIN_A4
|
||||
#define PIN_CTS2 19u // PIN_A19
|
||||
#define PIN_MISO0 20u // PIN_A20
|
||||
#define PIN_MOSI0 19u // PIN_A19
|
||||
#define PIN_PA00 0u // PIN_A0
|
||||
#define PIN_PA01 1u // PIN_A1
|
||||
@@ -84,23 +100,13 @@
|
||||
#define PIN_PA20 20u // PIN_A20
|
||||
#define PIN_PA23 23u // PIN_A23
|
||||
#define PIN_PWM0 20u // PIN_A20
|
||||
#define PIN_PWM1 12u // PIN_A12
|
||||
#define PIN_PWM2 14u // PIN_A14
|
||||
#define PIN_PWM3 15u // PIN_A15
|
||||
#define PIN_PWM4 16u // PIN_A16
|
||||
#define PIN_PWM5 17u // PIN_A17
|
||||
#define PIN_PWM6 18u // PIN_A18
|
||||
#define PIN_PWM7 23u // PIN_A23
|
||||
#define PIN_RTS0 9u // PIN_A9
|
||||
#define PIN_RTS2 20u // PIN_A20
|
||||
#define PIN_RX0 13u // PIN_A13
|
||||
#define PIN_RX1 2u // PIN_A2
|
||||
#define PIN_RX2 15u // PIN_A15
|
||||
#define PIN_SCK0 16u // PIN_A16
|
||||
#define PIN_SCL0 19u // PIN_A19
|
||||
#define PIN_SDA0 20u // PIN_A20
|
||||
#define PIN_TX0 14u // PIN_A14
|
||||
#define PIN_TX1 3u // PIN_A3
|
||||
#define PIN_TX2 16u // PIN_A16
|
||||
|
||||
// Port availability
|
||||
|
||||
42
boards/variants/ln-02.c
Normal file
42
boards/variants/ln-02.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/* This file was auto-generated from ln-02.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: PA11, SD_D1, I2C0_SCL, I2C0_SDA
|
||||
{PA_11, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D1: PB03, ADC5, I2C0_SCL, I2C0_SDA
|
||||
{PB_3, PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D2: PA03, UART0_RX, I2C0_SCL, I2C0_SDA
|
||||
{PA_3, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D3: PB08, UART1_RX, I2C0_SCL, I2C0_SDA
|
||||
{PB_8, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D4: PA02, UART0_TX, I2C0_SCL, I2C0_SDA
|
||||
{PA_2, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D5: PB09, UART1_TX, I2C0_SCL, I2C0_SDA
|
||||
{PB_9, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D6: PA01, ADC3, SWDIO, I2C0_SCL, I2C0_SDA
|
||||
{PA_1, PIN_SWD | PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D7: PA00, ADC2, I2C0_SCL, I2C0_SDA
|
||||
{PA_0, PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D8: PA09, BOOT1, SD_CLK, I2S0_SCLK, I2C0_SCL, I2C0_SDA
|
||||
{PA_9, PIN_I2S | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
};
|
||||
|
||||
PinInfo *lt_arduino_pin_gpio_map[] = {
|
||||
[0] = &(lt_arduino_pin_info_list[7]), // PA_0 (D7)
|
||||
[1] = &(lt_arduino_pin_info_list[6]), // PA_1 (D6)
|
||||
[2] = &(lt_arduino_pin_info_list[4]), // PA_2 (D4)
|
||||
[3] = &(lt_arduino_pin_info_list[2]), // PA_3 (D2)
|
||||
[9] = &(lt_arduino_pin_info_list[8]), // PA_9 (D8)
|
||||
[11] = &(lt_arduino_pin_info_list[0]), // PA_11 (D0)
|
||||
[19] = &(lt_arduino_pin_info_list[1]), // PB_3 (D1)
|
||||
[24] = &(lt_arduino_pin_info_list[3]), // PB_8 (D3)
|
||||
[25] = &(lt_arduino_pin_info_list[5]), // PB_9 (D5)
|
||||
};
|
||||
// clang-format on
|
||||
106
boards/variants/ln-02.h
Normal file
106
boards/variants/ln-02.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/* This file was auto-generated from ln-02.json using boardgen */
|
||||
|
||||
#pragma once
|
||||
|
||||
// clang-format off
|
||||
|
||||
// Pins
|
||||
// ----
|
||||
#define PINS_COUNT 9 // Total GPIO count
|
||||
#define NUM_DIGITAL_PINS 9 // Digital inputs/outputs
|
||||
#define NUM_ANALOG_INPUTS 3 // 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 11u // PA_11
|
||||
#define PIN_WIRE0_SCL_1 19u // PB_3
|
||||
#define PIN_WIRE0_SCL_2 3u // PA_3
|
||||
#define PIN_WIRE0_SCL_3 24u // PB_8
|
||||
#define PIN_WIRE0_SCL_4 2u // PA_2
|
||||
#define PIN_WIRE0_SCL_5 25u // PB_9
|
||||
#define PIN_WIRE0_SCL_6 1u // PA_1
|
||||
#define PIN_WIRE0_SCL_7 0u // PA_0
|
||||
#define PIN_WIRE0_SCL_8 9u // PA_9
|
||||
#define PIN_WIRE0_SDA_0 11u // PA_11
|
||||
#define PIN_WIRE0_SDA_1 19u // PB_3
|
||||
#define PIN_WIRE0_SDA_2 3u // PA_3
|
||||
#define PIN_WIRE0_SDA_3 24u // PB_8
|
||||
#define PIN_WIRE0_SDA_4 2u // PA_2
|
||||
#define PIN_WIRE0_SDA_5 25u // PB_9
|
||||
#define PIN_WIRE0_SDA_6 1u // PA_1
|
||||
#define PIN_WIRE0_SDA_7 0u // PA_0
|
||||
#define PIN_WIRE0_SDA_8 9u // PA_9
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){11u, 19u, 3u, 24u, 2u, 25u, 1u, 0u, 9u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){11u, 19u, 3u, 24u, 2u, 25u, 1u, 0u, 9u}
|
||||
|
||||
// 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_ADC2 0u // PA_0
|
||||
#define PIN_ADC3 1u // PA_1
|
||||
#define PIN_ADC5 19u // PB_3
|
||||
#define PIN_PA00 0u // PA_0
|
||||
#define PIN_PA01 1u // PA_1
|
||||
#define PIN_PA02 2u // PA_2
|
||||
#define PIN_PA03 3u // PA_3
|
||||
#define PIN_PA09 9u // PA_9
|
||||
#define PIN_PA11 11u // PA_11
|
||||
#define PIN_PB03 19u // PB_3
|
||||
#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 9u // PA_9
|
||||
#define PIN_SDA0 9u // PA_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 11u // PA_11
|
||||
#define PIN_D1 19u // PB_3
|
||||
#define PIN_D2 3u // PA_3
|
||||
#define PIN_D3 24u // PB_8
|
||||
#define PIN_D4 2u // PA_2
|
||||
#define PIN_D5 25u // PB_9
|
||||
#define PIN_D6 1u // PA_1
|
||||
#define PIN_D7 0u // PA_0
|
||||
#define PIN_D8 9u // PA_9
|
||||
#define PIN_A0 19u // PB_3
|
||||
#define PIN_A1 1u // PA_1
|
||||
#define PIN_A2 0u // PA_0
|
||||
|
||||
// Static pin names
|
||||
// ----------------
|
||||
static const unsigned char A0 = PIN_A0;
|
||||
static const unsigned char A1 = PIN_A1;
|
||||
static const unsigned char A2 = PIN_A2;
|
||||
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;
|
||||
@@ -14,15 +14,21 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,15 +14,21 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE0_SCL 29u // PA_29
|
||||
#define PIN_WIRE0_SDA 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PIN_WIRE0_SCL 29u // PA_29
|
||||
#define PIN_WIRE0_SDA 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -39,7 +47,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 14u // PA_14
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){22u, 29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -63,7 +81,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
@@ -74,9 +91,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 29u // PA_29
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 30u // PA_30
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
48
boards/variants/t112-v1.1.c
Normal file
48
boards/variants/t112-v1.1.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/* This file was auto-generated from t112-v1.1.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: PA29, UART2_RX, I2C0_SCL, PWM4
|
||||
{PA_29, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_UART, PIN_NONE, 0},
|
||||
// D1: PA19, ADC1, UART0_CTS, SPI0_CS, SPI1_CS, I2C0_SDA, SD_D3, TMR5_TRIG, I2S0_TX
|
||||
{PA_19, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
|
||||
// D2: PA15, PWM1, SWDIO
|
||||
{PA_15, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
|
||||
// D3: PA14, PWM0, SWCLK
|
||||
{PA_14, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
|
||||
// D4: PA00, PWM2
|
||||
{PA_0, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D5: PA05, PWM4, WAKE1
|
||||
{PA_5, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D6: PA18, UART0_RX, SPI0_SCK, SPI1_SCK, I2C1_SCL, SD_D2, TMR4_TRIG, I2S0_MCK, WAKE0
|
||||
{PA_18, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
|
||||
// D7: PA12, PWM3
|
||||
{PA_12, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D8: PA23, UART0_TX, SPI0_MOSI, SPI1_MOSI, I2C1_SDA, SD_D1, PWM0, WAKE3
|
||||
{PA_23, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_SPI | PIN_UART, PIN_NONE, 0},
|
||||
// D9: PA22, UART0_RTS, SPI0_MISO, SPI1_MISO, I2C0_SCL, SD_D0, PWM5, I2S0_WS, WAKE2
|
||||
{PA_22, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
|
||||
// D10: PA30, UART2_TX, I2C0_SDA, PWM4
|
||||
{PA_30, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_UART, PIN_NONE, 0},
|
||||
};
|
||||
|
||||
PinInfo *lt_arduino_pin_gpio_map[] = {
|
||||
[0] = &(lt_arduino_pin_info_list[4]), // PA_0 (D4)
|
||||
[5] = &(lt_arduino_pin_info_list[5]), // PA_5 (D5)
|
||||
[12] = &(lt_arduino_pin_info_list[7]), // PA_12 (D7)
|
||||
[14] = &(lt_arduino_pin_info_list[3]), // PA_14 (D3)
|
||||
[15] = &(lt_arduino_pin_info_list[2]), // PA_15 (D2)
|
||||
[18] = &(lt_arduino_pin_info_list[6]), // PA_18 (D6)
|
||||
[19] = &(lt_arduino_pin_info_list[1]), // PA_19 (D1)
|
||||
[22] = &(lt_arduino_pin_info_list[9]), // PA_22 (D9)
|
||||
[23] = &(lt_arduino_pin_info_list[8]), // PA_23 (D8)
|
||||
[29] = &(lt_arduino_pin_info_list[0]), // PA_29 (D0)
|
||||
[30] = &(lt_arduino_pin_info_list[10]), // PA_30 (D10)
|
||||
};
|
||||
// clang-format on
|
||||
138
boards/variants/t112-v1.1.h
Normal file
138
boards/variants/t112-v1.1.h
Normal file
@@ -0,0 +1,138 @@
|
||||
/* This file was auto-generated from t112-v1.1.json using boardgen */
|
||||
|
||||
#pragma once
|
||||
|
||||
// clang-format off
|
||||
|
||||
// Pins
|
||||
// ----
|
||||
#define PINS_COUNT 11 // Total GPIO count
|
||||
#define NUM_DIGITAL_PINS 11 // Digital inputs/outputs
|
||||
#define NUM_ANALOG_INPUTS 1 // ADC inputs
|
||||
#define NUM_ANALOG_OUTPUTS 9 // PWM & DAC outputs
|
||||
#define PINS_GPIO_MAX 30 // Last usable GPIO number
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE0_SCL_0 29u // PA_29
|
||||
#define PIN_WIRE0_SCL_1 22u // PA_22
|
||||
#define PIN_WIRE0_SDA_0 19u // PA_19
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u, 22u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// 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_MISO0 22u // PA_22
|
||||
#define PIN_MISO1 22u // PA_22
|
||||
#define PIN_MOSI0 23u // PA_23
|
||||
#define PIN_MOSI1 23u // PA_23
|
||||
#define PIN_PA00 0u // PA_0
|
||||
#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_PA18 18u // PA_18
|
||||
#define PIN_PA19 19u // PA_19
|
||||
#define PIN_PA22 22u // PA_22
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
#define PIN_PWM4 30u // PA_30
|
||||
#define PIN_PWM5 22u // PA_22
|
||||
#define PIN_RTS0 22u // PA_22
|
||||
#define PIN_RX0 18u // PA_18
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
// Port availability
|
||||
// -----------------
|
||||
#define HAS_SERIAL0 1
|
||||
#define HAS_SERIAL2 1
|
||||
#define HAS_SPI0 1
|
||||
#define HAS_SPI1 1
|
||||
#define HAS_WIRE0 1
|
||||
#define HAS_WIRE1 1
|
||||
#define SERIAL_INTERFACES_COUNT 2
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
#define WIRE_INTERFACES_COUNT 2
|
||||
|
||||
// Arduino pin names
|
||||
// -----------------
|
||||
#define PIN_D0 29u // PA_29
|
||||
#define PIN_D1 19u // PA_19
|
||||
#define PIN_D2 15u // PA_15
|
||||
#define PIN_D3 14u // PA_14
|
||||
#define PIN_D4 0u // PA_0
|
||||
#define PIN_D5 5u // PA_5
|
||||
#define PIN_D6 18u // PA_18
|
||||
#define PIN_D7 12u // PA_12
|
||||
#define PIN_D8 23u // PA_23
|
||||
#define PIN_D9 22u // PA_22
|
||||
#define PIN_D10 30u // PA_30
|
||||
#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;
|
||||
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;
|
||||
static const unsigned char D10 = PIN_D10;
|
||||
@@ -14,14 +14,19 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
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;
|
||||
@@ -14,15 +14,21 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PIN_WIRE1_SCL 20u // GPIO20
|
||||
#define PIN_WIRE1_SDA 21u // GPIO21
|
||||
#define PIN_WIRE2_SCL 0u // GPIO0
|
||||
#define PIN_WIRE2_SDA 1u // GPIO1
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){20u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){21u}
|
||||
#define PINS_WIRE2_SCL (pin_size_t[]){0u}
|
||||
#define PINS_WIRE2_SDA (pin_size_t[]){1u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PIN_SERIAL1_RX 10u // GPIO10
|
||||
#define PIN_SERIAL1_TX 11u // GPIO11
|
||||
#define PIN_SERIAL2_RX 1u // GPIO1
|
||||
#define PIN_SERIAL2_TX 0u // GPIO0
|
||||
#define PINS_SERIAL1_RX (pin_size_t[]){10u}
|
||||
#define PINS_SERIAL1_TX (pin_size_t[]){11u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){1u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){0u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
|
||||
54
boards/variants/wl2s.c
Normal file
54
boards/variants/wl2s.c
Normal file
@@ -0,0 +1,54 @@
|
||||
/* This file was auto-generated from wl2s.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_I2S | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D1: PA12, I2C0_SCL, I2C0_SDA
|
||||
{PA_12, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D2: PA03, UART0_RX, I2C0_SCL, I2C0_SDA
|
||||
{PA_3, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D3: PA10, SD_D0, I2S0_TX, I2C0_SCL, I2C0_SDA
|
||||
{PA_10, PIN_I2S | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D4: PA02, UART0_TX, I2C0_SCL, I2C0_SDA
|
||||
{PA_2, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D5: PA00, ADC2, I2C0_SCL, I2C0_SDA
|
||||
{PA_0, PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D6: PB03, ADC5, I2C0_SCL, I2C0_SDA
|
||||
{PB_3, PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D7: PA11, SD_D1, I2C0_SCL, I2C0_SDA
|
||||
{PA_11, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D8: PA09, BOOT1, SD_CLK, I2S0_SCLK, I2C0_SCL, I2C0_SDA
|
||||
{PA_9, PIN_I2S | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D9: PB08, UART1_RX, I2C0_SCL, I2C0_SDA
|
||||
{PB_8, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D10: PB09, UART1_TX, I2C0_SCL, I2C0_SDA
|
||||
{PB_9, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D11: PA05, I2C0_SCL, I2C0_SDA
|
||||
{PA_5, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
// D12: PA01, ADC3, SWDIO, I2C0_SCL, I2C0_SDA
|
||||
{PA_1, PIN_SWD | PIN_I2C | PIN_ADC | PIN_IRQ | PIN_GPIO, PIN_NONE, 0},
|
||||
};
|
||||
|
||||
PinInfo *lt_arduino_pin_gpio_map[] = {
|
||||
[0] = &(lt_arduino_pin_info_list[5]), // PA_0 (D5)
|
||||
[1] = &(lt_arduino_pin_info_list[12]), // PA_1 (D12)
|
||||
[2] = &(lt_arduino_pin_info_list[4]), // PA_2 (D4)
|
||||
[3] = &(lt_arduino_pin_info_list[2]), // PA_3 (D2)
|
||||
[5] = &(lt_arduino_pin_info_list[11]), // PA_5 (D11)
|
||||
[7] = &(lt_arduino_pin_info_list[0]), // PA_7 (D0)
|
||||
[9] = &(lt_arduino_pin_info_list[8]), // PA_9 (D8)
|
||||
[10] = &(lt_arduino_pin_info_list[3]), // PA_10 (D3)
|
||||
[11] = &(lt_arduino_pin_info_list[7]), // PA_11 (D7)
|
||||
[12] = &(lt_arduino_pin_info_list[1]), // PA_12 (D1)
|
||||
[19] = &(lt_arduino_pin_info_list[6]), // PB_3 (D6)
|
||||
[24] = &(lt_arduino_pin_info_list[9]), // PB_8 (D9)
|
||||
[25] = &(lt_arduino_pin_info_list[10]), // PB_9 (D10)
|
||||
};
|
||||
// clang-format on
|
||||
126
boards/variants/wl2s.h
Normal file
126
boards/variants/wl2s.h
Normal file
@@ -0,0 +1,126 @@
|
||||
/* This file was auto-generated from wl2s.json using boardgen */
|
||||
|
||||
#pragma once
|
||||
|
||||
// clang-format off
|
||||
|
||||
// Pins
|
||||
// ----
|
||||
#define PINS_COUNT 13 // Total GPIO count
|
||||
#define NUM_DIGITAL_PINS 13 // Digital inputs/outputs
|
||||
#define NUM_ANALOG_INPUTS 3 // 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 12u // PA_12
|
||||
#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 0u // PA_0
|
||||
#define PIN_WIRE0_SCL_6 19u // PB_3
|
||||
#define PIN_WIRE0_SCL_7 11u // PA_11
|
||||
#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_SCL_11 5u // PA_5
|
||||
#define PIN_WIRE0_SCL_12 1u // PA_1
|
||||
#define PIN_WIRE0_SDA_0 7u // PA_7
|
||||
#define PIN_WIRE0_SDA_1 12u // PA_12
|
||||
#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 0u // PA_0
|
||||
#define PIN_WIRE0_SDA_6 19u // PB_3
|
||||
#define PIN_WIRE0_SDA_7 11u // PA_11
|
||||
#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 PIN_WIRE0_SDA_11 5u // PA_5
|
||||
#define PIN_WIRE0_SDA_12 1u // PA_1
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){7u, 12u, 3u, 10u, 2u, 0u, 19u, 11u, 9u, 24u, 25u, 5u, 1u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){7u, 12u, 3u, 10u, 2u, 0u, 19u, 11u, 9u, 24u, 25u, 5u, 1u}
|
||||
|
||||
// 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_ADC2 0u // PA_0
|
||||
#define PIN_ADC3 1u // PA_1
|
||||
#define PIN_ADC5 19u // PB_3
|
||||
#define PIN_PA00 0u // PA_0
|
||||
#define PIN_PA01 1u // PA_1
|
||||
#define PIN_PA02 2u // PA_2
|
||||
#define PIN_PA03 3u // PA_3
|
||||
#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_PA11 11u // PA_11
|
||||
#define PIN_PA12 12u // PA_12
|
||||
#define PIN_PB03 19u // PB_3
|
||||
#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 1u // PA_1
|
||||
#define PIN_SDA0 1u // PA_1
|
||||
#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 12u // PA_12
|
||||
#define PIN_D2 3u // PA_3
|
||||
#define PIN_D3 10u // PA_10
|
||||
#define PIN_D4 2u // PA_2
|
||||
#define PIN_D5 0u // PA_0
|
||||
#define PIN_D6 19u // PB_3
|
||||
#define PIN_D7 11u // PA_11
|
||||
#define PIN_D8 9u // PA_9
|
||||
#define PIN_D9 24u // PB_8
|
||||
#define PIN_D10 25u // PB_9
|
||||
#define PIN_D11 5u // PA_5
|
||||
#define PIN_D12 1u // PA_1
|
||||
#define PIN_A0 0u // PA_0
|
||||
#define PIN_A1 19u // PB_3
|
||||
#define PIN_A2 1u // PA_1
|
||||
|
||||
// Static pin names
|
||||
// ----------------
|
||||
static const unsigned char A0 = PIN_A0;
|
||||
static const unsigned char A1 = PIN_A1;
|
||||
static const unsigned char A2 = PIN_A2;
|
||||
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;
|
||||
static const unsigned char D10 = PIN_D10;
|
||||
static const unsigned char D11 = PIN_D11;
|
||||
static const unsigned char D12 = PIN_D12;
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 19u // PA_19
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u, 22u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){30u, 19u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -62,7 +80,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 14u // PA_14
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM4 29u // PA_29
|
||||
@@ -72,9 +89,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 22u // PA_22
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 19u // PA_19
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 19u // PA_19
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u, 22u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){30u, 19u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -62,7 +80,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 14u // PA_14
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
#define PIN_PWM4 29u // PA_29
|
||||
@@ -72,9 +89,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 22u // PA_22
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 19u // PA_19
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE0_SCL 29u // PA_29
|
||||
#define PIN_WIRE0_SDA 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PIN_WIRE0_SCL 29u // PA_29
|
||||
#define PIN_WIRE0_SDA 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -40,7 +48,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 14u // PA_14
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
|
||||
@@ -19,14 +19,23 @@
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -46,7 +55,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 14u // PA_14
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
#define PIN_PWM4 29u // PA_29
|
||||
@@ -56,7 +64,6 @@
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 29u // PA_29
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 30u // PA_30
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){22u, 29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -63,7 +81,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
@@ -74,9 +91,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 29u // PA_29
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 30u // PA_30
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 19u // PA_19
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u, 22u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){30u, 19u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -63,7 +81,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
@@ -74,9 +91,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 22u // PA_22
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 19u // PA_19
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){22u, 29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -63,7 +81,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
@@ -74,9 +91,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 29u // PA_29
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 30u // PA_30
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -14,14 +14,22 @@
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PIN_SPI0_CS 19u // PA_19
|
||||
#define PIN_SPI0_MISO 22u // PA_22
|
||||
#define PIN_SPI0_MOSI 23u // PA_23
|
||||
#define PIN_SPI0_SCK 18u // PA_18
|
||||
#define PIN_SPI1_CS 19u // PA_19
|
||||
#define PIN_SPI1_MISO 22u // PA_22
|
||||
#define PIN_SPI1_MOSI 23u // PA_23
|
||||
#define PIN_SPI1_SCK 18u // PA_18
|
||||
#define PINS_SPI0_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI0_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI0_SCK (pin_size_t[]){18u}
|
||||
#define PINS_SPI1_CS (pin_size_t[]){19u}
|
||||
#define PINS_SPI1_MISO (pin_size_t[]){22u}
|
||||
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
|
||||
#define PINS_SPI1_SCK (pin_size_t[]){18u}
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
@@ -31,15 +39,25 @@
|
||||
#define PIN_WIRE0_SDA_1 19u // PA_19
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u, 22u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){30u, 19u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_CTS 19u // PA_19
|
||||
#define PIN_SERIAL0_RTS 22u // PA_22
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
|
||||
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -63,7 +81,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
@@ -74,9 +91,7 @@
|
||||
#define PIN_RX2 29u // PA_29
|
||||
#define PIN_SCK0 18u // PA_18
|
||||
#define PIN_SCK1 18u // PA_18
|
||||
#define PIN_SCL0 22u // PA_22
|
||||
#define PIN_SCL1 18u // PA_18
|
||||
#define PIN_SDA0 19u // PA_19
|
||||
#define PIN_SDA1 23u // PA_23
|
||||
#define PIN_TX0 23u // PA_23
|
||||
#define PIN_TX2 30u // PA_30
|
||||
|
||||
@@ -14,17 +14,25 @@
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define PIN_WIRE0_SCL 29u // PA_29
|
||||
#define PIN_WIRE0_SDA 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PIN_WIRE0_SCL 29u // PA_29
|
||||
#define PIN_WIRE0_SDA 30u // PA_30
|
||||
#define PIN_WIRE1_SCL 18u // PA_18
|
||||
#define PIN_WIRE1_SDA 23u // PA_23
|
||||
#define PINS_WIRE0_SCL (pin_size_t[]){29u}
|
||||
#define PINS_WIRE0_SDA (pin_size_t[]){30u}
|
||||
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
|
||||
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PIN_SERIAL0_RX 18u // PA_18
|
||||
#define PIN_SERIAL0_TX 23u // PA_23
|
||||
#define PIN_SERIAL2_RX 29u // PA_29
|
||||
#define PIN_SERIAL2_TX 30u // PA_30
|
||||
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
|
||||
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
|
||||
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
|
||||
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
@@ -40,7 +48,6 @@
|
||||
#define PIN_PA23 23u // PA_23
|
||||
#define PIN_PA29 29u // PA_29
|
||||
#define PIN_PA30 30u // PA_30
|
||||
#define PIN_PWM0 23u // PA_23
|
||||
#define PIN_PWM1 15u // PA_15
|
||||
#define PIN_PWM2 0u // PA_0
|
||||
#define PIN_PWM3 12u // PA_12
|
||||
|
||||
19
boards/wb02a.json
Normal file
19
boards/wb02a.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"_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",
|
||||
"pcb": {
|
||||
"symbol": ""
|
||||
}
|
||||
}
|
||||
22
boards/wl2s.json
Normal file
22
boards/wl2s.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"_base": [
|
||||
"lightning-ln882x",
|
||||
"lightning-ln882hki",
|
||||
"ic/ln882hk",
|
||||
"pcb/wl2s",
|
||||
"pcb/wl2s-test"
|
||||
],
|
||||
"build": {
|
||||
"mcu": "ln882hk",
|
||||
"variant": "wl2s"
|
||||
},
|
||||
"name": "WL2S Wi-Fi/BLE Module",
|
||||
"url": "https://docs.libretiny.eu/boards/wl2s/",
|
||||
"vendor": "Unknown",
|
||||
"doc": {
|
||||
"fccid": ""
|
||||
},
|
||||
"pcb": {
|
||||
"symbol": "WL2S"
|
||||
}
|
||||
}
|
||||
263
builder/family/lightning-ln882h.py
Normal file
263
builder/family/lightning-ln882h.py
Normal file
@@ -0,0 +1,263 @@
|
||||
# Copyright (c) Etienne Le Cousin 2024-02-08.
|
||||
|
||||
from os.path import join
|
||||
from shutil import copyfile
|
||||
|
||||
from platformio.platform.board import PlatformBoardConfig
|
||||
from SCons.Script import DefaultEnvironment, Environment
|
||||
|
||||
env: Environment = DefaultEnvironment()
|
||||
board: PlatformBoardConfig = env.BoardConfig()
|
||||
queue = env.AddLibraryQueue("lightning-ln882h")
|
||||
env.ConfigureFamily()
|
||||
|
||||
# Flags
|
||||
queue.AppendPublic(
|
||||
CCFLAGS=[
|
||||
"-mcpu=cortex-m4",
|
||||
"-mthumb",
|
||||
"-mabi=aapcs",
|
||||
"-mfloat-abi=hard",
|
||||
"-mfpu=fpv4-sp-d16",
|
||||
"-fno-short-enums",
|
||||
"-Wfatal-errors",
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-fno-strict-aliasing",
|
||||
"-MD",
|
||||
"-MP",
|
||||
],
|
||||
CFLAGS=[
|
||||
"-Wpointer-arith",
|
||||
"-Wno-write-strings",
|
||||
"-Wno-maybe-uninitialized",
|
||||
],
|
||||
CXXFLAGS=[],
|
||||
CPPDEFINES=[
|
||||
# other options
|
||||
"ARM_MATH_CM4",
|
||||
"LN882H",
|
||||
("PLATFORM_LN882H", "1"),
|
||||
("MBEDTLS_CONFIG_FILE", r"\"mbedtls_config.h\""),
|
||||
],
|
||||
ASFLAGS=[
|
||||
"-mcpu=cortex-m4",
|
||||
"-mthumb",
|
||||
"-mabi=aapcs",
|
||||
"-mfloat-abi=hard",
|
||||
"-mfpu=fpv4-sp-d16",
|
||||
"-g",
|
||||
"-c",
|
||||
],
|
||||
LINKFLAGS=[
|
||||
"-mcpu=cortex-m4",
|
||||
"-mthumb",
|
||||
"-mabi=aapcs",
|
||||
"-mfloat-abi=hard",
|
||||
"-mfpu=fpv4-sp-d16",
|
||||
"--specs=nano.specs",
|
||||
"-Wl,--gc-sections",
|
||||
"-Wl,--whole-archive",
|
||||
"-lcore_ln882h",
|
||||
"-Wl,--no-whole-archive",
|
||||
# stdio wrappers (base/port/printf.c)
|
||||
"-Wl,-wrap,ln_printf",
|
||||
],
|
||||
)
|
||||
queue.AppendPrivate(
|
||||
CFLAGS=[
|
||||
"-Wno-implicit-function-declaration",
|
||||
"-Wno-incompatible-pointer-types",
|
||||
"-Wno-int-conversion",
|
||||
"-Wno-pointer-sign",
|
||||
"-Wfatal-errors",
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-fno-strict-aliasing",
|
||||
"-std=gnu99",
|
||||
"-MD",
|
||||
"-MP",
|
||||
],
|
||||
)
|
||||
|
||||
# Boot files - from SDK project/wifi_mcu_basic_example
|
||||
"""
|
||||
queue.AddLibrary(
|
||||
name="ln882h_boot",
|
||||
base_dir="$SDK_DIR/project/wifi_mcu_basic_example",
|
||||
srcs=[
|
||||
"+<startup/startup_ln882h_gcc.c>",
|
||||
],
|
||||
)
|
||||
"""
|
||||
# Sources
|
||||
queue.AddLibrary(
|
||||
name="ln882h_sdk",
|
||||
base_dir="$SDK_DIR",
|
||||
srcs=[
|
||||
# MCU
|
||||
"+<mcu/ln882h/system_ln882h.c>"
|
||||
# Hal
|
||||
"+<mcu/driver_ln882h/hal/*.c>",
|
||||
# FreeRTOS
|
||||
"+<components/kernel/FreeRTOS_Adapter/*.c>",
|
||||
# Serial
|
||||
"+<components/serial/serial.c>",
|
||||
# Misc
|
||||
"+<components/fs/nvds/ln_nvds.c>",
|
||||
"+<components/fs/kv/kv/ln_kv.c>",
|
||||
"+<components/fs/kv/kv_port/ln_kv_port.c>",
|
||||
"+<components/fota/ota_agent/ota_image.c>",
|
||||
"+<components/utils/fifo/fifobuf.c>",
|
||||
"+<components/utils/debug/log.c>",
|
||||
"+<components/utils/debug/CmBacktrace/cm_backtrace.c>",
|
||||
"+<components/utils/system_parameter.c>",
|
||||
"+<components/utils/power_mgmt/ln_pm.c>",
|
||||
"+<components/utils/runtime/runtime.c>",
|
||||
"+<components/utils/reboot_trace/reboot_trace.c>",
|
||||
"+<components/tencent/qcloud_iot_c_sdk/external_libs/cJSON/cJSON.c>",
|
||||
],
|
||||
includes=[
|
||||
# MCU
|
||||
"+<mcu/CMSIS_5.3.0>",
|
||||
"+<mcu/ln882h>",
|
||||
# Hal
|
||||
"+<mcu/driver_ln882h>",
|
||||
"+<mcu/driver_ln882h/reg>",
|
||||
"+<mcu/driver_ln882h/hal>",
|
||||
# Components
|
||||
"+<components>",
|
||||
# FreeRTOS
|
||||
"+<components/kernel>",
|
||||
"+<components/kernel/FreeRTOS/Source/portable/GCC/ARM_CM4F>",
|
||||
"+<components/kernel/FreeRTOS_Adapter>",
|
||||
"+<components/kernel/osal>",
|
||||
# Misc
|
||||
"+<components/fs/nvds>",
|
||||
"+<components/fs/kv/kv>",
|
||||
"+<components/fs/kv/kv_port>",
|
||||
"+<components/fs/partition_mgr>",
|
||||
"+<components/fota/ota_agent>",
|
||||
"+<components/serial>",
|
||||
"+<components/utils/debug/CmBacktrace>",
|
||||
"+<components/utils/power_mgmt>",
|
||||
# "+<components/utils/runtime>",
|
||||
"+<components/utils/reboot_trace>",
|
||||
"+<components/tencent/qcloud_iot_c_sdk/external_libs/cJSON>",
|
||||
],
|
||||
options=dict(
|
||||
CPPDEFINES=["LN882H_SDK"],
|
||||
CFLAGS=["-w"],
|
||||
),
|
||||
)
|
||||
|
||||
queue.AddLibrary(
|
||||
name="ln882h_net",
|
||||
base_dir="$SDK_DIR",
|
||||
srcs=[
|
||||
# WiFi
|
||||
"+<components/wifi/wifi_manager/wifi_manager.c>",
|
||||
"+<components/wifi/wifi_lib_import/wifi_port.c>",
|
||||
# DHCPD
|
||||
"+<components/net/dhcpd/*.c>",
|
||||
# Utils
|
||||
"+<components/utils/ln_misc.c>",
|
||||
"+<components/utils/ln_sha1.c>",
|
||||
"+<components/utils/ln_aes.c>",
|
||||
"+<components/utils/ln_psk_calc.c>",
|
||||
],
|
||||
includes=[
|
||||
"+<components/wifi/wifi_manager>",
|
||||
"+<components/wifi/wifi_lib_import>",
|
||||
"+<components/wifi/wifi_lib_export>",
|
||||
"+<components/net/dhcpd>",
|
||||
],
|
||||
options=dict(
|
||||
CPPDEFINES=["LN882H_SDK"],
|
||||
CFLAGS=["-w"],
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
# Sources - FreeRTOS
|
||||
env.Replace(FREERTOS_PORT=env["FAMILY_NAME"], FREERTOS_PORT_DEFINE="LIGHTNING_LN882H")
|
||||
queue.AddExternalLibrary("freertos")
|
||||
queue.AddExternalLibrary("freertos-port")
|
||||
|
||||
# Sources - lwIP
|
||||
queue.AddExternalLibrary("lwip", port="ln882h")
|
||||
|
||||
# Sources - mbedTLS
|
||||
queue.AddLibrary(
|
||||
name="ln882h_mbedtls",
|
||||
base_dir="$SDK_DIR",
|
||||
srcs=[
|
||||
# mbedTLS from SDK
|
||||
"+<components/net/mbedtls/library/*.c>",
|
||||
# replace this with a port specific
|
||||
"-<components/net/mbedtls/library/net_sockets.c>",
|
||||
"-<components/net/mbedtls/library/platform.c>",
|
||||
"-<components/net/mbedtls/library/threading_alt.c>",
|
||||
"-<components/net/mbedtls/library/timing.c>",
|
||||
# ln port
|
||||
"+<components/net/mbedtls/port_ln/library/*.c>",
|
||||
],
|
||||
includes=[
|
||||
"+<components/net/mbedtls/include>",
|
||||
"+<components/net/mbedtls/port_ln/include>",
|
||||
],
|
||||
options=dict(
|
||||
CPPDEFINES=["LN882H_SDK"],
|
||||
CFLAGS=["-w"],
|
||||
),
|
||||
)
|
||||
|
||||
# Libs & linker config
|
||||
queue.AppendPublic(
|
||||
LIBPATH=[
|
||||
# fmt: off
|
||||
join("$SDK_DIR", "lib", "gcclib"),
|
||||
# fmt: on
|
||||
],
|
||||
LIBS=[
|
||||
"arm_cortexM4lf_math",
|
||||
"ln882h_wifi",
|
||||
"m",
|
||||
"c",
|
||||
"nosys",
|
||||
"gcc",
|
||||
],
|
||||
)
|
||||
|
||||
# Copy Bootloader
|
||||
bootfile = board.get("build.bootfile")
|
||||
copyfile(
|
||||
join(env.subst("$MISC_DIR"), bootfile), join(env.subst("$BUILD_DIR"), "boot.bin")
|
||||
)
|
||||
|
||||
# Generate linker scripts with correct flash offsets
|
||||
env.GenerateLinkerScript(board, board.get("build.ldscript"))
|
||||
|
||||
# Build all libraries
|
||||
queue.BuildLibraries()
|
||||
|
||||
# Main firmware outputs and actions
|
||||
# fmt: off
|
||||
image_ota = "${BUILD_DIR}/image_ota.${FLASH_OTA_OFFSET}.bin"
|
||||
image_part_tab = "${BUILD_DIR}/image_part_tab.${FLASH_PART_TAB_OFFSET}.bin"
|
||||
image_boot = "${BUILD_DIR}/image_boot.${FLASH_BOOT_OFFSET}.bin"
|
||||
image_app = "${BUILD_DIR}/image_app.${FLASH_APP_OFFSET}.bin"
|
||||
# fmt: on
|
||||
env.Replace(
|
||||
# linker command
|
||||
LINK='${LTCHIPTOOL} link2bin ${BOARD_JSON} "" ""',
|
||||
# UF2OTA input list
|
||||
UF2OTA=[
|
||||
# ota binary image for device
|
||||
f"{image_ota}=device:ota",
|
||||
# binary image for flasher
|
||||
f"{image_boot}=flasher:boot",
|
||||
f"{image_part_tab}=flasher:part_tab",
|
||||
f"{image_app}=flasher:app",
|
||||
],
|
||||
)
|
||||
@@ -410,7 +410,7 @@ if not isfile(bootloader_dst):
|
||||
image_ota_clear = env.subst("${BUILD_DIR}/raw_ota_clear.bin")
|
||||
if not isfile(image_ota_clear):
|
||||
with open(image_ota_clear, "wb") as f:
|
||||
f.write(b"\xFF" * 4096)
|
||||
f.write(b"\xff" * 4096)
|
||||
|
||||
# Build all libraries
|
||||
queue.BuildLibraries()
|
||||
@@ -427,8 +427,8 @@ env.Replace(
|
||||
# same OTA images for flasher and device
|
||||
f"{image_firmware_is},{image_firmware_is}=device:ota1,ota2;flasher:ota1,ota2",
|
||||
# having flashed an application image, update the bootloader and partition table (incl. keys)
|
||||
f"{image_bootloader}=device:boot;flasher:boot",
|
||||
f"{image_part_table}=device:part_table;flasher:part_table",
|
||||
f"{image_bootloader},{image_bootloader}=flasher:boot,boot",
|
||||
f"{image_part_table},{image_part_table}=flasher:part_table,part_table",
|
||||
# clearing headers of the "other" OTA image (hence the indexes are swapped)
|
||||
f"{image_ota_clear},{image_ota_clear}=device:ota2,ota1;flasher:ota2,ota1",
|
||||
],
|
||||
|
||||
@@ -20,8 +20,6 @@ env.ParseCustomOptions(platform)
|
||||
env.ParseCustomFlashLayout(platform, board)
|
||||
# Add flash layout C defines
|
||||
env.AddFlashLayout(board)
|
||||
# Write custom header options
|
||||
env.ApplyCustomOptions(platform)
|
||||
# Export board manifest for ltchiptool
|
||||
env.ExportBoardData(board)
|
||||
# Print information about versions and custom options
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user