Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
beastoin committed Dec 18, 2024
1 parent 97b1003 commit 895b57f
Show file tree
Hide file tree
Showing 10 changed files with 400 additions and 380 deletions.
12 changes: 6 additions & 6 deletions Friend/firmware/firmware_v1.0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ enable_language(C ASM)

target_sources(app PRIVATE
src/main.c
src/transport.c
src/mic.c
#src/transport.c
#src/mic.c
src/led.c
src/codec.c
src/lib/battery/battery.c
src/button.c
src/speaker.c
src/sdcard.c
src/storage.c
#src/button.c
#src/speaker.c
#src/sdcard.c
#src/storage.c
src/usb.c
# src/nfc.c future release
)
Expand Down
122 changes: 71 additions & 51 deletions Friend/firmware/firmware_v1.0/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,78 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 0
},
"configurePresets": [
{
"name": "build_xiao_ble_sense_devkitv1",
"displayName": "Devkit V1",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v1 device with no external modules",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv1",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv1.conf"
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 0
},
"configurePresets": [
{
"name": "build_xiao_ble_sense_devkitv1",
"displayName": "Devkit V1",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v1 device with no external modules",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv1",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv1.conf"
}
},{
"name": "build_xiao_ble_sense_devkitv1-spisd.",
"displayName": "Devkit V1 (with SPI SD)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v1 device with external SPI SD card module",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv1-spisd",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv1-spisd.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv1-spisd.overlay"
},
{
"name": "build_xiao_ble_sense_devkitv1-spisd.",
"displayName": "Devkit V1 (with SPI SD)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v1 device with external SPI SD card module",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv1-spisd",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv1-spisd.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv1-spisd.overlay"
}
},{
"name": "build_xiao_ble_sense_devkitv2-adafruit.",
"displayName": "Devkit V2 (with Adafruit BFF Module)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v2 device with adafruit audio bff module",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv2-adafruit",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-adafruit.conf",
"CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-adafruit.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv2-adafruit.overlay"
},
{
"name": "build_xiao_ble_sense_devkitv2-adafruit.",
"displayName": "Devkit V2 (with Adafruit BFF Module)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v2 device with adafruit audio bff module",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv2-adafruit",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-adafruit.conf",
"CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-adafruit.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv2-adafruit.overlay"
}
},
{
"name": "build_xiao_ble_sense_devkitv2-5340.",
"displayName": "Devkit V2 (with nrf5340)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v2 device with nrf5340",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv2-5340",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf5340",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-5340.conf",
"CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-5340.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv2-5340.overlay"
}
}
]
Expand Down
3 changes: 3 additions & 0 deletions Friend/firmware/firmware_v1.0/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ config ENABLE_BUTTON
config ENABLE_SPEAKER
bool "Enable the speaker!!"
default n
config ENABLE_LED
bool "Enable the led!!"
default y
endmenu
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@

//&i2s0 {
// status = "okay";
// pinctrl-0 = <&i2s0_default>;
// pinctrl-names = "default";
// label = "I2S_0";
//};
//
//&pinctrl {
// i2s0_default: i2s0_default {
// group1 {
// psels = <NRF_PSEL(I2S_SCK_M, 0, 29)>, // SCK pin (bit clock) A3
// <NRF_PSEL(I2S_LRCK_M, 0, 28)>, // LRCK pin (word select clock) A2
// <NRF_PSEL(I2S_SDOUT, 0, 3)>; // SDOUT pin (data out) A1
// };
// };
//};
//
//&spi2 {
// status = "okay";
// pinctrl-0 = <&custom_spi>;
// pinctrl-1 = <&custom_spi>;
// pinctrl-names = "default", "sleep";
// cs-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; // CS pin on P0.28
//
// sdhc0: sdhc@0 {
// compatible = "zephyr,sdhc-spi-slot";
// reg = <0>;
// status = "okay";
// label = "SDHC_0";
// mmc {
// compatible = "zephyr,sdmmc-disk";
// status = "okay";
// };
// spi-max-frequency = <24000000>; // 24 MHz SPI speed for SD card
// };
//};
//
//&pinctrl {
// custom_spi: custom_spi {
// group1 {
// psels = <NRF_PSEL(SPIM_SCK, 1, 13)>, // SCK on P1.13
// <NRF_PSEL(SPIM_MOSI, 1, 15)>, // MOSI on P1.15
// <NRF_PSEL(SPIM_MISO, 1, 14)>; // MISO on P1.14
// };
// };
//};
//
//&uart0 {
// status = "disabled";
//};
//
//// &qspi {
//// status = "disabled";
//// };
//
//&i2c0 {
// lsm6ds3tr_c: lsm6ds3tr-c@6a {
// compatible = "st,lsm6dsl";
// reg = <0x6a>;
// irq-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
// status = "okay";
// label = "b";
// // wakeup-source = true;
// };
//};
//
//&i2c1{
// status = "disabled";
//};
//
//&temp {
// status = "disabled";
//};
//
//


//FOR 7002DK, ref: /opt/nordic/ncs/v2.8.0/zephyr/boards/nordic/nrf7002dk/nrf5340_cpuapp_common.dtsi
/ {
aliases {
led0 = &led0;
led1 = &led1;
led2 = &led1;
pwm-led0 = &pwm_led0;
sw0 = &button0;
sw1 = &button1;
bootloader-led0 = &led0;
mcuboot-button0 = &button0;
mcuboot-led0 = &led0;
watchdog0 = &wdt0;
};
};

Loading

0 comments on commit 895b57f

Please sign in to comment.