-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ln882x] add support for lightning ln882x & ln882h families
- Loading branch information
Showing
69 changed files
with
4,044 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
{ | ||
"pcb": { | ||
"ic": { | ||
"8": { | ||
"C_NAME": "PA_0", | ||
"GPIO": "P0", | ||
"ADC": 2, | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"9": { | ||
"C_NAME": "PA_1", | ||
"GPIO": "P1", | ||
"ADC": 3, | ||
"SWD": "DIO", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"10": { | ||
"C_NAME": "PA_2", | ||
"GPIO": "P2", | ||
"UART": "1_TX", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"11": { | ||
"C_NAME": "PA_3", | ||
"GPIO": "P3", | ||
"UART": "1_RX", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"12": { | ||
"C_NAME": "PA_4", | ||
"GPIO": "P4", | ||
"IRQ": null, | ||
"ADC": 4, | ||
"SWD": "CLK", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"13": { | ||
"C_NAME": "PA_5", | ||
"GPIO": "P5", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"14": { | ||
"C_NAME": "PA_6", | ||
"GPIO": "P6", | ||
"SD": "D2", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"15": { | ||
"C_NAME": "PA_7", | ||
"GPIO": "P7", | ||
"SD": "D3", | ||
"I2S": "0_RX", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"16": { | ||
"C_NAME": "PA_8", | ||
"GPIO": "P8", | ||
"SD": "CMD", | ||
"I2S": "0_WS", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"17": { | ||
"C_NAME": "PA_9", | ||
"GPIO": "P9", | ||
"SD": "CLK", | ||
"I2S": "0_SCLK", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"21": { | ||
"C_NAME": "PA_10", | ||
"GPIO": "P10", | ||
"IRQ": null, | ||
"SD": "D0", | ||
"I2S": "0_TX", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"22": { | ||
"C_NAME": "PA_11", | ||
"GPIO": "P11", | ||
"IRQ": null, | ||
"SD": "D1", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"23": { | ||
"C_NAME": "PA_12", | ||
"GPIO": "P12", | ||
"IRQ": null, | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"24": { | ||
"C_NAME": "PB_3", | ||
"GPIO": "P19", | ||
"IRQ": null, | ||
"ADC": 5, | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"25": { | ||
"C_NAME": "PB_4", | ||
"GPIO": "P20", | ||
"IRQ": null, | ||
"ADC": 6, | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"26": { | ||
"C_NAME": "PB_5", | ||
"GPIO": "P21", | ||
"IRQ": null, | ||
"ADC": 7, | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"27": { | ||
"C_NAME": "PB_6", | ||
"GPIO": "P22", | ||
"IRQ": null, | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"28": { | ||
"C_NAME": "PB_7", | ||
"GPIO": "P23", | ||
"IRQ": null, | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"29": { | ||
"C_NAME": "PB_8", | ||
"GPIO": "P24", | ||
"IRQ": null, | ||
"UART": "0_RX", | ||
"I2C": ["0_SCL","0_SDA"] | ||
}, | ||
"30": { | ||
"C_NAME": "PB_9", | ||
"GPIO": "P25", | ||
"UART": "0_TX", | ||
"I2C": ["0_SCL","0_SDA"] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"build": { | ||
"family": "LN882X", | ||
"ldscript": "ln882x_bsp.ld", | ||
"bootfile": "boot_ln882x.bin", | ||
"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" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"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" | ||
}, | ||
"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","A3"] | ||
}, | ||
"10": { | ||
"IC": 7 | ||
}, | ||
"11": { | ||
"IC": 8, | ||
"ARD": ["D7","A2"] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"_base": [ | ||
"lightning-ln882x", | ||
"lightning-ln882hki", | ||
"ic/ln882hk", | ||
"pcb/ln-02" | ||
], | ||
"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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* 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: P11, SD_D1, I2C0_SCL, I2C0_SDA | ||
{PA_11, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0}, | ||
// D1: P19, ADC5, I2C0_SCL, I2C0_SDA | ||
{PB_3, PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0}, | ||
// D2: P3, UART1_RX, I2C0_SCL, I2C0_SDA | ||
{PA_3, PIN_UART | PIN_I2C | PIN_GPIO, PIN_NONE, 0}, | ||
// D3: P24, UART0_RX, I2C0_SCL, I2C0_SDA | ||
{PB_8, PIN_UART | PIN_I2C | PIN_IRQ | PIN_GPIO, PIN_NONE, 0}, | ||
// D4: P2, UART1_TX, I2C0_SCL, I2C0_SDA | ||
{PA_2, PIN_UART | PIN_I2C | PIN_GPIO, PIN_NONE, 0}, | ||
// D5: P25, UART0_TX, I2C0_SCL, I2C0_SDA | ||
{PB_9, PIN_UART | PIN_I2C | PIN_GPIO, PIN_NONE, 0}, | ||
// D6: P1, ADC3, SWDIO, I2C0_SCL, I2C0_SDA | ||
{PA_1, PIN_SWD | PIN_I2C | PIN_ADC | PIN_GPIO, PIN_NONE, 0}, | ||
// D7: P0, ADC2, I2C0_SCL, I2C0_SDA | ||
{PA_0, PIN_I2C | PIN_ADC | 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) | ||
[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 |
Oops, something went wrong.