diff --git a/.gitignore b/.gitignore index bf2f1e5..5e00332 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,16 @@ middleware include drivers *.pyc +build +bootloader +application/samples/wifi/sta_sample/ +application/samples/wifi/ohos_connect/hilink_adapt/adapter +application/samples/wifi/hilink_indie_upgrade/ +application/ws63/hsf +application/samples/radar/ +application/samples/peripheral/ +application/samples/bt +CMakeLists.txt + +# YoYo AI version control directory +.yoyo/ diff --git a/application/samples/wifi/ohos_connect/hilink_adapt/adapter/hilink_ble_adapter.c b/application/samples/wifi/ohos_connect/hilink_adapt/adapter/hilink_ble_adapter.c index b7b5828..a14088d 100755 --- a/application/samples/wifi/ohos_connect/hilink_adapt/adapter/hilink_ble_adapter.c +++ b/application/samples/wifi/ohos_connect/hilink_adapt/adapter/hilink_ble_adapter.c @@ -800,7 +800,7 @@ int BleStartAdvEx(int *advId, const StartAdvRawData rawData, BleAdvParams advPar set_own_addr_from_nv(&own_addr); (void)memcpy_s(&cfg_adv_params.peer_addr.addr, BD_ADDR_LEN, advParam.peerAddr.addr, BD_ADDR_LEN); (void)memcpy_s(&cfg_adv_params.own_addr.addr, BD_ADDR_LEN, own_addr.addr, BD_ADDR_LEN); - + (void)memset_s(&cfg_adv_params.own_addr.addr, BD_ADDR_LEN, 0, BD_ADDR_LEN); ret = gap_ble_set_adv_param(BLE_ADV_HANDLE_DEFAULT, &cfg_adv_params); if (ret != ERRCODE_BT_SUCCESS) { HILINK_SAL_ERROR("%s BleStartAdvEx gap_ble_set_adv_param error.\n", BLE_HILINK_SERVER_LOG); diff --git a/application/samples/wifi/ohos_connect/hilink_adapt/product/hilink_device.c b/application/samples/wifi/ohos_connect/hilink_adapt/product/hilink_device.c index 1dc2efe..1c927d7 100755 --- a/application/samples/wifi/ohos_connect/hilink_adapt/product/hilink_device.c +++ b/application/samples/wifi/ohos_connect/hilink_adapt/product/hilink_device.c @@ -458,7 +458,10 @@ int fast_report(const char* svc_id) } else { // 云端模式:使用HILINK_ReportCharState err = HILINK_ReportCharState(svc_id, payload, len); - HILINK_Printf("CLOUD report %s result is %d, payload:%s \r\n", svc_id, err, payload); + HILINK_Printf("CLOUD report %s result is %d, payload:%s \r\n", svc_id, err, payload); + if (payload != NULL) { + free(payload); + } } if (payload) { diff --git a/build/config/target_config/ws63/menuconfig/acore/ws63_flashboot.config b/build/config/target_config/ws63/menuconfig/acore/ws63_flashboot.config new file mode 100644 index 0000000..bdeb594 --- /dev/null +++ b/build/config/target_config/ws63/menuconfig/acore/ws63_flashboot.config @@ -0,0 +1,549 @@ +# Generated by Kconfig Tool. +# Note: !!!This file can not be modify manually!!! + +# +# Main menu description, show how to use this configuration system. +# + +# +# Targets +# + +# +# Select the target. +# +# end of Targets + +# +# Application +# + +# +# Config the application. +# +# CONFIG_SAMPLE_ENABLE is not set +# end of Application + +# +# Bootloader +# + +# +# Config the bootloader. +# +# CONFIG_BOOT_SUPPORT_SEC is not set +CONFIG_BOOT_SUPPORT_ECC_VERIFY=y +# CONFIG_BOOT_SUPPORT_SM2_VERIFY is not set +# CONFIG_BOOT_SUPPORT_RSA3072_VERIFY is not set +# CONFIG_BOOT_SUPPORT_RSA4096_VERIFY is not set +# CONFIG_BOOT_SUPPORT_SOFT_VERIFY is not set +CONFIG_FLASH_BOOT_SUPPORT_ROM_API=y +CONFIG_ROM_EXPEND_SUPPORT_NOT_ALIGNED=y +# CONFIG_LOADERBOOT_SUPPORT_DYNAMIC_PACKET_SIZE is not set +CONFIG_BOOT_SUPPORT_SECURE_VERIFY=y + +# +# Boot Secure Verify Configuration +# + +# +# Boot secure verify +# +# end of Boot Secure Verify Configuration + +# CONFIG_BOOT_SUPPORT_PARTITION is not set +# CONFIG_LOADERBOOT_SUPPORT_EFUSE_BURN is not set +# CONFIG_LOADERBOOT_SUPPORT_FLASH_CHIP_ERASE is not set +# CONFIG_LOADERBOOT_SUPPORT_UPLOAD_DATA is not set +# CONFIG_LOADERBOOT_SUPPORT_READ_VERSION is not set +# CONFIG_LOADERBOOT_SUPPORT_SET_BUADRATE is not set +# end of Bootloader + +# +# Drivers +# + +# +# Config the drivers. +# + +# +# Boards +# + +# +# Config the drivers of boards. +# + +# +# Boards Configurations for ws63 +# + +# +# Config ws63 +# +# CONFIG_MEMORY_CUSTOMIZE_SEC is not set +# CONFIG_MEMORY_CUSTOMIZE_RSV is not set +# end of Boards Configurations for ws63 +# end of Boards + +# +# Chips +# + +# +# Config the drivers of chips. +# +# CONFIG_CHIP_WS53 is not set +CONFIG_CHIP_WS63=y + +# +# Chip Configurations for ws63 +# + +# +# Config ws63 +# +CONFIG_BGLE_RAM_SIZE_16K=y +# CONFIG_BGLE_RAM_SIZE_32K is not set +# CONFIG_BGLE_RAM_SIZE_64K is not set +CONFIG_RADAR_SENSOR_RX_MEM_8K=y +# CONFIG_RADAR_SENSOR_RX_MEM_16K is not set +# CONFIG_RADAR_SENSOR_RX_MEM_24K is not set +# CONFIG_RADAR_SENSOR_RX_MEM_32K is not set +CONFIG_LWIP_COMPILE_PATH="" +# CONFIG_PRINTF_BUFFER_DYNAMIC is not set +CONFIG_UART0_BAUDRATE=115200 +CONFIG_UART1_BAUDRATE=921600 +CONFIG_UART2_BAUDRATE=115200 +CONFIG_DEBUG_UART=0 +CONFIG_DEBUG_UART_BAUDRATE=115200 +CONFIG_LOG_UART=1 +CONFIG_LOG_UART_BAUDRATE=921600 +CONFIG_AT_UART=0 +CONFIG_AT_UART_BAUDRATE=115200 +CONFIG_WVT_UART=2 +CONFIG_WVT_UART_BAUDRATE=115200 +CONFIG_TESTSUIT_UART=0 +CONFIG_TESTSUIT_UART_BAUDRATE=115200 +CONFIG_REG_WHITELIST=y +CONFIG_UART0_SUPPORT_WRITE_MUTEX=1 +CONFIG_UART1_SUPPORT_WRITE_MUTEX=1 +CONFIG_UART2_SUPPORT_WRITE_MUTEX=1 +# CONFIG_UART_SUPPORT_PORTTING_IRQ is not set +CONFIG_PM_SUPPORT_WKUP_UART=1 +# CONFIG_PM_SUPPORT_POWER_EXCEPTION_DEBUG is not set +# CONFIG_PM_SUPPORT_SRV_DECOUPLING is not set +CONFIG_HIGH_FREQUENCY=y +# CONFIG_LOW_FREQUENCY is not set +# end of Chip Configurations for ws63 +# end of Chips + +# +# Drivers +# + +# +# Config the drivers. +# +# CONFIG_DRIVER_SUPPORT_ADC is not set +# CONFIG_DRIVER_SUPPORT_CAN_FD is not set +# CONFIG_DRIVER_SUPPORT_CPUTRACE is not set +CONFIG_DRIVER_SUPPORT_DMA=y + +# +# DMA Configuration +# + +# +# Config DMA +# +CONFIG_DMA_SUPPORT_LLI=y +# CONFIG_DMA_SUPPORT_CIRCULAR_LLI is not set +CONFIG_DMA_SUPPORT_LPM=y +# CONFIG_DMA_SUPPORT_QUERY_REGS is not set +# CONFIG_DMA_USING_V100 is not set +# CONFIG_DMA_USING_V120 is not set +# CONFIG_DMA_USING_V150 is not set +CONFIG_SUPPORT_DATA_CACHE=y +# CONFIG_DMA_LLI_NODE_FIX_MEM is not set +# end of DMA Configuration + +# CONFIG_DRIVER_SUPPORT_EDGE is not set +# CONFIG_DRIVER_SUPPORT_EFLASH is not set +CONFIG_DRIVER_SUPPORT_EFUSE=y + +# +# EFUSE Configuration +# + +# +# Config EFUSE +# +CONFIG_EFUSE_USING_V151=y +# CONFIG_EFUSE_SWITCH_EN is not set +CONFIG_EFUSE_REGION_NUM=1 +# end of EFUSE Configuration + +# CONFIG_DRIVER_SUPPORT_FLASH is not set +CONFIG_DRIVER_SUPPORT_GPIO=y + +# +# GPIO Configuration +# + +# +# Config GPIO +# +CONFIG_GPIO_SUPPORT_LPM=y +# CONFIG_GPIO_SELECT_CORE is not set +# CONFIG_GPIO_USING_V100 is not set +CONFIG_GPIO_USING_V150=y +CONFIG_GPIO_BANK_NUM=2 +CONFIG_GPIO0_WIDTH=32 +CONFIG_GPIO1_WIDTH=32 +# end of GPIO Configuration + +# CONFIG_DRIVER_SUPPORT_HASH is not set +# CONFIG_DRIVER_SUPPORT_I2C is not set +# CONFIG_DRIVER_SUPPORT_I2S is not set +# CONFIG_DRIVER_SUPPORT_IPC is not set +# CONFIG_DRIVER_SUPPORT_KEYSCAN is not set +# CONFIG_DRIVER_SUPPORT_MEM_MONITOR is not set +# CONFIG_DRIVER_SUPPORT_MPU is not set +# CONFIG_DRIVER_SUPPORT_PCM is not set +# CONFIG_DRIVER_SUPPORT_PDM is not set +# CONFIG_DRIVER_SUPPORT_PINCTRL is not set +# CONFIG_DRIVER_SUPPORT_PM is not set +# CONFIG_DRIVER_SUPPORT_PMP is not set +CONFIG_DRIVER_SUPPORT_PWM=y + +# +# PWM Configuration +# + +# +# Config PWM +# +CONFIG_PWM_USING_V151=y +# CONFIG_PWM_USING_V150 is not set +CONFIG_PWM_GROUP_NUM=6 +CONFIG_PWM_CHANNEL_NUM=6 +# CONFIG_PWM_PRELOAD is not set +# end of PWM Configuration + +# CONFIG_DRIVER_SUPPORT_RTC is not set +# CONFIG_DRIVER_SUPPORT_SDIO is not set +# CONFIG_DRIVER_SUPPORT_SEC is not set +CONFIG_DRIVER_SUPPORT_SECURITY_UNIFIED=y + +# +# SECURITY_UNIFIED Configuration +# + +# +# Config security_unified +# +# CONFIG_SECURITY_UNIFIED_SUPPORT_DEEP_SLEEP is not set +# CONFIG_SECURITY_UNIFIED_SUPPORT_SYMC is not set +# CONFIG_SECURITY_UNIFIED_SUPPORT_HASH is not set +# CONFIG_SECURITY_UNIFIED_SUPPORT_TRNG is not set +# CONFIG_SECURITY_UNIFIED_SUPPORT_KM is not set +# CONFIG_SECURITY_UNIFIED_SUPPORT_FAPC is not set +CONFIG_SECURITY_UNIFIED_SUPPORT_PKE=y +# CONFIG_PKE_IRQ_ENABLE is not set +# CONFIG_PKE_SUPPORT_ECC_FIPS_P192R is not set +# CONFIG_PKE_SUPPORT_ECC_FIPS_P224R is not set +# CONFIG_PKE_SUPPORT_ECC_FIPS_P256R is not set +# CONFIG_PKE_SUPPORT_ECC_FIPS_P384R is not set +# CONFIG_PKE_SUPPORT_ECC_FIPS_P521R is not set +CONFIG_PKE_SUPPORT_ECC_BP256R=y +# CONFIG_PKE_SUPPORT_ECC_BP384R is not set +# CONFIG_PKE_SUPPORT_ECC_BP512R is not set +# CONFIG_PKE_SUPPORT_CURVE is not set +# CONFIG_PKE_SUPPORT_EDWARD is not set +CONFIG_PKE_SUPPORT_SM2=y +# CONFIG_PKE_SUPPORT_SM2_SIGN is not set +CONFIG_PKE_SUPPORT_SM2_VERIFY=y +# CONFIG_PKE_SUPPORT_SM2_CRYPTO is not set +# CONFIG_PKE_SUPPORT_RSA is not set +# CONFIG_PKE_SUPPORT_ECC_SIGN is not set +# CONFIG_PKE_SUPPORT_ECC_VERIFY is not set +# CONFIG_PKE_SUPPORT_ECC_ECDH is not set +# CONFIG_PKE_SUPPORT_ECC_GEN_KEY is not set +# CONFIG_PKE_SUPPORT_ECC_CAL is not set +# CONFIG_PKE_SUPPORT_BIG_NUMBER is not set +# CONFIG_ENTROPY_SOURCES_FROM_FRO is not set +# CONFIG_TRNG_RING_ENABLE is not set +CONFIG_SM_EFUSE_CHECK=y +# end of SECURITY_UNIFIED Configuration + +CONFIG_DRIVER_SUPPORT_SFC=y + +# +# SFC Configuration +# + +# +# Config SFC +# +# CONFIG_SFC_DEBUG is not set +# end of SFC Configuration + +CONFIG_DRIVER_SUPPORT_SPI=y + +# +# SPI Configuration +# + +# +# Config SPI +# +# CONFIG_SPI_SUPPORT_MASTER is not set +# CONFIG_SPI_SUPPORT_SLAVE is not set +# CONFIG_SPI_SUPPORT_DMA is not set +# CONFIG_SPI_SUPPORT_INTERRUPT is not set +# CONFIG_SPI_SUPPORT_CONCURRENCY is not set +# CONFIG_SPI_SUPPORT_LOOPBACK is not set +# CONFIG_SPI_SUPPORT_CRC is not set +CONFIG_SPI_MAX_TIMEOUT=0xFFFFFFFF +CONFIG_SPI_TXFTLR=1 +CONFIG_SPI_RXFTLR=1 +# CONFIG_SPI_SUPPORT_LPC is not set +# CONFIG_SPI_SUPPORT_LPM is not set +# CONFIG_SPI_SUPPORT_SINGLE_SPI is not set +CONFIG_SPI_NOT_SUPPORT_TEXAS_FORMAT=y +# CONFIG_SPI_SUPPORT_QUERY_REGS is not set +# CONFIG_SPI_SUPPORT_TXRX_TRANS_MODE is not set +# CONFIG_SPI_USING_V100 is not set +CONFIG_SPI_USING_V151=y +# end of SPI Configuration + +# CONFIG_DRIVER_SUPPORT_SSI is not set +# CONFIG_DRIVER_SUPPORT_SYSTICK is not set +# CONFIG_DRIVER_SUPPORT_TCXO is not set +# CONFIG_DRIVER_SUPPORT_TIMER is not set +# CONFIG_DRIVER_SUPPORT_TSENSOR is not set +CONFIG_DRIVER_SUPPORT_UART=y + +# +# Uart Configuration +# + +# +# Config uart +# +# CONFIG_UART_BAUD_RATE_DIV_8 is not set +# CONFIG_UART_SUPPORT_TX is not set +CONFIG_UART_SUPPORT_TX_INT=y +# CONFIG_UART_SUPPORT_RX is not set +# CONFIG_UART_SUPPORT_DMA is not set +# CONFIG_UART_SUPPORT_FLOW_CTRL is not set +# CONFIG_UART_SUPPORT_LPM is not set +CONFIG_UART_FIFO_DEPTH=64 +# CONFIG_UART_SUPPORT_LPC is not set +# CONFIG_UART_SUPPORT_QUERY_REGS is not set +CONFIG_UART_DLF_SIZE=4 +# CONFIG_UART_USING_V120 is not set +CONFIG_UART_USING_V151=y +# CONFIG_UART_USING_V100 is not set +# CONFIG_UART_IP_VERSION_V151_PRO is not set +# CONFIG_UART_USING_LP_UART is not set +# end of Uart Configuration + +# CONFIG_DRIVER_SUPPORT_USB is not set +CONFIG_DRIVER_SUPPORT_WDT=y + +# +# Watchdog Configuration +# + +# +# Config watchdog +# +# CONFIG_WATCHDOG_ALREADY_START is not set +# CONFIG_WATCHDOG_SUPPORT_ULP_WDT is not set +# CONFIG_WATCHDOG_SUPPORT_LPM is not set +CONFIG_WATCHDOG_USING_V151=y +# CONFIG_WATCHDOG_USING_V100 is not set +# CONFIG_WATCHDOG_USING_V152 is not set +CONFIG_WATCHDOG_USING_V151_RST_PL=7 +# end of Watchdog Configuration + +# CONFIG_DRIVER_SUPPORT_AUDIO is not set +# end of Drivers +# end of Drivers + +# +# Kernel +# + +# +# Config the kernel. +# +# CONFIG_DRIVER_SUPPORT_LITEOS is not set + +# +# osal +# + +# +# Config osal. +# +# CONFIG_DRIVER_DISABLE_OSAL_LOG is not set +# end of osal +# end of Kernel + +# +# Middleware +# + +# +# Config the middleware. +# + +# +# Chips +# + +# +# Config the middleware of chips. +# +# CONFIG_MIDDLEWARE_CHIP_WS53 is not set +CONFIG_MIDDLEWARE_CHIP_WS63=y + +# +# Chip Configurations for ws63 +# + +# +# Config ws63 +# +# CONFIG_MIDDLEWARE_SUPPORT_FTM is not set +# CONFIG_MIDDLEWARE_SUPPORT_NV is not set +CONFIG_MIDDLEWARE_SUPPORT_UPG=y +# CONFIG_MIDDLEWARE_SUPPORT_SLICE_UPG is not set +# CONFIG_MIDDLEWARE_SUPPORT_EXCEPT_DISABLE_WDT is not set +CONFIG_MIDDLEWARE_SUPPORT_UPG_COMPRESS=y +# CONFIG_MIDDLEWARE_SUPPORT_UPG_AB is not set +CONFIG_MIDDLEWARE_SUPPORT_UPG_COMPRESS_ENCRY=y +CONFIG_MIDDLEWARE_SUPPORT_UPG_SAMPLE_VERIFY=y +CONFIG_MIDDLEWARE_SUPPORT_EXCEPT_REBOOT=y +# CONFIG_MIDDLEWARE_SUPPORT_EXCEPT_WAITFOREVER is not set +# CONFIG_MIDDLEWARE_SUPPORT_LFS is not set +# CONFIG_SUPPORT_CRASHINFO_SAVE_TO_FLASH is not set +# end of Chip Configurations for ws63 +# end of Chips + +# +# Services +# + +# +# Config the middleware of service. +# +# CONFIG_MIDDLEWARE_SUPPORT_TIOT is not set +# end of Services + +# +# Utils +# + +# +# Config the middleware of utils. +# +# CONFIG_MIDDLEWARE_SUPPORT_PM is not set +# CONFIG_MIDDLEWARE_SUPPORT_DFX is not set +# CONFIG_MIDDLEWARE_SUPPORT_AT is not set +# CONFIG_MIDDLEWARE_SUPPORT_CODEC is not set +# CONFIG_MIDDLEWARE_SUPPORT_UPDATE is not set +# end of Utils +# end of Middleware + +# +# Protocol +# + +# +# Config the protocol. +# + +# +# bt_host +# + +# +# Config bluetooth. +# +CONFIG_AT_BLE=y + +# +# AT_BLE +# + +# +# Config bluetooth host AT BLE. +# +# end of AT_BLE + +CONFIG_AT_GLE=y + +# +# AT_GLE +# + +# +# Config bluetooth host AT GLE. +# +# end of AT_GLE + +# +# FEATURE_GLE +# + +# +# Config bluetooth host GLE feature. +# +# CONFIG_FEATURE_GLE_LOW_LATENCY is not set +# CONFIG_FEATURE_GLE_HADM is not set +# end of FEATURE_GLE +# end of bt_host + +# +# bt_controller +# + +# +# Config bluetooth. +# +# end of bt_controller + +# +# nfc +# + +# +# Config nfc. +# +# end of nfc + +# +# wifi +# + +# +# Config wifi. +# +# end of wifi + +# CONFIG_RADAR_SERVICE is not set +# end of Protocol + +# +# Test +# + +# +# Config the test. +# +# end of Test diff --git a/drivers/chips/ws63/porting/pwm/CMakeLists.txt b/drivers/chips/ws63/porting/pwm/CMakeLists.txt new file mode 100755 index 0000000..ee5e6fb --- /dev/null +++ b/drivers/chips/ws63/porting/pwm/CMakeLists.txt @@ -0,0 +1,40 @@ +#=============================================================================== +# @brief cmake file +# Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved. +#=============================================================================== +set(COMPONENT_NAME "pwm_port") + +set(SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/pwm_porting.c +) + +set(PUBLIC_HEADER + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../drivers/drivers/hal/pwm/v151/ +) + +set(PRIVATE_HEADER +) + +set(PUBLIC_DEFINES +) + +set(PRIVATE_DEFINES +) + +# use this when you want to add ccflags like -include xxx +set(COMPONENT_PUBLIC_CCFLAGS +) + +set(COMPONENT_CCFLAGS +) + +set(WHOLE_LINK + true +) + +set(MAIN_COMPONENT + false +) + +build_component()