-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: shields: Add Seeed Studio XIAO Expansion Board
Add Seeed Studio XIAO Expansion Board: - User button - SSD1306 128x64 pixels - MicroSD - PFC8563 RTC Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
- Loading branch information
1 parent
eaf140e
commit 0358d94
Showing
5 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
boards/shields/seeed_xiao_expansion_board/Kconfig.defconfig
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,27 @@ | ||
# Copyright (c) 2024 Charles Dias <charlesdias.cd@outlook.com> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if SHIELD_SEEED_XIAO_EXPANSION_BOARD | ||
|
||
if DISPLAY | ||
|
||
if LVGL | ||
|
||
config LV_Z_VDB_SIZE | ||
default 64 | ||
|
||
config LV_DPI_DEF | ||
default 148 | ||
|
||
config LV_Z_BITS_PER_PIXEL | ||
default 1 | ||
|
||
choice LV_COLOR_DEPTH | ||
default LV_COLOR_DEPTH_1 | ||
endchoice | ||
|
||
endif # LVGL | ||
|
||
endif # DISPLAY | ||
|
||
endif # SHIELD_SEEED_XIAO_EXPANSION_BOARD |
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,5 @@ | ||
# Copyright (c) 2024 Charles Dias <charlesdias.cd@outlook.com> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SHIELD_SEEED_XIAO_EXPANSION_BOARD | ||
def_bool $(shields_list_contains,seeed_xiao_expansion_board) |
Binary file added
BIN
+24.1 KB
boards/shields/seeed_xiao_expansion_board/doc/img/seeed_xiao_expansion_board.webp
Binary file not shown.
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,76 @@ | ||
.. _seeed_xiao_expansion_board: | ||
|
||
Seeed Studio XIAO Expansion Board | ||
################################# | ||
|
||
Overview | ||
******** | ||
|
||
Seeed Studio XIAO Expansion Board is a powerful functional expansion board | ||
for `Seeed Studio XIAO series`_ of only half Raspberry Pi 4 size. It enables | ||
building prototypes and projects in an easy and quick way. With its rich | ||
peripherals, you could explore the infinite possibilities of Seeed Studio | ||
XIAO series. | ||
|
||
.. figure:: img/seeed_xiao_expansion_board.webp | ||
:align: center | ||
:alt: Seeed Studio XIAO Expansion Board | ||
|
||
Seeed Studio XIAO Expansion Board (Credit: Seeed Studio) | ||
|
||
Pin Assignments | ||
=============== | ||
|
||
+-----------------------+---------------------------------------------+ | ||
| Shield Connector Pin | Function | | ||
+=======================+=============================================+ | ||
| 0 | Grove*1 (A0, D0) | | ||
+-----------------------+---------------------------------------------+ | ||
| 1 | User button | | ||
+-----------------------+---------------------------------------------+ | ||
| 2 | MicroSD SPI CSn | | ||
+-----------------------+---------------------------------------------+ | ||
| 3 | Buzzer(A3) | | ||
+-----------------------+---------------------------------------------+ | ||
| 4 | Grove*2 I2C SDA | | ||
+-----------------------+---------------------------------------------+ | ||
| 5 | Grove*2 I2C SCL | | ||
+-----------------------+---------------------------------------------+ | ||
| 6 | Grove*1 UART TX | | ||
+-----------------------+---------------------------------------------+ | ||
| 7 | Grove*1 UART RX | | ||
+-----------------------+---------------------------------------------+ | ||
| 8 | MicroSD SPI SCK (Serial Clock Input) | | ||
+-----------------------+---------------------------------------------+ | ||
| 9 | MicroSD SPI MISO (Serial Data Input) | | ||
+-----------------------+---------------------------------------------+ | ||
| 10 | MicroSD SPI MOSI (Serial Data Output) | | ||
+-----------------------+---------------------------------------------+ | ||
|
||
Programming | ||
*********** | ||
|
||
LED Button Sample | ||
================= | ||
|
||
Set ``-DSHIELD=seeed_xiao_expansion_board`` when you invoke ``west build``. For example: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/basic/button | ||
:board: xiao_ble/nrf52840 | ||
:shield: seeed_xiao_expansion_board | ||
:goals: build | ||
|
||
LVGL Basic Sample | ||
========================== | ||
|
||
Set ``-DSHIELD=seeed_xiao_expansion_board`` when you invoke ``west build``. For example: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/subsys/display/lvgl | ||
:board: xiao_ble/nrf52840 | ||
:shield: seeed_xiao_expansion_board | ||
:goals: build | ||
|
||
.. _Seeed Studio XIAO series: | ||
https://www.seeedstudio.com/XIAO-c-1964.html |
65 changes: 65 additions & 0 deletions
65
boards/shields/seeed_xiao_expansion_board/seeed_xiao_expansion_board.overlay
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,65 @@ | ||
/* | ||
* Copyright (c) 2024 Charles Dias <charlesdias.cd@outlook.com> | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
chosen { | ||
zephyr,display = &ssd1306_128x64; | ||
zephyr,rtc = &pfc8563_rtc; | ||
}; | ||
|
||
buttons { | ||
compatible = "gpio-keys"; | ||
xiao_button0: button_0 { | ||
gpios = <&xiao_d 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
label = "SW0"; | ||
zephyr,code = <INPUT_KEY_0>; | ||
}; | ||
}; | ||
|
||
aliases { | ||
sw0 = &xiao_button0; | ||
rtc = &pfc8563_rtc; | ||
}; | ||
}; | ||
|
||
&xiao_i2c { | ||
status = "okay"; | ||
|
||
ssd1306_128x64: ssd1306@3c { | ||
compatible = "solomon,ssd1306fb"; | ||
reg = <0x3c>; | ||
width = <128>; | ||
height = <64>; | ||
segment-offset = <0>; | ||
page-offset = <0>; | ||
display-offset = <0>; | ||
multiplex-ratio = <63>; | ||
segment-remap; | ||
com-invdir; | ||
prechargep = <0x22>; | ||
}; | ||
|
||
pfc8563_rtc: pfc8563@51 { | ||
compatible = "nxp,pcf8563"; | ||
reg = <0x51>; | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&xiao_spi { | ||
status = "okay"; | ||
cs-gpios = <&xiao_d 2 GPIO_ACTIVE_LOW>; | ||
|
||
sdhc0: sdhc@0 { | ||
compatible = "zephyr,sdhc-spi-slot"; | ||
reg = <0>; | ||
status = "okay"; | ||
mmc { | ||
compatible = "zephyr,sdmmc-disk"; | ||
status = "okay"; | ||
}; | ||
spi-max-frequency = <24000000>; | ||
}; | ||
}; |