├── .gitignore ├── README.md ├── _bld_script ├── bld_v211.yml ├── bld_v212.yml ├── rls_v211.yml ├── rls_v212.yml ├── sdk_build.py ├── sdk_build.yml └── sdk_release.py ├── components ├── ble │ ├── controller │ │ └── include │ │ │ ├── ll.h │ │ │ ├── ll_buf.h │ │ │ ├── ll_common.h │ │ │ ├── ll_debug.h │ │ │ ├── ll_def.h │ │ │ ├── ll_enc.h │ │ │ ├── ll_hw_drv.h │ │ │ └── ll_sleep.h │ ├── hci │ │ ├── hci_data.h │ │ ├── hci_event.h │ │ ├── hci_host.h │ │ ├── hci_task.h │ │ └── hci_tl.h │ ├── host │ │ ├── att_internal.h │ │ ├── gap_internal.h │ │ ├── gapgattserver.h │ │ ├── gatt_internal.h │ │ ├── gatt_profile_uuid.h │ │ ├── gattservapp.h │ │ ├── gatttest.h │ │ ├── l2cap_internal.h │ │ ├── linkdb.h │ │ ├── sm_internal.h │ │ └── smp.h │ └── include │ │ ├── att.h │ │ ├── bcomdef.h │ │ ├── gap.h │ │ ├── gatt.h │ │ ├── gatt_uuid.h │ │ ├── hci.h │ │ ├── l2cap.h │ │ └── sm.h ├── common │ ├── error.h │ ├── hal_defs.h │ ├── hal_mcu.h │ └── version.h ├── driver │ ├── adc │ │ ├── adc.c │ │ └── adc.h │ ├── clock │ │ ├── clock.c │ │ └── clock.h │ ├── common │ │ ├── common.c │ │ └── common.h │ ├── dma │ │ ├── dma.c │ │ ├── dma.h │ │ └── gdma.h │ ├── flash │ │ ├── flash.c │ │ └── flash.h │ ├── gpio │ │ ├── gpio.c │ │ └── gpio.h │ ├── i2c │ │ ├── i2c.c │ │ ├── i2c.h │ │ ├── i2c_common.c │ │ ├── i2c_common.h │ │ ├── i2c_s.c │ │ ├── i2c_s.h │ │ ├── i2c_slave.c │ │ └── i2c_slave.h │ ├── i2s │ │ └── i2s.h │ ├── key │ │ ├── key.c │ │ └── key.h │ ├── kscan │ │ ├── kscan.c │ │ └── kscan.h │ ├── log │ │ ├── log.h │ │ └── my_printf.c │ ├── pwm │ │ ├── pwm.c │ │ └── pwm.h │ ├── pwrmgr │ │ ├── pwrmgr.c │ │ └── pwrmgr.h │ ├── qdec │ │ ├── qdec.c │ │ └── qdec.h │ ├── spi │ │ ├── spi.c │ │ └── spi.h │ ├── spiflash │ │ ├── spiflash.c │ │ └── spiflash.h │ ├── timer │ │ ├── ap_timer.c │ │ └── ap_timer.h │ ├── uart │ │ ├── uart.c │ │ └── uart.h │ ├── voice │ │ ├── voice.c │ │ └── voice.h │ └── watchdog │ │ ├── watchdog.c │ │ └── watchdog.h ├── ethermind │ ├── external │ │ └── crypto │ │ │ ├── aes │ │ │ ├── README.txt │ │ │ ├── aes-ccm.c │ │ │ ├── aes.c │ │ │ └── aes.h │ │ │ ├── asm_ecdh_p256 │ │ │ ├── P256-cortex-ecdh.h │ │ │ └── P256-cortex-m0-ecdh-keil.s │ │ │ └── sha256 │ │ │ ├── sha256.c │ │ │ └── sha256.h │ ├── lib │ │ └── phy6200 │ │ │ └── phyos │ │ │ └── keil │ │ │ ├── libethermind_ecdh.lib │ │ │ ├── libethermind_mesh_core.lib │ │ │ ├── libethermind_mesh_models.lib │ │ │ └── libethermind_utils.lib │ ├── mesh │ │ └── export │ │ │ ├── appl │ │ │ ├── appl_main.c │ │ │ ├── appl_main.h │ │ │ ├── appl_prov.c │ │ │ ├── appl_proxy.c │ │ │ └── model │ │ │ │ ├── client │ │ │ │ ├── appl_config_client.c │ │ │ │ ├── appl_config_client.h │ │ │ │ ├── appl_generic_battery_client.c │ │ │ │ ├── appl_generic_battery_client.h │ │ │ │ ├── appl_generic_default_transition_time_client.c │ │ │ │ ├── appl_generic_default_transition_time_client.h │ │ │ │ ├── appl_generic_level_client.c │ │ │ │ ├── appl_generic_level_client.h │ │ │ │ ├── appl_generic_location_client.c │ │ │ │ ├── appl_generic_location_client.h │ │ │ │ ├── appl_generic_onoff_client.c │ │ │ │ ├── appl_generic_onoff_client.h │ │ │ │ ├── appl_generic_power_level_client.c │ │ │ │ ├── appl_generic_power_level_client.h │ │ │ │ ├── appl_generic_power_onoff_client.c │ │ │ │ ├── appl_generic_power_onoff_client.h │ │ │ │ ├── appl_generic_property_client.c │ │ │ │ ├── appl_generic_property_client.h │ │ │ │ ├── appl_health_client.c │ │ │ │ ├── appl_health_client.h │ │ │ │ ├── appl_light_ctl_client.c │ │ │ │ ├── appl_light_ctl_client.h │ │ │ │ ├── appl_light_hsl_client.c │ │ │ │ ├── appl_light_hsl_client.h │ │ │ │ ├── appl_light_lc_client.c │ │ │ │ ├── appl_light_lc_client.h │ │ │ │ ├── appl_light_lightness_client.c │ │ │ │ ├── appl_light_lightness_client.h │ │ │ │ ├── appl_light_xyl_client.c │ │ │ │ ├── appl_light_xyl_client.h │ │ │ │ ├── appl_main_model_client.c │ │ │ │ ├── appl_scene_client.c │ │ │ │ ├── appl_scene_client.h │ │ │ │ ├── appl_scheduler_client.c │ │ │ │ ├── appl_scheduler_client.h │ │ │ │ ├── appl_sensor_client.c │ │ │ │ ├── appl_sensor_client.h │ │ │ │ ├── appl_time_client.c │ │ │ │ └── appl_time_client.h │ │ │ │ └── server │ │ │ │ ├── appl_main_model_server.c │ │ │ │ ├── appl_model_server_callback.c │ │ │ │ ├── appl_model_server_state_handler.c │ │ │ │ ├── appl_model_state_handler.h │ │ │ │ ├── generics │ │ │ │ ├── generic_battery_server │ │ │ │ │ ├── appl_generic_battery_server.c │ │ │ │ │ ├── appl_generic_battery_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── generic_default_transition_time_server │ │ │ │ │ ├── appl_generic_default_transition_time_server.c │ │ │ │ │ └── appl_generic_default_transition_time_server.h │ │ │ │ ├── generic_level_server │ │ │ │ │ ├── appl_generic_level_server.c │ │ │ │ │ ├── appl_generic_level_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── generic_location_server │ │ │ │ │ ├── appl_generic_location_server.c │ │ │ │ │ ├── appl_generic_location_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── generic_onoff_server │ │ │ │ │ ├── appl_generic_onoff_server.c │ │ │ │ │ ├── appl_generic_onoff_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── generic_power_level_server │ │ │ │ │ ├── appl_generic_power_level_server.c │ │ │ │ │ ├── appl_generic_power_level_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── generic_power_onoff_server │ │ │ │ │ ├── appl_generic_power_onoff_server.c │ │ │ │ │ ├── appl_generic_power_onoff_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ └── generic_property_server │ │ │ │ │ ├── appl_generic_property_server.c │ │ │ │ │ ├── appl_generic_property_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── health │ │ │ │ ├── appl_health_server.c │ │ │ │ └── appl_health_server.h │ │ │ │ ├── lighting │ │ │ │ ├── light_ctl_server │ │ │ │ │ ├── appl_light_ctl_server.c │ │ │ │ │ ├── appl_light_ctl_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── light_hsl_server │ │ │ │ │ ├── appl_light_hsl_server.c │ │ │ │ │ ├── appl_light_hsl_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── light_lc_server │ │ │ │ │ ├── appl_light_lc_server.c │ │ │ │ │ ├── appl_light_lc_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── light_lightness_server │ │ │ │ │ ├── appl_light_lightness_server.c │ │ │ │ │ ├── appl_light_lightness_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ └── light_xyl_server │ │ │ │ │ ├── appl_light_xyl_server.c │ │ │ │ │ ├── appl_light_xyl_server.h │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ └── appl_model_state_handler.h │ │ │ │ ├── sensor │ │ │ │ └── sensor_server │ │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ │ ├── appl_model_state_handler.h │ │ │ │ │ ├── appl_sensor_server.c │ │ │ │ │ └── appl_sensor_server.h │ │ │ │ └── time_and_scenes │ │ │ │ ├── scene_server │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ ├── appl_model_state_handler.h │ │ │ │ ├── appl_scene_server.c │ │ │ │ └── appl_scene_server.h │ │ │ │ ├── scheduler_server │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ ├── appl_model_state_handler.h │ │ │ │ ├── appl_scheduler_server.c │ │ │ │ └── appl_scheduler_server.h │ │ │ │ └── time_server │ │ │ │ ├── appl_model_state_handler.c │ │ │ │ ├── appl_model_state_handler.h │ │ │ │ ├── appl_time_server.c │ │ │ │ └── appl_time_server.h │ │ │ ├── bearer │ │ │ ├── blebrr.c │ │ │ ├── blebrr.h │ │ │ └── blebrr_gatt.c │ │ │ ├── cbtimer │ │ │ ├── EXT_cbtimer.c │ │ │ ├── EXT_cbtimer.h │ │ │ └── cbtimer.h │ │ │ ├── cli │ │ │ ├── cli_brr.c │ │ │ ├── cli_core.c │ │ │ ├── cli_core_network.c │ │ │ ├── cli_core_provision.c │ │ │ ├── cli_core_proxy.c │ │ │ ├── cli_core_transport.c │ │ │ ├── cli_demo.c │ │ │ ├── cli_inclusion_flags.txt │ │ │ ├── cli_main.c │ │ │ ├── cli_main.h │ │ │ ├── cli_model.c │ │ │ ├── cli_model_client.c │ │ │ ├── cli_model_server.c │ │ │ ├── cli_ps.c │ │ │ └── model │ │ │ │ └── client │ │ │ │ ├── cli_config_client.c │ │ │ │ ├── cli_config_client.h │ │ │ │ ├── cli_generic_battery_client.c │ │ │ │ ├── cli_generic_battery_client.h │ │ │ │ ├── cli_generic_default_transition_time_client.c │ │ │ │ ├── cli_generic_default_transition_time_client.h │ │ │ │ ├── cli_generic_level_client.c │ │ │ │ ├── cli_generic_level_client.h │ │ │ │ ├── cli_generic_location_client.c │ │ │ │ ├── cli_generic_location_client.h │ │ │ │ ├── cli_generic_onoff_client.c │ │ │ │ ├── cli_generic_onoff_client.h │ │ │ │ ├── cli_generic_power_level_client.c │ │ │ │ ├── cli_generic_power_level_client.h │ │ │ │ ├── cli_generic_power_onoff_client.c │ │ │ │ ├── cli_generic_power_onoff_client.h │ │ │ │ ├── cli_generic_property_client.c │ │ │ │ ├── cli_generic_property_client.h │ │ │ │ ├── cli_health_client.c │ │ │ │ ├── cli_health_client.h │ │ │ │ ├── cli_light_ctl_client.c │ │ │ │ ├── cli_light_ctl_client.h │ │ │ │ ├── cli_light_hsl_client.c │ │ │ │ ├── cli_light_hsl_client.h │ │ │ │ ├── cli_light_lc_client.c │ │ │ │ ├── cli_light_lc_client.h │ │ │ │ ├── cli_light_lightness_client.c │ │ │ │ ├── cli_light_lightness_client.h │ │ │ │ ├── cli_light_xyl_client.c │ │ │ │ ├── cli_light_xyl_client.h │ │ │ │ ├── cli_scene_client.c │ │ │ │ ├── cli_scene_client.h │ │ │ │ ├── cli_scheduler_client.c │ │ │ │ ├── cli_scheduler_client.h │ │ │ │ ├── cli_sensor_client.c │ │ │ │ ├── cli_sensor_client.h │ │ │ │ ├── cli_time_client.c │ │ │ │ └── cli_time_client.h │ │ │ ├── include │ │ │ ├── MS_access_api.h │ │ │ ├── MS_assigned_numbers.h │ │ │ ├── MS_brr_api.h │ │ │ ├── MS_common.h │ │ │ ├── MS_config_api.h │ │ │ ├── MS_error.h │ │ │ ├── MS_generic_battery_api.h │ │ │ ├── MS_generic_default_transition_time_api.h │ │ │ ├── MS_generic_level_api.h │ │ │ ├── MS_generic_location_api.h │ │ │ ├── MS_generic_onoff_api.h │ │ │ ├── MS_generic_power_level_api.h │ │ │ ├── MS_generic_power_onoff_api.h │ │ │ ├── MS_generic_property_api.h │ │ │ ├── MS_health_client_api.h │ │ │ ├── MS_health_server_api.h │ │ │ ├── MS_light_ctl_api.h │ │ │ ├── MS_light_hsl_api.h │ │ │ ├── MS_light_lc_api.h │ │ │ ├── MS_light_lightness_api.h │ │ │ ├── MS_light_xyl_api.h │ │ │ ├── MS_ltrn_api.h │ │ │ ├── MS_model_states.h │ │ │ ├── MS_net_api.h │ │ │ ├── MS_prov_api.h │ │ │ ├── MS_scene_api.h │ │ │ ├── MS_trn_api.h │ │ │ ├── MS_version.h │ │ │ ├── access_extern.h │ │ │ ├── fsm_defines.h │ │ │ ├── fsm_engine.h │ │ │ ├── ltrn_extern.h │ │ │ └── net_extern.h │ │ │ ├── phymodel │ │ │ ├── client │ │ │ │ ├── phymodel_client.c │ │ │ │ └── phymodel_client.h │ │ │ ├── phymodel_common.h │ │ │ └── server │ │ │ │ ├── phymodel_server.c │ │ │ │ └── phymodel_server.h │ │ │ ├── platforms │ │ │ └── ext │ │ │ │ ├── MS_common_pl.c │ │ │ │ ├── MS_common_pl.h │ │ │ │ ├── prov_pl.c │ │ │ │ └── prov_pl.h │ │ │ └── sample │ │ │ ├── appl_sample_example_1.c │ │ │ ├── appl_sample_example_10.c │ │ │ ├── appl_sample_example_10a.c │ │ │ ├── appl_sample_example_11.c │ │ │ ├── appl_sample_example_5.c │ │ │ ├── appl_sample_example_6.c │ │ │ ├── appl_sample_example_7.c │ │ │ ├── appl_sample_example_8.c │ │ │ ├── appl_sample_example_9.c │ │ │ └── readme.txt │ ├── osal │ │ └── src │ │ │ └── phyos │ │ │ ├── EM_assert.h │ │ │ ├── EM_debug.c │ │ │ ├── EM_debug.h │ │ │ ├── EM_debug_api.h │ │ │ ├── EM_debug_internal.h │ │ │ ├── EM_os.c │ │ │ ├── EM_os.h │ │ │ ├── EM_timer.c │ │ │ ├── EM_timer.h │ │ │ └── EM_timer_internal.h │ ├── platforms │ │ └── phy6200 │ │ │ ├── EM_platform.c │ │ │ ├── EM_platform.h │ │ │ ├── interfaces │ │ │ └── crypto │ │ │ │ ├── cry.c │ │ │ │ └── cry.h │ │ │ └── mesh │ │ │ ├── MS_features.h │ │ │ ├── MS_limits.h │ │ │ ├── blebrr_pl.c │ │ │ ├── mesh_clients.c │ │ │ ├── mesh_clients.h │ │ │ ├── mesh_services.c │ │ │ ├── mesh_services.h │ │ │ ├── model_state_handler_pl.c │ │ │ └── model_state_handler_pl.h │ └── utils │ │ └── include │ │ ├── ARMCM0.h │ │ ├── aes_cmac.h │ │ ├── aes_cmac_pl.h │ │ ├── ap_cp.h │ │ ├── apbin.h │ │ ├── bitarray.h │ │ ├── btypes.h │ │ ├── burn.h │ │ ├── cliface.h │ │ ├── core_cm0.h │ │ ├── core_cmFunc.h │ │ ├── core_cmInstr.h │ │ ├── cpbin.h │ │ ├── crypto.h │ │ ├── ecdh.h │ │ ├── global_config.h │ │ ├── gpio.h │ │ ├── hal.h │ │ ├── jump_function.h │ │ ├── mpal.h │ │ ├── nvs.h │ │ ├── nvsto.h │ │ ├── rf_phy_driver.h │ │ ├── system_ARMCM0.h │ │ ├── timer.h │ │ └── types.h ├── inc │ ├── ap_cp.h │ ├── apbin.h │ ├── burn.h │ ├── cpbin.h │ ├── global_config.h │ ├── hal.h │ ├── jump_function.h │ ├── rf_phy_driver.h │ ├── timer.h │ └── types.h ├── libraries │ ├── cliface │ │ ├── cliface.c │ │ └── cliface.h │ ├── console │ │ ├── phy_console.c │ │ └── phy_console.h │ ├── crc16 │ │ ├── crc16.c │ │ └── crc16.h │ ├── datetime │ │ ├── app_datetime.c │ │ └── app_datetime.h │ ├── fs │ │ ├── fs.c │ │ ├── fs.h │ │ ├── fs_test.c │ │ └── fs_test.h │ └── tinycrypt-0.2.8 │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README │ │ ├── VERSION │ │ ├── config.mk │ │ ├── documentation │ │ └── tinycrypt.rst │ │ ├── lib │ │ ├── Makefile │ │ ├── include │ │ │ └── tinycrypt │ │ │ │ ├── aes.h │ │ │ │ ├── cbc_mode.h │ │ │ │ ├── ccm_mode.h │ │ │ │ ├── cmac_mode.h │ │ │ │ ├── constants.h │ │ │ │ ├── ctr_mode.h │ │ │ │ ├── ctr_prng.h │ │ │ │ ├── ecc.h │ │ │ │ ├── ecc_dh.h │ │ │ │ ├── ecc_dsa.h │ │ │ │ ├── ecc_platform_specific.h │ │ │ │ ├── hmac.h │ │ │ │ ├── hmac_prng.h │ │ │ │ ├── sha256.h │ │ │ │ └── utils.h │ │ └── source │ │ │ ├── aes_decrypt.c │ │ │ ├── aes_encrypt.c │ │ │ ├── cbc_mode.c │ │ │ ├── ccm_mode.c │ │ │ ├── cmac_mode.c │ │ │ ├── ctr_mode.c │ │ │ ├── ctr_prng.c │ │ │ ├── ecc.c │ │ │ ├── ecc_dh.c │ │ │ ├── ecc_dsa.c │ │ │ ├── ecc_platform_specific.c │ │ │ ├── hmac.c │ │ │ ├── hmac_prng.c │ │ │ ├── sha256.c │ │ │ └── utils.c │ │ └── tests │ │ ├── Makefile │ │ ├── include │ │ ├── test_ecc_utils.h │ │ └── test_utils.h │ │ ├── test_aes.c │ │ ├── test_cbc_mode.c │ │ ├── test_ccm_mode.c │ │ ├── test_cmac_mode.c │ │ ├── test_ctr_mode.c │ │ ├── test_ctr_prng.c │ │ ├── test_ecc_dh.c │ │ ├── test_ecc_dsa.c │ │ ├── test_ecc_utils.c │ │ ├── test_hmac.c │ │ ├── test_hmac_prng.c │ │ └── test_sha256.c ├── osal │ ├── include │ │ ├── OSAL.h │ │ ├── OSAL_Clock.h │ │ ├── OSAL_Memory.h │ │ ├── OSAL_Nv.h │ │ ├── OSAL_PwrMgr.h │ │ ├── OSAL_Tasks.h │ │ ├── OSAL_Timers.h │ │ ├── comdef.h │ │ ├── osal_bufmgr.h │ │ ├── osal_cbtimer.h │ │ └── osal_snv.h │ ├── jump_table.c │ └── snv │ │ └── osal_snv.c └── profiles │ ├── AudioProfile │ ├── AudioGATTprofile.c │ └── AudioGATTprofile.h │ ├── Batt │ ├── battservice.c │ └── battservice.h │ ├── DevInfo │ ├── devinfoservice.c │ └── devinfoservice.h │ ├── GATT │ └── gattservapp.c │ ├── HID │ ├── hiddev.c │ ├── hiddev.h │ ├── hidkbdservice.c │ └── hidkbdservice.h │ ├── HIDVoice │ ├── hiddev.c │ ├── hiddev.h │ ├── hidkbdservice.c │ └── hidkbdservice.h │ ├── Keys │ ├── simplekeys.c │ └── simplekeys.h │ ├── Roles │ ├── broadcaster.c │ ├── broadcaster.h │ ├── central.c │ ├── central.h │ ├── gap.c │ ├── gapbondmgr.c │ ├── gapbondmgr.h │ ├── gapgattserver.c │ ├── observer.c │ ├── observer.h │ ├── peripheral.c │ ├── peripheral.h │ ├── peripheralBroadcaster.c │ └── peripheralBroadcaster.h │ ├── ScanParam │ ├── scanparamservice.c │ └── scanparamservice.h │ ├── SimpleProfile │ ├── simpleGATTprofile_ota.c │ └── simpleGATTprofile_ota.h │ ├── aliGenie │ ├── ali_genie_profile.c │ └── ali_genie_profile.h │ ├── ancs │ ├── ancs_attr.c │ ├── ancs_attr.h │ ├── ble_ancs.c │ └── ble_ancs.h │ ├── hrs │ ├── heartrateservice.c │ └── heartrateservice.h │ ├── ota │ ├── ota_flash.c │ ├── ota_flash.h │ ├── ota_flash_mesh.c │ ├── ota_flash_mesh.h │ ├── ota_protocol.c │ ├── ota_protocol.h │ ├── ota_service.c │ ├── ota_service.h │ ├── otam_protocol.c │ └── otam_protocol.h │ ├── ota_app │ ├── ota_app_service.c │ └── ota_app_service.h │ └── ppsp │ ├── core_queu.c │ ├── core_queu.h │ ├── list_slst.c │ ├── list_slst.h │ ├── ppsp_impl.c │ ├── ppsp_impl.h │ ├── ppsp_serv.c │ └── ppsp_serv.h ├── example ├── OTA │ ├── OTA_internal_flash │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_ota.c │ │ │ ├── main.c │ │ │ ├── ota.c │ │ │ ├── ota.h │ │ │ └── ota_Main.c │ │ ├── bin │ │ │ ├── OTA_APP_LOADER │ │ │ ├── OTA_LARGE_HEAP │ │ │ ├── OTA_SECTOR │ │ │ ├── ota.hex │ │ │ ├── ota_dualbank_hasFCT.hex │ │ │ ├── ota_dualbank_noFCT.hex │ │ │ ├── ota_singlebank_hasFCT.hex │ │ │ └── ota_singlebank_noFCT.hex │ │ ├── ota_if.uvprojx │ │ ├── ram.ini │ │ └── scatter_load.sct │ ├── OTA_master │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_otaMaster.c │ │ │ ├── app_err.h │ │ │ ├── main.c │ │ │ ├── ota_master.c │ │ │ ├── ota_master.h │ │ │ ├── ota_master_Main.c │ │ │ ├── otam_1clk_ota.c │ │ │ ├── otam_1clk_ota.h │ │ │ ├── otam_cmd.c │ │ │ ├── otam_cmd.h │ │ │ ├── otam_protocol.c │ │ │ ├── otam_protocol.h │ │ │ ├── touch_key.c │ │ │ ├── touch_key.h │ │ │ └── ui │ │ │ │ ├── lcd_allvision.c │ │ │ │ ├── lcd_allvision.h │ │ │ │ ├── res_tab.h │ │ │ │ ├── res_tab_128x32.c │ │ │ │ ├── ui_128x32.c │ │ │ │ ├── ui_128x32_normal.c │ │ │ │ ├── ui_disp_substance.h │ │ │ │ ├── ui_display.c │ │ │ │ ├── ui_display.h │ │ │ │ ├── ui_page.c │ │ │ │ ├── ui_page.h │ │ │ │ ├── ui_task.c │ │ │ │ └── ui_task.h │ │ ├── otam.uvprojx │ │ ├── otam_fw.py │ │ ├── ram.ini │ │ └── scatter_load.sct │ ├── OTA_upgrade_2ndboot │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_otaupgrade.c │ │ │ ├── main.c │ │ │ ├── otaboot_hex.c │ │ │ ├── otaboot_hex.py │ │ │ ├── otaupgrade.c │ │ │ ├── otaupgrade.h │ │ │ └── otaupgrade_Main.c │ │ ├── ota_upgrade.uvprojx │ │ ├── ram.ini │ │ └── scatter_load.sct │ └── uart_ext_flash │ │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ ├── RTE_Components.h │ │ └── _uart_ext_flash │ │ │ └── RTE_Components.h │ │ ├── Source │ │ ├── OSAL_uart_extf.c │ │ ├── main.c │ │ ├── spi_flash_drv.c │ │ ├── spi_flash_drv.h │ │ ├── uart_extf.c │ │ ├── uart_extf.h │ │ ├── uart_extf_Main.c │ │ ├── uart_extf_cmd.c │ │ └── uart_extf_cmd.h │ │ ├── ram.ini │ │ ├── scatter_load.sct │ │ └── uart_ext_flash.uvprojx ├── ble_central │ └── simpleBleCentral │ │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ │ ├── Source │ │ ├── OSAL_simpleBLECentral.c │ │ ├── main.c │ │ ├── simpleBLECentral.c │ │ ├── simpleBLECentral.h │ │ └── simpleBLECentral_Main.c │ │ ├── ram.ini │ │ ├── scatter_load.sct │ │ └── simpleBleCentral.uvprojx ├── ble_mesh │ ├── aliGenie_bleMesh │ │ ├── aliGenie_bleMesh │ │ │ ├── aliGenie_appl_common.c │ │ │ ├── appl_base │ │ │ │ ├── aliGenie_OSAL_bleMesh.c │ │ │ │ ├── aliGenie_appl_Prov.c │ │ │ │ ├── aliGenie_appl_Proxy.c │ │ │ │ ├── aliGenie_appl_node_mng.c │ │ │ │ ├── aliGenie_bleMesh.c │ │ │ │ ├── aliGenie_bleMesh_Main.c │ │ │ │ ├── aliGenie_blebrr.c │ │ │ │ └── appl_utils.c │ │ │ ├── include │ │ │ │ ├── aliGenie_appl_Generic.h │ │ │ │ ├── aliGenie_appl_Light.h │ │ │ │ ├── aliGenie_appl_Prov.h │ │ │ │ ├── aliGenie_appl_Proxy.h │ │ │ │ ├── aliGenie_appl_Vendor.h │ │ │ │ ├── aliGenie_appl_node_mng.h │ │ │ │ ├── aliGenie_bleMesh.h │ │ │ │ └── appl_utils.h │ │ │ ├── libs │ │ │ │ ├── lib_light.c │ │ │ │ └── lib_light.h │ │ │ ├── model_generic │ │ │ │ ├── aliGenie_appl_Generic_OnOff.c │ │ │ │ └── aliGenie_appl_Generic_Scene.c │ │ │ ├── model_light │ │ │ │ ├── aliGenie_appl_Light_Ctl.c │ │ │ │ ├── aliGenie_appl_Light_HSL.c │ │ │ │ └── aliGenie_appl_Light_Lightness.c │ │ │ └── model_vendor │ │ │ │ └── aliGenie_appl_Vendor.c │ │ ├── aliGenie_bleMesh_3KeySwitch │ │ │ ├── RTE │ │ │ │ ├── Device │ │ │ │ │ └── ARMCM0 │ │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ │ └── system_ARMCM0.c │ │ │ │ ├── RTE_Components.h │ │ │ │ └── _Target_1 │ │ │ │ │ └── RTE_Components.h │ │ │ ├── aliGenie_mesh_3Keyswitch.uvprojx │ │ │ ├── clean.bat │ │ │ ├── ram.ini │ │ │ ├── scatter_load.sct │ │ │ └── source │ │ │ │ ├── aliGenie_appl.c │ │ │ │ ├── aliGenie_appl_.c │ │ │ │ ├── aliGenie_appl_3keyswitch.c │ │ │ │ ├── appl_hard │ │ │ │ └── aliGenie_led_light.c │ │ │ │ ├── bleMesh.c │ │ │ │ ├── bleMesh.h │ │ │ │ ├── bleMesh_Main.c │ │ │ │ ├── include │ │ │ │ ├── aliGenie_appl.h │ │ │ │ ├── aliGenie_appl_Vendor_fan.h │ │ │ │ ├── aliGenie_appl_Vendor_fanlight.h │ │ │ │ ├── aliGenie_appl_Vendor_fogger.h │ │ │ │ ├── aliGenie_appl_Vendor_heater.h │ │ │ │ ├── aliGenie_appl_Vendor_light.h │ │ │ │ └── aliGenie_led_light.h │ │ │ │ ├── jump_table.c │ │ │ │ ├── led_light.c │ │ │ │ ├── led_light.h │ │ │ │ ├── main.c │ │ │ │ └── model_vendor │ │ │ │ ├── aliGenie_appl_Vendor_3keyswitch.c │ │ │ │ └── aliGenie_appl_Vendor_indications.c │ │ ├── aliGenie_bleMesh_curtain │ │ │ ├── RTE │ │ │ │ ├── Device │ │ │ │ │ └── ARMCM0 │ │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ │ └── system_ARMCM0.c │ │ │ │ ├── RTE_Components.h │ │ │ │ └── _Target_1 │ │ │ │ │ └── RTE_Components.h │ │ │ ├── aliGenie_mesh_curtain.uvprojx │ │ │ ├── clean.bat │ │ │ ├── ram.ini │ │ │ ├── scatter_load.sct │ │ │ └── source │ │ │ │ ├── aliGenie_appl.c │ │ │ │ ├── aliGenie_appl_.c │ │ │ │ ├── aliGenie_appl_curtain.c │ │ │ │ ├── aliGenie_appl_light.c │ │ │ │ ├── appl_hard │ │ │ │ └── aliGenie_led_light.c │ │ │ │ ├── bleMesh.c │ │ │ │ ├── bleMesh.h │ │ │ │ ├── bleMesh_Main.c │ │ │ │ ├── include │ │ │ │ ├── aliGenie_appl.h │ │ │ │ ├── aliGenie_appl_Vendor_fan.h │ │ │ │ ├── aliGenie_appl_Vendor_fanlight.h │ │ │ │ ├── aliGenie_appl_Vendor_fogger.h │ │ │ │ ├── aliGenie_appl_Vendor_heater.h │ │ │ │ ├── aliGenie_appl_Vendor_light.h │ │ │ │ └── aliGenie_led_light.h │ │ │ │ ├── jump_table.c │ │ │ │ ├── led_light.c │ │ │ │ ├── led_light.h │ │ │ │ ├── main.c │ │ │ │ └── model_vendor │ │ │ │ ├── aliGenie_appl_Vendor_Curtain.c │ │ │ │ ├── aliGenie_appl_Vendor_indications.c │ │ │ │ └── aliGenie_appl_Vendor_light.c │ │ ├── aliGenie_bleMesh_fan │ │ │ ├── RTE │ │ │ │ ├── Device │ │ │ │ │ └── ARMCM0 │ │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ │ └── system_ARMCM0.c │ │ │ │ ├── RTE_Components.h │ │ │ │ └── _Target_1 │ │ │ │ │ └── RTE_Components.h │ │ │ ├── aliGenie_mesh_fan.uvprojx │ │ │ ├── clean.bat │ │ │ ├── ram.ini │ │ │ ├── scatter_load.sct │ │ │ └── source │ │ │ │ ├── aliGenie_appl.c │ │ │ │ ├── aliGenie_appl_.c │ │ │ │ ├── aliGenie_appl_fan.c │ │ │ │ ├── aliGenie_appl_light.c │ │ │ │ ├── appl_hard │ │ │ │ └── aliGenie_led_light.c │ │ │ │ ├── bleMesh.c │ │ │ │ ├── bleMesh.h │ │ │ │ ├── bleMesh_Main.c │ │ │ │ ├── include │ │ │ │ ├── aliGenie_appl.h │ │ │ │ ├── aliGenie_appl_Vendor_fan.h │ │ │ │ ├── aliGenie_appl_Vendor_fanlight.h │ │ │ │ ├── aliGenie_appl_Vendor_fogger.h │ │ │ │ ├── aliGenie_appl_Vendor_heater.h │ │ │ │ ├── aliGenie_appl_Vendor_light.h │ │ │ │ └── aliGenie_led_light.h │ │ │ │ ├── jump_table.c │ │ │ │ ├── led_light.c │ │ │ │ ├── led_light.h │ │ │ │ ├── main.c │ │ │ │ └── model_vendor │ │ │ │ ├── aliGenie_appl_Vendor_WirelessButton.c │ │ │ │ ├── aliGenie_appl_Vendor_fan.c │ │ │ │ ├── aliGenie_appl_Vendor_indications.c │ │ │ │ └── aliGenie_appl_Vendor_light.c │ │ ├── aliGenie_bleMesh_fanlight │ │ │ ├── RTE │ │ │ │ ├── Device │ │ │ │ │ └── ARMCM0 │ │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ │ └── system_ARMCM0.c │ │ │ │ ├── RTE_Components.h │ │ │ │ └── _Target_1 │ │ │ │ │ └── RTE_Components.h │ │ │ ├── aliGenie_mesh_fanlight.uvprojx │ │ │ ├── clean.bat │ │ │ ├── ram.ini │ │ │ ├── scatter_load.sct │ │ │ └── source │ │ │ │ ├── aliGenie_appl.c │ │ │ │ ├── aliGenie_appl_.c │ │ │ │ ├── aliGenie_appl_fan.c │ │ │ │ ├── aliGenie_appl_fanlight.c │ │ │ │ ├── aliGenie_appl_light.c │ │ │ │ ├── appl_hard │ │ │ │ └── aliGenie_led_light.c │ │ │ │ ├── bleMesh.c │ │ │ │ ├── bleMesh.h │ │ │ │ ├── bleMesh_Main.c │ │ │ │ ├── include │ │ │ │ ├── aliGenie_appl.h │ │ │ │ ├── aliGenie_appl_Vendor_fan.h │ │ │ │ ├── aliGenie_appl_Vendor_fanlight.h │ │ │ │ ├── aliGenie_appl_Vendor_fogger.h │ │ │ │ ├── aliGenie_appl_Vendor_heater.h │ │ │ │ ├── aliGenie_appl_Vendor_light.h │ │ │ │ └── aliGenie_led_light.h │ │ │ │ ├── jump_table.c │ │ │ │ ├── led_light.c │ │ │ │ ├── led_light.h │ │ │ │ ├── main.c │ │ │ │ └── model_vendor │ │ │ │ ├── aliGenie_appl_Vendor_fan.c │ │ │ │ ├── aliGenie_appl_Vendor_fanlight.c │ │ │ │ ├── aliGenie_appl_Vendor_indications.c │ │ │ │ └── aliGenie_appl_Vendor_light.c │ │ ├── aliGenie_bleMesh_fogger │ │ │ ├── RTE │ │ │ │ ├── Device │ │ │ │ │ └── ARMCM0 │ │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ │ └── system_ARMCM0.c │ │ │ │ ├── RTE_Components.h │ │ │ │ └── _Target_1 │ │ │ │ │ └── RTE_Components.h │ │ │ ├── aliGenie_mesh_fogger.uvprojx │ │ │ ├── clean.bat │ │ │ ├── ram.ini │ │ │ ├── scatter_load.sct │ │ │ └── source │ │ │ │ ├── aliGenie_appl.c │ │ │ │ ├── aliGenie_appl_.c │ │ │ │ ├── aliGenie_appl_fogger.c │ │ │ │ ├── aliGenie_appl_light.c │ │ │ │ ├── appl_hard │ │ │ │ └── aliGenie_led_light.c │ │ │ │ ├── bleMesh.c │ │ │ │ ├── bleMesh.h │ │ │ │ ├── bleMesh_Main.c │ │ │ │ ├── include │ │ │ │ ├── aliGenie_appl.h │ │ │ │ ├── aliGenie_appl_Vendor_fan.h │ │ │ │ ├── aliGenie_appl_Vendor_fanlight.h │ │ │ │ ├── aliGenie_appl_Vendor_fogger.h │ │ │ │ ├── aliGenie_appl_Vendor_heater.h │ │ │ │ ├── aliGenie_appl_Vendor_light.h │ │ │ │ └── aliGenie_led_light.h │ │ │ │ ├── jump_table.c │ │ │ │ ├── led_light.c │ │ │ │ ├── led_light.h │ │ │ │ ├── main.c │ │ │ │ └── model_vendor │ │ │ │ ├── aliGenie_appl_Vendor_fogger.c │ │ │ │ ├── aliGenie_appl_Vendor_indications.c │ │ │ │ └── aliGenie_appl_Vendor_light.c │ │ ├── aliGenie_bleMesh_heater │ │ │ ├── RTE │ │ │ │ ├── Device │ │ │ │ │ └── ARMCM0 │ │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ │ └── system_ARMCM0.c │ │ │ │ ├── RTE_Components.h │ │ │ │ └── _Target_1 │ │ │ │ │ └── RTE_Components.h │ │ │ ├── aliGenie_mesh_heater.uvprojx │ │ │ ├── clean.bat │ │ │ ├── ram.ini │ │ │ ├── scatter_load.sct │ │ │ └── source │ │ │ │ ├── aliGenie_appl.c │ │ │ │ ├── aliGenie_appl_.c │ │ │ │ ├── aliGenie_appl_heater.c │ │ │ │ ├── aliGenie_appl_light.c │ │ │ │ ├── appl_hard │ │ │ │ └── aliGenie_led_light.c │ │ │ │ ├── bleMesh.c │ │ │ │ ├── bleMesh.h │ │ │ │ ├── bleMesh_Main.c │ │ │ │ ├── include │ │ │ │ ├── aliGenie_appl.h │ │ │ │ ├── aliGenie_appl_Vendor_fan.h │ │ │ │ ├── aliGenie_appl_Vendor_fanlight.h │ │ │ │ ├── aliGenie_appl_Vendor_fogger.h │ │ │ │ ├── aliGenie_appl_Vendor_heater.h │ │ │ │ ├── aliGenie_appl_Vendor_light.h │ │ │ │ └── aliGenie_led_light.h │ │ │ │ ├── jump_table.c │ │ │ │ ├── led_light.c │ │ │ │ ├── led_light.h │ │ │ │ ├── main.c │ │ │ │ └── model_vendor │ │ │ │ ├── aliGenie_appl_Vendor_heater.c │ │ │ │ ├── aliGenie_appl_Vendor_indications.c │ │ │ │ └── aliGenie_appl_Vendor_light.c │ │ ├── aliGenie_bleMesh_light │ │ │ ├── RTE │ │ │ │ ├── Device │ │ │ │ │ └── ARMCM0 │ │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ │ └── system_ARMCM0.c │ │ │ │ ├── RTE_Components.h │ │ │ │ └── _Target_1 │ │ │ │ │ └── RTE_Components.h │ │ │ ├── aliGenie_mesh_light.uvprojx │ │ │ ├── clean.bat │ │ │ ├── ram.ini │ │ │ ├── scatter_load.sct │ │ │ └── source │ │ │ │ ├── aliGenie_appl.c │ │ │ │ ├── aliGenie_appl_.c │ │ │ │ ├── aliGenie_appl_light.c │ │ │ │ ├── appl_hard │ │ │ │ └── aliGenie_led_light.c │ │ │ │ ├── bleMesh.c │ │ │ │ ├── bleMesh.h │ │ │ │ ├── bleMesh_Main.c │ │ │ │ ├── include │ │ │ │ ├── aliGenie_appl.h │ │ │ │ ├── aliGenie_appl_Vendor_fan.h │ │ │ │ ├── aliGenie_appl_Vendor_fanlight.h │ │ │ │ ├── aliGenie_appl_Vendor_fogger.h │ │ │ │ ├── aliGenie_appl_Vendor_heater.h │ │ │ │ ├── aliGenie_appl_Vendor_light.h │ │ │ │ └── aliGenie_led_light.h │ │ │ │ ├── jump_table.c │ │ │ │ ├── led_light.c │ │ │ │ ├── led_light.h │ │ │ │ ├── main.c │ │ │ │ └── model_vendor │ │ │ │ ├── aliGenie_appl_Vendor_indications.c │ │ │ │ └── aliGenie_appl_Vendor_light.c │ │ ├── aliGenie_bleMesh_socket │ │ │ ├── RTE │ │ │ │ ├── Device │ │ │ │ │ └── ARMCM0 │ │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ │ └── system_ARMCM0.c │ │ │ │ ├── RTE_Components.h │ │ │ │ └── _Target_1 │ │ │ │ │ └── RTE_Components.h │ │ │ ├── aliGenie_mesh_socket.uvprojx │ │ │ ├── clean.bat │ │ │ ├── ram.ini │ │ │ ├── scatter_load.sct │ │ │ └── source │ │ │ │ ├── aliGenie_appl.c │ │ │ │ ├── aliGenie_appl_.c │ │ │ │ ├── aliGenie_appl_3keyswitch.c │ │ │ │ ├── aliGenie_appl_socket.c │ │ │ │ ├── appl_hard │ │ │ │ └── aliGenie_led_light.c │ │ │ │ ├── bleMesh.c │ │ │ │ ├── bleMesh.h │ │ │ │ ├── bleMesh_Main.c │ │ │ │ ├── include │ │ │ │ ├── aliGenie_appl.h │ │ │ │ ├── aliGenie_appl_Vendor_fan.h │ │ │ │ ├── aliGenie_appl_Vendor_fanlight.h │ │ │ │ ├── aliGenie_appl_Vendor_fogger.h │ │ │ │ ├── aliGenie_appl_Vendor_heater.h │ │ │ │ ├── aliGenie_appl_Vendor_light.h │ │ │ │ └── aliGenie_led_light.h │ │ │ │ ├── jump_table.c │ │ │ │ ├── led_light.c │ │ │ │ ├── led_light.h │ │ │ │ ├── main.c │ │ │ │ └── model_vendor │ │ │ │ ├── aliGenie_appl_Vendor_indications.c │ │ │ │ └── aliGenie_appl_Vendor_socket.c │ │ ├── clean.bat │ │ ├── ram.ini │ │ └── scatter_load.sct │ ├── mesh_gateway │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ ├── RTE_Components.h │ │ │ └── _Target_1 │ │ │ │ └── RTE_Components.h │ │ ├── mesh_gateway.uvprojx │ │ ├── ram.ini │ │ ├── scatter_load.sct │ │ └── source │ │ │ ├── bleMesh │ │ │ ├── OSAL_bleMesh.c │ │ │ ├── appl_sample_mesh_gateway.c │ │ │ ├── bleMesh.c │ │ │ ├── bleMesh.h │ │ │ ├── bleMesh_Main.c │ │ │ ├── dongleKey.c │ │ │ ├── dongleKey.h │ │ │ ├── led_light.c │ │ │ └── led_light.h │ │ │ ├── jump_table.c │ │ │ └── main.c │ ├── mesh_light │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ ├── RTE_Components.h │ │ │ └── _Target_1 │ │ │ │ └── RTE_Components.h │ │ ├── mesh_light.uvprojx │ │ ├── ram.ini │ │ ├── scatter_load.sct │ │ └── source │ │ │ ├── bleMesh │ │ │ ├── OSAL_bleMesh.c │ │ │ ├── appl_sample_example_phylight.c │ │ │ ├── bleMesh.c │ │ │ ├── bleMesh.h │ │ │ ├── bleMesh_Main.c │ │ │ ├── cli_vendor.c │ │ │ ├── cli_vendor.h │ │ │ ├── led_light.c │ │ │ └── led_light.h │ │ │ ├── jump_table.c │ │ │ └── main.c │ ├── mesh_lpn │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── mesh_lpn.uvprojx │ │ ├── ram.ini │ │ ├── scatter_load.sct │ │ └── source │ │ │ ├── bleMesh │ │ │ ├── OSAL_bleMesh.c │ │ │ ├── appl_sample_mesh_lpn.c │ │ │ ├── bleMesh.c │ │ │ ├── bleMesh.h │ │ │ ├── bleMesh_Main.c │ │ │ ├── dongleKey.c │ │ │ ├── dongleKey.h │ │ │ ├── led_light.c │ │ │ └── led_light.h │ │ │ ├── jump_table.c │ │ │ └── main.c │ ├── mesh_sensor │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ ├── RTE_Components.h │ │ │ └── _Target_1 │ │ │ │ └── RTE_Components.h │ │ ├── mesh_sensor.uvprojx │ │ ├── ram.ini │ │ ├── scatter_load.sct │ │ └── source │ │ │ ├── CHT8305 │ │ │ ├── CHT8305_sensor.c │ │ │ ├── CHT8305_sensor.h │ │ │ ├── sensorMonitor_task.c │ │ │ └── sensorMonitor_task.h │ │ │ ├── SensorModel │ │ │ ├── not use │ │ │ │ ├── sensor_server.c │ │ │ │ └── sensor_server.h │ │ │ ├── sensor_server.c │ │ │ └── sensor_server.h │ │ │ ├── bleMesh │ │ │ ├── OSAL_bleMesh.c │ │ │ ├── appl_sample_mesh_sensor.c │ │ │ ├── bleMesh.c │ │ │ ├── bleMesh.h │ │ │ ├── bleMesh_Main.c │ │ │ ├── dongleKey.c │ │ │ ├── dongleKey.h │ │ │ ├── led_light.c │ │ │ └── led_light.h │ │ │ ├── jump_table.c │ │ │ └── main.c │ └── mesh_switch │ │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ │ ├── mesh_switch.uvprojx │ │ ├── ram.ini │ │ ├── scatter_load.sct │ │ └── source │ │ ├── bleMesh │ │ ├── OSAL_bleMesh.c │ │ ├── appl_sample_mesh_switch.c │ │ ├── bleMesh.c │ │ ├── bleMesh.h │ │ ├── bleMesh_Main.c │ │ ├── dongleKey.c │ │ ├── dongleKey.h │ │ ├── hal_keyboard_matrix.c │ │ ├── hal_keyboard_matrix.h │ │ ├── led_light.c │ │ └── led_light.h │ │ ├── jump_table.c │ │ └── main.c ├── ble_multi │ ├── README.txt │ ├── multiRole.eddx │ └── simpleBleMultiConnection │ │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ ├── RTE_Components.h │ │ └── _Target_1 │ │ │ └── RTE_Components.h │ │ ├── main.c │ │ ├── ram.ini │ │ ├── rom1Sym.txt │ │ ├── scatter_load.sct │ │ ├── simpleBleMulti.uvprojx │ │ ├── source │ │ └── multi_role │ │ │ ├── OSAL_multi_role.c │ │ │ ├── battservice.c │ │ │ ├── battservice.h │ │ │ ├── devinfoservice.c │ │ │ ├── gapbondmgr.c │ │ │ ├── gapgattserver.c │ │ │ ├── gattservapp.c │ │ │ ├── hiddev.c │ │ │ ├── hiddev.h │ │ │ ├── hidkbdservice.c │ │ │ ├── hidkbdservice.h │ │ │ ├── multi.c │ │ │ ├── multi.h │ │ │ ├── multiRoleProfile.c │ │ │ ├── multiRoleProfile.h │ │ │ ├── multiRole_gap.c │ │ │ ├── multi_role.c │ │ │ ├── multi_role.h │ │ │ ├── multi_role_Main.c │ │ │ ├── ppsp_impl.c │ │ │ ├── ppsp_serv.c │ │ │ ├── slboot.c │ │ │ ├── slboot.h │ │ │ ├── slboot_Main.c │ │ │ ├── spi_flash_drv.c │ │ │ ├── spi_flash_drv.h │ │ │ ├── uart_extf_cmd.c │ │ │ └── uart_extf_cmd.h │ │ └── sscom.ini ├── ble_peripheral │ ├── HIDAdvRemote │ │ ├── HIDAdvRemote.uvprojx │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_hidkbd.c │ │ │ ├── Voice_Queue.c │ │ │ ├── Voice_Queue.h │ │ │ ├── adpcm.c │ │ │ ├── adpcm.h │ │ │ ├── hal_drivers.c │ │ │ ├── hal_drivers.h │ │ │ ├── hal_keyboard_matrix.c │ │ │ ├── hal_keyboard_matrix.h │ │ │ ├── hidkbd.c │ │ │ ├── hidkbd.h │ │ │ ├── hidkbd_Main.c │ │ │ ├── main.c │ │ │ ├── voice_circ_buff.c │ │ │ ├── voice_circ_buff.h │ │ │ ├── voice_data.c │ │ │ ├── voice_data.h │ │ │ ├── voice_task.c │ │ │ └── voice_task.h │ │ ├── ram.ini │ │ └── scatter_load.sct │ ├── HIDKeyboard │ │ ├── HRDKbd.uvprojx │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_hidkbd.c │ │ │ ├── hidkbd.c │ │ │ ├── hidkbd.h │ │ │ ├── hidkbd_Main.c │ │ │ ├── main.c │ │ │ ├── touch_key.c │ │ │ └── touch_key.h │ │ ├── ram.ini │ │ └── scatter_load.sct │ ├── XIPDemo │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_wrist.c │ │ │ ├── app_err.h │ │ │ ├── app_wrist.c │ │ │ ├── app_wrist.h │ │ │ ├── ble │ │ │ │ ├── wristservice.c │ │ │ │ └── wristservice.h │ │ │ ├── led_light.c │ │ │ ├── led_light.h │ │ │ ├── main.c │ │ │ └── wrist_Main.c │ │ ├── pwmLightXIP.uvprojx │ │ ├── ram.ini │ │ └── scatter_load.sct │ ├── ancs │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_ancs.c │ │ │ ├── ancs_Main.c │ │ │ ├── ancs_app.c │ │ │ ├── ancs_app.h │ │ │ └── main.c │ │ ├── ancs.uvprojx │ │ ├── ram.ini │ │ └── scatter_load.sct │ ├── bleUart_AT │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_bleuart.c │ │ │ ├── bleuart.c │ │ │ ├── bleuart.h │ │ │ ├── bleuart_Main.c │ │ │ ├── bleuart_at_cmd.c │ │ │ ├── bleuart_at_cmd.h │ │ │ ├── bleuart_protocol.c │ │ │ ├── bleuart_protocol.h │ │ │ ├── bleuart_service.c │ │ │ ├── bleuart_service.h │ │ │ ├── led.c │ │ │ ├── led.h │ │ │ ├── main.c │ │ │ ├── peripheral.c │ │ │ └── peripheral.h │ │ ├── ble_uart_at.uvprojx │ │ ├── ram.ini │ │ └── scatter_load.sct │ ├── pwmLight │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_wrist.c │ │ │ ├── app_err.h │ │ │ ├── app_wrist.c │ │ │ ├── app_wrist.h │ │ │ ├── ble │ │ │ │ ├── wristservice.c │ │ │ │ └── wristservice.h │ │ │ ├── led_light.c │ │ │ ├── led_light.h │ │ │ ├── main.c │ │ │ └── wrist_Main.c │ │ ├── pwmLight.uvprojx │ │ ├── ram.ini │ │ └── scatter_load.sct │ ├── simpleBlePeripheral │ │ ├── RTE │ │ │ ├── Device │ │ │ │ └── ARMCM0 │ │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ │ └── system_ARMCM0.c │ │ │ ├── RTE_Components.h │ │ │ └── _SBP_Sample │ │ │ │ └── RTE_Components.h │ │ ├── Source │ │ │ ├── OSAL_SimpleBLEPeripheral.c │ │ │ ├── SimpleBLEPeripheral_Main.c │ │ │ ├── main.c │ │ │ ├── sbpProfile_ota.c │ │ │ ├── sbpProfile_ota.h │ │ │ ├── simpleBLEPeripheral.c │ │ │ └── simpleBLEPeripheral.h │ │ ├── ram.ini │ │ ├── scatter_load.sct │ │ └── simpleBlePeripheral.uvprojx │ └── wrist │ │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ │ ├── Source │ │ ├── KX023.c │ │ ├── KX023.h │ │ ├── OSAL_wrist.c │ │ ├── app_err.h │ │ ├── app_wrist.c │ │ ├── app_wrist.h │ │ ├── battery.c │ │ ├── battery.h │ │ ├── ble │ │ │ ├── wristservice.c │ │ │ └── wristservice.h │ │ ├── epticore │ │ │ ├── M0StaticLib.lib │ │ │ ├── em70xx.c │ │ │ └── em70xx.h │ │ ├── led_light.c │ │ ├── led_light.h │ │ ├── main.c │ │ ├── touch_key.c │ │ ├── touch_key.h │ │ ├── ui │ │ │ ├── dl_oled.h │ │ │ ├── lcd_TFT.c │ │ │ ├── lcd_TFT.h │ │ │ ├── lcd_allvision.c │ │ │ ├── lcd_allvision.h │ │ │ ├── res_tab.h │ │ │ ├── res_tab_128x32.c │ │ │ ├── ui_128x32.c │ │ │ ├── ui_128x32_normal.c │ │ │ ├── ui_160x80_TFT.c │ │ │ ├── ui_dispTFT.c │ │ │ ├── ui_dispTFT.h │ │ │ ├── ui_disp_substance.h │ │ │ ├── ui_display.c │ │ │ ├── ui_display.h │ │ │ ├── ui_page.c │ │ │ ├── ui_page.h │ │ │ ├── ui_task.c │ │ │ └── ui_task.h │ │ └── wrist_Main.c │ │ ├── ram.ini │ │ ├── scatter_load.sct │ │ └── wrist.uvprojx └── peripheral │ ├── adc │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ ├── Source │ │ ├── OSAL_adc.c │ │ ├── adc_Main.c │ │ ├── adc_demo.c │ │ ├── adc_demo.h │ │ └── main.c │ ├── adc.uvprojx │ ├── ram.ini │ └── scatter_load.sct │ ├── ap_timer │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ ├── Source │ │ ├── OSAL_ap_timer.c │ │ ├── ap_timer_Main.c │ │ ├── ap_timer_demo.c │ │ ├── ap_timer_demo.h │ │ ├── ap_timer_test.c │ │ └── main.c │ ├── ap_timer.uvprojx │ ├── ram.ini │ └── scatter_load.sct │ ├── fs │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ ├── Source │ │ ├── OSAL_heartrate.c │ │ ├── heartrate.c │ │ ├── heartrate.h │ │ ├── hrs_Main.c │ │ └── main.c │ ├── fs.uvprojx │ ├── ram.ini │ └── scatter_load.sct │ ├── gpio │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ ├── Source │ │ ├── OSAL_gpio.c │ │ ├── gpio_Main.c │ │ ├── gpio_demo.c │ │ ├── gpio_demo.h │ │ └── main.c │ ├── gpio.uvprojx │ ├── ram.ini │ └── scatter_load.sct │ ├── kscan │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ ├── Source │ │ ├── OSAL_kscan.c │ │ ├── kscan_Main.c │ │ ├── kscan_demo.c │ │ ├── kscan_demo.h │ │ └── main.c │ ├── kscan.uvprojx │ ├── ram.ini │ └── scatter_load.sct │ ├── pwm │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ ├── Source │ │ ├── OSAL_pwm.c │ │ ├── main.c │ │ ├── pwm_Main.c │ │ ├── pwmdemo.c │ │ ├── pwmdemo.h │ │ ├── pwmservice.c │ │ └── pwmservice.h │ ├── pwm.uvprojx │ ├── ram.ini │ └── scatter_load.sct │ ├── spiflash │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ ├── Source │ │ ├── OSAL_spiflash.c │ │ ├── lcd_ST7789VW.c │ │ ├── lcd_ST7789VW.h │ │ ├── main.c │ │ ├── spiflash_Main.c │ │ ├── spiflash_demo.c │ │ └── spiflash_demo.h │ ├── ram.ini │ ├── scatter_load.sct │ └── spiflash.uvprojx │ ├── voice │ ├── Matlab │ │ ├── adpcm.m │ │ ├── cvsd.m │ │ ├── pcma.m │ │ ├── pcmraw.m │ │ ├── pcmu.m │ │ ├── voice_adpcm_10sec.txt │ │ ├── voice_cvsd_5sec.txt │ │ ├── voice_notes.docx │ │ ├── voice_notes.txt │ │ ├── voice_pcma_5sec.txt │ │ └── voice_pcmraw_2p5sec.txt │ ├── RTE │ │ ├── Device │ │ │ └── ARMCM0 │ │ │ │ ├── startup_ARMCM0.s │ │ │ │ └── system_ARMCM0.c │ │ └── RTE_Components.h │ ├── Source │ │ ├── OSAL_adc.c │ │ ├── OSAL_voice.c │ │ ├── adc_Main.c │ │ ├── adc_demo.c │ │ ├── adc_demo.h │ │ ├── main.c │ │ ├── voice_Main.c │ │ ├── voice_demo.c │ │ └── voice_demo.h │ ├── ram.ini │ ├── scatter_load.sct │ └── voice.uvprojx │ └── watchdog │ ├── RTE │ ├── Device │ │ └── ARMCM0 │ │ │ ├── startup_ARMCM0.s │ │ │ └── system_ARMCM0.c │ └── RTE_Components.h │ ├── Source │ ├── OSAL_watchdog.c │ ├── main.c │ ├── watchdog_Main.c │ ├── watchdog_demo.c │ └── watchdog_demo.h │ ├── ram.ini │ ├── scatter_load.sct │ └── watchdog.uvprojx ├── lib ├── README.txt ├── font │ ├── unicode_ch_12x12.bin.res │ ├── unicode_ch_16x16_cooperblank.bin.res │ ├── unicode_cn3500_16x16.bin.res │ └── unicode_en_16x16_cooperblank.bin.res ├── multi_include │ ├── att.h │ ├── bcomdef.h │ ├── devinfoservice.h │ ├── gap.h │ ├── gapbondmgr.h │ ├── gatt.h │ ├── gatt_uuid.h │ ├── gattservapp.h │ ├── hci.h │ ├── l2cap.h │ ├── ll.h │ ├── ll_buf.h │ ├── ll_common.h │ ├── ll_debug.h │ ├── ll_def.h │ ├── ll_enc.h │ ├── ll_hw_drv.h │ ├── ll_sleep.h │ ├── osal_cbtimer.h │ ├── ppsp_serv.h │ ├── rf_phy_driver.h │ ├── simpleGATTprofile.h │ └── sm.h ├── multi_rf.lib ├── multi_stack_lib.lib ├── phy_font.lib ├── rf.lib ├── rflib.h └── ui_font.h └── misc ├── jump_table.c └── rom1Sym.txt /.gitignore: -------------------------------------------------------------------------------- 1 | *.d 2 | *.o 3 | *.obj 4 | *.out 5 | *.dep 6 | *.i 7 | *.hex* 8 | *.htm 9 | *.crf 10 | *.iex 11 | *.csv 12 | *.dep 13 | *.lst 14 | *.map 15 | *.uvguix* 16 | *.uvoptx 17 | *.bin 18 | JLinkLog.txt 19 | JlinkSettings.ini 20 | *.zip 21 | *.asf 22 | *.asm 23 | *.scvd 24 | *.axf 25 | *.elf 26 | *.lnp 27 | ArInp.Scr 28 | _bld.txt 29 | buildlog_*.txt 30 | ER_IROM* 31 | JUMP_TABLE 32 | 33 | # ignor folder 34 | #RTE/ 35 | bin/ 36 | components/driver_rom/ 37 | lib/generate_mesh_lib/ethermind/build/* 38 | !lib/generate_mesh_lib/ethermind/build/*.bat 39 | !lib/generate_mesh_lib/ethermind/build/*.py 40 | !lib/generate_mesh_lib/ethermind/build/*.defines* 41 | !lib/generate_mesh_lib/ethermind/build/*phy6200 42 | 43 | #VS Coder 44 | .vscode 45 | *.code-workspace 46 | 47 | #Force include file/folder 48 | !example/OTA/OTA_internal_flash/bin/ 49 | !**/OTA/*/bin/ota*.hex 50 | !lib/font/*.bin -------------------------------------------------------------------------------- /_bld_script/rls_v211.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #release tag name @ current repo 3 | ReleaseTagName: 4 | - tag_v211 5 | 6 | ReleaseBranchName: 7 | - PHY62XX_SDK_2.1.1 8 | 9 | #build config 10 | # - yaml file 11 | BuildConfig: 12 | - bld_v211 13 | 14 | #Protect file config 15 | ProtectFile: 16 | # rls example config yaml: u 17 | - rls_example: 18 | - bld_v211 19 | - remove_file: 20 | - lib\rf_mst.lib 21 | - lib\rf_dtm_HopeRF_*.lib 22 | - '*.py' 23 | - '*.txt' 24 | - remove_folder: 25 | - freertos\ 26 | - lib\generate_lib\ 27 | - lib\generate_mesh_lib\ 28 | - lib\generate_multiConn_lib\ 29 | - components\libraries\dfl\ 30 | - components\libraries\slb\ -------------------------------------------------------------------------------- /_bld_script/rls_v212.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #release tag name @ current repo 3 | ReleaseTagName: 4 | - tag_v212 5 | 6 | ReleaseBranchName: 7 | - PHY62XX_SDK_2.1.2 8 | 9 | #build config 10 | # - yaml file 11 | BuildConfig: 12 | - bld_v212 13 | 14 | #Protect file config 15 | ProtectFile: 16 | # rls example config yaml: u 17 | - rls_example: 18 | - bld_v212 19 | - remove_file: 20 | - lib\rf_mst.lib 21 | - lib\rf_dtm_HopeRF_*.lib 22 | - '*.py' 23 | - '*.txt' 24 | - remove_folder: 25 | - freertos\ 26 | - lib\generate_lib\ 27 | - lib\generate_mesh_lib\ 28 | - lib\generate_multiConn_lib\ 29 | - components\libraries\dfl\ 30 | - components\libraries\slb\ -------------------------------------------------------------------------------- /components/ble/include/gap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/ble/include/gap.h -------------------------------------------------------------------------------- /components/ble/include/gatt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/ble/include/gatt.h -------------------------------------------------------------------------------- /components/driver/common/common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/driver/common/common.h -------------------------------------------------------------------------------- /components/ethermind/external/crypto/aes/README.txt: -------------------------------------------------------------------------------- 1 | To realize the AES-CCM functionality using the aes.c interface herewith, pull the files aes-ccm.c and aes.h from the repo: https://github.com/wi-fi-analyzer/crackle, and make the following updates - 2 | 3 | ** Update the 'xor_aes_block()' function implementation as below and use. 4 | 5 | static void xor_aes_block(u8 *dst, const u8 *src) 6 | { 7 | #ifdef HAVE_ALIGNED_MEM_OPERATION 8 | u32 *d = (u32 *) dst; 9 | u32 *s = (u32 *) src; 10 | *d++ ^= *s++; 11 | *d++ ^= *s++; 12 | *d++ ^= *s++; 13 | *d++ ^= *s++; 14 | #else /* HAVE_ALIGNED_MEM_OPERATION */ 15 | u32 i; 16 | 17 | for (i = 0; i < 16; i++) 18 | { 19 | *dst++ ^= *src++; 20 | } 21 | #endif /* HAVE_ALIGNED_MEM_OPERATION */ 22 | } 23 | 24 | 25 | ** Update the 'aes_ccm_encr()' function implementation as below and use. 26 | 27 | static void aes_ccm_encr(void *aes, size_t L, const u8 *in, size_t len, u8 *out, 28 | u8 *a) 29 | { 30 | size_t last = len % AES_BLOCK_SIZE; 31 | size_t i; 32 | 33 | /* crypt = msg XOR (S_1 | S_2 | ... | S_n) */ 34 | for (i = 1; i <= len / AES_BLOCK_SIZE; i++) { 35 | PUT_BE16(&a[AES_BLOCK_SIZE - 2], i); 36 | /* S_i = E(K, A_i) */ 37 | aes_encrypt(aes, a, out); 38 | xor_aes_block(out, in); 39 | out += AES_BLOCK_SIZE; 40 | in += AES_BLOCK_SIZE; 41 | } 42 | #if 0 43 | if (last) { 44 | PUT_BE16(&a[AES_BLOCK_SIZE - 2], i); 45 | aes_encrypt(aes, a, out); 46 | /* XOR zero-padded last block */ 47 | for (i = 0; i < last; i++) 48 | *out++ ^= *in++; 49 | } 50 | #else /* 0 */ 51 | if (last) { 52 | u8 tout[AES_BLOCK_SIZE]; 53 | 54 | PUT_BE16(&a[AES_BLOCK_SIZE - 2], i); 55 | aes_encrypt(aes, a, tout); 56 | /* XOR zero-padded last block */ 57 | for (i = 0; i < last; i++) 58 | *out++ = tout[i] ^ *in++; 59 | } 60 | #endif /* 0 */ 61 | } 62 | -------------------------------------------------------------------------------- /components/ethermind/external/crypto/aes/aes.c: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file aes.c 4 | * 5 | * AES Interface file for the Open AES-CCM block. 6 | * 7 | */ 8 | 9 | /* 10 | * Copyright (C) 2013. Mindtree Limited. 11 | * All rights reserved. 12 | */ 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "aes.h" 16 | #include "cry.h" 17 | 18 | /* --------------------------------------------- External Global Variables */ 19 | 20 | /* --------------------------------------------- Exported Global Variables */ 21 | 22 | /* --------------------------------------------- Static Global Variables */ 23 | 24 | /* --------------------------------------------- Functions */ 25 | 26 | void * aes_encrypt_init(const u8 *key, size_t len) 27 | { 28 | u8 *ctx; 29 | 30 | ctx = EM_alloc_mem (len); 31 | if (NULL != ctx) 32 | { 33 | memcpy (ctx, key, len); 34 | } 35 | 36 | return (void *)ctx; 37 | } 38 | 39 | void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) 40 | { 41 | INT32 ret; 42 | cry_aes_128_encrypt_be ((UCHAR *)plain, (UCHAR *)ctx, (UCHAR *)crypt, ret); 43 | 44 | VOID ret; // resolve warning 45 | } 46 | 47 | void aes_encrypt_deinit(void *ctx) 48 | { 49 | EM_free_mem (ctx); 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /components/ethermind/external/crypto/aes/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AES functions 3 | * Copyright (c) 2003-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AES_H 10 | #define AES_H 11 | 12 | #include 13 | #include 14 | 15 | typedef uint8_t u8; 16 | typedef uint16_t u16; 17 | typedef uint32_t u32; 18 | 19 | #define AES_BLOCK_SIZE 16 20 | 21 | void * aes_encrypt_init(const u8 *key, size_t len); 22 | void aes_encrypt(void *ctx, const u8 *plain, u8 *crypt); 23 | void aes_encrypt_deinit(void *ctx); 24 | void * aes_decrypt_init(const u8 *key, size_t len); 25 | void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain); 26 | void aes_decrypt_deinit(void *ctx); 27 | 28 | int aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, 29 | size_t M, const u8 *plain, size_t plain_len, 30 | const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth); 31 | int aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce, 32 | size_t M, const u8 *crypt, size_t crypt_len, 33 | const u8 *aad, size_t aad_len, const u8 *auth, u8 *plain); 34 | 35 | #endif /* AES_H */ 36 | 37 | -------------------------------------------------------------------------------- /components/ethermind/external/crypto/asm_ecdh_p256/P256-cortex-m0-ecdh-keil.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/ethermind/external/crypto/asm_ecdh_p256/P256-cortex-m0-ecdh-keil.s -------------------------------------------------------------------------------- /components/ethermind/lib/phy6200/phyos/keil/libethermind_ecdh.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/ethermind/lib/phy6200/phyos/keil/libethermind_ecdh.lib -------------------------------------------------------------------------------- /components/ethermind/lib/phy6200/phyos/keil/libethermind_mesh_core.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/ethermind/lib/phy6200/phyos/keil/libethermind_mesh_core.lib -------------------------------------------------------------------------------- /components/ethermind/lib/phy6200/phyos/keil/libethermind_mesh_models.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/ethermind/lib/phy6200/phyos/keil/libethermind_mesh_models.lib -------------------------------------------------------------------------------- /components/ethermind/lib/phy6200/phyos/keil/libethermind_utils.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/ethermind/lib/phy6200/phyos/keil/libethermind_utils.lib -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/appl_main.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file appl_main.h 4 | * 5 | * Header File for the Test Application to test the Mindtree 6 | * Mesh stack. 7 | */ 8 | 9 | /* 10 | * Copyright (C) 2016. Mindtree Ltd. 11 | * All rights reserved. 12 | */ 13 | 14 | #ifndef _H_APPL_MAIN_ 15 | #define _H_APPL_MAIN_ 16 | 17 | /* --------------------------------------------- Header File Inclusion */ 18 | #include "MS_access_api.h" 19 | #include "MS_config_api.h" 20 | 21 | /* --------------------------------------------- Global Definitions */ 22 | 23 | /* --------------------------------------------- Structures/Data Types */ 24 | 25 | /* --------------------------------------------- Macros */ 26 | 27 | /* Console Input/Output */ 28 | #define CONSOLE_OUT(...) printf(__VA_ARGS__) 29 | #define CONSOLE_IN(...) scanf(__VA_ARGS__) 30 | 31 | /* --------------------------------------------- Internal Functions */ 32 | void main_register_models(void); 33 | void appl_dump_bytes(UCHAR *buffer, UINT16 length); 34 | void appl_model_power_cycle(void); 35 | void appl_prov_bind(UCHAR brr, UCHAR index); 36 | void appl_prov_get_local_public_key(void); 37 | void appl_prov_input_auth_val (UCHAR mode, void * data, UINT16 datalen); 38 | void appl_prov_register(void); 39 | void appl_prov_set_auth_action 40 | ( 41 | UCHAR mode, 42 | UCHAR * s_oob_val, 43 | UCHAR oob_act, 44 | UCHAR oob_sz 45 | ); 46 | void appl_prov_setup(UCHAR role, UCHAR brr); 47 | API_RESULT appl_prov_update_remote_uuid 48 | ( 49 | UCHAR * uuid, 50 | UINT16 uuid_len, 51 | UINT16 oob_info, 52 | UCHAR * uri 53 | ); 54 | void appl_prov_set_uuid (UCHAR * uuid); 55 | void appl_prov_update_uuid (UCHAR octet); 56 | 57 | void appl_proxy_adv 58 | ( 59 | UCHAR identification_type, 60 | MS_SUBNET_HANDLE subnet_handle 61 | ); 62 | void appl_proxy_register(void); 63 | void appl_prov_set_dev_public_key(void); 64 | void appl_prov_bind_device(UCHAR brr); 65 | void appl_proxy_start_net_id_adv(MS_SUBNET_HANDLE subnet_handle); 66 | API_RESULT appl_is_configured (void); 67 | 68 | #endif /* _H_APPL_MAIN_ */ 69 | 70 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/client/appl_generic_battery_client.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_generic_battery_client.h 3 | * 4 | * \brief This file defines the Mesh Generic Battery Model Application Interface 5 | * - includes Data Structures and Methods for Client. 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2018. Mindtree Ltd. 10 | * All rights reserved. 11 | */ 12 | 13 | #ifndef _H_APPL_GENERIC_BATTERY_CLIENT_ 14 | #define _H_APPL_GENERIC_BATTERY_CLIENT_ 15 | 16 | 17 | /* --------------------------------------------- Header File Inclusion */ 18 | #include "MS_generic_battery_api.h" 19 | #include "appl_main.h" 20 | 21 | 22 | /* --------------------------------------------- Global Definitions */ 23 | 24 | 25 | /* --------------------------------------------- Data Types/ Structures */ 26 | 27 | 28 | /* --------------------------------------------- Function */ 29 | /* generic_battery client application entry point */ 30 | void main_generic_battery_client_operations(void); 31 | 32 | /* Send Generic Battery Get */ 33 | void appl_send_generic_battery_get(void); 34 | 35 | /* Get Model Handle */ 36 | void appl_generic_battery_client_get_model_handle(void); 37 | 38 | /* Set Publish Address */ 39 | void appl_generic_battery_client_set_publish_address(void); 40 | 41 | /** 42 | * \brief Client Application Asynchronous Notification Callback. 43 | * 44 | * \par Description 45 | * Generic_Battery client calls the registered callback to indicate events occurred to the application. 46 | * 47 | * \param [in] handle Model Handle. 48 | * \param [in] opcode Opcode. 49 | * \param [in] data_param Data associated with the event if any or NULL. 50 | * \param [in] data_len Size of the event data. 0 if event data is NULL. 51 | */ 52 | API_RESULT appl_generic_battery_client_cb 53 | ( 54 | /* IN */ MS_ACCESS_MODEL_HANDLE * handle, 55 | /* IN */ UINT32 opcode, 56 | /* IN */ UCHAR * data_param, 57 | /* IN */ UINT16 data_len 58 | ); 59 | 60 | #endif /*_H_APPL_GENERIC_BATTERY_CLIENT_ */ 61 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_server_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_SERVER_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_SERVER_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 28 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | #endif /*_H_APPL_MODEL_SERVER_STATE_HANDLER_ */ 31 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_battery_server/appl_generic_battery_server.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_generic_battery_server.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_GENERIC_BATTERY_SERVER_ 11 | #define _H_APPL_GENERIC_BATTERY_SERVER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "MS_generic_battery_api.h" 16 | #include "appl_main.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | /* generic_battery server application entry point */ 27 | void main_generic_battery_server_operations(/* IN */ UINT8 have_menu); 28 | 29 | /* Get Model Handle */ 30 | void appl_generic_battery_server_get_model_handle(void); 31 | 32 | /* Set Publish Address */ 33 | void appl_generic_battery_server_set_publish_address(void); 34 | 35 | /** 36 | * \brief Server Application Asynchronous Notification Callback. 37 | * 38 | * \par Description 39 | * Generic_Battery server calls the registered callback to indicate events occurred to the application. 40 | * 41 | * \param [in] ctx Context of message received for a specific model instance. 42 | * \param [in] msg_raw Uninterpreted/raw received message. 43 | * \param [in] req_type Requested message type. 44 | * \param [in] state_params Model specific state parameters. 45 | * \param [in] ext_params Additional parameters. 46 | */ 47 | API_RESULT appl_generic_battery_server_cb 48 | ( 49 | /* IN */ MS_ACCESS_MODEL_REQ_MSG_CONTEXT * ctx, 50 | /* IN */ MS_ACCESS_MODEL_REQ_MSG_RAW * msg_raw, 51 | /* IN */ MS_ACCESS_MODEL_REQ_MSG_T * req_type, 52 | /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * state_params, 53 | /* IN */ MS_ACCESS_MODEL_EXT_PARAMS * ext_params 54 | ); 55 | 56 | #endif /*_H_APPL_GENERIC_BATTERY_SERVER_ */ 57 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_battery_server/appl_model_state_handler.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.c 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | 11 | 12 | /* --------------------------------------------- Header File Inclusion */ 13 | #include "appl_model_state_handler.h" 14 | #include "MS_common.h" 15 | 16 | 17 | 18 | /* --------------------------------------------- Global Definitions */ 19 | 20 | 21 | /* --------------------------------------------- Data Types/ Structures */ 22 | #define MS_MAX_NUM_STATES 2 23 | 24 | static MS_STATE_GENERIC_BATTERY_STRUCT appl_generic_battery[MS_MAX_NUM_STATES]; 25 | 26 | 27 | 28 | 29 | /* --------------------------------------------- Function */ 30 | void appl_model_states_initialization(void) 31 | { 32 | EM_mem_set(appl_generic_battery, 0, sizeof(appl_generic_battery)); 33 | } 34 | 35 | void appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction) 36 | { 37 | switch (state_t) 38 | { 39 | case MS_STATE_GENERIC_BATTERY_T: 40 | { 41 | MS_STATE_GENERIC_BATTERY_STRUCT * param_p; 42 | 43 | param_p = (MS_STATE_GENERIC_BATTERY_STRUCT *)param; 44 | 45 | /* Ignoring Instance and direction right now */ 46 | *param_p = appl_generic_battery[0]; 47 | } 48 | break; 49 | 50 | default: 51 | break; 52 | } 53 | } 54 | 55 | void appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction) 56 | { 57 | switch (state_t) 58 | { 59 | case MS_STATE_GENERIC_BATTERY_T: 60 | { 61 | MS_STATE_GENERIC_BATTERY_STRUCT * param_p; 62 | 63 | param_p = (MS_STATE_GENERIC_BATTERY_STRUCT *)param; 64 | 65 | /* Ignoring Instance and direction right now */ 66 | appl_generic_battery[0] = *param_p; 67 | } 68 | break; 69 | 70 | default: 71 | break; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_battery_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | void appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | void appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_default_transition_time_server/appl_generic_default_transition_time_server.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_generic_default_transition_time_server.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_GENERIC_DEFAULT_TRANSITION_TIME_SERVER_ 11 | #define _H_APPL_GENERIC_DEFAULT_TRANSITION_TIME_SERVER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "MS_generic_default_transition_time_api.h" 16 | #include "appl_main.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | /* generic_default_transition_time server application entry point */ 27 | void main_generic_default_transition_time_server_operations(/* IN */ UINT8 have_menu); 28 | 29 | /* Get Model Handle */ 30 | void appl_generic_default_transition_time_server_get_model_handle(void); 31 | 32 | /* Set Publish Address */ 33 | void appl_generic_default_transition_time_server_set_publish_address(void); 34 | 35 | #endif /*_H_APPL_GENERIC_DEFAULT_TRANSITION_TIME_SERVER_ */ 36 | 37 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_level_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_location_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | void appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | void appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_onoff_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_power_level_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_power_onoff_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/generics/generic_property_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | void appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | void appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/health/appl_health_server.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_health_server.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_HEALTH_SERVER_ 11 | #define _H_APPL_HEALTH_SERVER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "MS_health_server_api.h" 16 | #include "appl_main.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | /* health server application entry point */ 27 | void main_health_server_operations(/* IN */ UINT8 have_menu); 28 | 29 | /** 30 | * \brief Health Server application Asynchronous Notification Callback. 31 | * 32 | * \par Description 33 | * Health Server calls the registered callback to indicate events occurred to the 34 | * application. 35 | * 36 | * \param handle Model Handle. 37 | * \param event_type Health Server Event type. 38 | * \param event_param Parameter associated with the event if any or NULL. 39 | * \param param_len Size of the event parameter data. 0 if event param is NULL. 40 | */ 41 | API_RESULT appl_health_server_cb 42 | ( 43 | MS_ACCESS_MODEL_HANDLE * handle, 44 | UINT8 event_type, 45 | UINT8 * event_param, 46 | UINT16 param_len 47 | ); 48 | 49 | void appl_health_server_send_status(void); 50 | 51 | #endif /*_H_APPL_HEALTH_SERVER_ */ 52 | 53 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/lighting/light_ctl_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/lighting/light_hsl_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/lighting/light_lc_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/lighting/light_lightness_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/lighting/light_xyl_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | API_RESULT appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | API_RESULT appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/sensor/sensor_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | void appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | void appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/time_and_scenes/scene_server/appl_model_state_handler.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.c 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | 11 | 12 | /* --------------------------------------------- Header File Inclusion */ 13 | #include "appl_model_state_handler.h" 14 | #include "MS_common.h" 15 | 16 | 17 | /* --------------------------------------------- Global Definitions */ 18 | 19 | 20 | /* --------------------------------------------- Static Global Variables */ 21 | 22 | 23 | /* --------------------------------------------- Data Types/Structures */ 24 | 25 | /* ------- Transition Time Data Structures */ 26 | 27 | /* ------- Scene Data Structures */ 28 | #define MS_MAX_SCENE_REGS 16 29 | 30 | /* --------------------------------------------- Function */ 31 | void appl_model_states_initialization(void) 32 | { 33 | } 34 | 35 | /** Scene Server Handlers */ 36 | 37 | void * appl_scene_save_current_state(/* IN */ UINT32 scene_index) 38 | { 39 | /* Free previous context - if any */ 40 | /* Empty right now - dummy returning the same scene index itself */ 41 | return (void *)scene_index; 42 | } 43 | 44 | void * appl_scene_delete_saved_state(/* IN */ UINT32 scene_index, /* IN */ void * context) 45 | { 46 | /* Free context - if any */ 47 | /* Empty right now - dummy returning NULL */ 48 | return (void *)NULL; 49 | } 50 | 51 | void * appl_scene_recall_saved_state(/* IN */ UINT32 scene_index, /* IN */ void * context) 52 | { 53 | /* Recall context - if any */ 54 | /* Empty right now - dummy returning NULL */ 55 | return (void *)NULL; 56 | } 57 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/time_and_scenes/scene_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | void appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, MS_EXT_TID_AND_TRANSITION_STRUCT * trns, UINT8 direction); 29 | 30 | void appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, MS_EXT_TID_AND_TRANSITION_STRUCT * trns, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/time_and_scenes/scene_server/appl_scene_server.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_scene_server.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_SCENE_SERVER_ 11 | #define _H_APPL_SCENE_SERVER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "MS_scene_api.h" 16 | #include "appl_main.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | /* scene server application entry point */ 27 | void main_scene_server_operations(/* IN */ UINT8 have_menu); 28 | 29 | /** 30 | * \brief Server Application Asynchronous Notification Callback. 31 | * 32 | * \par Description 33 | * Scene server calls the registered callback to indicate events occurred to the application. 34 | * 35 | * \param [in] ctx Context of message received for a specific model instance. 36 | * \param [in] msg_raw Uninterpreted/raw received message. 37 | * \param [in] req_type Requested message type. 38 | * \param [in] state_params Model specific state parameters. 39 | * \param [in] ext_params Additional parameters. 40 | */ 41 | void * appl_scene_server_cb 42 | ( 43 | /* IN */ MS_ACCESS_MODEL_HANDLE * handle, 44 | /* IN */ UINT8 event_type, 45 | /* IN */ void * event_param, 46 | /* IN */ UINT16 event_length, 47 | /* IN */ void * context 48 | ); 49 | 50 | #endif /*_H_APPL_SCENE_SERVER_ */ 51 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/time_and_scenes/scheduler_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | void appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | void appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/time_and_scenes/scheduler_server/appl_scheduler_server.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_scheduler_server.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_SCHEDULER_SERVER_ 11 | #define _H_APPL_SCHEDULER_SERVER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "MS_scheduler_api.h" 16 | #include "appl_main.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | /* scheduler server application entry point */ 27 | void main_scheduler_server_operations(/* IN */ UINT8 have_menu); 28 | 29 | /* Get Model Handle */ 30 | void appl_scheduler_server_get_model_handle(void); 31 | 32 | /* Set Publish Address */ 33 | void appl_scheduler_server_set_publish_address(void); 34 | 35 | /** 36 | * \brief Server Application Asynchronous Notification Callback. 37 | * 38 | * \par Description 39 | * Scheduler server calls the registered callback to indicate events occurred to the application. 40 | * 41 | * \param [in] ctx Context of message received for a specific model instance. 42 | * \param [in] msg_raw Uninterpreted/raw received message. 43 | * \param [in] req_type Requested message type. 44 | * \param [in] state_params Model specific state parameters. 45 | * \param [in] ext_params Additional parameters. 46 | */ 47 | API_RESULT appl_scheduler_server_cb 48 | ( 49 | /* IN */ MS_ACCESS_MODEL_REQ_MSG_CONTEXT * ctx, 50 | /* IN */ MS_ACCESS_MODEL_REQ_MSG_RAW * msg_raw, 51 | /* IN */ MS_ACCESS_MODEL_REQ_MSG_T * req_type, 52 | /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * state_params, 53 | /* IN */ MS_ACCESS_MODEL_EXT_PARAMS * ext_params 54 | ); 55 | 56 | #endif /*_H_APPL_SCHEDULER_SERVER_ */ 57 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/time_and_scenes/time_server/appl_model_state_handler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_model_state_handler.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_MODEL_STATE_HANDLER_ 11 | #define _H_APPL_MODEL_STATE_HANDLER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "appl_main.h" 16 | #include "MS_model_states.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | void appl_model_states_initialization(void); 27 | 28 | void appl_model_state_get(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 29 | 30 | void appl_model_state_set(UINT16 state_t, UINT16 state_inst, void * param, UINT8 direction); 31 | 32 | #endif /*_H_APPL_MODEL_STATE_HANDLER_ */ 33 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/appl/model/server/time_and_scenes/time_server/appl_time_server.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file appl_time_server.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2017. Mindtree Ltd. 7 | * All rights reserved. 8 | */ 9 | 10 | #ifndef _H_APPL_TIME_SERVER_ 11 | #define _H_APPL_TIME_SERVER_ 12 | 13 | 14 | /* --------------------------------------------- Header File Inclusion */ 15 | #include "MS_time_api.h" 16 | #include "appl_main.h" 17 | 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | 22 | /* --------------------------------------------- Data Types/ Structures */ 23 | 24 | 25 | /* --------------------------------------------- Function */ 26 | /* time server application entry point */ 27 | void main_time_server_operations(/* IN */ UINT8 have_menu); 28 | 29 | /* Get Model Handle */ 30 | void appl_time_server_get_model_handle(void); 31 | 32 | /* Set Publish Address */ 33 | void appl_time_server_set_publish_address(void); 34 | 35 | /** 36 | * \brief Server Application Asynchronous Notification Callback. 37 | * 38 | * \par Description 39 | * Time server calls the registered callback to indicate events occurred to the application. 40 | * 41 | * \param [in] ctx Context of message received for a specific model instance. 42 | * \param [in] msg_raw Uninterpreted/raw received message. 43 | * \param [in] req_type Requested message type. 44 | * \param [in] state_params Model specific state parameters. 45 | * \param [in] ext_params Additional parameters. 46 | */ 47 | API_RESULT appl_time_server_cb 48 | ( 49 | /* IN */ MS_ACCESS_MODEL_REQ_MSG_CONTEXT * ctx, 50 | /* IN */ MS_ACCESS_MODEL_REQ_MSG_RAW * msg_raw, 51 | /* IN */ MS_ACCESS_MODEL_REQ_MSG_T * req_type, 52 | /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * state_params, 53 | /* IN */ MS_ACCESS_MODEL_EXT_PARAMS * ext_params 54 | ); 55 | 56 | #endif /*_H_APPL_TIME_SERVER_ */ 57 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/cli/cli_model.c: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file cli_main.c 4 | * 5 | * This File contains the "model" handlers for the CLI application, 6 | * to exercise various functionalities of the Mindtree Mesh stack. 7 | */ 8 | 9 | /* 10 | * Copyright (C) 2017. Mindtree Ltd. 11 | * All rights reserved. 12 | */ 13 | 14 | /* ------------------------------- Header File Inclusion */ 15 | #include "cli_main.h" 16 | 17 | /* ------------------------------- Global Variables */ 18 | /* Level - Model */ 19 | DECL_CONST CLI_COMMAND cli_model_cmd_list[] = 20 | { 21 | /* Help */ 22 | { "help", "Help", cli_help }, 23 | 24 | /* Model Server */ 25 | { "models", "Model Server Options", cli_model_server }, 26 | 27 | /* Model Client */ 28 | { "modelc", "Model Client Options", cli_model_client }, 29 | 30 | /* Back */ 31 | { "back", "One Level Up", cli_back }, 32 | 33 | /* Root */ 34 | { "root", "Back to Root", cli_root } 35 | 36 | }; 37 | 38 | /* ------------------------------- Functions */ 39 | /* Model */ 40 | API_RESULT cli_model(UINT32 argc, UCHAR *argv[]) 41 | { 42 | CONSOLE_OUT("In Model\n"); 43 | 44 | cli_cmd_stack_push((CLI_COMMAND *)cli_model_cmd_list, sizeof(cli_model_cmd_list) / sizeof(CLI_COMMAND)); 45 | 46 | cli_help(argc, argv); 47 | return API_SUCCESS; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/cli/model/client/cli_generic_battery_client.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file cli_generic_battery_client.h 3 | * 4 | * \brief This file defines the Mesh Generic Battery Model Application Interface 5 | * - includes Data Structures and Methods for Client. 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2018. Mindtree Ltd. 10 | * All rights reserved. 11 | */ 12 | 13 | #ifndef _H_CLI_GENERIC_BATTERY_CLIENT_ 14 | #define _H_CLI_GENERIC_BATTERY_CLIENT_ 15 | 16 | 17 | /* --------------------------------------------- Header File Inclusion */ 18 | #include "MS_generic_battery_api.h" 19 | #include "cli_main.h" 20 | 21 | 22 | /* --------------------------------------------- Global Definitions */ 23 | 24 | 25 | /* --------------------------------------------- Data Types/ Structures */ 26 | 27 | 28 | /* --------------------------------------------- Function */ 29 | /* generic_battery client CLI entry point */ 30 | CLI_CMD_HANDLER_DECL(cli_modelc_generic_battery); 31 | 32 | /* generic_battery client CLI entry point */ 33 | CLI_CMD_HANDLER_DECL(cli_modelc_generic_battery_setup); 34 | 35 | /* Send Generic Battery Get */ 36 | CLI_CMD_HANDLER_DECL(cli_modelc_generic_battery_get); 37 | 38 | /* Get Model Handle */ 39 | CLI_CMD_HANDLER_DECL(cli_modelc_generic_battery_get_model_handle); 40 | 41 | /* Set Publish Address */ 42 | CLI_CMD_HANDLER_DECL(cli_modelc_generic_battery_set_publish_address); 43 | 44 | /** 45 | * \brief Client Application Asynchronous Notification Callback. 46 | * 47 | * \par Description 48 | * Generic_Battery client calls the registered callback to indicate events occurred to the application. 49 | * 50 | * \param [in] handle Model Handle. 51 | * \param [in] opcode Opcode. 52 | * \param [in] data_param Data associated with the event if any or NULL. 53 | * \param [in] data_len Size of the event data. 0 if event data is NULL. 54 | */ 55 | API_RESULT cli_generic_battery_client_cb 56 | ( 57 | /* IN */ MS_ACCESS_MODEL_HANDLE * handle, 58 | /* IN */ UINT32 opcode, 59 | /* IN */ UCHAR * data_param, 60 | /* IN */ UINT16 data_len 61 | ); 62 | 63 | #endif /*_H_CLI_GENERIC_BATTERY_CLIENT_ */ 64 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/include/MS_generic_level_api.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/ethermind/mesh/export/include/MS_generic_level_api.h -------------------------------------------------------------------------------- /components/ethermind/mesh/export/include/fsm_engine.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file fsm_engine.h 4 | * 5 | * This file defines interface offered by the FSM module. 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2013. Mindtree Ltd. 10 | * All rights reserved. 11 | */ 12 | 13 | #ifndef _H_FSM_ENGINE_ 14 | #define _H_FSM_ENGINE_ 15 | 16 | /* --------------------------------------------- Header File Inclusion */ 17 | #include "MS_common.h" 18 | #include "fsm_defines.h" 19 | 20 | 21 | #ifndef FSM_NO_DEBUG 22 | #ifdef VAR_ARG_IN_MACRO_NOT_SUPPORTED 23 | #define FSM_ERR 24 | #else 25 | #define FSM_ERR(...) EM_debug_error(MS_MODULE_ID_FSM,__VA_ARGS__) 26 | #endif /* VAR_ARG_IN_MACRO_NOT_SUPPORTED */ 27 | #else /* FSM_NO_DEBUG */ 28 | #define FSM_ERR EM_debug_null 29 | #endif /* FSM_NO_DEBUG */ 30 | 31 | #ifdef FSM_DEBUG 32 | 33 | #define FSM_TRC(...) EM_debug_trace(BT_MODULE_ID_FSM,__VA_ARGS__) 34 | #define FSM_INF(...) EM_debug_info(BT_MODULE_ID_FSM,__VA_ARGS__) 35 | 36 | #else /* FSM_DEBUG */ 37 | #ifdef VAR_ARG_IN_MACRO_NOT_SUPPORTED 38 | #define FSM_TRC 39 | #define FSM_INF 40 | #else 41 | #define FSM_TRC EM_debug_null 42 | #define FSM_INF EM_debug_null 43 | #endif /* VAR_ARG_IN_MACRO_NOT_SUPPORTED */ 44 | 45 | #endif /* FSM_DEBUG */ 46 | 47 | /* --------------------------------------------- Functions */ 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | void ms_fsm_init (void); 53 | 54 | API_RESULT ms_fsm_register_module 55 | ( 56 | /* IN */ DECL_CONST FSM_MODULE_TABLE_T * module_fsm, 57 | /* OUT */ UCHAR * fsm_id 58 | ); 59 | 60 | API_RESULT ms_fsm_post_event 61 | ( 62 | UCHAR fsm_id, 63 | EVENT_T fsm_event, 64 | void * param 65 | ); 66 | 67 | #ifdef __cplusplus 68 | }; 69 | #endif 70 | 71 | #endif /* _H_FSM_ENGINE_ */ 72 | 73 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/include/ltrn_extern.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file ltrn_extern.h 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (C) 2016. Mindtree Ltd. 9 | * All rights reserved. 10 | */ 11 | 12 | #ifndef _H_LTRN_EXTERN_ 13 | #define _H_LTRN_EXTERN_ 14 | 15 | /* --------------------------------------------- External Global Definitions */ 16 | /* Module Mutex */ 17 | MS_DEFINE_MUTEX_TYPE(extern, ltrn_mutex) 18 | 19 | /* Module callback pointer */ 20 | extern LTRN_NTF_CB ltrn_callback; 21 | 22 | 23 | 24 | API_RESULT ltrn_delete_from_reassembled_cache 25 | ( 26 | /* IN */ MS_NET_ADDR addr 27 | ); 28 | 29 | API_RESULT ltrn_delete_from_replay_cache 30 | ( 31 | /* IN */ MS_NET_ADDR addr 32 | ); 33 | 34 | 35 | 36 | #endif /* _H_LTRN_EXTERN_ */ 37 | 38 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/include/net_extern.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file net_extern.h 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (C) 2016. Mindtree Ltd. 9 | * All rights reserved. 10 | */ 11 | 12 | #ifndef _H_NET_EXTERN_ 13 | #define _H_NET_EXTERN_ 14 | 15 | #include "MS_net_api.h" 16 | 17 | 18 | /* --------------------------------------------- External Global Definitions */ 19 | /* Module Mutex */ 20 | MS_DEFINE_MUTEX_TYPE(extern, net_mutex) 21 | 22 | /* Module callback pointer */ 23 | extern NET_NTF_CB net_callback; 24 | 25 | /* Network Sequence Number */ 26 | extern NET_SEQ_NUMBER_STATE net_seq_number_state; 27 | 28 | extern UINT8 seq_num_init_flag; 29 | extern UINT32 g_iv_update_index; 30 | extern UINT8 g_iv_update_state; 31 | extern UINT8 g_iv_update_start_timer; 32 | extern UINT8 MS_key_refresh_active; 33 | 34 | 35 | 36 | /* Network Cache */ 37 | //MS_DECLARE_GLOBAL_ARRAY(NET_CACHE_ELEMENT, net_cache, MS_CONFIG_LIMITS(MS_NET_CACHE_SIZE)); 38 | 39 | //extern UINT16 net_cache_start; 40 | //extern UINT16 net_cache_size; 41 | 42 | API_RESULT net_delete_from_cache 43 | ( 44 | /* IN */ MS_NET_ADDR addr 45 | ); 46 | 47 | 48 | #endif /* _H_NET_EXTERN_ */ 49 | 50 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/platforms/ext/MS_common_pl.c: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file MS_common_pl.c 4 | * 5 | * Common routines and start-up initialization & shutdown handlers 6 | * (Platform: Windows User Mode) 7 | */ 8 | 9 | /* 10 | * Copyright (C) 2016. Mindtree Ltd. 11 | * All rights reserved. 12 | */ 13 | 14 | /* ------------------------------------------- Header File Inclusion */ 15 | #include "MS_common.h" 16 | #include "MS_access_api.h" 17 | #include "blebrr.h" 18 | 19 | /* ------------------------------------------- External Global Variables */ 20 | 21 | 22 | /* ------------------------------------------- External Global Variables */ 23 | 24 | 25 | /* ------------------------------------------- External Global Variables */ 26 | 27 | 28 | /* ------------------------------------------- Functions */ 29 | /* EtherMind-Init: Platform Handler */ 30 | void ms_init_pl (void) 31 | { 32 | } 33 | 34 | UINT8 MS_common_reset(void) 35 | { 36 | UINT8 retval; 37 | UINT8 proxy_state,proxy; 38 | 39 | retval = MS_TRUE; 40 | 41 | MS_access_cm_get_features_field(&proxy, MS_FEATURE_PROXY); 42 | MS_proxy_fetch_state(&proxy_state); 43 | if((MS_TRUE == proxy) && (proxy_state == MS_PROXY_CONNECTED)) 44 | { 45 | blebrr_disconnect_pl(); 46 | retval = MS_FALSE; 47 | } 48 | 49 | nvs_reset(NVS_BANK_PERSISTENT); 50 | MS_access_cm_reset(); 51 | 52 | return retval; 53 | } 54 | 55 | 56 | 57 | #ifndef MS_NO_SHUTDOWN 58 | 59 | /* Mesh Shutdown: Platform Handler */ 60 | void ms_shutdown_pl (void) 61 | { 62 | } 63 | 64 | #endif /* MS_NO_SHUTDOWN */ 65 | 66 | 67 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/platforms/ext/MS_common_pl.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file MS_common_pl.h 4 | * 5 | * This file contains the Function Declaration, and Constant Definitions 6 | * for the EtherMind Mesh Stack in Windows User Mode. 7 | */ 8 | 9 | /* 10 | * Copyright (C) 2016. Mindtree Ltd. 11 | * All rights reserved. 12 | */ 13 | 14 | #ifndef _H_MS_COMMON_PL_ 15 | #define _H_MS_COMMON_PL_ 16 | 17 | /* ------------------------------------------- Header File Inclusion */ 18 | 19 | /* ------------------------------------------- Common PL Debug */ 20 | #define PL_ERR(...) MS_debug_error(ms_debug_fd, __VA_ARGS__) 21 | 22 | #ifdef PL_DEBUG 23 | 24 | #define PL_TRC(...) MS_debug_trace(ms_debug_fd, __VA_ARGS__) 25 | #define PL_INF(...) MS_debug_info(ms_debug_fd, __VA_ARGS__) 26 | 27 | #else /* PL_DEBUG */ 28 | 29 | #define PL_TRC MS_debug_null 30 | #define PL_INF MS_debug_null 31 | 32 | #endif /* PL_DEBUG */ 33 | 34 | 35 | /* ------------------------------------------- Global Definitions/Macros */ 36 | /* EtherMind Configuration File */ 37 | #define MS_CONFIG_FILE "ethermind.conf" 38 | 39 | 40 | /* ------------------------------------------- Data Structures */ 41 | 42 | 43 | /* ------------------------------------------- Function Declarations */ 44 | /* EtherMind-Init: Platform Handler */ 45 | void ms_init_pl(void); 46 | 47 | UINT8 MS_common_reset(void); 48 | 49 | 50 | /* Mesh Shutdown: Platform Handler */ 51 | void ms_shutdown_pl(void); 52 | 53 | #endif /* _H_MS_COMMON_PL_ */ 54 | 55 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/platforms/ext/prov_pl.c: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file prov_pl.c 4 | * 5 | * 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2013. Mindtree Limited. 10 | * All rights reserved. 11 | */ 12 | 13 | /* --------------------------------------------- Header File Inclusion */ 14 | #include "prov_pl.h" 15 | 16 | /* --------------------------------------------- External Global Variables */ 17 | 18 | /* --------------------------------------------- Exported Global Variables */ 19 | 20 | /* --------------------------------------------- Static Global Variables */ 21 | /** Out of Band Public Key information */ 22 | DECL_STATIC UCHAR prov_dev_oob_pubkey[PROV_PUBKEY_SIZE_PL]; 23 | 24 | /** Static Out of Band Authentication information */ 25 | DECL_STATIC UCHAR prov_static_oob_auth[PROV_AUTHVAL_SIZE_PL]; 26 | 27 | /* --------------------------------------------- Functions */ 28 | 29 | void prov_set_device_oob_pubkey_pl(UCHAR * key, UINT16 size) 30 | { 31 | EM_mem_copy(prov_dev_oob_pubkey, key, size); 32 | } 33 | 34 | void prov_read_device_oob_pubkey_pl (UCHAR * key, UINT16 size) 35 | { 36 | EM_mem_copy(key, prov_dev_oob_pubkey, size); 37 | } 38 | 39 | void prov_set_static_oob_auth_pl(UCHAR * key, UINT16 size) 40 | { 41 | EM_mem_copy(prov_static_oob_auth, key, size); 42 | } 43 | 44 | void prov_read_static_oob_auth_pl(UCHAR * key, UINT16 size) 45 | { 46 | EM_mem_copy(key, prov_static_oob_auth, size); 47 | } 48 | 49 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/platforms/ext/prov_pl.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file prov_pl.h 4 | * 5 | * 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2013. Mindtree Limited. 10 | * All rights reserved. 11 | */ 12 | 13 | #ifndef _H_PROV_PL_ 14 | #define _H_PROV_PL_ 15 | 16 | /* --------------------------------------------- Header File Inclusion */ 17 | #include "MS_common.h" 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | #define PROV_PUBKEY_SIZE_PL 64 21 | #define PROV_AUTHVAL_SIZE_PL 16 22 | 23 | /* --------------------------------------------- Structures/Data Types */ 24 | 25 | /* --------------------------------------------- Macros */ 26 | 27 | /* --------------------------------------------- Internal Functions */ 28 | 29 | /* --------------------------------------------- API Declarations */ 30 | void prov_set_device_oob_pubkey_pl(UCHAR * key, UINT16 size); 31 | void prov_set_static_oob_auth_pl(UCHAR * key, UINT16 size); 32 | void prov_read_device_oob_pubkey_pl (UCHAR * key, UINT16 size); 33 | void prov_read_static_oob_auth_pl(UCHAR * key, UINT16 size); 34 | 35 | #endif /* _H_PROV_PL_ */ 36 | 37 | -------------------------------------------------------------------------------- /components/ethermind/mesh/export/sample/readme.txt: -------------------------------------------------------------------------------- 1 | | Example # | Description | 2 | | ------------- | ------------- | 3 | | Example 1 | Generic OnOff Server | 4 | | Example 5 | Adding OnOff and Lightness in two elements | 5 | | Example 6 | Adding vendor specific model | 6 | | Example 7 | Generic OnOff Client as Provisioner | 7 | | Example 8 | Generic OnOff Server on GATT Bearer + Proxy Feature | 8 | | Example 9 | Generic OnOff Client on GATT Bearer + Proxy Feature | 9 | | Example 10 | Generic OnOff Server + LPN/Friend Feature | 10 | | Example 11 | Generic OnOff Server on GATT Bearer + LPN/Friend Feature | -------------------------------------------------------------------------------- /components/ethermind/osal/src/phyos/EM_assert.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file EM_assert.h 4 | * 5 | * This file contains the implementation of EM_assert() macro, 6 | * used to evaluate an expression and take action based on whether 7 | * the expression is true or false. 8 | * 9 | * Version: Windows User Mode 10 | */ 11 | 12 | /* 13 | * Copyright (C) 2013. Mindtree Ltd. 14 | * All rights reserved. 15 | */ 16 | 17 | #ifndef _H_EM_ASSERT_ 18 | #define _H_EM_ASSERT_ 19 | 20 | /* -------------------------------------------- Header File Inclusion */ 21 | /* The EtherMind Debug Library */ 22 | #include "EM_debug.h" 23 | 24 | 25 | /* -------------------------------------------- Macros */ 26 | /* 27 | * Macro to assert the validity (truth-value) of an expression. 28 | * This is similar to the standard C macro assert(). 29 | * 30 | * The default behaviour of this macro is to dump the following 31 | * information to the debug system (which could be a file or 32 | * a serial port or some other interface, as abstracted by the 33 | * Debug Library): 34 | * 1. The expression under assertion 35 | * 2. The source file (using the macro __FILE__) 36 | * 3. The source line number (using the macro __LINE__) 37 | * 38 | * This macro is diagnostic in nature and its default implementation 39 | * does not abort the system as opposed to the standard assert() macro, 40 | * since in an embedded system or even when running in the kernel/driver 41 | * mode, if the system aborts it is very difficult and sometime even 42 | * impossible to find out what caused this catastrophic effect. 43 | * 44 | * This macro can be modified to suit the target environment and 45 | * also according to the various stages of life-cycle of the system. 46 | */ 47 | #define EM_assert(exp) \ 48 | if (!(exp)) \ 49 | { \ 50 | EM_debug_error(0, \ 51 | "[ASSERT] %s:%d `" #exp "`\n", __FILE__, __LINE__); \ 52 | } 53 | 54 | #endif /* _H_EM_ASSERT_ */ 55 | 56 | -------------------------------------------------------------------------------- /components/ethermind/osal/src/phyos/EM_debug.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file EM_debug.h 4 | * 5 | * This Header File contains the APIs exported by the 6 | * EtherMind Debug Library for Windows (User-mode). 7 | */ 8 | 9 | /* 10 | * Copyright (C) 2013. Mindtree Ltd. 11 | * All rights reserved. 12 | */ 13 | 14 | #ifndef _H_EM_DEBUG_ 15 | #define _H_EM_DEBUG_ 16 | 17 | /* ----------------------------------------------- Header File Inclusion */ 18 | #include "EM_os.h" 19 | 20 | /* extern FILE *em_debug_fd; */ 21 | 22 | #include "EM_debug_api.h" 23 | 24 | #endif /* _H_EM_DEBUG_ */ 25 | 26 | -------------------------------------------------------------------------------- /components/ethermind/osal/src/phyos/EM_debug_internal.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file EM_debug_internal.h 4 | * 5 | * Internal Header File of EtherMind Debug Library 6 | * for Windows (User-mode). 7 | */ 8 | 9 | /* 10 | * Copyright (C) 2013. Mindtree Ltd. 11 | * All rights reserved. 12 | */ 13 | 14 | #ifndef _H_EM_DEBUG_INTERNAL_ 15 | #define _H_EM_DEBUG_INTERNAL_ 16 | 17 | /* ----------------------------------------------- Header File Inclusion */ 18 | #include "EM_debug.h" 19 | 20 | /* ----------------------------------------------- Internal Functions */ 21 | #ifdef __cplusplus 22 | extern "C"{ 23 | #endif 24 | 25 | 26 | #ifdef __cplusplus 27 | }; 28 | #endif 29 | 30 | #endif /* _H_EM_DEBUG_INTERNAL_ */ 31 | 32 | -------------------------------------------------------------------------------- /components/ethermind/platforms/phy6200/EM_platform.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file EM_platform.c 3 | * 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (C) 2013. Mindtree Limited. 9 | * All rights reserved. 10 | */ 11 | 12 | /* --------------------------------------------- Header File Inclusion */ 13 | #include "EM_platform.h" 14 | #include "uart.h" 15 | 16 | #pragma import(__use_no_semihosting_swi) 17 | 18 | /* --------------------------------------------- Global Definitions */ 19 | 20 | /* --------------------------------------------- Static Global Variables */ 21 | struct __FILE { int handle; /* whatever required */ }; 22 | FILE __stdout; 23 | FILE __stdin; 24 | 25 | /* --------------------------------------------- External Global Variables */ 26 | 27 | /* --------------------------------------------- Exported Global Variables */ 28 | 29 | /* --------------------------------------------- Function */ 30 | void EM_enter_sleep_pl(void) 31 | { 32 | } 33 | 34 | void EM_exit_sleep_pl(void) 35 | { 36 | } 37 | 38 | int fputc(int c, FILE *f) { 39 | return hal_uart_send_buff((uint8_t *)&c, 1); 40 | } 41 | 42 | 43 | int fgetc(FILE *f) { 44 | return 0; 45 | } 46 | 47 | 48 | int ferror(FILE *f) { 49 | /* Your implementation of ferror */ 50 | return EOF; 51 | } 52 | 53 | 54 | void _ttywrch(int c) { 55 | hal_uart_send_buff((uint8_t *)&c, 1); 56 | } 57 | 58 | 59 | void _sys_exit(int return_code) { 60 | label: goto label; /* endless loop */ 61 | } 62 | -------------------------------------------------------------------------------- /components/ethermind/platforms/phy6200/EM_platform.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file EM_platform.h 4 | * 5 | * 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2013. Mindtree Limited. 10 | * All rights reserved. 11 | */ 12 | 13 | #ifndef _H_EM_PLATFORM_ 14 | #define _H_EM_PLATFORM_ 15 | 16 | /* --------------------------------------------- Header File Inclusion */ 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "osal.h" 23 | 24 | /* --------------------------------------------- Global Definitions */ 25 | #define EM_HAVE_STATIC_DECL 26 | #define EM_HAVE_CONST_DECL 27 | 28 | /* --------------------------------------------- Structures/Data Types */ 29 | 30 | /* --------------------------------------------- Macros */ 31 | #define printf(...) {printf (__VA_ARGS__); printf("\r\n"); fflush(stdout);} 32 | #define scanf(...) 33 | 34 | /* --------------------------------------------- Internal Functions */ 35 | 36 | /* --------------------------------------------- API Declarations */ 37 | void EM_enter_sleep_pl(void); 38 | void EM_exit_sleep_pl(void); 39 | 40 | int _write (int fd, char *ptr, int len); 41 | int _read (int fd, char *ptr, int len); 42 | int _close (int fd); 43 | int _fstat (int fd); 44 | int _isatty (int fd); 45 | int _lseek (int fd); 46 | 47 | void HardFault_Handler(void); 48 | void debugHardfault(uint32_t *sp); 49 | 50 | #endif /* _H_EM_PLATFORM_ */ 51 | 52 | -------------------------------------------------------------------------------- /components/ethermind/platforms/phy6200/mesh/model_state_handler_pl.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file model_state_handler_pl.h 4 | * 5 | * 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2013. Mindtree Limited. 10 | * All rights reserved. 11 | */ 12 | 13 | #ifndef _H_MODEL_STATE_HANDLER_ 14 | #define _H_MODEL_STATE_HANDLER_ 15 | 16 | /* --------------------------------------------- Header File Inclusion */ 17 | #include "MS_common.h" 18 | 19 | /* --------------------------------------------- Global Definitions */ 20 | 21 | /* --------------------------------------------- Structures/Data Types */ 22 | 23 | /* --------------------------------------------- Macros */ 24 | 25 | /* --------------------------------------------- Internal Functions */ 26 | 27 | /* --------------------------------------------- API Declarations */ 28 | void mesh_model_platform_init_pl(void); 29 | void mesh_model_device_bootup_ind_pl(void); 30 | void mesh_model_device_provisioned_ind_pl(void); 31 | void generic_onoff_set_pl (UINT8 state); 32 | void vendor_mode_mainlight_onoff_set_pl (UINT8 state); 33 | void vendor_mode_backlight_onoff_set_pl (UINT8 state); 34 | void light_lightness_set_pl (uint16_t ligtnessValue); 35 | void light_ctl_set_pl (uint16_t ctlValue,uint16_t dltUV); 36 | void light_hsl_set_pl (uint16_t H,uint16_t S,uint16_t L); 37 | 38 | #endif /* _H_MODEL_STATE_HANDLER_ */ 39 | 40 | -------------------------------------------------------------------------------- /components/ethermind/utils/include/aes_cmac_pl.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file aes_cmac_pl.h 4 | * 5 | * 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2013. Mindtree Ltd. 10 | * All rights reserved. 11 | */ 12 | 13 | #ifndef _H_AES_CMAC_PL_ 14 | #define _H_AES_CMAC_PL_ 15 | 16 | /* --------------------------------------------- Header File Inclusion */ 17 | #include "EM_os.h" 18 | #include "cry.h" 19 | 20 | /* --------------------------------------------- Global Definitions */ 21 | 22 | /* --------------------------------------------- Structures/Data Types */ 23 | 24 | /* --------------------------------------------- Macros */ 25 | /* Hack. TBD */ 26 | #define EM_MODULE_ID_AES_CMAC 0 27 | 28 | /* --------------------------------------------- Internal Functions */ 29 | 30 | /* --------------------------------------------- API Declarations */ 31 | /* Platform Init */ 32 | void aes_cmac_init_pl (void); 33 | 34 | /* Platform Encrypt */ 35 | EM_RESULT aes_cmac_128B_encrypt_pl (UCHAR * key, UCHAR * data, UCHAR * encout); 36 | void aes_cmac_128B_encrypt_complete_pl(UCHAR status, UCHAR * data, UINT16 length); 37 | 38 | #endif /* _H_AES_CMAC_PL_ */ 39 | 40 | -------------------------------------------------------------------------------- /components/ethermind/utils/include/ecdh.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright (C) Mindtree Consulting Ltd. 3 | This module is a confidential and proprietary property of Mindtree and 4 | a possession or use of this module requires written permission of Mindtree. 5 | ***************************************************************************/ 6 | 7 | /** 8 | * \file ecdh.h 9 | * Contains the Interface definition of ECDH functions required by 10 | * the Cryptographic modules. 11 | * 12 | * \date 2008-03-07 13 | */ 14 | 15 | #ifndef _ECDH_H_ 16 | #define _ECDH_H_ 17 | 18 | /* ========================= Include File Section ========================= */ 19 | #include "btypes.h" 20 | 21 | #ifdef ENABLE_LE_ECDH 22 | #include "mpal.h" 23 | 24 | /* ============================= API Section ============================== */ 25 | u8 verify_point_on_curve( DIGIT_S* X, DIGIT_S* Y); 26 | 27 | #ifdef ECDH_TIME_SLICE 28 | u8 mixed_scalar_multiply(u8* S, u8* X, u8* Y); 29 | u8 conv_coord(DIGIT_S* S, OUT DIGIT_S* X, OUT DIGIT_S* Y); 30 | #else 31 | void mixed_scalar_multiply(u8* S, u8* X, u8* Y); 32 | #endif 33 | 34 | #endif /* ENABLE_LE_ECDH */ 35 | 36 | #endif /* _ECDH_H_ */ 37 | -------------------------------------------------------------------------------- /components/inc/hal.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************************** 2 | 3 | Phyplus Microelectronics Limited confidential and proprietary. 4 | All rights reserved. 5 | 6 | IMPORTANT: All rights of this software belong to Phyplus Microelectronics 7 | Limited ("Phyplus"). Your use of this Software is limited to those 8 | specific rights granted under the terms of the business contract, the 9 | confidential agreement, the non-disclosure agreement and any other forms 10 | of agreements as a customer or a partner of Phyplus. You may not use this 11 | Software unless you agree to abide by the terms of these agreements. 12 | You acknowledge that the Software may not be modified, copied, 13 | distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy 14 | (BLE) integrated circuit, either as a product or is integrated into your 15 | products. Other than for the aforementioned purposes, you may not use, 16 | reproduce, copy, prepare derivative works of, modify, distribute, perform, 17 | display or sell this Software and/or its documentation for any purposes. 18 | 19 | YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE 20 | PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 21 | INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, 22 | NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL 23 | PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT, 24 | NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER 25 | LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES 26 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE 27 | OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT 28 | OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES 29 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. 30 | 31 | **************************************************************************************************/ 32 | 33 | #ifndef _HAL_H_ 34 | #define _HAL_H_ 35 | 36 | #include "types.h" 37 | 38 | uint16 HalUARTRead(uint8 port, uint8 *pbuf, uint16 len); 39 | 40 | 41 | #endif -------------------------------------------------------------------------------- /components/libraries/tinycrypt-0.2.8/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *~ 3 | *.d 4 | *.exe 5 | *.a 6 | -------------------------------------------------------------------------------- /components/libraries/tinycrypt-0.2.8/AUTHORS: -------------------------------------------------------------------------------- 1 | Architect: 2 | Rafael Misoczki 3 | 4 | Open Source Maintainer: 5 | Constanza Heath 6 | Rafael Misoczki 7 | 8 | Contributors: 9 | Constanza Heath 10 | Rafael Misoczki 11 | Flavio Santes 12 | Jarkko Sakkinen 13 | Chris Morrison 14 | Marti Bolivar 15 | Colin Ian King 16 | -------------------------------------------------------------------------------- /components/libraries/tinycrypt-0.2.8/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright (C) 2017 by Intel Corporation, All Rights Reserved. 4 | # 5 | # Global Makefile. 6 | # See lib/Makefile and tests/Makefile for further configuration. 7 | # 8 | ################################################################################ 9 | include config.mk 10 | 11 | all: 12 | $(MAKE) -C lib 13 | ifeq ($(ENABLE_TESTS),true) 14 | $(MAKE) -C tests 15 | endif 16 | 17 | clean: 18 | $(MAKE) -C lib clean 19 | $(MAKE) -C tests clean 20 | $(RM) *~ 21 | 22 | -------------------------------------------------------------------------------- /components/libraries/tinycrypt-0.2.8/VERSION: -------------------------------------------------------------------------------- 1 | 0.2.8 2 | -------------------------------------------------------------------------------- /components/libraries/tinycrypt-0.2.8/config.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright (C) 2017 by Intel Corporation, All Rights Reserved. 4 | # 5 | # Global configuration Makefile. Included everywhere. 6 | # 7 | ################################################################################ 8 | 9 | # EDIT HERE: 10 | CC:=gcc 11 | CFLAGS:=-Os -std=c99 -Wall -Wextra -D_ISOC99_SOURCE -MMD -I../lib/include/ -I../lib/source/ -I../tests/include/ 12 | vpath %.c ../lib/source/ 13 | ENABLE_TESTS=true 14 | 15 | # override MinGW built-in recipe 16 | %.o: %.c 17 | $(COMPILE.c) $(OUTPUT_OPTION) $< 18 | 19 | ifeq ($(OS),Windows_NT) 20 | DOTEXE:=.exe 21 | endif 22 | 23 | # DO NOT EDIT AFTER THIS POINT: 24 | ifeq ($(ENABLE_TESTS), true) 25 | CFLAGS += -DENABLE_TESTS 26 | else 27 | CFLAGS += -DDISABLE_TESTS 28 | endif 29 | 30 | export CC 31 | export CFLAGS 32 | export VPATH 33 | export ENABLE_TESTS 34 | 35 | ################################################################################ 36 | -------------------------------------------------------------------------------- /components/libraries/tinycrypt-0.2.8/lib/Makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright (C) 2017 by Intel Corporation, All Rights Reserved. 4 | # 5 | # Cryptographic Primitives Makefile. 6 | # 7 | ################################################################################ 8 | 9 | include ../config.mk 10 | 11 | # Edit the OBJS content to add/remove primitives needed from TinyCrypt library: 12 | OBJS:=aes_decrypt.o \ 13 | aes_encrypt.o \ 14 | cbc_mode.o \ 15 | ctr_mode.o \ 16 | ctr_prng.o \ 17 | hmac.o \ 18 | hmac_prng.o \ 19 | sha256.o \ 20 | ecc.o \ 21 | ecc_dh.o \ 22 | ecc_dsa.o \ 23 | ccm_mode.o \ 24 | cmac_mode.o \ 25 | utils.o 26 | 27 | DEPS:=$(OBJS:.o=.d) 28 | 29 | all: libtinycrypt.a 30 | 31 | libtinycrypt.a: $(OBJS) 32 | $(AR) $(ARFLAGS) $@ $^ 33 | 34 | .PHONY: clean 35 | 36 | clean: 37 | -$(RM) *.exe $(OBJS) $(DEPS) *~ libtinycrypt.a 38 | 39 | -include $(DEPS) 40 | -------------------------------------------------------------------------------- /components/osal/include/comdef.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/components/osal/include/comdef.h -------------------------------------------------------------------------------- /components/profiles/ota/ota_flash_mesh.h: -------------------------------------------------------------------------------- 1 | #ifndef __OTA_MESH_FLASH_ 2 | #define __OTA_MESH_FLASH_ 3 | 4 | #include "ota_flash.h" 5 | 6 | 7 | 8 | #ifndef CFG_OTA_MESH 9 | #error "unsupported OTA_mesh config, please check micro:CFG_OTA_MESH!" 10 | #else 11 | 12 | 13 | #if(CFG_FLASH >= 512) 14 | #define OTAFM_APP_RAMRUN_ADDR 0x11017000 //108K bytes 15 | #define OTAFM_APP_XIP_ADDR 0x11032000 //120K bytes 16 | #define OTAFM_FW_OTA_ADDR 0x11050000 //256K bytes 17 | #define OTAFM_FW_OTA_INFO_SZ 0x1000 //size of ota info, 4K 18 | #define OTAFM_FW_OTA_DATA_OFFSET 0x2000 19 | #define OTAFM_FW_OTA_DATA_ADDR (OTAFM_FW_OTA_ADDR + OTAFM_FW_OTA_DATA_OFFSET) 20 | 21 | #endif 22 | 23 | #define OTAFM_DEV_FLG_USED 0 24 | #define OTAFM_DEV_FLG_UNINIT 0xff 25 | #define OTAFM_DEV_FLG_INVALID 0x80 26 | #define OTAFM_DEV_FLG_READY 0xfe 27 | #define OTAFM_DEV_FLG_OTAING 0xfc 28 | #define OTAFM_DEV_FLG_COMPLETED 0xf8 29 | #define OTAFM_DEV_FLG_FAILED 0xec 30 | 31 | 32 | typedef struct{ 33 | uint16_t dev_type; 34 | uint16_t index; 35 | uint8_t dev_addr[6]; 36 | }otafmesh_dev_t; 37 | 38 | int otafm_write_partition(uint32 addr, uint32_t* p_sect, uint32_t size); 39 | int otafm_write_boot_sector(uint32_t* p_sect, uint32_t size, uint32_t offset); 40 | int otafm_dev_add(otafmesh_dev_t* pdev); 41 | int otafm_dev_pull(otafmesh_dev_t* pdev); 42 | int otafm_dev_clear(otafmesh_dev_t* pdev); 43 | int otafm_fw_load(ota_fw_t* pfw); 44 | int otafm_fw_execute(void); 45 | int otafm_format(void); 46 | #endif //CFG_FLASH 47 | #endif //__OTA_MESH_FLASH_ 48 | 49 | -------------------------------------------------------------------------------- /components/profiles/ppsp/ppsp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef PPSP_IMPL_H 2 | #define PPSP_IMPL_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | 10 | /********************************************************************* 11 | * INCLUDES 12 | */ 13 | #include "comdef.h" 14 | 15 | /********************************************************************* 16 | * CONSTANTS 17 | */ 18 | 19 | /* 20 | * callback of tick, on which used as watch guard and ticker for xfer 21 | */ 22 | void 23 | ppsp_impl_appl_timr_hdlr(void); 24 | 25 | uint8 26 | ppsp_impl_ini(void); 27 | 28 | uint32 29 | ppsp_impl_get_stat(void); 30 | 31 | uint8 32 | ppsp_impl_get_pids(uint8* pids); 33 | 34 | uint8 35 | ppsp_impl_get_macs(uint8* macs); 36 | 37 | uint8 38 | ppsp_impl_get_scrt(uint8* scrt); 39 | 40 | uint8 41 | ppsp_impl_cal_keys(const uint8* rand, uint8 rsiz, const uint8* pids, uint8 psiz, const uint8* macs, uint8 msiz, const uint8* scrt, uint8 ssiz); 42 | 43 | uint8 44 | ppsp_impl_enc_text(uint8* text, uint8* cipr); 45 | 46 | uint8 47 | ppsp_impl_dec_cipr(uint8* text, uint8* cipr); 48 | 49 | /* 50 | * callback of connection stat changes 51 | */ 52 | void 53 | ppsp_impl_ack_conn(uint8 flag); 54 | 55 | // uint8 56 | // ppsp_impl_set_msgs(); 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif /* */ 63 | -------------------------------------------------------------------------------- /example/OTA/OTA_internal_flash/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'ota_if' 7 | * Target: 'ota_internal_flash' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/OTA/OTA_internal_flash/bin/OTA_APP_LOADER: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/OTA/OTA_internal_flash/bin/OTA_APP_LOADER -------------------------------------------------------------------------------- /example/OTA/OTA_internal_flash/bin/OTA_LARGE_HEAP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/OTA/OTA_internal_flash/bin/OTA_LARGE_HEAP -------------------------------------------------------------------------------- /example/OTA/OTA_internal_flash/bin/OTA_SECTOR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/OTA/OTA_internal_flash/bin/OTA_SECTOR -------------------------------------------------------------------------------- /example/OTA/OTA_internal_flash/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/OTA/OTA_internal_flash/ram.ini -------------------------------------------------------------------------------- /example/OTA/OTA_internal_flash/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x20008000 0x00009C00 { ; load region size_region 6 | ER_IROM1 0x20008000 0x00009C00 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | ;RW_IRAM1 0x20000000 0x00003000 { ; RW data 15 | ; .ANY (+RW +ZI) 16 | ;} 17 | ;ER_IROM2 0x1fff4100 0x0003500 { ; load address = execution address 18 | ; .ANY (+RO) 19 | ;} 20 | 21 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 22 | ; .ANY (+RW +ZI) 23 | ;} 24 | 25 | } 26 | 27 | LR_IROM2 0x1fff5000 0x10800 { 28 | ; 66kB for ota_partition_buffer_area (statement : 64KB+16B) 29 | OTA_SECTOR 0x1fff5000 0x10800 { 30 | .ANY (ota_partition_buffer_area) 31 | } 32 | } 33 | 34 | LR_IROM3 0x1fff0800 0x00800 { 35 | JUMP_TABLE 0x1fff0800 0x00400 { 36 | .ANY (jump_table_mem_area) 37 | 38 | } 39 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 40 | .ANY (global_config_area) 41 | 42 | } 43 | } 44 | LR_IROM4 0x20011C00 0xC00 { 45 | OTA_APP_LOADER 0x20011C00 0xC00 { 46 | .ANY (ota_app_loader_area) 47 | ;crc16.o 48 | aes.o 49 | .ANY (+RO) 50 | .ANY (+RW +ZI) 51 | .ANY(STACK) 52 | } 53 | } 54 | LR_IROM5 0x20005800 0x2800 { 55 | OTA_LARGE_HEAP 0x20005800 0x2800 { 56 | .ANY (large_heap_buffer_area) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /example/OTA/OTA_master/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'otam' 7 | * Target: 'simpleBleCentral Sample' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/OTA/OTA_master/Source/otam_1clk_ota.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __OTAM_1CLK_OTA_H 3 | #define __OTAM_1CLK_OTA_H 4 | 5 | enum{ 6 | ONECLK_EVT_CONNECTED, 7 | ONECLK_EVT_TERMINATED, 8 | ONECLK_EVT_TIMER, 9 | ONECLK_EVT_OTA_FINISHED 10 | 11 | }; 12 | 13 | typedef struct{ 14 | uint8_t ev; 15 | 16 | 17 | 18 | }oneclk_evt_t; 19 | 20 | 21 | void otam_oneclick_evt(oneclk_evt_t* pev); 22 | 23 | void otam_oneclick_ota(void); 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /example/OTA/OTA_master/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/OTA/OTA_master/ram.ini -------------------------------------------------------------------------------- /example/OTA/OTA_master/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | 6 | LR_IROM1 0x1fff4800 0x001c000 { ; load region size_region 7 | ER_IROM1 0x1fff4800 0x001c000 { ; load address = execution address 8 | *.o (RESET, +First) 9 | *(InRoot$$Sections) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | } 14 | 15 | ;LR_IROM3 0x20000000 0x00010000 { ; load region size_region 16 | ;RF_DTM_RO 0x20000000 0x0003000 { ; load address = execution address 17 | ;;*.o (RESET, +First) 18 | ;;*(InRoot$$Sections) 19 | ;rf_phy_driver.o (i.rf_phy_dtm_zigbee_pkt_gen) 20 | ;rf_phy_driver.o (i.rf_phy_direct_test) 21 | ;rf_phy_driver.o (i.rf_phy_dtm_cmd_parse) 22 | ;rf_phy_driver.o (i.rf_phy_dtm_evt_send) 23 | ;rf_phy_driver.o (i.rf_phy_dtm_trigged) 24 | ;} 25 | ;} 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/OTA/OTA_upgrade_2ndboot/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'ota_upgrade' 7 | * Target: 'otaug' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/OTA/OTA_upgrade_2ndboot/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/OTA/OTA_upgrade_2ndboot/ram.ini -------------------------------------------------------------------------------- /example/OTA/OTA_upgrade_2ndboot/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0000c000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x0000c000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | 15 | } 16 | 17 | LR_IROM2 0x1fff0800 0x00800 { 18 | JUMP_TABLE 0x1fff0800 0x00400 { 19 | .ANY (jump_table_mem_area) 20 | 21 | } 22 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 23 | .ANY (global_config_area) 24 | 25 | } 26 | } 27 | 28 | LR_IROM3 0x20000000 0x0000c000 { ; load region size_region 29 | ER_IROM2 0x20000000 0x0000c000 { ; load address = execution address 30 | .ANY (ota_update_code_area) 31 | otaupgrade.o 32 | .ANY (+RO) 33 | .ANY (+RW +ZI) 34 | 35 | } 36 | 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /example/OTA/uart_ext_flash/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'uart_ext_flash' 7 | * Target: 'uart_ext_flash' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/OTA/uart_ext_flash/RTE/_uart_ext_flash/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'uart_ext_flash' 7 | * Target: 'uart_ext_flash' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/OTA/uart_ext_flash/Source/OSAL_uart_extf.c: -------------------------------------------------------------------------------- 1 | 2 | /************************************************************************************************** 3 | * INCLUDES 4 | **************************************************************************************************/ 5 | #include "OSAL.h" 6 | #include "OSAL_Tasks.h" 7 | 8 | /* LL */ 9 | #include "ll.h" 10 | 11 | /* Application */ 12 | #include "uart_extf.h" 13 | 14 | /********************************************************************* 15 | * GLOBAL VARIABLES 16 | */ 17 | 18 | // The order in this table must be identical to the task initialization calls below in osalInitTask. 19 | const pTaskEventHandlerFn tasksArr[] = 20 | { 21 | LL_ProcessEvent, 22 | uartextf_App_ProcessEvent 23 | }; 24 | 25 | const uint8 tasksCnt = sizeof( tasksArr ) / sizeof( tasksArr[0] ); 26 | uint16 *tasksEvents; 27 | 28 | /********************************************************************* 29 | * FUNCTIONS 30 | *********************************************************************/ 31 | 32 | /********************************************************************* 33 | * @fn osalInitTasks 34 | * 35 | * @brief This function invokes the initialization function for each task. 36 | * 37 | * @param void 38 | * 39 | * @return none 40 | */ 41 | void osalInitTasks( void ) 42 | { 43 | uint8 taskID = 0; 44 | 45 | tasksEvents = (uint16 *)osal_mem_alloc( sizeof( uint16 ) * tasksCnt); 46 | osal_memset( tasksEvents, 0, (sizeof( uint16 ) * tasksCnt)); 47 | 48 | /* LL Task */ 49 | LL_Init( taskID++ ); 50 | 51 | /* Application */ 52 | uartextf_App_Init( taskID ); 53 | } 54 | 55 | /********************************************************************* 56 | *********************************************************************/ 57 | -------------------------------------------------------------------------------- /example/OTA/uart_ext_flash/Source/spi_flash_drv.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __SPIFLASH_DRV_H__ 3 | #define __SPIFLASH_DRV_H__ 4 | #include "bcomdef.h" 5 | 6 | /*gd25q16 cmd define*/ 7 | #define FLASH_WREN 0x06 8 | #define FLASH_WRDIS 0x04 9 | #define FLASH_CE 0x60 10 | //#define FLASH_CE 0xC7 11 | 12 | #define FLASH_DP 0xB9 13 | #define FLASH_RDI 0xAB 14 | #define FLASH_SE 0x20 15 | #define FLASH_BE_32KB 0x52 16 | #define FLASH_BE_64KB 0xD8 17 | #define FLASH_WRSR 0x01 18 | #define FLASH_RDID 0x9F 19 | #define FLASH_RDSR_LOW 0x05 20 | #define FLASH_RDSR_HIGH 0x35 21 | #define FLASH_PP 0x02 22 | #define FLASH_READ 0x03 23 | 24 | int spiflash_write(uint32_t addr, uint8* data, uint32_t len); 25 | int spiflash_read(uint32_t addr, uint8* data, uint32_t len); 26 | int spiflash_erase(uint32_t addr,uint32_t len); 27 | int spiflash_erase_all(void); 28 | int spiflash_init(void); 29 | 30 | 31 | #endif 32 | 33 | 34 | -------------------------------------------------------------------------------- /example/OTA/uart_ext_flash/Source/uart_extf_cmd.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _OTAUART_CMD_H 3 | #define _OTAUART_CMD_H 4 | 5 | 6 | enum{ 7 | OTA_MODE_OTA_APPLICATION= 0, 8 | OTA_MODE_OTA_FCT, //1 9 | OTA_MODE_OTA, //2 10 | OTA_MODE_RESOURCE, //3 11 | OTA_MODE_UART //4 12 | }; 13 | 14 | 15 | 16 | void uartextf_timer_hdl(void); 17 | void uartextf_cmdinit(void); 18 | 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /example/OTA/uart_ext_flash/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/OTA/uart_ext_flash/ram.ini -------------------------------------------------------------------------------- /example/OTA/uart_ext_flash/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0001e000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x0001e000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | ;RW_IRAM1 0x20000000 0x00003000 { ; RW data 15 | ; .ANY (+RW +ZI) 16 | ;} 17 | ;ER_IROM2 0x1fff4100 0x0003500 { ; load address = execution address 18 | ; .ANY (+RO) 19 | ;} 20 | 21 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 22 | ; .ANY (+RW +ZI) 23 | ;} 24 | 25 | } 26 | 27 | 28 | 29 | LR_IROM3 0x1fff0800 0x00800 { 30 | JUMP_TABLE 0x1fff0800 0x00400 { 31 | .ANY (jump_table_mem_area) 32 | 33 | } 34 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 35 | .ANY (global_config_area) 36 | 37 | } 38 | } 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /example/ble_central/simpleBleCentral/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'simpleBleCentral' 7 | * Target: 'simpleBleCentral Sample' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_central/simpleBleCentral/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_central/simpleBleCentral/ram.ini -------------------------------------------------------------------------------- /example/ble_central/simpleBleCentral/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | 6 | LR_IROM1 0x1fff4800 0x0018000 { ; load region size_region 7 | ER_IROM1 0x1fff4800 0x0010000 { ; load address = execution address 8 | *.o (RESET, +First) 9 | *(InRoot$$Sections) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | } 14 | 15 | ;LR_IROM3 0x20000000 0x00010000 { ; load region size_region 16 | ;RF_DTM_RO 0x20000000 0x0003000 { ; load address = execution address 17 | ;;*.o (RESET, +First) 18 | ;;*(InRoot$$Sections) 19 | ;rf_phy_driver.o (i.rf_phy_dtm_zigbee_pkt_gen) 20 | ;rf_phy_driver.o (i.rf_phy_direct_test) 21 | ;rf_phy_driver.o (i.rf_phy_dtm_cmd_parse) 22 | ;rf_phy_driver.o (i.rf_phy_dtm_evt_send) 23 | ;rf_phy_driver.o (i.rf_phy_dtm_trigged) 24 | ;} 25 | ;} 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/aliGenie_appl_common.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/aliGenie_appl_common.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/appl_base/aliGenie_appl_Prov.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/appl_base/aliGenie_appl_Prov.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/appl_base/aliGenie_bleMesh.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/appl_base/aliGenie_bleMesh.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/appl_base/appl_utils.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/appl_base/appl_utils.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/include/aliGenie_appl_Light.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _ALIGENIE_LIGHT_H_ 3 | #define _ALIGENIE_LIGHT_H_ 4 | 5 | #include "MS_light_lightness_api.h" 6 | #include "MS_light_ctl_api.h" 7 | #include "MS_light_hsl_api.h" 8 | 9 | /** -- Light - CTL */ 10 | #define LIGHT_CTL_TEMPERATURE_T_MIN 0x0320 11 | #define LIGHT_CTL_TEMPERATURE_T_MAX 0x4E20 12 | 13 | typedef struct ui_data_light_ctl_model UI_DATA_LIGHT_CTL_MODEL_T; 14 | 15 | struct ui_data_light_ctl_model 16 | { 17 | MS_ACCESS_ELEMENT_HANDLE element_handle; 18 | MS_ACCESS_MODEL_HANDLE model_handle; 19 | MS_ACCESS_MODEL_HANDLE setup_model_handle; 20 | 21 | MS_STATE_LIGHT_CTL_STRUCT UI_light_ctl; 22 | MS_STATE_LIGHT_CTL_DEFAULT_STRUCT UI_light_ctl_default; 23 | MS_STATE_LIGHT_CTL_TEMPERATURE_STRUCT UI_light_ctl_temperature; 24 | 25 | 26 | }; 27 | 28 | /** -- Light - HSL */ 29 | 30 | typedef struct ui_data_light_hsl_model UI_DATA_LIGHT_HSL_MODEL_T; 31 | 32 | struct ui_data_light_hsl_model 33 | { 34 | MS_ACCESS_ELEMENT_HANDLE element_handle; 35 | MS_ACCESS_MODEL_HANDLE model_handle; 36 | MS_ACCESS_MODEL_HANDLE setup_model_handle; 37 | 38 | MS_STATE_LIGHT_HSL_STRUCT UI_light_hsl; 39 | MS_STATE_LIGHT_HSL_RANGE_STRUCT UI_light_hsl_range; 40 | MS_STATE_LIGHT_HSL_DEFAULT_STRUCT UI_light_hsl_default; 41 | 42 | }; 43 | 44 | /** -- Light - Lightness */ 45 | typedef struct ui_data_light_lightness_model 46 | { 47 | MS_ACCESS_ELEMENT_HANDLE element_handle; 48 | MS_ACCESS_MODEL_HANDLE model_handle; 49 | MS_STATE_LIGHT_LIGHTNESS_STRUCT UI_light_lightness; 50 | 51 | }UI_DATA_LIGHT_LIGHTNESS_MODEL_T; 52 | 53 | 54 | /** 55 | * Light HSL state is a composite state that includes the Light HSL Lighness, 56 | * the Light HSL Hue and the Light HSL Saturation states 57 | */ 58 | 59 | extern API_RESULT UI_light_ctl_model_server_create(MS_ACCESS_ELEMENT_HANDLE element_handle); 60 | extern API_RESULT UI_light_hsl_model_server_create(MS_ACCESS_ELEMENT_HANDLE element_handle); 61 | extern API_RESULT UI_light_lightness_model_server_create(MS_ACCESS_ELEMENT_HANDLE element_handle); 62 | 63 | #endif //_ALIGENIE_LIGHT_H_ 64 | 65 | 66 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/include/aliGenie_appl_Proxy.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALIGENIE_APPL_H_ 2 | #define _ALIGENIE_APPL_H_ 3 | 4 | #include "aliGenie_appl.h" 5 | 6 | 7 | void UI_proxy_start_adv(MS_SUBNET_HANDLE subnet_handle, UCHAR proxy_adv_mode); 8 | void UI_proxy_callback(NETIF_HANDLE * handle,UCHAR p_evt,UCHAR * data_param,UINT16 data_len); 9 | #ifdef MS_PROXY_SUPPORT 10 | void UI_register_proxy(void); 11 | #endif 12 | 13 | #endif //_ALIGENIE_APPL_H_ 14 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/include/aliGenie_appl_node_mng.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _ALIGENIE_APPL_NODE_MNG_H_ 3 | #define _ALIGENIE_APPL_NODE_MNG_H_ 4 | 5 | #include "MS_common.h" 6 | #include "MS_access_api.h" 7 | #include "MS_net_api.h" 8 | 9 | #define MODEL_TREE_MAXNUM 20 10 | bool find_element_by_model( MS_ACCESS_MODEL_HANDLE model_handle, MS_ACCESS_ELEMENT_HANDLE * element_handle); 11 | bool appl_model_tree_add(MS_ACCESS_ELEMENT_HANDLE element_handle,MS_ACCESS_MODEL_HANDLE model_handle,void * p_private_data); 12 | void * find_model_private_data( MS_ACCESS_MODEL_HANDLE model_handle); 13 | UINT16 find_model_handles(MS_ACCESS_MODEL_HANDLE model_handle_list[]); 14 | bool set_element_addr_by_model_handle( MS_ACCESS_MODEL_HANDLE model_handle, MS_NET_ADDR element_addr); 15 | bool copyget_generic_scene_modele_handle( MS_ACCESS_MODEL_HANDLE model_handle,MS_ACCESS_MODEL_HANDLE *generic_scene_model_handle); 16 | bool set_generic_scene_modele_handle( MS_ACCESS_MODEL_HANDLE model_handle); 17 | bool set_all_element_addr_by_element_handle( MS_ACCESS_ELEMENT_HANDLE element_handle, MS_NET_ADDR element_addr); 18 | bool get_model_handles_of_element( MS_ACCESS_MODEL_HANDLE * model_handle, MS_ACCESS_ELEMENT_HANDLE element_handle); 19 | 20 | #endif //_ALIGENIE_APPL_NODE_MNG_H_ 21 | 22 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/include/appl_utils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/include/appl_utils.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/libs/lib_light.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/libs/lib_light.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/libs/lib_light.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIB_LIGHT_H_ 2 | #define _LIB_LIGHT_H_ 3 | typedef struct color_rgb 4 | { 5 | unsigned char r; 6 | unsigned char g; 7 | unsigned char b; 8 | }COLOR_RGB_T; 9 | 10 | extern void calc_color_rgb(unsigned int data, COLOR_RGB_T * color_rgb); 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/model_light/aliGenie_appl_Light_Ctl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/model_light/aliGenie_appl_Light_Ctl.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/model_light/aliGenie_appl_Light_Lightness.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh/model_light/aliGenie_appl_Light_Lightness.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_3Keyswitch' 7 | * Target: '3keyswitch' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/clean.bat: -------------------------------------------------------------------------------- 1 | del .\*.uvguix.* 2 | del .\*.uvoptx 3 | del .\*.htm 4 | del .\*.asm 5 | rd /s/q Listings 6 | for /f "tokens=*" %%i in ('dir/b/ad *.bin') do rd /s/q "%%i" 7 | del Objects\*.o 8 | del Objects\*.d 9 | del Objects\*.crf 10 | del Objects\*.htm 11 | del Objects\*.dep 12 | del Objects\*.lnp 13 | del _bld.txt -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/aliGenie_appl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/aliGenie_appl.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_fan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_fan.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_fanlight.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_fanlight.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_fogger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_fogger.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_heater.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_heater.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_light.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/include/aliGenie_appl_Vendor_light.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/model_vendor/aliGenie_appl_Vendor_3keyswitch.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/model_vendor/aliGenie_appl_Vendor_3keyswitch.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_3KeySwitch/source/model_vendor/aliGenie_appl_Vendor_indications.c: -------------------------------------------------------------------------------- 1 | #include "aliGenie_appl.h" 2 | #include "aliGenie_appl_vendor.h" 3 | 4 | 5 | API_RESULT vendor_Aligenie_indication(MS_NET_ADDR saddr,UINT16 attr_code, UINT32 attr_val,int attr_len) 6 | { 7 | 8 | MS_SUBNET_HANDLE subnet_handle; 9 | MS_APPKEY_HANDLE appkey_handle; 10 | UINT8 ttl; 11 | UINT32 opcode; 12 | UCHAR pdu[15]; 13 | UINT16 data_len = 1; 14 | 15 | 16 | subnet_handle = 0; 17 | appkey_handle = 0; 18 | ttl = 0x08; 19 | opcode = MS_ACCESS_VENDOR_ALIGENIE_INDICATION; 20 | 21 | pdu[0]=++vendor_msg_tid; 22 | 23 | make_attr_pdu(pdu+data_len, attr_code, attr_val, attr_len); 24 | if (attr_len > 0) 25 | { 26 | data_len += attr_len+2; 27 | } 28 | 29 | cfg_retry_flag = 1; 30 | for(int i = 0; i < 2 ; i++) 31 | { 32 | MS_access_send_pdu 33 | ( 34 | saddr, 35 | aligenie_addr, 36 | subnet_handle, 37 | appkey_handle, 38 | ttl, 39 | opcode, 40 | pdu, 41 | data_len, 42 | MS_TRUE 43 | ); 44 | } 45 | INFO_PRINT("Vendor Sending Indication, saddr = 0x%02X,data_len = %d \r\n", saddr,data_len); 46 | return API_SUCCESS; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_curtain' 7 | * Target: 'curtain' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/clean.bat: -------------------------------------------------------------------------------- 1 | del .\*.uvguix.* 2 | del .\*.uvoptx 3 | del .\*.htm 4 | del .\*.asm 5 | rd /s/q Listings 6 | for /f "tokens=*" %%i in ('dir/b/ad *.bin') do rd /s/q "%%i" 7 | del Objects\*.o 8 | del Objects\*.d 9 | del Objects\*.crf 10 | del Objects\*.htm 11 | del Objects\*.dep 12 | del Objects\*.lnp 13 | del _bld.txt -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/aliGenie_appl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/aliGenie_appl.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_fan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_fan.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_fanlight.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_fanlight.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_fogger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_fogger.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_heater.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_heater.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_light.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/include/aliGenie_appl_Vendor_light.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/model_vendor/aliGenie_appl_Vendor_Curtain.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/model_vendor/aliGenie_appl_Vendor_Curtain.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/model_vendor/aliGenie_appl_Vendor_indications.c: -------------------------------------------------------------------------------- 1 | #include "aliGenie_appl.h" 2 | #include "aliGenie_appl_vendor.h" 3 | 4 | 5 | API_RESULT vendor_Aligenie_indication(MS_NET_ADDR saddr,UINT16 attr_code, UINT32 attr_val,int attr_len) 6 | { 7 | 8 | MS_SUBNET_HANDLE subnet_handle; 9 | MS_APPKEY_HANDLE appkey_handle; 10 | UINT8 ttl; 11 | UINT32 opcode; 12 | UCHAR pdu[15]; 13 | UINT16 data_len = 1; 14 | 15 | 16 | subnet_handle = 0; 17 | appkey_handle = 0; 18 | ttl = 0x08; 19 | opcode = MS_ACCESS_VENDOR_ALIGENIE_INDICATION; 20 | 21 | pdu[0]=++vendor_msg_tid; 22 | 23 | make_attr_pdu(pdu+data_len, attr_code, attr_val, attr_len); 24 | if (attr_len > 0) 25 | { 26 | data_len += attr_len+2; 27 | } 28 | 29 | cfg_retry_flag = 1; 30 | for(int i = 0; i < 2 ; i++) 31 | { 32 | MS_access_send_pdu 33 | ( 34 | saddr, 35 | aligenie_addr, 36 | subnet_handle, 37 | appkey_handle, 38 | ttl, 39 | opcode, 40 | pdu, 41 | data_len, 42 | MS_TRUE 43 | ); 44 | } 45 | INFO_PRINT("Vendor Sending Indication, saddr = 0x%02X,data_len = %d \r\n", saddr,data_len); 46 | return API_SUCCESS; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/model_vendor/aliGenie_appl_Vendor_light.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_curtain/source/model_vendor/aliGenie_appl_Vendor_light.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_fan' 7 | * Target: 'fan' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/clean.bat: -------------------------------------------------------------------------------- 1 | del .\*.uvguix.* 2 | del .\*.uvoptx 3 | del .\*.htm 4 | del .\*.asm 5 | rd /s/q Listings 6 | for /f "tokens=*" %%i in ('dir/b/ad *.bin') do rd /s/q "%%i" 7 | del Objects\*.o 8 | del Objects\*.d 9 | del Objects\*.crf 10 | del Objects\*.htm 11 | del Objects\*.dep 12 | del Objects\*.lnp 13 | del _bld.txt -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/aliGenie_appl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/aliGenie_appl.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_fan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_fan.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_fanlight.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_fanlight.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_fogger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_fogger.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_heater.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_heater.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_light.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/include/aliGenie_appl_Vendor_light.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/model_vendor/aliGenie_appl_Vendor_WirelessButton.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/model_vendor/aliGenie_appl_Vendor_WirelessButton.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/model_vendor/aliGenie_appl_Vendor_fan.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/model_vendor/aliGenie_appl_Vendor_fan.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/model_vendor/aliGenie_appl_Vendor_indications.c: -------------------------------------------------------------------------------- 1 | #include "aliGenie_appl.h" 2 | #include "aliGenie_appl_vendor.h" 3 | 4 | 5 | API_RESULT vendor_Aligenie_indication(MS_NET_ADDR saddr,UINT16 attr_code, UINT32 attr_val,int attr_len) 6 | { 7 | 8 | MS_SUBNET_HANDLE subnet_handle; 9 | MS_APPKEY_HANDLE appkey_handle; 10 | UINT8 ttl; 11 | UINT32 opcode; 12 | UCHAR pdu[15]; 13 | UINT16 data_len = 1; 14 | 15 | 16 | subnet_handle = 0; 17 | appkey_handle = 0; 18 | ttl = 0x08; 19 | opcode = MS_ACCESS_VENDOR_ALIGENIE_INDICATION; 20 | 21 | pdu[0]=++vendor_msg_tid; 22 | 23 | make_attr_pdu(pdu+data_len, attr_code, attr_val, attr_len); 24 | if (attr_len > 0) 25 | { 26 | data_len += attr_len+2; 27 | } 28 | 29 | cfg_retry_flag = 1; 30 | for(int i = 0; i < 2 ; i++) 31 | { 32 | MS_access_send_pdu 33 | ( 34 | saddr, 35 | aligenie_addr, 36 | subnet_handle, 37 | appkey_handle, 38 | ttl, 39 | opcode, 40 | pdu, 41 | data_len, 42 | MS_TRUE 43 | ); 44 | } 45 | INFO_PRINT("Vendor Sending Indication, saddr = 0x%02X,data_len = %d \r\n", saddr,data_len); 46 | return API_SUCCESS; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/model_vendor/aliGenie_appl_Vendor_light.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fan/source/model_vendor/aliGenie_appl_Vendor_light.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_fanlight' 7 | * Target: 'fanlight' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/clean.bat: -------------------------------------------------------------------------------- 1 | del .\*.uvguix.* 2 | del .\*.uvoptx 3 | del .\*.htm 4 | del .\*.asm 5 | rd /s/q Listings 6 | for /f "tokens=*" %%i in ('dir/b/ad *.bin') do rd /s/q "%%i" 7 | del Objects\*.o 8 | del Objects\*.d 9 | del Objects\*.crf 10 | del Objects\*.htm 11 | del Objects\*.dep 12 | del Objects\*.lnp 13 | del _bld.txt -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/aliGenie_appl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/aliGenie_appl.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_fan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_fan.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_fanlight.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_fanlight.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_fogger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_fogger.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_heater.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_heater.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_light.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/include/aliGenie_appl_Vendor_light.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/model_vendor/aliGenie_appl_Vendor_fan.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/model_vendor/aliGenie_appl_Vendor_fan.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/model_vendor/aliGenie_appl_Vendor_fanlight.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/model_vendor/aliGenie_appl_Vendor_fanlight.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/model_vendor/aliGenie_appl_Vendor_indications.c: -------------------------------------------------------------------------------- 1 | #include "aliGenie_appl.h" 2 | #include "aliGenie_appl_vendor.h" 3 | 4 | 5 | API_RESULT vendor_Aligenie_indication(MS_NET_ADDR saddr,UINT16 attr_code, UINT32 attr_val,int attr_len) 6 | { 7 | 8 | MS_SUBNET_HANDLE subnet_handle; 9 | MS_APPKEY_HANDLE appkey_handle; 10 | UINT8 ttl; 11 | UINT32 opcode; 12 | UCHAR pdu[15]; 13 | UINT16 data_len = 1; 14 | 15 | 16 | subnet_handle = 0; 17 | appkey_handle = 0; 18 | ttl = 0x08; 19 | opcode = MS_ACCESS_VENDOR_ALIGENIE_INDICATION; 20 | 21 | pdu[0]=++vendor_msg_tid; 22 | 23 | make_attr_pdu(pdu+data_len, attr_code, attr_val, attr_len); 24 | if (attr_len > 0) 25 | { 26 | data_len += attr_len+2; 27 | } 28 | 29 | cfg_retry_flag = 1; 30 | for(int i = 0; i < 2 ; i++) 31 | { 32 | MS_access_send_pdu 33 | ( 34 | saddr, 35 | aligenie_addr, 36 | subnet_handle, 37 | appkey_handle, 38 | ttl, 39 | opcode, 40 | pdu, 41 | data_len, 42 | MS_TRUE 43 | ); 44 | } 45 | INFO_PRINT("Vendor Sending Indication, saddr = 0x%02X,data_len = %d \r\n", saddr,data_len); 46 | return API_SUCCESS; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/model_vendor/aliGenie_appl_Vendor_light.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fanlight/source/model_vendor/aliGenie_appl_Vendor_light.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_fogger' 7 | * Target: 'fogger' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/clean.bat: -------------------------------------------------------------------------------- 1 | del .\*.uvguix.* 2 | del .\*.uvoptx 3 | del .\*.htm 4 | del .\*.asm 5 | rd /s/q Listings 6 | for /f "tokens=*" %%i in ('dir/b/ad *.bin') do rd /s/q "%%i" 7 | del Objects\*.o 8 | del Objects\*.d 9 | del Objects\*.crf 10 | del Objects\*.htm 11 | del Objects\*.dep 12 | del Objects\*.lnp 13 | del _bld.txt -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/aliGenie_appl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/aliGenie_appl.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_fan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_fan.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_fanlight.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_fanlight.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_fogger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_fogger.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_heater.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_heater.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_light.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/include/aliGenie_appl_Vendor_light.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/model_vendor/aliGenie_appl_Vendor_fogger.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/model_vendor/aliGenie_appl_Vendor_fogger.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/model_vendor/aliGenie_appl_Vendor_indications.c: -------------------------------------------------------------------------------- 1 | #include "aliGenie_appl.h" 2 | #include "aliGenie_appl_vendor.h" 3 | 4 | 5 | API_RESULT vendor_Aligenie_indication(MS_NET_ADDR saddr,UINT16 attr_code, UINT32 attr_val,int attr_len) 6 | { 7 | 8 | MS_SUBNET_HANDLE subnet_handle; 9 | MS_APPKEY_HANDLE appkey_handle; 10 | UINT8 ttl; 11 | UINT32 opcode; 12 | UCHAR pdu[15]; 13 | UINT16 data_len = 1; 14 | 15 | 16 | subnet_handle = 0; 17 | appkey_handle = 0; 18 | ttl = 0x08; 19 | opcode = MS_ACCESS_VENDOR_ALIGENIE_INDICATION; 20 | 21 | pdu[0]=++vendor_msg_tid; 22 | 23 | make_attr_pdu(pdu+data_len, attr_code, attr_val, attr_len); 24 | if (attr_len > 0) 25 | { 26 | data_len += attr_len+2; 27 | } 28 | 29 | cfg_retry_flag = 1; 30 | for(int i = 0; i < 2 ; i++) 31 | { 32 | MS_access_send_pdu 33 | ( 34 | saddr, 35 | aligenie_addr, 36 | subnet_handle, 37 | appkey_handle, 38 | ttl, 39 | opcode, 40 | pdu, 41 | data_len, 42 | MS_TRUE 43 | ); 44 | } 45 | INFO_PRINT("Vendor Sending Indication, saddr = 0x%02X,data_len = %d \r\n", saddr,data_len); 46 | return API_SUCCESS; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/model_vendor/aliGenie_appl_Vendor_light.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_fogger/source/model_vendor/aliGenie_appl_Vendor_light.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_heater' 7 | * Target: 'heater' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/clean.bat: -------------------------------------------------------------------------------- 1 | del .\*.uvguix.* 2 | del .\*.uvoptx 3 | del .\*.htm 4 | del .\*.asm 5 | rd /s/q Listings 6 | for /f "tokens=*" %%i in ('dir/b/ad *.bin') do rd /s/q "%%i" 7 | del Objects\*.o 8 | del Objects\*.d 9 | del Objects\*.crf 10 | del Objects\*.htm 11 | del Objects\*.dep 12 | del Objects\*.lnp 13 | del _bld.txt -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/aliGenie_appl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/aliGenie_appl.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_fan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_fan.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_fanlight.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_fanlight.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_fogger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_fogger.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_heater.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_heater.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_light.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/include/aliGenie_appl_Vendor_light.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/model_vendor/aliGenie_appl_Vendor_heater.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/model_vendor/aliGenie_appl_Vendor_heater.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/model_vendor/aliGenie_appl_Vendor_indications.c: -------------------------------------------------------------------------------- 1 | #include "aliGenie_appl.h" 2 | #include "aliGenie_appl_vendor.h" 3 | 4 | 5 | API_RESULT vendor_Aligenie_indication(MS_NET_ADDR saddr,UINT16 attr_code, UINT32 attr_val,int attr_len) 6 | { 7 | 8 | MS_SUBNET_HANDLE subnet_handle; 9 | MS_APPKEY_HANDLE appkey_handle; 10 | UINT8 ttl; 11 | UINT32 opcode; 12 | UCHAR pdu[15]; 13 | UINT16 data_len = 1; 14 | 15 | 16 | subnet_handle = 0; 17 | appkey_handle = 0; 18 | ttl = 0x08; 19 | opcode = MS_ACCESS_VENDOR_ALIGENIE_INDICATION; 20 | 21 | pdu[0]=++vendor_msg_tid; 22 | 23 | make_attr_pdu(pdu+data_len, attr_code, attr_val, attr_len); 24 | if (attr_len > 0) 25 | { 26 | data_len += attr_len+2; 27 | } 28 | 29 | cfg_retry_flag = 1; 30 | for(int i = 0; i < 2 ; i++) 31 | { 32 | MS_access_send_pdu 33 | ( 34 | saddr, 35 | aligenie_addr, 36 | subnet_handle, 37 | appkey_handle, 38 | ttl, 39 | opcode, 40 | pdu, 41 | data_len, 42 | MS_TRUE 43 | ); 44 | } 45 | INFO_PRINT("Vendor Sending Indication, saddr = 0x%02X,data_len = %d \r\n", saddr,data_len); 46 | return API_SUCCESS; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/model_vendor/aliGenie_appl_Vendor_light.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_heater/source/model_vendor/aliGenie_appl_Vendor_light.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_light' 7 | * Target: 'light' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/clean.bat: -------------------------------------------------------------------------------- 1 | del .\*.uvguix.* 2 | del .\*.uvoptx 3 | del .\*.htm 4 | del .\*.asm 5 | rd /s/q Listings 6 | for /f "tokens=*" %%i in ('dir/b/ad *.bin') do rd /s/q "%%i" 7 | del Objects\*.o 8 | del Objects\*.d 9 | del Objects\*.crf 10 | del Objects\*.htm 11 | del Objects\*.dep 12 | del Objects\*.lnp 13 | del _bld.txt -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/aliGenie_appl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/aliGenie_appl.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_fan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_fan.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_fanlight.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_fanlight.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_fogger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_fogger.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_heater.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_heater.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_light.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/include/aliGenie_appl_Vendor_light.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/model_vendor/aliGenie_appl_Vendor_indications.c: -------------------------------------------------------------------------------- 1 | #include "aliGenie_appl.h" 2 | #include "aliGenie_appl_vendor.h" 3 | 4 | 5 | API_RESULT vendor_Aligenie_indication(MS_NET_ADDR saddr,UINT16 attr_code, UINT32 attr_val,int attr_len) 6 | { 7 | 8 | MS_SUBNET_HANDLE subnet_handle; 9 | MS_APPKEY_HANDLE appkey_handle; 10 | UINT8 ttl; 11 | UINT32 opcode; 12 | UCHAR pdu[15]; 13 | UINT16 data_len = 1; 14 | 15 | 16 | subnet_handle = 0; 17 | appkey_handle = 0; 18 | ttl = 0x08; 19 | opcode = MS_ACCESS_VENDOR_ALIGENIE_INDICATION; 20 | 21 | pdu[0]=++vendor_msg_tid; 22 | 23 | make_attr_pdu(pdu+data_len, attr_code, attr_val, attr_len); 24 | if (attr_len > 0) 25 | { 26 | data_len += attr_len+2; 27 | } 28 | 29 | cfg_retry_flag = 1; 30 | for(int i = 0; i < 2 ; i++) 31 | { 32 | MS_access_send_pdu 33 | ( 34 | saddr, 35 | aligenie_addr, 36 | subnet_handle, 37 | appkey_handle, 38 | ttl, 39 | opcode, 40 | pdu, 41 | data_len, 42 | MS_TRUE 43 | ); 44 | } 45 | INFO_PRINT("Vendor Sending Indication, saddr = 0x%02X,data_len = %d \r\n", saddr,data_len); 46 | return API_SUCCESS; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/model_vendor/aliGenie_appl_Vendor_light.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_light/source/model_vendor/aliGenie_appl_Vendor_light.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_socket' 7 | * Target: '3keyswitch' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'aliGenie_mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/clean.bat: -------------------------------------------------------------------------------- 1 | del .\*.uvguix.* 2 | del .\*.uvoptx 3 | del .\*.htm 4 | del .\*.asm 5 | rd /s/q Listings 6 | for /f "tokens=*" %%i in ('dir/b/ad *.bin') do rd /s/q "%%i" 7 | del Objects\*.o 8 | del Objects\*.d 9 | del Objects\*.crf 10 | del Objects\*.htm 11 | del Objects\*.dep 12 | del Objects\*.lnp 13 | del _bld.txt -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/aliGenie_appl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/aliGenie_appl.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_fan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_fan.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_fanlight.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_fanlight.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_fogger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_fogger.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_heater.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_heater.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_light.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/include/aliGenie_appl_Vendor_light.h -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/model_vendor/aliGenie_appl_Vendor_indications.c: -------------------------------------------------------------------------------- 1 | #include "aliGenie_appl.h" 2 | #include "aliGenie_appl_vendor.h" 3 | 4 | 5 | API_RESULT vendor_Aligenie_indication(MS_NET_ADDR saddr,UINT16 attr_code, UINT32 attr_val,int attr_len) 6 | { 7 | 8 | MS_SUBNET_HANDLE subnet_handle; 9 | MS_APPKEY_HANDLE appkey_handle; 10 | UINT8 ttl; 11 | UINT32 opcode; 12 | UCHAR pdu[15]; 13 | UINT16 data_len = 1; 14 | 15 | 16 | subnet_handle = 0; 17 | appkey_handle = 0; 18 | ttl = 0x08; 19 | opcode = MS_ACCESS_VENDOR_ALIGENIE_INDICATION; 20 | 21 | pdu[0]=++vendor_msg_tid; 22 | 23 | make_attr_pdu(pdu+data_len, attr_code, attr_val, attr_len); 24 | if (attr_len > 0) 25 | { 26 | data_len += attr_len+2; 27 | } 28 | 29 | cfg_retry_flag = 1; 30 | for(int i = 0; i < 2 ; i++) 31 | { 32 | MS_access_send_pdu 33 | ( 34 | saddr, 35 | aligenie_addr, 36 | subnet_handle, 37 | appkey_handle, 38 | ttl, 39 | opcode, 40 | pdu, 41 | data_len, 42 | MS_TRUE 43 | ); 44 | } 45 | INFO_PRINT("Vendor Sending Indication, saddr = 0x%02X,data_len = %d \r\n", saddr,data_len); 46 | return API_SUCCESS; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/model_vendor/aliGenie_appl_Vendor_socket.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/aliGenie_bleMesh_socket/source/model_vendor/aliGenie_appl_Vendor_socket.c -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/clean.bat: -------------------------------------------------------------------------------- 1 | del .\*.uvguix.* 2 | del .\*.uvoptx 3 | del .\*.htm 4 | del .\*.asm 5 | rd /s/q Listings 6 | for /f "tokens=*" %%i in ('dir/b/ad *.bin') do rd /s/q "%%i" 7 | del Objects\*.o 8 | del Objects\*.d 9 | del Objects\*.crf 10 | del Objects\*.htm 11 | del Objects\*.dep 12 | del Objects\*.lnp 13 | del _bld.txt -------------------------------------------------------------------------------- /example/ble_mesh/aliGenie_bleMesh/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/aliGenie_bleMesh/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/mesh_gateway/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'mesh_gateway' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_gateway/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'mesh_gateway' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_gateway/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/mesh_gateway/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/mesh_light/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_light/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'mesh_light' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_light/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/mesh_light/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/mesh_lpn/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'mesh_lpn' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_lpn/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/mesh_lpn/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/mesh_lpn/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0001e000{;0x0001e800 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x0001e000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | .ANY (+RW +ZI) 11 | } 12 | } 13 | 14 | 15 | LR_IROM2 0x1fff0800 0x00800 { 16 | JUMP_TABLE 0x1fff0800 0x00400 { 17 | .ANY (jump_table_mem_area) 18 | 19 | } 20 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 21 | .ANY (global_config_area) 22 | 23 | } 24 | } 25 | 26 | LR_IROM3 0x11032000 0x030000 { 27 | ER_IROM3 0x11032000 0x030000 { ; load address = execution address 28 | libethermind_mesh_models.lib (+RO) 29 | ;libethermind_utils.lib (+RO) 30 | libethermind_mesh_core.lib (+RO) 31 | ;devinfoservice.o(+RO) 32 | ;gatt*.o(+RO) 33 | ;gatt_client.o(+RO) 34 | ;cli_*.o (+RO) 35 | ;sm*.o (+RO) 36 | ;appl_*.o (+RO) 37 | } 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_lpn/source/bleMesh/bleMesh.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/mesh_lpn/source/bleMesh/bleMesh.c -------------------------------------------------------------------------------- /example/ble_mesh/mesh_sensor/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'mesh_sensor' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_sensor/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'mesh_sensor' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_sensor/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/mesh_sensor/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/mesh_sensor/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0001e000{;0x0001e800 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x0001e000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | .ANY (+RW +ZI) 11 | } 12 | } 13 | 14 | 15 | LR_IROM2 0x1fff0800 0x00800 { 16 | JUMP_TABLE 0x1fff0800 0x00400 { 17 | .ANY (jump_table_mem_area) 18 | 19 | } 20 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 21 | .ANY (global_config_area) 22 | 23 | } 24 | } 25 | 26 | LR_IROM3 0x11032000 0x030000 { 27 | ER_IROM3 0x11032000 0x030000 { ; load address = execution address 28 | ;libethermind_mesh_models.lib (+RO) 29 | ;libethermind_utils.lib (+RO) 30 | libethermind_mesh_core.lib (+RO) 31 | ;devinfoservice.o(+RO) 32 | ;gatt*.o(+RO) 33 | ;gatt_client.o(+RO) 34 | ;cli_*.o (+RO) 35 | ;sm*.o (+RO) 36 | ;appl_*.o (+RO) 37 | } 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_sensor/source/bleMesh/bleMesh.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/mesh_sensor/source/bleMesh/bleMesh.c -------------------------------------------------------------------------------- /example/ble_mesh/mesh_switch/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'mesh_switch' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_mesh/mesh_switch/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_mesh/mesh_switch/ram.ini -------------------------------------------------------------------------------- /example/ble_mesh/mesh_switch/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0001e000{;0x0001e800 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x0001e000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | .ANY (+RW +ZI) 11 | } 12 | } 13 | 14 | 15 | LR_IROM2 0x1fff0800 0x00800 { 16 | JUMP_TABLE 0x1fff0800 0x00400 { 17 | .ANY (jump_table_mem_area) 18 | 19 | } 20 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 21 | .ANY (global_config_area) 22 | 23 | } 24 | } 25 | 26 | LR_IROM3 0x11032000 0x030000 { 27 | ER_IROM3 0x11032000 0x030000 { ; load address = execution address 28 | libethermind_mesh_models.lib (+RO) 29 | ;libethermind_utils.lib (+RO) 30 | libethermind_mesh_core.lib (+RO) 31 | ;devinfoservice.o(+RO) 32 | ;gatt*.o(+RO) 33 | ;gatt_client.o(+RO) 34 | ;cli_*.o (+RO) 35 | ;sm*.o (+RO) 36 | ;appl_*.o (+RO) 37 | } 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /example/ble_multi/README.txt: -------------------------------------------------------------------------------- 1 | multiRole 做 master 时,连接 slave MAC Addr: 2 | addr[5] = 0x11 3 | addr[4] = 0x22 4 | addr[3] = 0x33 5 | addr[2] = 0x44 6 | addr[1] = 0x60 7 | addr[0] = 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 8 | 9 | master 通过 MultiRole characteristic 0xFFF5 控制 Slave LED Status 10 | master --> MultiRole --> Slave control LED ( Characteristic OxFFF5 ) 11 | 12 | 13 | 流程图查看: 14 | “multiRole.eddx” 可使用网页“http://www.edrawsoft.cn/viewer/app/” 查看 -------------------------------------------------------------------------------- /example/ble_multi/multiRole.eddx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_multi/multiRole.eddx -------------------------------------------------------------------------------- /example/ble_multi/simpleBleMultiConnection/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'simpleBleMulti' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_multi/simpleBleMultiConnection/RTE/_Target_1/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'simpleBleMulti' 7 | * Target: 'Target 1' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_multi/simpleBleMultiConnection/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_multi/simpleBleMultiConnection/ram.ini -------------------------------------------------------------------------------- /example/ble_multi/simpleBleMultiConnection/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0001e000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x0001e000 { ; load address = execution address 7 | *.o (RESET, +First) .ANY (+RO) 8 | .ANY (+ZI) 9 | hid*.o (+RW) 10 | *(InRoot$$Sections) 11 | } 12 | 13 | 14 | ; ER_IROM2 0x1fff1200 0x00002d00 { ; load address = execution address 15 | ER_IROM2 0x1fff101C 0x00002EE0 { ; load address = execution address 16 | ll_hwitf.o(i.ll_scheduler0) 17 | .ANY (+RW) 18 | gap*.o (+ZI) 19 | gatt*.o (+ZI) 20 | gapgatt*.o (+ZI) 21 | l2cap_util.o (+ZI) 22 | ;gap_centdevmgr.o (+RO) 23 | } 24 | } 25 | 26 | LR_IROM4 0x1fff0800 0x00800 { 27 | JUMP_TABLE 0x1fff0800 0x00400 { 28 | .ANY (jump_table_mem_area) 29 | } 30 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 31 | .ANY (global_config_area) 32 | } 33 | } 34 | 35 | ;LR_IROM3 0x11032000 0x030000 { 36 | ; ER_IROM3 0x11032000 0x030000 { ; load address = execution address 37 | LR_IROM3 0x11032000 0x01D000 { 38 | ER_IROM3 0x11032000 0x01D000 { ; load address = execution address 39 | multi*.o (+RO) 40 | linkdb.o (+RO) ; host code 41 | gap*.o (+RO) 42 | att*.o (+RO) 43 | gatt*.o (+RO) 44 | sm*.o (+RO) 45 | l2cap_if.o (+RO) 46 | l2cap_task.o (+RO) 47 | devinfoservice.o (+RO) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /example/ble_multi/simpleBleMultiConnection/source/multi_role/spi_flash_drv.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __SPIFLASH_DRV_H__ 3 | #define __SPIFLASH_DRV_H__ 4 | #include "bcomdef.h" 5 | 6 | /*gd25q16 cmd define*/ 7 | #define FLASH_WREN 0x06 8 | #define FLASH_WRDIS 0x04 9 | #define FLASH_CE 0x60 10 | //#define FLASH_CE 0xC7 11 | 12 | #define FLASH_DP 0xB9 13 | #define FLASH_RDI 0xAB 14 | #define FLASH_SE 0x20 15 | #define FLASH_BE_32KB 0x52 16 | #define FLASH_BE_64KB 0xD8 17 | #define FLASH_WRSR 0x01 18 | #define FLASH_RDID 0x9F 19 | #define FLASH_RDSR_LOW 0x05 20 | #define FLASH_RDSR_HIGH 0x35 21 | #define FLASH_PP 0x02 22 | #define FLASH_READ 0x03 23 | 24 | int spiflash_write(uint32_t addr, uint8* data, uint32_t len); 25 | int spiflash_read(uint32_t addr, uint8* data, uint32_t len); 26 | int spiflash_erase(uint32_t addr,uint32_t len); 27 | int spiflash_erase_all(void); 28 | int spiflash_init(void); 29 | 30 | 31 | #endif 32 | 33 | 34 | -------------------------------------------------------------------------------- /example/ble_multi/simpleBleMultiConnection/source/multi_role/uart_extf_cmd.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _OTAUART_CMD_H 3 | #define _OTAUART_CMD_H 4 | 5 | 6 | enum{ 7 | OTA_MODE_OTA_APPLICATION= 0, 8 | OTA_MODE_OTA_FCT, //1 9 | OTA_MODE_OTA, //2 10 | OTA_MODE_RESOURCE, //3 11 | OTA_MODE_UART //4 12 | }; 13 | 14 | 15 | 16 | void uartextf_timer_hdl(void); 17 | void uartextf_cmdinit(void); 18 | 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /example/ble_multi/simpleBleMultiConnection/sscom.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_multi/simpleBleMultiConnection/sscom.ini -------------------------------------------------------------------------------- /example/ble_peripheral/HIDAdvRemote/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'HIDAdvRemote' 7 | * Target: 'HidAdvRemote' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_peripheral/HIDAdvRemote/Source/voice_data.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/HIDAdvRemote/Source/voice_data.c -------------------------------------------------------------------------------- /example/ble_peripheral/HIDAdvRemote/Source/voice_data.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/HIDAdvRemote/Source/voice_data.h -------------------------------------------------------------------------------- /example/ble_peripheral/HIDAdvRemote/Source/voice_task.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/HIDAdvRemote/Source/voice_task.c -------------------------------------------------------------------------------- /example/ble_peripheral/HIDAdvRemote/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/HIDAdvRemote/ram.ini -------------------------------------------------------------------------------- /example/ble_peripheral/HIDAdvRemote/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00020000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00020000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | ; RW_IRAM1 0x20007000 0x00006000 { ; RW data 15 | ; .ANY (+RW +ZI) 16 | ; } 17 | ;ER_IROM2 0x1fff4100 0x0003500 { ; load address = execution address 18 | ; .ANY (+RO) 19 | ;} 20 | 21 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 22 | ; .ANY (+RW +ZI) 23 | ;} 24 | 25 | } 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/ble_peripheral/HIDKeyboard/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'HRDKbd' 7 | * Target: 'hidkbd' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_peripheral/HIDKeyboard/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/HIDKeyboard/ram.ini -------------------------------------------------------------------------------- /example/ble_peripheral/HIDKeyboard/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00018000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00018000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | 15 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 16 | ; .ANY (+RW +ZI) 17 | ;} 18 | 19 | } 20 | 21 | LR_IROM2 0x1fff0800 0x00800 { 22 | JUMP_TABLE 0x1fff0800 0x00400 { 23 | .ANY (jump_table_mem_area) 24 | 25 | } 26 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 27 | .ANY (global_config_area) 28 | 29 | } 30 | } 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /example/ble_peripheral/XIPDemo/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'pwmLightXIP' 7 | * Target: 'pwnLightXIP' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_peripheral/XIPDemo/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/XIPDemo/ram.ini -------------------------------------------------------------------------------- /example/ble_peripheral/XIPDemo/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00018000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00018000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | } 15 | 16 | LR_IROM2 0x11032000 0x10000 { 17 | ER_IROM2 0x11032000 0x10000 { 18 | app_wrist.o (+RO) 19 | led_light.o (+RO) 20 | gpio.o (+RO) 21 | ;patch.o(+RO) //feasible 22 | ;rf.lib(+RO) //infeasible 23 | 24 | } 25 | } 26 | 27 | 28 | 29 | LR_IROM3 0x1fff0800 0x00800 { 30 | JUMP_TABLE 0x1fff0800 0x00400 { 31 | .ANY (jump_table_mem_area) 32 | 33 | } 34 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 35 | .ANY (global_config_area) 36 | 37 | } 38 | } 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /example/ble_peripheral/ancs/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'ancs' 7 | * Target: 'ancs' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_peripheral/ancs/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/ancs/ram.ini -------------------------------------------------------------------------------- /example/ble_peripheral/ancs/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0000c000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00012000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | ;RW_IRAM1 0x20000000 0x00003000 { ; RW data 15 | ; .ANY (+RW +ZI) 16 | ;} 17 | ;ER_IROM2 0x1fff4100 0x0003500 { ; load address = execution address 18 | ; .ANY (+RO) 19 | ;} 20 | 21 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 22 | ; .ANY (+RW +ZI) 23 | ;} 24 | 25 | } 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/ble_peripheral/bleUart_AT/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'ble_uart_at' 7 | * Target: 'ble_uart_at' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_peripheral/bleUart_AT/Source/bleuart_at_cmd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/bleUart_AT/Source/bleuart_at_cmd.c -------------------------------------------------------------------------------- /example/ble_peripheral/bleUart_AT/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/bleUart_AT/ram.ini -------------------------------------------------------------------------------- /example/ble_peripheral/bleUart_AT/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | 6 | LR_IROM1 0x1fff4800 0x0010000 { ; load region size_region 7 | ER_IROM1 0x1fff4800 0x0010000 { ; load address = execution address 8 | *.o (RESET, +First) 9 | *(InRoot$$Sections) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | } 14 | 15 | ;LR_IROM3 0x20000000 0x00010000 { ; load region size_region 16 | ;RF_DTM_RO 0x20000000 0x0003000 { ; load address = execution address 17 | ;;*.o (RESET, +First) 18 | ;;*(InRoot$$Sections) 19 | ;rf_phy_driver.o (i.rf_phy_dtm_zigbee_pkt_gen) 20 | ;rf_phy_driver.o (i.rf_phy_direct_test) 21 | ;rf_phy_driver.o (i.rf_phy_dtm_cmd_parse) 22 | ;rf_phy_driver.o (i.rf_phy_dtm_evt_send) 23 | ;rf_phy_driver.o (i.rf_phy_dtm_trigged) 24 | ;} 25 | ;} 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/ble_peripheral/pwmLight/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'pwmLight' 7 | * Target: 'wrist' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_peripheral/pwmLight/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/pwmLight/ram.ini -------------------------------------------------------------------------------- /example/ble_peripheral/pwmLight/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0001d100 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x0001d100 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | ;RW_IRAM1 0x20000000 0x00004000 { ; RW data 15 | ;} 16 | ;ER_IROM2 0x1fff4100 0x0003500 { ; load address = execution address 17 | ; .ANY (+RO) 18 | ;} 19 | 20 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 21 | ; .ANY (+RW +ZI) 22 | ;} 23 | 24 | } 25 | 26 | LR_IROM2 0x1fff0800 0x00800 { 27 | JUMP_TABLE 0x1fff0800 0x00400 { 28 | .ANY (jump_table_mem_area) 29 | 30 | } 31 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 32 | .ANY (global_config_area) 33 | 34 | } 35 | } 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /example/ble_peripheral/simpleBlePeripheral/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'simpleBlePeripheral' 7 | * Target: 'SBP Sample' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_peripheral/simpleBlePeripheral/RTE/_SBP_Sample/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'simpleBlePeripheral' 7 | * Target: 'SBP Sample' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | /* 15 | * Define the Device Header File: 16 | */ 17 | #define CMSIS_device_header "ARMCM0.h" 18 | 19 | 20 | #endif /* RTE_COMPONENTS_H */ 21 | -------------------------------------------------------------------------------- /example/ble_peripheral/simpleBlePeripheral/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/simpleBlePeripheral/ram.ini -------------------------------------------------------------------------------- /example/ble_peripheral/simpleBlePeripheral/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | 6 | LR_IROM1 0x1fff4800 0x0010000 { ; load region size_region 7 | ER_IROM1 0x1fff4800 0x000C000 { ; load address = execution address 8 | *.o (RESET, +First) 9 | *(InRoot$$Sections) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | } 14 | 15 | ;LR_IROM3 0x20000000 0x00010000 { ; load region size_region 16 | ;RF_DTM_RO 0x20000000 0x0003000 { ; load address = execution address 17 | ;;*.o (RESET, +First) 18 | ;;*(InRoot$$Sections) 19 | ;rf_phy_driver.o (i.rf_phy_dtm_zigbee_pkt_gen) 20 | ;rf_phy_driver.o (i.rf_phy_direct_test) 21 | ;rf_phy_driver.o (i.rf_phy_dtm_cmd_parse) 22 | ;rf_phy_driver.o (i.rf_phy_dtm_evt_send) 23 | ;rf_phy_driver.o (i.rf_phy_dtm_trigged) 24 | ;} 25 | ;} 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/ble_peripheral/wrist/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'wrist' 7 | * Target: 'wrist' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/ble_peripheral/wrist/Source/epticore/M0StaticLib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/wrist/Source/epticore/M0StaticLib.lib -------------------------------------------------------------------------------- /example/ble_peripheral/wrist/Source/ui/lcd_TFT.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/wrist/Source/ui/lcd_TFT.h -------------------------------------------------------------------------------- /example/ble_peripheral/wrist/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/ble_peripheral/wrist/ram.ini -------------------------------------------------------------------------------- /example/ble_peripheral/wrist/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0001b000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x0001b000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | 15 | } 16 | 17 | LR_IROM2 0x1fff0800 0x00800 { 18 | JUMP_TABLE 0x1fff0800 0x00400 { 19 | .ANY (jump_table_mem_area) 20 | 21 | } 22 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 23 | .ANY (global_config_area) 24 | 25 | } 26 | } 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /example/peripheral/adc/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'adc' 7 | * Target: 'adc' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/peripheral/adc/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/adc/ram.ini -------------------------------------------------------------------------------- /example/peripheral/adc/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00010000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00010000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | ;RW_IRAM1 0x20010000 0x00003000 { ; RW data 15 | ;.ANY (+RW +ZI) 16 | ;} 17 | ;ER_IROM2 0x1fff4100 0x0003500 { ; load address = execution address 18 | ; .ANY (+RO) 19 | ;} 20 | 21 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 22 | ; .ANY (+RW +ZI) 23 | ;} 24 | 25 | } 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/peripheral/ap_timer/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'ap_timer' 7 | * Target: 'ap_timer' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/peripheral/ap_timer/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/ap_timer/ram.ini -------------------------------------------------------------------------------- /example/peripheral/ap_timer/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00010000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00010000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | ;RW_IRAM1 0x20010000 0x00003000 { ; RW data 15 | ;.ANY (+RW +ZI) 16 | ;} 17 | ;ER_IROM2 0x1fff4100 0x0003500 { ; load address = execution address 18 | ; .ANY (+RO) 19 | ;} 20 | 21 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 22 | ; .ANY (+RW +ZI) 23 | ;} 24 | 25 | } 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/peripheral/fs/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'fs' 7 | * Target: 'hrs' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/peripheral/fs/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/fs/ram.ini -------------------------------------------------------------------------------- /example/peripheral/fs/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x0001a000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x0001a000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | } 14 | 15 | LR_IROM2 0x1fff0800 0x00800 { 16 | JUMP_TABLE 0x1fff0800 0x00400 { 17 | .ANY (jump_table_mem_area) 18 | 19 | } 20 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 21 | .ANY (global_config_area) 22 | 23 | } 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/peripheral/gpio/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'gpio' 7 | * Target: 'gpio' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/peripheral/gpio/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/gpio/ram.ini -------------------------------------------------------------------------------- /example/peripheral/gpio/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00010000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00010000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | ;RW_IRAM1 0x20010000 0x00003000 { ; RW data 15 | ;.ANY (+RW +ZI) 16 | ;} 17 | ;ER_IROM2 0x1fff4100 0x0003500 { ; load address = execution address 18 | ; .ANY (+RO) 19 | ;} 20 | 21 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 22 | ; .ANY (+RW +ZI) 23 | ;} 24 | 25 | } 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/peripheral/kscan/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'kscan' 7 | * Target: 'kscan_demo' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/peripheral/kscan/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/kscan/ram.ini -------------------------------------------------------------------------------- /example/peripheral/kscan/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00010000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00010000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | } 14 | 15 | LR_IROM2 0x1fff0800 0x00800 { 16 | JUMP_TABLE 0x1fff0800 0x00400 { 17 | .ANY (jump_table_mem_area) 18 | 19 | } 20 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 21 | .ANY (global_config_area) 22 | 23 | } 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/peripheral/pwm/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'pwm' 7 | * Target: 'pwm_demo' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/peripheral/pwm/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/pwm/ram.ini -------------------------------------------------------------------------------- /example/peripheral/pwm/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00010000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00010000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | } 14 | 15 | LR_IROM2 0x1fff0800 0x00800 { 16 | JUMP_TABLE 0x1fff0800 0x00400 { 17 | .ANY (jump_table_mem_area) 18 | 19 | } 20 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 21 | .ANY (global_config_area) 22 | 23 | } 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/peripheral/spiflash/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'spiflash' 7 | * Target: 'spiflash' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/peripheral/spiflash/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/spiflash/ram.ini -------------------------------------------------------------------------------- /example/peripheral/spiflash/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00010000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00010000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | } 14 | 15 | LR_IROM2 0x1fff0800 0x00800 { 16 | JUMP_TABLE 0x1fff0800 0x00400 { 17 | .ANY (jump_table_mem_area) 18 | 19 | } 20 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 21 | .ANY (global_config_area) 22 | 23 | } 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/peripheral/voice/Matlab/pcmraw.m: -------------------------------------------------------------------------------- 1 | fid=fopen('voice_pcmraw_2p5sec_2.txt'); 2 | [inData,n]=fscanf(fid,'%x'); 3 | inData32u=uint32(inData); 4 | rightMask=uint32(sscanf('0000ffff','%x')); 5 | leftMask=uint32(sscanf('ffff0000','%x')); 6 | right16u=uint16(bitand(inData32u,rightMask*ones(n,1,'uint32'))); 7 | left16u=uint16(bitshift(bitand(inData32u,leftMask*ones(n,1,'uint32')),-16)); 8 | rightData=int32(right16u)-int32(int32(right16u)>2^15)*2^16; 9 | leftData=int32(left16u)-int32(int32(left16u)>2^15)*2^16; 10 | soundsc(double(rightData)) 11 | -------------------------------------------------------------------------------- /example/peripheral/voice/Matlab/pcmu.m: -------------------------------------------------------------------------------- 1 | fid=fopen('voice_cvsd_5sec.txt'); 2 | [inData,n]=fscanf(fid,'%x'); 3 | inData32u=uint32(inData); 4 | 5 | rightLateMask=uint32(sscanf('000000ff','%x')); 6 | rightEarlyMask=uint32(sscanf('0000ff00','%x')); 7 | leftLateMask=uint32(sscanf('00ff0000','%x')); 8 | leftEarlyMask=uint32(sscanf('ff000000','%x')); 9 | rightLate16u=uint16(bitand(inData32u,rightLateMask*ones(n,1,'uint32'))); 10 | rightEarly16u=uint16(bitshift(bitand(inData32u,rightEarlyMask*ones(n,1,'uint32')),-8)); 11 | leftLate16u=uint16(bitshift(bitand(inData32u,leftLateMask*ones(n,1,'uint32')),-16)); 12 | leftEarly16u=uint16(bitshift(bitand(inData32u,leftEarlyMask*ones(n,1,'uint32')),-24)); 13 | 14 | right16u(1:2:2*n-1,1)=rightEarly16u; 15 | right16u(2:2:2*n,1)=rightLate16u; 16 | left16u(1:2:2*n-1,1)=leftEarly16u; 17 | left16u(2:2:2*n,1)=leftLate16u; 18 | 19 | quantMask=uint16(sscanf('000f','%x')); 20 | segMask=uint16(sscanf('0070','%x')); 21 | signMask=uint16(sscanf('0080','%x')); 22 | bias=uint16(sscanf('0084','%x')); 23 | 24 | rightBase=bitshift(bitand(bitcmp(right16u),quantMask*ones(2*n,1,'uint16')),3)+bias; 25 | leftBase=bitshift(bitand(bitcmp(left16u),quantMask*ones(2*n,1,'uint16')),3)+bias; 26 | rightShift=bitshift(bitand(bitcmp(right16u),segMask*ones(2*n,1,'uint16')),-4); 27 | leftShift=bitshift(bitand(bitcmp(left16u),segMask*ones(2*n,1,'uint16')),-4); 28 | rightSign=bitshift(bitand(bitcmp(right16u),signMask*ones(2*n,1,'uint16')),-7); 29 | leftSign=bitshift(bitand(bitcmp(left16u),signMask*ones(2*n,1,'uint16')),-7); 30 | 31 | rightData=int32(bitshift(rightBase,rightShift)-bias).*(1-2*int32(rightSign)); 32 | leftData=int32(bitshift(leftBase,leftShift)-bias).*(1-2*int32(leftSign)); 33 | 34 | stereoData=[leftData,rightData]; 35 | 36 | soundsc(double(rightData)) 37 | -------------------------------------------------------------------------------- /example/peripheral/voice/Matlab/voice_notes.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/voice/Matlab/voice_notes.docx -------------------------------------------------------------------------------- /example/peripheral/voice/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'voice' 7 | * Target: 'voice' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/peripheral/voice/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/voice/ram.ini -------------------------------------------------------------------------------- /example/peripheral/voice/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00010000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x01080000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | 14 | ;RW_IRAM1 0x20010000 0x00003000 { ; RW data 15 | ; .ANY (+RW +ZI) 16 | ;} 17 | ;ER_IROM2 0x1fff4100 0x0003500 { ; load address = execution address 18 | ; .ANY (+RO) 19 | ;} 20 | 21 | ;RW_IRAM1 0x1fff7600 0x00000d00 { ; RW data 22 | ; .ANY (+RW +ZI) 23 | ;} 24 | 25 | } 26 | 27 | LR_IROM2 0x1fff0800 0x00800 { 28 | JUMP_TABLE 0x1fff0800 0x00400 { 29 | .ANY (jump_table_mem_area) 30 | 31 | } 32 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 33 | .ANY (global_config_area) 34 | 35 | } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/peripheral/watchdog/RTE/RTE_Components.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Auto generated Run-Time-Environment Component Configuration File 4 | * *** Do not modify ! *** 5 | * 6 | * Project: 'watchdog' 7 | * Target: 'watchdog' 8 | */ 9 | 10 | #ifndef RTE_COMPONENTS_H 11 | #define RTE_COMPONENTS_H 12 | 13 | 14 | #endif /* RTE_COMPONENTS_H */ 15 | -------------------------------------------------------------------------------- /example/peripheral/watchdog/ram.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/example/peripheral/watchdog/ram.ini -------------------------------------------------------------------------------- /example/peripheral/watchdog/scatter_load.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x1fff4800 0x00010000 { ; load region size_region 6 | ER_IROM1 0x1fff4800 0x00010000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | *.o(.rev16_text,.revsh_text,.text) 10 | .ANY (+RO) 11 | .ANY (+RW +ZI) 12 | } 13 | } 14 | 15 | LR_IROM2 0x1fff0800 0x00800 { 16 | JUMP_TABLE 0x1fff0800 0x00400 { 17 | .ANY (jump_table_mem_area) 18 | 19 | } 20 | GOLBAL_CONFIG 0x1fff0c00 0x00400 { 21 | .ANY (global_config_area) 22 | 23 | } 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /lib/README.txt: -------------------------------------------------------------------------------- 1 | multi role project 工程说明: 2 | 因为 multi role link layer 等数据结构变化,不能与原SDK components 的 3 | 头文件共用,因此将新的头文件添加到了 Trunk\lib\multi_include 目录 4 | 5 | 1、multi proj 目录更改记录 6 | (1)、components->ble->include 7 | (该目录有多个文件,但仅有部分文件不同,因此将整个目录更改) 8 | (2)、components->ble->controller->include 9 | -------------------------------------------------------------------------------- /lib/multi_include/gap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/lib/multi_include/gap.h -------------------------------------------------------------------------------- /lib/multi_include/gatt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/lib/multi_include/gatt.h -------------------------------------------------------------------------------- /lib/multi_include/simpleGATTprofile.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/lib/multi_include/simpleGATTprofile.h -------------------------------------------------------------------------------- /lib/multi_rf.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/lib/multi_rf.lib -------------------------------------------------------------------------------- /lib/multi_stack_lib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/lib/multi_stack_lib.lib -------------------------------------------------------------------------------- /lib/phy_font.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/lib/phy_font.lib -------------------------------------------------------------------------------- /lib/rf.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ai-Thinker-Open/AiThinker-Open-PB-BleMesh/aafc842ca717a50a5f022f698243f3cda89d741d/lib/rf.lib --------------------------------------------------------------------------------