Skip to content

Commit

Permalink
Add init project files from zephyr app
Browse files Browse the repository at this point in the history
  • Loading branch information
protocentralashwin committed Nov 12, 2023
1 parent fdf99a9 commit 174f7da
Show file tree
Hide file tree
Showing 1,122 changed files with 445,457 additions and 338 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added app/.DS_Store
Binary file not shown.
10 changes: 9 additions & 1 deletion app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

project(app LANGUAGES C)

target_sources(app PRIVATE src/main.c)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

# Add display module only if enabled
FILE(GLOB display_sources src/display/*.c src/images/*.c)
target_sources_ifdef(CONFIG_HEALTHYPI_DISPLAY_ENABLED app PRIVATE ${display_sources})

zephyr_include_directories(src)
zephyr_include_directories(src/display)
26 changes: 20 additions & 6 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@
# You can browse these options using the west targets menuconfig (terminal) or
# guiconfig (GUI).

menu "Zephyr"
source "Kconfig.zephyr"
endmenu
mainmenu "HealthyPi 5 Project Configuration"

config HEALTHYPI_USB_CDC_ENABLED
bool "Enable USB CDC"
default n
help
Enable USB CDC

config HEALTHYPI_DISPLAY_ENABLED
bool "Enable Display"
default n
help
Enable Display

module = APP
module-str = APP
source "subsys/logging/Kconfig.template.log_config"
config HEALTHYPI_USB_MSC_ENABLED
bool "Enable USB Mass Storage"
default n
help
Enable USB MSC

source "Kconfig.zephyr"
47 changes: 47 additions & 0 deletions app/boards/healthypi5_rp2040.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

// ProtoCentral Electronics (info@protocentral.com)
// SPDX-License-Identifier: Apache-2.0

/ {
chosen {
zephyr,display = &ili9488;
};
};

&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};

&spi1 {
clock-frequency = <DT_FREQ_M(48)>;
status = "okay";
pinctrl-0 = <&spi1_default>;
pinctrl-names = "default";
cs-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;

ili9488: ili9488@0 {
compatible = "ilitek,ili9488";
spi-max-frequency = <48000000>;
reg = <0>;
cmd-data-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; /* D7 */
reset-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; /* D10 */
//pixel-format = <ILI9XXX_PIXEL_FORMAT_RGB888>;
width = <480>;
height = <320>;
rotation = <270>;
frmctr1 = [ a0 11 ];
pwctrl1 = [ 17 15 ];
pwctrl2 = [ 41 ];
pgamctrl = [ 00 03 09 08 16 0a 3f 78 4c 09 0a 08 16 1a 0f ];
ngamctrl = [ 00 16 19 03 0f 05 32 45 46 04 0e 0d 35 37 0f ];
};
};
/*
&pwm {
status = "okay";
divider-frac-1 = <15>;
divider-int-1 = <255>;
};*/

21 changes: 0 additions & 21 deletions app/boards/nucleo_f302r8.overlay

This file was deleted.

153 changes: 149 additions & 4 deletions app/prj.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,151 @@
# Copyright (c) 2021 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
#
# This file contains selected Kconfig options for the application.
# HealthyPi 5 Specific Configuration
CONFIG_HEALTHYPI_USB_CDC_ENABLED=y
CONFIG_HEALTHYPI_USB_MSC_ENABLED=n
#CONFIG_HEALTHYPI_DISPLAY_ENABLED=n
CONFIG_HEALTHYPI_DISPLAY_ENABLED=y

# Memory Configuration
CONFIG_HEAP_MEM_POOL_SIZE=32528
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=16384
CONFIG_MAIN_STACK_SIZE=8192

# Zephyr OS Configuration
#CONFIG_SMP=y
#CONFIG_MP_MAX_NUM_CPUS=2
CONFIG_SMF=y
CONFIG_EVENTS=y
CONFIG_LOG=y
CONFIG_CBPRINTF_FP_SUPPORT=y

# Peripheral device drivers
CONFIG_SENSOR=y
CONFIG_SENSOR_MAX30001=y
CONFIG_SENSOR_AFE4400=y
CONFIG_SENSOR_MAX30205=y
CONFIG_I2C=y
CONFIG_FUEL_GAUGE=y

