Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e0750c9d3 | ||
|
|
9a3e512b1b | ||
|
|
861e741030 | ||
|
|
a3e7e21d45 | ||
|
|
86db2fcf61 | ||
|
|
fcd72e013a |
@@ -106,7 +106,7 @@ void analogWrite(pin_size_t pinNumber, int value) {
|
||||
pwm.duty_cycle3 = 0;
|
||||
#endif
|
||||
|
||||
if (value) {
|
||||
if (dutyCycle) {
|
||||
if (!pinEnabled(pin, PIN_PWM)) {
|
||||
// enable PWM and set its value
|
||||
pwm.cfg.bits.en = PWM_ENABLE;
|
||||
@@ -131,7 +131,6 @@ void analogWrite(pin_size_t pinNumber, int value) {
|
||||
// disable PWM
|
||||
pwm.cfg.bits.en = PWM_DISABLE;
|
||||
__wrap_bk_printf_disable();
|
||||
sddev_control(PWM_DEV_NAME, CMD_PWM_SET_DUTY_CYCLE, &pwm);
|
||||
sddev_control(PWM_DEV_NAME, CMD_PWM_DEINIT_PARAM, &pwm);
|
||||
__wrap_bk_printf_enable();
|
||||
pin->enabled &= ~PIN_PWM;
|
||||
|
||||
@@ -28,4 +28,5 @@
|
||||
- [WR3L](../boards/wr3l/README.md)
|
||||
- [WR3LE](../boards/wr3le/README.md)
|
||||
- [LSC LMA35](../boards/lsc-lma35/README.md)
|
||||
- [LSC LMA35 T](../boards/lsc-lma35-t/README.md)
|
||||
- [Generic - Host-native](../boards/generic-native/README.md)
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
"f_cpu": "120000000L",
|
||||
"prefix": "arm-none-eabi-",
|
||||
"bkota": {
|
||||
"encryption": "aes256",
|
||||
"compression": "gzip",
|
||||
"key": "0123456789ABCDEF0123456789ABCDEF",
|
||||
"iv": "0123456789ABCDEF"
|
||||
"encryption": "none",
|
||||
"compression": "gzip"
|
||||
}
|
||||
},
|
||||
"connectivity": [
|
||||
|
||||
29
boards/lsc-lma35-t.json
Normal file
29
boards/lsc-lma35-t.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"_base": [
|
||||
"beken-72xx",
|
||||
"beken-7231u",
|
||||
"beken-7231t-tuya",
|
||||
"ic/bk7231-qfn32",
|
||||
"pcb/lsc-lma35"
|
||||
],
|
||||
"build": {
|
||||
"mcu": "bk7231t",
|
||||
"variant": "lsc-lma35-t"
|
||||
},
|
||||
"name": "LSC LMA35 BK7231T",
|
||||
"symbol": "LSC LMA35 T",
|
||||
"url": "https://www.action.com/de-at/p/lsc-smart-connect-outdoor-led-streifen/",
|
||||
"vendor": "Unknown",
|
||||
"pcb": {
|
||||
"symbol": "LMA35"
|
||||
},
|
||||
"doc": {
|
||||
"extra": [
|
||||
"## Information",
|
||||
"This board has no marking on the front side, only something that looks like PCB manufacturing info on the back; thus it was named based on these symbols.",
|
||||
"It can be found in 'LSC Smart Connect Outdoor LED Strip', and is likely custom-made for this product.",
|
||||
"The pinout was established by writing to and probing consecutive GPIOs, using the generic board definition.",
|
||||
"Pins marked with '?' are currently unknown, with a possibility of being CEN. Pin 22 (P1/D14) is also not confirmed."
|
||||
]
|
||||
}
|
||||
}
|
||||
98
boards/lsc-lma35-t/README.md
Normal file
98
boards/lsc-lma35-t/README.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# LSC LMA35 BK7231T
|
||||
|
||||
*by Unknown*
|
||||
|
||||
[Product page](https://www.action.com/de-at/p/lsc-smart-connect-outdoor-led-streifen/)
|
||||
|
||||
- [General info](../../docs/platform/beken-72xx/README.md)
|
||||
- [Flashing guide](../../docs/platform/beken-72xx/flashing.md)
|
||||
|
||||
Parameter | Value
|
||||
-------------|----------------------------------
|
||||
Board code | `lsc-lma35-t`
|
||||
MCU | BK7231T
|
||||
Manufacturer | Beken
|
||||
Series | BK72XX
|
||||
Frequency | 120 MHz
|
||||
Flash size | 2 MiB
|
||||
RAM size | 256 KiB
|
||||
Voltage | 3.0V - 3.6V
|
||||
I/O | 15x GPIO, 6x PWM, 2x UART, 1x ADC
|
||||
Wi-Fi | 802.11 b/g/n
|
||||
Bluetooth | BLE v4.2
|
||||
|
||||
## Usage
|
||||
|
||||
**Board code:** `lsc-lma35-t`
|
||||
|
||||
In `platformio.ini`:
|
||||
|
||||
```ini
|
||||
[env:lsc-lma35-t]
|
||||
platform = libretuya
|
||||
board = lsc-lma35-t
|
||||
framework = arduino
|
||||
```
|
||||
|
||||
In ESPHome YAML:
|
||||
|
||||
```yaml
|
||||
libretuya:
|
||||
board: lsc-lma35-t
|
||||
framework:
|
||||
version: dev
|
||||
```
|
||||
|
||||
## Pinout
|
||||
|
||||

|
||||
|
||||
## Arduino Core pin mapping
|
||||
|
||||
No. | Pin | UART | I²C | SPI | PWM | Other
|
||||
----|-----------|----------|----------|------|------|------
|
||||
D0 | P26 | | | | PWM5 |
|
||||
D1 | P14 | | | SCK | |
|
||||
D2 | P16 | | | MOSI | |
|
||||
D3 | P24 | | | | PWM4 |
|
||||
D4 | P22 | | | | | TDI
|
||||
D5 | P0 | UART2_TX | I2C2_SCL | | |
|
||||
D6 | P23 | | | | | TDO
|
||||
D7 | P8 | | | | PWM2 |
|
||||
D8 | P9 | | | | PWM3 |
|
||||
D9 | P21 | | I2C1_SDA | | | TMS
|
||||
D10 | P6 | | | | PWM0 |
|
||||
D11 | P7 | | | | PWM1 |
|
||||
D12 | P10 | UART1_RX | | | |
|
||||
D13 | P11 | UART1_TX | | | |
|
||||
D14 | P1 | UART2_RX | I2C2_SDA | | |
|
||||
A0 | P23, ADC3 | | | | |
|
||||
|
||||
## Flash memory map
|
||||
|
||||
Flash size: 2 MiB / 2,097,152 B / 0x200000
|
||||
|
||||
Hex values are in bytes.
|
||||
|
||||
Name | Start | Length | End
|
||||
----------------|----------|--------------------|---------
|
||||
Bootloader | 0x000000 | 68 KiB / 0x11000 | 0x011000
|
||||
App Image | 0x011000 | 1.1 MiB / 0x121000 | 0x132000
|
||||
OTA Image | 0x132000 | 664 KiB / 0xA6000 | 0x1D8000
|
||||
Key-Value Store | 0x1D8000 | 32 KiB / 0x8000 | 0x1E0000
|
||||
Calibration | 0x1E0000 | 4 KiB / 0x1000 | 0x1E1000
|
||||
TLV Store | 0x1E1000 | 4 KiB / 0x1000 | 0x1E2000
|
||||
Network Data | 0x1E2000 | 4 KiB / 0x1000 | 0x1E3000
|
||||
User Data | 0x1E3000 | 116 KiB / 0x1D000 | 0x200000
|
||||
|
||||
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.
|
||||
|
||||
## Information
|
||||
|
||||
This board has no marking on the front side, only something that looks like PCB manufacturing info on the back; thus it was named based on these symbols.
|
||||
|
||||
It can be found in 'LSC Smart Connect Outdoor LED Strip', and is likely custom-made for this product.
|
||||
|
||||
The pinout was established by writing to and probing consecutive GPIOs, using the generic board definition.
|
||||
|
||||
Pins marked with '?' are currently unknown, with a possibility of being CEN. Pin 22 (P1/D14) is also not confirmed.
|
||||
325
boards/lsc-lma35-t/pinout_lsc-lma35-t.svg
Normal file
325
boards/lsc-lma35-t/pinout_lsc-lma35-t.svg
Normal file
@@ -0,0 +1,325 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" height="500" version="1.1" viewBox="0,0,85.33333333333333,41.666666666666664" width="1024">
|
||||
<defs/>
|
||||
<rect fill="white" height="41.666666666666664" stroke="black" stroke-width="0.1" width="85.33333333333333" x="0" y="0"/>
|
||||
<linearGradient gradientUnits="objectBoundingBox" id="id1" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
|
||||
<stop offset="0%" stop-color="#47a8cd"/>
|
||||
<stop offset="100%" stop-color="#008fb5"/>
|
||||
</linearGradient>
|
||||
<rect fill="url(#id1) none" height="23.9" stroke="#b5a739" stroke-width="0.1" width="19.9" x="32.66666666666666" y="4.433333333333333"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.left.pin1.trace" width="0.7" x="32.61666666666666" y="12.133333333333333"/>
|
||||
<circle cx="32.61666666666666" cy="12.733333333333333" fill="#fff" id="custom-20x24-22.front.left.pin1.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.left.pin2.trace" width="0.7" x="32.61666666666666" y="14.133333333333333"/>
|
||||
<circle cx="32.61666666666666" cy="14.733333333333333" fill="#fff" id="custom-20x24-22.front.left.pin2.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.left.pin3.trace" width="0.7" x="32.61666666666666" y="16.133333333333333"/>
|
||||
<circle cx="32.61666666666666" cy="16.733333333333334" fill="#fff" id="custom-20x24-22.front.left.pin3.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.left.pin4.trace" width="0.7" x="32.61666666666666" y="18.133333333333333"/>
|
||||
<circle cx="32.61666666666666" cy="18.733333333333334" fill="#fff" id="custom-20x24-22.front.left.pin4.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.left.pin5.trace" width="0.7" x="32.61666666666666" y="20.133333333333333"/>
|
||||
<circle cx="32.61666666666666" cy="20.733333333333334" fill="#fff" id="custom-20x24-22.front.left.pin5.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.left.pin6.trace" width="0.7" x="32.61666666666666" y="22.133333333333333"/>
|
||||
<circle cx="32.61666666666666" cy="22.733333333333334" fill="#fff" id="custom-20x24-22.front.left.pin6.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.left.pin7.trace" width="0.7" x="32.61666666666666" y="24.133333333333333"/>
|
||||
<circle cx="32.61666666666666" cy="24.733333333333334" fill="#fff" id="custom-20x24-22.front.left.pin7.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.right.pin1.trace" width="0.7" x="51.91666666666666" y="12.133333333333333"/>
|
||||
<circle cx="52.61666666666666" cy="12.733333333333333" fill="#fff" id="custom-20x24-22.front.right.pin1.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.right.pin2.trace" width="0.7" x="51.91666666666666" y="14.133333333333333"/>
|
||||
<circle cx="52.61666666666666" cy="14.733333333333333" fill="#fff" id="custom-20x24-22.front.right.pin2.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.right.pin3.trace" width="0.7" x="51.91666666666666" y="16.133333333333333"/>
|
||||
<circle cx="52.61666666666666" cy="16.733333333333334" fill="#fff" id="custom-20x24-22.front.right.pin3.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.right.pin4.trace" width="0.7" x="51.91666666666666" y="18.133333333333333"/>
|
||||
<circle cx="52.61666666666666" cy="18.733333333333334" fill="#fff" id="custom-20x24-22.front.right.pin4.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.right.pin5.trace" width="0.7" x="51.91666666666666" y="20.133333333333333"/>
|
||||
<circle cx="52.61666666666666" cy="20.733333333333334" fill="#fff" id="custom-20x24-22.front.right.pin5.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.right.pin6.trace" width="0.7" x="51.91666666666666" y="22.133333333333333"/>
|
||||
<circle cx="52.61666666666666" cy="22.733333333333334" fill="#fff" id="custom-20x24-22.front.right.pin6.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="1.2" id="custom-20x24-22.front.right.pin7.trace" width="0.7" x="51.91666666666666" y="24.133333333333333"/>
|
||||
<circle cx="52.61666666666666" cy="24.733333333333334" fill="#fff" id="custom-20x24-22.front.right.pin7.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="0.7" id="pins_horz8_2mm_0.7mm.pin1.trace" width="1.2" x="35.06666666666666" y="27.683333333333334"/>
|
||||
<circle cx="35.66666666666666" cy="28.383333333333333" fill="#fff" id="pins_horz8_2mm_0.7mm.pin1.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="0.7" id="pins_horz8_2mm_0.7mm.pin2.trace" width="1.2" x="37.06666666666666" y="27.683333333333334"/>
|
||||
<circle cx="37.66666666666666" cy="28.383333333333333" fill="#fff" id="pins_horz8_2mm_0.7mm.pin2.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="0.7" id="pins_horz8_2mm_0.7mm.pin3.trace" width="1.2" x="39.06666666666666" y="27.683333333333334"/>
|
||||
<circle cx="39.66666666666666" cy="28.383333333333333" fill="#fff" id="pins_horz8_2mm_0.7mm.pin3.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="0.7" id="pins_horz8_2mm_0.7mm.pin4.trace" width="1.2" x="41.06666666666666" y="27.683333333333334"/>
|
||||
<circle cx="41.66666666666666" cy="28.383333333333333" fill="#fff" id="pins_horz8_2mm_0.7mm.pin4.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="0.7" id="pins_horz8_2mm_0.7mm.pin5.trace" width="1.2" x="43.06666666666666" y="27.683333333333334"/>
|
||||
<circle cx="43.66666666666666" cy="28.383333333333333" fill="#fff" id="pins_horz8_2mm_0.7mm.pin5.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="0.7" id="pins_horz8_2mm_0.7mm.pin6.trace" width="1.2" x="45.06666666666666" y="27.683333333333334"/>
|
||||
<circle cx="45.66666666666666" cy="28.383333333333333" fill="#fff" id="pins_horz8_2mm_0.7mm.pin6.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="0.7" id="pins_horz8_2mm_0.7mm.pin7.trace" width="1.2" x="47.06666666666666" y="27.683333333333334"/>
|
||||
<circle cx="47.66666666666666" cy="28.383333333333333" fill="#fff" id="pins_horz8_2mm_0.7mm.pin7.cast" r="0.35"/>
|
||||
<rect fill="#e5b472" height="0.7" id="pins_horz8_2mm_0.7mm.pin8.trace" width="1.2" x="49.06666666666666" y="27.683333333333334"/>
|
||||
<circle cx="49.66666666666666" cy="28.383333333333333" fill="#fff" id="pins_horz8_2mm_0.7mm.pin8.cast" r="0.35"/>
|
||||
<rect fill="#4e4c4c" height="2.0" width="0.2" x="35.56666666666666" y="28.583333333333332"/>
|
||||
<rect fill="#4e4c4c" height="0.2" width="0.2" x="35.36666666666666" y="30.383333333333333"/>
|
||||
<rect height="0.0" id="custom-20x24-22.front.down.label1.anchor" width="0.0" x="35.86666666666666" y="30.483333333333334"/>
|
||||
<rect fill="#4e4c4c" height="4.0" width="0.2" x="37.56666666666666" y="28.583333333333332"/>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.2" x="35.36666666666666" y="32.38333333333333"/>
|
||||
<rect height="0.0" id="custom-20x24-22.front.down.label2.anchor" width="0.0" x="35.86666666666666" y="32.483333333333334"/>
|
||||
<rect fill="#4e4c4c" height="6.0" width="0.2" x="39.56666666666666" y="28.583333333333332"/>
|
||||
<rect fill="#4e4c4c" height="0.2" width="4.2" x="35.36666666666666" y="34.38333333333333"/>
|
||||
<rect height="0.0" id="custom-20x24-22.front.down.label3.anchor" width="0.0" x="35.86666666666666" y="34.483333333333334"/>
|
||||
<rect fill="#4e4c4c" height="8.0" width="0.2" x="41.56666666666666" y="28.583333333333332"/>
|
||||
<rect fill="#4e4c4c" height="0.2" width="6.2" x="35.36666666666666" y="36.38333333333333"/>
|
||||
<rect height="0.0" id="custom-20x24-22.front.down.label4.anchor" width="0.0" x="35.86666666666666" y="36.483333333333334"/>
|
||||
<rect fill="#4e4c4c" height="8.0" width="0.2" x="43.56666666666666" y="28.583333333333332"/>
|
||||
<rect fill="#4e4c4c" height="0.2" width="6.2" x="43.66666666666666" y="36.38333333333333"/>
|
||||
<rect height="0.0" id="custom-20x24-22.front.down.label5.anchor" width="0.0" x="49.36666666666666" y="36.483333333333334"/>
|
||||
<rect fill="#4e4c4c" height="6.0" width="0.2" x="45.56666666666666" y="28.583333333333332"/>
|
||||
<rect fill="#4e4c4c" height="0.2" width="4.2" x="45.66666666666666" y="34.38333333333333"/>
|
||||
<rect height="0.0" id="custom-20x24-22.front.down.label6.anchor" width="0.0" x="49.36666666666666" y="34.483333333333334"/>
|
||||
<rect fill="#4e4c4c" height="4.0" width="0.2" x="47.56666666666666" y="28.583333333333332"/>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.2" x="47.66666666666666" y="32.38333333333333"/>
|
||||
<rect height="0.0" id="custom-20x24-22.front.down.label7.anchor" width="0.0" x="49.36666666666666" y="32.483333333333334"/>
|
||||
<rect fill="#4e4c4c" height="2.0" width="0.2" x="49.56666666666666" y="28.583333333333332"/>
|
||||
<rect fill="#4e4c4c" height="0.2" width="0.2" x="49.66666666666666" y="30.383333333333333"/>
|
||||
<rect height="0.0" id="custom-20x24-22.front.down.label8.anchor" width="0.0" x="49.36666666666666" y="30.483333333333334"/>
|
||||
<linearGradient gradientUnits="objectBoundingBox" id="id2" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
|
||||
<stop offset="0%" stop-color="whitesmoke"/>
|
||||
<stop offset="100%" stop-color="#999"/>
|
||||
</linearGradient>
|
||||
<rect fill="url(#id2) none" height="15.8" rx="0.5" ry="0.5" width="17.6" x="33.81666666666666" y="11.333333333333332"/>
|
||||
<rect fill="#58839b" height="5.2" width="0.5" x="35.71666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#58839b" height="0.5" width="4.6" x="35.71666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#58839b" height="5.2" width="0.5" x="37.91666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#58839b" height="3.0" width="0.5" x="39.81666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#58839b" height="0.5" width="3.0" x="39.81666666666666" y="7.683333333333333"/>
|
||||
<rect fill="#58839b" height="3.0" width="0.5" x="42.31666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#58839b" height="0.5" width="2.7" x="42.31666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#58839b" height="3.0" width="0.5" x="44.51666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#58839b" height="0.5" width="3.0" x="44.51666666666666" y="7.683333333333333"/>
|
||||
<rect fill="#58839b" height="3.0" width="0.5" x="47.01666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#58839b" height="0.5" width="2.5" x="47.01666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#58839b" height="4.4" width="0.5" x="49.01666666666666" y="5.183333333333333"/>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.51666666666666" y="12.633333333333333"/>
|
||||
<g transform="translate(25.731026020611555,11.933333333333332)">
|
||||
<rect fill="#cd3c24" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.216666666666658" y="12.733333333333333">3V3</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.51666666666666" y="14.633333333333333"/>
|
||||
<g transform="translate(25.731026020611555,13.933333333333332)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.216666666666658" y="14.733333333333333">P26</text>
|
||||
<g transform="translate(22.73102602061156,13.933333333333332)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="23.91666666666666" y="14.733333333333333">D0</text>
|
||||
<g transform="translate(19.131026020611557,13.933333333333332)">
|
||||
<rect fill="#aeafc1" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="20.61666666666666" y="14.733333333333333">IRDA</text>
|
||||
<g transform="translate(15.531026020611561,13.933333333333332)">
|
||||
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="17.016666666666662" y="14.733333333333333">PWM5</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.51666666666666" y="16.633333333333333"/>
|
||||
<g transform="translate(25.731026020611555,15.933333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.216666666666658" y="16.733333333333334">P14</text>
|
||||
<g transform="translate(22.73102602061156,15.933333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="23.91666666666666" y="16.733333333333334">D1</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.51666666666666" y="18.633333333333333"/>
|
||||
<g transform="translate(25.731026020611555,17.933333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.216666666666658" y="18.733333333333334">P16</text>
|
||||
<g transform="translate(22.73102602061156,17.933333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="23.91666666666666" y="18.733333333333334">D2</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.51666666666666" y="20.633333333333333"/>
|
||||
<g transform="translate(25.731026020611555,19.933333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.216666666666658" y="20.733333333333334">P24</text>
|
||||
<g transform="translate(22.73102602061156,19.933333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="23.91666666666666" y="20.733333333333334">D3</text>
|
||||
<g transform="translate(19.131026020611557,19.933333333333334)">
|
||||
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="20.61666666666666" y="20.733333333333334">PWM4</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.51666666666666" y="22.633333333333333"/>
|
||||
<g transform="translate(25.731026020611555,21.933333333333334)">
|
||||
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.216666666666658" y="22.733333333333334">GND</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.51666666666666" y="24.633333333333333"/>
|
||||
<g transform="translate(25.731026020611555,23.933333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.216666666666658" y="24.733333333333334">P22</text>
|
||||
<g transform="translate(22.73102602061156,23.933333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="23.91666666666666" y="24.733333333333334">D4</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.11666666666666" y="24.633333333333333"/>
|
||||
<g transform="translate(56.53102602061156,23.933333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.016666666666666" y="24.733333333333334">P0</text>
|
||||
<g transform="translate(60.131026020611564,23.933333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.31666666666666" y="24.733333333333334">D5</text>
|
||||
<g transform="translate(63.131026020611564,23.933333333333334)">
|
||||
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="64.61666666666666" y="24.733333333333334">TX2</text>
|
||||
<g transform="translate(66.73102602061155,23.933333333333334)">
|
||||
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="68.21666666666665" y="24.733333333333334">SCL2</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.11666666666666" y="22.633333333333333"/>
|
||||
<g transform="translate(56.53102602061156,21.933333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.016666666666666" y="22.733333333333334">P23</text>
|
||||
<g transform="translate(60.131026020611564,21.933333333333334)">
|
||||
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.61666666666667" y="22.733333333333334">ADC3</text>
|
||||
<g transform="translate(63.731026020611566,21.933333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="64.91666666666667" y="22.733333333333334">D6</text>
|
||||
<g transform="translate(66.73102602061155,21.933333333333334)">
|
||||
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="67.91666666666666" y="22.733333333333334">A0</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.11666666666666" y="20.633333333333333"/>
|
||||
<g transform="translate(56.53102602061156,19.933333333333334)">
|
||||
<rect fill="#ed602e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.016666666666666" y="20.733333333333334">?</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.11666666666666" y="18.633333333333333"/>
|
||||
<g transform="translate(56.53102602061156,17.933333333333334)">
|
||||
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.016666666666666" y="18.733333333333334">GND</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.11666666666666" y="16.633333333333333"/>
|
||||
<g transform="translate(56.53102602061156,15.933333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.016666666666666" y="16.733333333333334">P8</text>
|
||||
<g transform="translate(60.131026020611564,15.933333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.31666666666666" y="16.733333333333334">D7</text>
|
||||
<g transform="translate(63.131026020611564,15.933333333333334)">
|
||||
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="64.61666666666666" y="16.733333333333334">PWM2</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.11666666666666" y="14.633333333333333"/>
|
||||
<g transform="translate(56.53102602061156,13.933333333333332)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.016666666666666" y="14.733333333333333">P9</text>
|
||||
<g transform="translate(60.131026020611564,13.933333333333332)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.31666666666666" y="14.733333333333333">D8</text>
|
||||
<g transform="translate(63.131026020611564,13.933333333333332)">
|
||||
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="64.61666666666666" y="14.733333333333333">PWM3</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.11666666666666" y="12.633333333333333"/>
|
||||
<g transform="translate(56.53102602061156,11.933333333333332)">
|
||||
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.016666666666666" y="12.733333333333333">GND</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="32.76666666666666" y="30.383333333333333"/>
|
||||
<g transform="translate(28.981026020611555,29.683333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="30.466666666666658" y="30.483333333333334">P21</text>
|
||||
<g transform="translate(25.98102602061156,29.683333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.16666666666666" y="30.483333333333334">D9</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="32.76666666666666" y="32.38333333333333"/>
|
||||
<g transform="translate(28.981026020611555,31.683333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="30.466666666666658" y="32.483333333333334">P6</text>
|
||||
<g transform="translate(25.98102602061156,31.683333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.16666666666666" y="32.483333333333334">D10</text>
|
||||
<g transform="translate(22.381026020611557,31.683333333333334)">
|
||||
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="23.86666666666666" y="32.483333333333334">PWM0</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="32.76666666666666" y="34.38333333333333"/>
|
||||
<g transform="translate(28.981026020611555,33.68333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="30.466666666666658" y="34.483333333333334">P7</text>
|
||||
<g transform="translate(25.98102602061156,33.68333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.16666666666666" y="34.483333333333334">D11</text>
|
||||
<g transform="translate(22.381026020611557,33.68333333333334)">
|
||||
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="23.86666666666666" y="34.483333333333334">PWM1</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="32.76666666666666" y="36.38333333333333"/>
|
||||
<g transform="translate(28.981026020611555,35.68333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="30.466666666666658" y="36.483333333333334">P10</text>
|
||||
<g transform="translate(25.98102602061156,35.68333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="27.16666666666666" y="36.483333333333334">D12</text>
|
||||
<g transform="translate(22.381026020611557,35.68333333333334)">
|
||||
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="23.86666666666666" y="36.483333333333334">RX1</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="49.86666666666666" y="36.38333333333333"/>
|
||||
<g transform="translate(53.28102602061156,35.68333333333334)">
|
||||
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="54.766666666666666" y="36.483333333333334">GND</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="49.86666666666666" y="34.38333333333333"/>
|
||||
<g transform="translate(53.28102602061156,33.68333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="54.766666666666666" y="34.483333333333334">P11</text>
|
||||
<g transform="translate(56.881026020611564,33.68333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.06666666666666" y="34.483333333333334">D13</text>
|
||||
<g transform="translate(59.881026020611564,33.68333333333334)">
|
||||
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.36666666666667" y="34.483333333333334">TX1</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="49.86666666666666" y="32.38333333333333"/>
|
||||
<g transform="translate(53.28102602061156,31.683333333333334)">
|
||||
<rect fill="#ed602e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="54.766666666666666" y="32.483333333333334">?</text>
|
||||
<rect fill="#4e4c4c" height="0.2" width="2.6" x="49.86666666666666" y="30.383333333333333"/>
|
||||
<g transform="translate(53.28102602061156,29.683333333333334)">
|
||||
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="54.766666666666666" y="30.483333333333334">P1</text>
|
||||
<g transform="translate(56.881026020611564,29.683333333333334)">
|
||||
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.06666666666666" y="30.483333333333334">D14</text>
|
||||
<g transform="translate(59.881026020611564,29.683333333333334)">
|
||||
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.36666666666667" y="30.483333333333334">RX2</text>
|
||||
<g transform="translate(63.481026020611566,29.683333333333334)">
|
||||
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
|
||||
</g>
|
||||
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="64.96666666666667" y="30.483333333333334">SDA2</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 30 KiB |
1
boards/lsc-lma35-t/pins_arduino.h
Normal file
1
boards/lsc-lma35-t/pins_arduino.h
Normal file
@@ -0,0 +1 @@
|
||||
#include "variant.h"
|
||||
42
boards/lsc-lma35-t/variant.cpp
Normal file
42
boards/lsc-lma35-t/variant.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
/* This file was auto-generated from lsc-lma35-t.json using boardgen */
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
// clang-format off
|
||||
PinInfo pinTable[PINS_COUNT] = {
|
||||
// D0: P26, PWM5, IRDA
|
||||
{GPIO26, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D1: P14, SD_CLK, SCK
|
||||
{GPIO14, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
|
||||
// D2: P16, SD_D0, MOSI
|
||||
{GPIO16, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
|
||||
// D3: P24, PWM4
|
||||
{GPIO24, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D4: P22, TDI, FSI
|
||||
{GPIO22, PIN_GPIO | PIN_IRQ | PIN_JTAG, PIN_NONE, 0},
|
||||
// D5: P0, UART2_TX, I2C2_SCL
|
||||
{GPIO0, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
|
||||
// D6: P23, ADC3, TDO, FSO
|
||||
{GPIO23, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_JTAG, PIN_NONE, 0},
|
||||
// D7: P8, PWM2
|
||||
{GPIO8, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D8: P9, PWM3
|
||||
{GPIO9, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D9: P21, I2C1_SDA, TMS, MCLK, ^FCS
|
||||
{GPIO21, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_JTAG, PIN_NONE, 0},
|
||||
// D10: P6, PWM0
|
||||
{GPIO6, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D11: P7, PWM1
|
||||
{GPIO7, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
|
||||
// D12: P10, UART1_RX
|
||||
{GPIO10, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
|
||||
// D13: P11, UART1_TX
|
||||
{GPIO11, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
|
||||
// D14: P1, UART2_RX, I2C2_SDA
|
||||
{GPIO1, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
} // extern "C"
|
||||
71
boards/lsc-lma35-t/variant.h
Normal file
71
boards/lsc-lma35-t/variant.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/* This file was auto-generated from lsc-lma35-t.json using boardgen */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <WVariant.h>
|
||||
|
||||
// clang-format off
|
||||
|
||||
// Pins
|
||||
// ----
|
||||
#define PINS_COUNT 15
|
||||
#define NUM_DIGITAL_PINS 15
|
||||
#define NUM_ANALOG_INPUTS 1
|
||||
#define NUM_ANALOG_OUTPUTS 0
|
||||
|
||||
// Analog pins
|
||||
// -----------
|
||||
#define PIN_A0 6u // GPIO23
|
||||
#define A0 PIN_A0
|
||||
|
||||
// SPI Interfaces
|
||||
// --------------
|
||||
#define SPI_INTERFACES_COUNT 0
|
||||
|
||||
// Wire Interfaces
|
||||
// ---------------
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
#define PIN_WIRE2_SCL 5u // GPIO0
|
||||
#define PIN_WIRE2_SDA 14u // GPIO1
|
||||
|
||||
// Serial ports
|
||||
// ------------
|
||||
#define SERIAL_INTERFACES_COUNT 2
|
||||
#define PIN_SERIAL1_RX 12u // GPIO10
|
||||
#define PIN_SERIAL1_TX 13u // GPIO11
|
||||
#define PIN_SERIAL2_RX 14u // GPIO1
|
||||
#define PIN_SERIAL2_TX 5u // GPIO0
|
||||
|
||||
// Pin function macros
|
||||
// -------------------
|
||||
#define PIN_FUNCTION_ADC3 6u // GPIO23
|
||||
#define PIN_FUNCTION_MOSI 2u // GPIO16
|
||||
#define PIN_FUNCTION_P0 5u // GPIO0
|
||||
#define PIN_FUNCTION_P1 14u // GPIO1
|
||||
#define PIN_FUNCTION_P6 10u // GPIO6
|
||||
#define PIN_FUNCTION_P7 11u // GPIO7
|
||||
#define PIN_FUNCTION_P8 7u // GPIO8
|
||||
#define PIN_FUNCTION_P9 8u // GPIO9
|
||||
#define PIN_FUNCTION_P10 12u // GPIO10
|
||||
#define PIN_FUNCTION_P11 13u // GPIO11
|
||||
#define PIN_FUNCTION_P14 1u // GPIO14
|
||||
#define PIN_FUNCTION_P16 2u // GPIO16
|
||||
#define PIN_FUNCTION_P21 9u // GPIO21
|
||||
#define PIN_FUNCTION_P22 4u // GPIO22
|
||||
#define PIN_FUNCTION_P23 6u // GPIO23
|
||||
#define PIN_FUNCTION_P24 3u // GPIO24
|
||||
#define PIN_FUNCTION_P26 0u // GPIO26
|
||||
#define PIN_FUNCTION_PWM0 10u // GPIO6
|
||||
#define PIN_FUNCTION_PWM1 11u // GPIO7
|
||||
#define PIN_FUNCTION_PWM2 7u // GPIO8
|
||||
#define PIN_FUNCTION_PWM3 8u // GPIO9
|
||||
#define PIN_FUNCTION_PWM4 3u // GPIO24
|
||||
#define PIN_FUNCTION_PWM5 0u // GPIO26
|
||||
#define PIN_FUNCTION_RX1 12u // GPIO10
|
||||
#define PIN_FUNCTION_RX2 14u // GPIO1
|
||||
#define PIN_FUNCTION_SCK 1u // GPIO14
|
||||
#define PIN_FUNCTION_SCL2 5u // GPIO0
|
||||
#define PIN_FUNCTION_SDA1 9u // GPIO21
|
||||
#define PIN_FUNCTION_SDA2 14u // GPIO1
|
||||
#define PIN_FUNCTION_TX1 13u // GPIO11
|
||||
#define PIN_FUNCTION_TX2 5u // GPIO0
|
||||
@@ -2,17 +2,12 @@
|
||||
|
||||
from os.path import join
|
||||
|
||||
from ltchiptool.soc.bk72xx.binary import to_offset
|
||||
from SCons.Script import Builder, DefaultEnvironment
|
||||
|
||||
env = DefaultEnvironment()
|
||||
board = env.BoardConfig()
|
||||
|
||||
# Install PyCryptodome for OTA packaging with AES
|
||||
try:
|
||||
import Cryptodome
|
||||
except ImportError:
|
||||
env.Execute("$PYTHONEXE -m pip install pycryptodomex")
|
||||
|
||||
ROOT_DIR = join("$SDK_DIR", "beken378")
|
||||
APP_DIR = join(ROOT_DIR, "app")
|
||||
DRIVER_DIR = join(ROOT_DIR, "driver")
|
||||
@@ -567,8 +562,8 @@ env.Replace(
|
||||
# Calculate RBL header offset
|
||||
app_offs = int(env["FLASH_APP_OFFSET"], 16)
|
||||
app_size = int(board.get("build.bkrbl_size_app"), 16)
|
||||
rbl_offs = int(app_size // 32 * 34) - 102
|
||||
env.Replace(FLASH_RBL_OFFSET=f"0x{app_offs + rbl_offs:06X}")
|
||||
rbl_offs = app_offs + to_offset(app_size) - 102
|
||||
env.Replace(FLASH_RBL_OFFSET=f"0x{rbl_offs:06X}")
|
||||
|
||||
# Build all libraries
|
||||
env.BuildLibraries()
|
||||
|
||||
@@ -5,20 +5,35 @@ ESPHome can be flashed in few different ways, depending on your needs.
|
||||
!!! abstract
|
||||
All binary files generated by ESPHome will be in `.esphome/build/<yourdevice>/.pioenvs/<yourdevice>/`. The methods described below may require you to get a file from that directory.
|
||||
|
||||
If you're using the GUI (ESPHome Dashboard) this path will be in your `configs/` directory.
|
||||
|
||||
This path will be referred to as **build directory**.
|
||||
|
||||
## Built-in flasher
|
||||
|
||||
The flasher program built-in LibreTuya is also available for ESPHome.
|
||||
=== "CLI"
|
||||
|
||||
- use `python -m esphome run yourdevice.yml` to recompile AND upload the firmware
|
||||
- use `python -m esphome upload yourdevice.yml` to upload without recompiling
|
||||
The flasher program built-in LibreTuya is also available for ESPHome.
|
||||
|
||||
{%
|
||||
include-markdown "inc/uart-info.md"
|
||||
%}
|
||||
- use `python -m esphome run yourdevice.yml` to recompile AND upload the firmware
|
||||
- use `python -m esphome upload yourdevice.yml` to upload without recompiling
|
||||
|
||||
If your device is already running ESPHome, refer to the OTA guide below.
|
||||
<!-- the line below needs to be indented by 4 spaces!!! -->
|
||||
{%
|
||||
include-markdown "inc/uart-info.md"
|
||||
%}
|
||||
|
||||
If your device is already running ESPHome, refer to the OTA guide below.
|
||||
|
||||
=== "GUI"
|
||||
|
||||
The built-in flasher is not yet available in the GUI. Here are your options:
|
||||
|
||||
- OTA, using the downloaded UF2 file (if you're already running ESPHome)
|
||||
- wired (also UF2), using ltchiptool
|
||||
- wirelessly, using tuya-cloudcutter
|
||||
|
||||
Read below for more details on each of these methods.
|
||||
|
||||
## Over-the-Air (OTA)
|
||||
|
||||
|
||||
@@ -1,55 +1,111 @@
|
||||
# ESPHome
|
||||
|
||||
!!! important
|
||||
Read [Getting started](../getting-started/README.md) first - most importantly, the first part about installation.
|
||||
|
||||
**It is very important that you have the latest version of LibreTuya installed** (not `libretuya-esphome` - this is a different thing!) **so that you don't face issues that are already resolved**.
|
||||
|
||||
## Download ESPHome
|
||||
|
||||
Because ESPHome does not natively support running on non-ESP chips, you need to use a fork of the project.
|
||||
|
||||
Assuming you have PlatformIO, git and Python installed:
|
||||
There are two basic ways to install and use LibreTuya-ESPHome. You can choose the option that best suits you:
|
||||
|
||||
1. Open a terminal/cmd.exe, create `esphome` directory and `cd` into it.
|
||||
2. `git clone https://github.com/kuba2k2/libretuya-esphome`
|
||||
3. `cd` into the newly created `libretuya-esphome` directory.
|
||||
4. Check if it works by typing `python -m esphome`
|
||||
- command line (CLI) - for more experienced users; compilation using CLI commands, somewhat easier to troubleshoot
|
||||
- ESPHome Dashboard (GUI) - for new users, might be an easy way to go; config management & compilation using web-based dashboard
|
||||
|
||||
!!! tip
|
||||
For Linux users (or if `python -m esphome` doesn't work for you):
|
||||
You can use LibreTuya-ESPHome for ESP32/ESP8266 compilation as well - the forked version *extends* the base, and doesn't remove any existing features. Keep in mind that you might not have latest ESPHome updates until the fork gets updated (which usually happens at most every few weeks).
|
||||
|
||||
- uninstall ESPHome first: `pip uninstall esphome`
|
||||
- install the forked version: `pip install -e .`
|
||||
## Find your device's board
|
||||
|
||||
Go to [Boards & CPU list](../status/supported/), find your board (chip model), click on it and remember the **`Board code`**. This will be used later, during config creation.
|
||||
|
||||
If your board isn't listed, use one of the **Generic** boards, depending on the chip type of your device.
|
||||
|
||||
## Download ESPHome
|
||||
|
||||
=== "CLI"
|
||||
|
||||
!!! important
|
||||
Read [Getting started](../getting-started/README.md) first - most importantly, the first part about installation.
|
||||
|
||||
**It is very important that you have the latest version of LibreTuya installed** (not `libretuya-esphome` - this is a different thing!) **so that you don't face issues that are already resolved**.
|
||||
|
||||
Assuming you have PlatformIO, git and Python installed:
|
||||
|
||||
1. Open a terminal/cmd.exe, create `esphome` directory and `cd` into it.
|
||||
2. `git clone https://github.com/kuba2k2/libretuya-esphome`
|
||||
3. `cd` into the newly created `libretuya-esphome` directory.
|
||||
4. Check if it works by typing `python -m esphome`
|
||||
|
||||
!!! tip
|
||||
For Linux users (or if `python -m esphome` doesn't work for you):
|
||||
|
||||
- uninstall ESPHome first: `pip uninstall esphome`
|
||||
- install the forked version: `pip install -e .`
|
||||
|
||||
=== "GUI"
|
||||
|
||||
For this, you need Docker, Docker Compose and Python installed. After running the commands, you'll have a running ESPHome Dashboard interface that you can connect to.
|
||||
|
||||
1. `git clone https://github.com/kuba2k2/libretuya-esphome` (or download the .ZIP and unpack it, not recommended)
|
||||
2. Open a terminal/cmd.exe in the cloned directory (`libretuya-esphome`).
|
||||
3. `python docker/build.py --tag libretuya --arch amd64 --build-type docker build` - this will build the Docker image of ESPHome. Change `amd64` to something else if you're using a Raspberry Pi.
|
||||
4. Create a `docker-compose.yml` file in the same directory:
|
||||
|
||||
```yaml title="docker-compose.yml"
|
||||
version: "3"
|
||||
services:
|
||||
esphome:
|
||||
container_name: esphome-libretuya
|
||||
image: esphome/esphome-amd64:libretuya # (2)!
|
||||
volumes:
|
||||
- ./configs:/config:rw # (1)!
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
restart: always
|
||||
privileged: false
|
||||
network_mode: host
|
||||
```
|
||||
|
||||
1. You can change `./configs` to another path, in which your ESPHome configs will be stored.
|
||||
2. Ensure the architecture (`amd64`) matches the one you selected in step 3.
|
||||
5. Start the container - `docker-compose up`. You should be able to open the GUI on [http://localhost:6052/](http://localhost:6052/).
|
||||
|
||||
## Create your device config
|
||||
|
||||
1. Go to [Boards & CPU list](../status/supported/), click on your board and remember the **`Board code`**.
|
||||
2. Create a YAML config file for your device. You can either:
|
||||
- use `python -m esphome wizard yourdevice.yml` - type answers to the six questions the wizard asks, OR:
|
||||
- write a config file manually:
|
||||
```yaml title="yourdevice.yml"
|
||||
esphome:
|
||||
name: yourdevice
|
||||
=== "CLI"
|
||||
|
||||
libretuya:
|
||||
board: wr3 # THIS IS YOUR BOARD CODE
|
||||
framework:
|
||||
version: latest
|
||||
1. Create a YAML config file for your device. You can either:
|
||||
- use `python -m esphome wizard yourdevice.yml` - type answers to the six questions the wizard asks, OR:
|
||||
- write a config file manually:
|
||||
```yaml title="yourdevice.yml"
|
||||
esphome:
|
||||
name: yourdevice
|
||||
|
||||
logger:
|
||||
api:
|
||||
password: ""
|
||||
ota:
|
||||
password: ""
|
||||
libretuya:
|
||||
board: wr3 # THIS IS YOUR BOARD CODE
|
||||
framework:
|
||||
version: latest
|
||||
|
||||
wifi:
|
||||
ssid: "YourWiFiSSID"
|
||||
password: "SecretPa$$w0rd"
|
||||
ap:
|
||||
ssid: "Yourdevice Fallback Hotspot"
|
||||
password: "Dv2hZMGZRUvy"
|
||||
```
|
||||
logger:
|
||||
api:
|
||||
password: ""
|
||||
ota:
|
||||
password: ""
|
||||
|
||||
wifi:
|
||||
ssid: "YourWiFiSSID"
|
||||
password: "SecretPa$$w0rd"
|
||||
ap:
|
||||
ssid: "Yourdevice Fallback Hotspot"
|
||||
password: "Dv2hZMGZRUvy"
|
||||
```
|
||||
|
||||
=== "GUI"
|
||||
|
||||
1. Open the GUI on [http://localhost:6052/](http://localhost:6052/) (or a different IP address if you're running on a Pi).
|
||||
2. Go through the wizard steps:
|
||||
- `New Device`
|
||||
- `Continue`
|
||||
- enter name and WiFi details
|
||||
- choose `LibreTuya`
|
||||
- choose the board that you found before
|
||||
- select `Skip`
|
||||
3. A new config file will be added. Press `Edit` and proceed to the next section.
|
||||
|
||||
## Add components
|
||||
|
||||
@@ -62,9 +118,15 @@ Now, just like with standard ESPHome on ESP32/ESP8266, you need to add component
|
||||
|
||||
## Build & upload
|
||||
|
||||
The command `python -m esphome compile yourdevice.yml` will compile ESPHome.
|
||||
=== "CLI"
|
||||
|
||||
You probably want to refer to the [flashing guide](../flashing/esphome.md) to learn how to upload ESPHome to your device. There's also info on using `tuya-cloudcutter` in that guide.
|
||||
The command `python -m esphome compile yourdevice.yml` will compile ESPHome.
|
||||
|
||||
=== "GUI"
|
||||
|
||||
Close the config editor. Press the three dots icon and select `Install`. Choose `Manual download` and `Modern format`. The firmware will be compiled and a UF2 file will be downloaded automatically.
|
||||
|
||||
Now, refer to the [flashing guide](../flashing/esphome.md) to learn how to upload ESPHome to your device. There's also info on using `tuya-cloudcutter` in that guide.
|
||||
|
||||
## Advanced: LT configuration
|
||||
|
||||
|
||||
@@ -34,5 +34,6 @@ Name | MCU
|
||||
[WR3LE](../../boards/wr3le/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz`
|
||||
**Unknown** | | | | | | | |
|
||||
[LSC LMA35](../../boards/lsc-lma35/README.md) | BK7231N | 2 MiB | 256 KiB | 22 (15 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n`
|
||||
[LSC LMA35 T](../../boards/lsc-lma35-t/README.md) | BK7231T | 2 MiB | 256 KiB | 22 (15 I/O) | ✔️ | ✔️ | ❌ | `beken-7231u`
|
||||
**N/A** | | | | | | | |
|
||||
[Native](../../boards/generic-native/README.md) | NATIVE | 4 MiB | 4 MiB | - | ✔️ | ❌ | ❌ | `host-native`
|
||||
|
||||
@@ -7,7 +7,9 @@ repo_url: https://github.com/kuba2k2/libretuya
|
||||
theme:
|
||||
name: material
|
||||
features:
|
||||
- content.code.annotate
|
||||
- content.code.copy
|
||||
- content.tabs.link
|
||||
- navigation.instant
|
||||
- navigation.tracking
|
||||
- navigation.path
|
||||
@@ -50,6 +52,8 @@ markdown_extensions:
|
||||
emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.details
|
||||
- pymdownx.superfences
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/kuba2k2/platformio-libretuya"
|
||||
},
|
||||
"version": "0.12.4",
|
||||
"version": "0.12.5",
|
||||
"frameworks": {
|
||||
"arduino": {
|
||||
"title": "Generic Arduino framework",
|
||||
|
||||
@@ -17,7 +17,7 @@ from platformio.platform.base import PlatformBase
|
||||
from platformio.platform.board import PlatformBoardConfig
|
||||
from semantic_version import SimpleSpec, Version
|
||||
|
||||
LTCHIPTOOL_VERSION = "^2.0.2"
|
||||
LTCHIPTOOL_VERSION = "^3.0.0"
|
||||
|
||||
# Install & import tools
|
||||
def check_ltchiptool(install: bool):
|
||||
@@ -26,7 +26,7 @@ def check_ltchiptool(install: bool):
|
||||
print("Installing/updating ltchiptool")
|
||||
system(
|
||||
f"{sys.executable} -m pip install -U --force-reinstall "
|
||||
f'"ltchiptool >= {LTCHIPTOOL_VERSION}, < 3.0"'
|
||||
f'"ltchiptool >= {LTCHIPTOOL_VERSION}, < 4.0"'
|
||||
)
|
||||
|
||||
# unload all modules from the old version
|
||||
@@ -72,7 +72,7 @@ if dirname(__file__) in sys.path:
|
||||
sys.path.remove(dirname(__file__))
|
||||
|
||||
# Let ltchiptool know about LT's location
|
||||
ltchiptool.util.lt_set_path(dirname(__file__))
|
||||
ltchiptool.lt_set_path(dirname(__file__))
|
||||
|
||||
libretuya_packages = None
|
||||
manifest_default = {"version": "0.0.0", "description": "", "keywords": []}
|
||||
|
||||
Reference in New Issue
Block a user