CONFIG_ADC=y
CONFIG_LED=y
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_LINE_CTRL=y

CONFIG_REBOOT=y

# Filesystem & Internal Flash support to store data
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# Enabled settings module and FS to store settings
CONFIG_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
CONFIG_SETTINGS_FILE=y
CONFIG_SETTINGS_FILE_PATH="/lfs/settings"

# USB Configuration
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="HealthyPi 5"
CONFIG_USB_DEVICE_PID=0x0001
CONFIG_USB_DEVICE_VID=4440
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y

# Enable MCUmgr and dependencies.
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y
CONFIG_CRC=y
CONFIG_MCUMGR=y
CONFIG_STREAM_FLASH=y
CONFIG_FLASH_MAP=y

CONFIG_BASE64=y
CONFIG_CONSOLE=y

CONFIG_TEST_RANDOM_GENERATOR=y

# Ensure an MCUboot-compatible binary is generated.
#CONFIG_BOOTLOADER_MCUBOOT=y

# Tensorflow Lite Configuration
#CONFIG_CPP=y
#CONFIG_LIB_CPLUSPLUS=y
#CONFIG_NEWLIB_LIBC=y
#CONFIG_TENSORFLOW_LITE_MICRO=y
#CONFIG_TENSORFLOW_LITE_MICRO_CMSIS_NN_KERNELS=y

CONFIG_DISK_ACCESS=y
CONFIG_DISK_DRIVER_SDMMC=y

# BT Host only configuration
CONFIG_BT=y
CONFIG_BT_H4=y
CONFIG_BT_HCI=y
CONFIG_BT_CTLR=n

# BLE Configuration
CONFIG_BT_PERIPHERAL=y
#CONFIG_BT_DIS=y
#CONFIG_BT_DIS_PNP=n
CONFIG_BT_BAS=y
CONFIG_BT_HRS=y
CONFIG_BT_SMP=y
CONFIG_BT_DEVICE_NAME="HealthyPi"
CONFIG_BT_DEVICE_APPEARANCE=833

CONFIG_BT_SETTINGS=n

CONFIG_BT_HCI_ACL_FLOW_CONTROL=n
#CONFIG_BT_ATT_ENFORCE_FLOW=n



CONFIG_DISPLAY=y
CONFIG_DISPLAY_LOG_LEVEL_ERR=y

# LVGL Library Options
CONFIG_LVGL=y
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_THEME_DEFAULT_DARK=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_USE_LOG=y
CONFIG_LV_USE_LABEL=y
CONFIG_LV_USE_BTN=y
CONFIG_LV_USE_IMG=y
#CONFIG_LV_USE_PERF_MONITOR=y

# LVGL New Settings
#CONFIG_LV_Z_VDB_SIZE=10
#CONFIG_LV_MEM_BUF_MAX_NUM=256
CONFIG_LV_Z_MEM_POOL_SYS_HEAP=y
CONFIG_LV_Z_MEM_POOL_SIZE=16384
#CONFIG_LV_Z_VDB_ALIGN=4
#CONFIG_LV_Z_BUFFER_ALLOC_STATIC=y

#CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=16
#CONFIG_LV_Z_VDB_SIZE=20
#CONFIG_SPEED_OPTIMIZATIONS=y
#CONFIG_LV_DISP_DEF_REFR_PERIOD=150

# LVGL Font Options
CONFIG_LV_FONT_MONTSERRAT_12=y
CONFIG_LV_FONT_MONTSERRAT_14=y
CONFIG_LV_FONT_MONTSERRAT_16=y
CONFIG_LV_FONT_MONTSERRAT_20=y
CONFIG_LV_FONT_MONTSERRAT_24=y
CONFIG_LV_FONT_MONTSERRAT_28=y
CONFIG_LV_FONT_MONTSERRAT_34=y
CONFIG_LV_FONT_MONTSERRAT_42=y
CONFIG_LV_FONT_MONTSERRAT_12_SUBPX=y
CONFIG_LV_CIRCLE_CACHE_SIZE=8
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_12=y
CONFIG_LV_USE_FONT_SUBPX=y
Binary file added app/src/.DS_Store
Binary file not shown.
Loading

0 comments on commit 174f7da

Please sign in to comment.