diff --git a/README.md b/README.md index 4194cb0e9..7a5b173e0 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The online WiSeConnect 3 SDK documentation is available [here](https://docs.sila - See the [Getting Started](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started) section to run your first example. - See the [Examples](https://docs.silabs.com/wiseconnect/latest/wiseconnect-examples) section to explore all the available examples. - - See our [Migration Guide](docs/software-reference/developer-guides/migrating-from-v3-1-3.md) for information on porting your WiSeConnect v3.1.3 application to WiSeConnect v3.1.4 + - See our [Migration Guide](docs/software-reference/developer-guides/migrating-from-v3-1-4.md) for information on porting your WiSeConnect v3.1.4 application to WiSeConnect v3.2.0 - [API Reference Guide](https://docs.silabs.com/wiseconnect/latest/wiseconnect-api-reference-guide-summary) - [SiWx917 Software Reference Manual](docs/software-reference/manuals/siwx91x-software-reference-manual.md) - [SiWG917 – TA Flash Memory Map Change Guide](https://www.silabs.com/Wi-Fi_H&L_Apps/Wi-Fi_H&L_Apps_SoC/SiWG917%E2%80%93TA_Flash_Memory_Map_Change_Guide_v1.3.pdf) diff --git a/components/board/silabs/component/brd2605a.slcc b/components/board/silabs/component/brd2605a.slcc new file mode 100644 index 000000000..09534b303 --- /dev/null +++ b/components/board/silabs/component/brd2605a.slcc @@ -0,0 +1,43 @@ +!!omap +- id: brd2605a +- label: BRD2605A +- package: platform +- description: Board support for BRD2605A. +- category: Board|Radio Board +- quality: production +- root_path: components/board/silabs/config/brd2605a +- requires: + - name: siwg917m111mgtba + - name: brd2605a_config + - name: external_flash_none + - name: external_psram_8mb + - name: rsilib_board + - name: si91x_common_flash +- provides: + - name: brd2605a + - name: hardware_board + - name: hardware_board_rb + - name: hardware_board_supports_multi_slave + - name: si91x_b0_board +- define: + - name: SL_BOARD_NAME + value: '"BRD2605A"' + - name: SL_BOARD_REV + value: '"A02"' + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER + value: '1' + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + value: '1' + - name: SLI_SI91X_MCU_COMMON_FLASH_MODE + value: '1' + - name: SLI_SI91X_MCU_EXTERNAL_LDO_FOR_PSRAM + value: '1' + - name: SLI_SI91X_MCU_ENABLE_FLASH_BASED_EXECUTION + value: '1' +- tag: + - board:pn:BRD2605 + - board:variant:A + - board:revision:A02 + - board:device:siwg917m111mgtba + - hardware:has:vcom + \ No newline at end of file diff --git a/components/board/silabs/component/brd2605a_config.slcc b/components/board/silabs/component/brd2605a_config.slcc new file mode 100644 index 000000000..02e143696 --- /dev/null +++ b/components/board/silabs/component/brd2605a_config.slcc @@ -0,0 +1,140 @@ +!!omap +- id: brd2605a_config +- label: brd2605a config +- description: Configuration files for BRD2605A +- package: platform +- category: Board|Configuration +- quality: production +- ui_hints: + visibility: never +- root_path: "components/board/silabs/config" +- provides: + - name: brd2605a_config +- config_file: + - override: + component: "%extension-wiseconnect3_sdk%board_configuration_headers" + file_id: RTE_Device_917 + path: brd2605/RTE_Device_917.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_0 + path: common_config/sl_si91x_adc_init_channel_0_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_1 + path: common_config/sl_si91x_adc_init_channel_1_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_2 + path: common_config/sl_si91x_adc_init_channel_2_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_3 + path: common_config/sl_si91x_adc_init_channel_3_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_4 + path: common_config/sl_si91x_adc_init_channel_4_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_5 + path: common_config/sl_si91x_adc_init_channel_5_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_6 + path: common_config/sl_si91x_adc_init_channel_6_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_7 + path: common_config/sl_si91x_adc_init_channel_7_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_8 + path: common_config/sl_si91x_adc_init_channel_8_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_9 + path: common_config/sl_si91x_adc_init_channel_9_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_10 + path: common_config/sl_si91x_adc_init_channel_10_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_11 + path: common_config/sl_si91x_adc_init_channel_11_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_12 + path: common_config/sl_si91x_adc_init_channel_12_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_13 + path: common_config/sl_si91x_adc_init_channel_13_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_14 + path: common_config/sl_si91x_adc_init_channel_14_config.h + - override: + component: "%extension-wiseconnect3_sdk%adc_instance" + file_id: adc_config + instance: channel_15 + path: common_config/sl_si91x_adc_init_channel_15_config.h + - override: + component: "%extension-wiseconnect3_sdk%pwm_instance" + file_id: pwm_config + instance: channel_0 + path: common_config/sl_si91x_pwm_init_channel_0_config.h + - override: + component: "%extension-wiseconnect3_sdk%pwm_instance" + file_id: pwm_config + instance: channel_1 + path: common_config/sl_si91x_pwm_init_channel_1_config.h + - override: + component: "%extension-wiseconnect3_sdk%pwm_instance" + file_id: pwm_config + instance: channel_2 + path: common_config/sl_si91x_pwm_init_channel_2_config.h + - override: + component: "%extension-wiseconnect3_sdk%pwm_instance" + file_id: pwm_config + instance: channel_3 + path: common_config/sl_si91x_pwm_init_channel_3_config.h + - override: + component: "%extension-wiseconnect3_sdk%i2c_instance" + file_id: i2c_config + instance: i2c0 + path: common_config/sl_si91x_i2c_init_i2c0_config.h + - override: + component: "%extension-wiseconnect3_sdk%i2c_instance" + file_id: i2c_config + instance: i2c1 + path: common_config/sl_si91x_i2c_init_i2c1_config.h + - override: + component: "%extension-wiseconnect3_sdk%i2c_instance" + file_id: i2c_config + instance: i2c2 + path: common_config/sl_si91x_i2c_init_i2c2_config.h + - override: + component: "%extension-wiseconnect3_sdk%board_configuration_headers" + file_id: sl_board_configuration + path: brd2605a/sl_board_configuration.h + - override: + component: "%extension-wiseconnect3_sdk%board_configuration_headers" + file_id: sl_board_control + path: brd2605a/sl_board_control.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4325a.slcc b/components/board/silabs/component/brd4325a.slcc index 85d33e5e7..ed78c5cc6 100644 --- a/components/board/silabs/component/brd4325a.slcc +++ b/components/board/silabs/component/brd4325a.slcc @@ -15,11 +15,11 @@ - name: external_flash_none - name: external_psram_none - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4325a - name: hardware_board - name: hardware_board_rb - - name: si91x_common_flash - name: si91x_a0_board - recommends: - id: brd4002a @@ -32,42 +32,6 @@ value: '1' - name: SLI_SI91X_MCU_COMMON_FLASH_MODE value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136388608 # 0x0821 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 524288 # 0x0008 0000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136388608 # 0x0821 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 524288 # 0x0008 0000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136388608 # 0x0821 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 524288 # 0x0008 0000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4325 - board:variant:A diff --git a/components/board/silabs/component/brd4325a_config.slcc b/components/board/silabs/component/brd4325a_config.slcc index 094d93ff6..40bccf036 100644 --- a/components/board/silabs/component/brd4325a_config.slcc +++ b/components/board/silabs/component/brd4325a_config.slcc @@ -7,137 +7,134 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4325a" +- root_path: "components/board/silabs/config" - provides: - name: brd4325a_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4325a/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4325a/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h + path: brd4325a/sl_board_control.h diff --git a/components/board/silabs/component/brd4325b.slcc b/components/board/silabs/component/brd4325b.slcc index 375df90ef..0fab813fa 100644 --- a/components/board/silabs/component/brd4325b.slcc +++ b/components/board/silabs/component/brd4325b.slcc @@ -15,11 +15,11 @@ - name: external_flash_8mb - name: external_psram_none - name: rsilib_board + - name: si91x_dual_flash - provides: - name: brd4325b - name: hardware_board - name: hardware_board_rb - - name: si91x_dual_flash - name: si91x_a0_board - recommends: - id: brd4002a @@ -30,42 +30,6 @@ value: '"A00"' - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 134291456 # 0x0801 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 4194304 # 0x0040 0000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 134291456 # 0x0801 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 4194304 # 0x0040 0000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 134291456 # 0x0801 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 4194304 # 0x0040 0000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4325 - board:variant:B diff --git a/components/board/silabs/component/brd4325b_config.slcc b/components/board/silabs/component/brd4325b_config.slcc index af49873f9..1178ef31a 100644 --- a/components/board/silabs/component/brd4325b_config.slcc +++ b/components/board/silabs/component/brd4325b_config.slcc @@ -7,145 +7,134 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4325b" +- root_path: "components/board/silabs/config" - provides: - name: brd4325b_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%brd4325b" file_id: A0_pin_config - path: RTE_Device_917.h + path: brd4325b/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h - - override: - component: "%extension-wiseconnect3_sdk%board_configuration_headers" - file_id: RTE_Device_917 - path: RTE_Device_917.h - - override: - component: "%extension-wiseconnect3_sdk%board_configuration_headers" - file_id: freertos_config - path: FreeRTOSConfig.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4325b/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h + path: brd4325b/sl_board_control.h diff --git a/components/board/silabs/component/brd4325c.slcc b/components/board/silabs/component/brd4325c.slcc index ac2295814..75cac9e5f 100644 --- a/components/board/silabs/component/brd4325c.slcc +++ b/components/board/silabs/component/brd4325c.slcc @@ -15,12 +15,12 @@ - name: external_flash_none - name: external_psram_none - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4325c - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -31,42 +31,6 @@ value: '"A00"' - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4325 - board:variant:C diff --git a/components/board/silabs/component/brd4325c_config.slcc b/components/board/silabs/component/brd4325c_config.slcc index f00cace21..6585dbaf3 100644 --- a/components/board/silabs/component/brd4325c_config.slcc +++ b/components/board/silabs/component/brd4325c_config.slcc @@ -7,142 +7,134 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4325c" +- root_path: "components/board/silabs/config" - provides: - name: brd4325c_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4325c/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4325c/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h + path: brd4325c/sl_board_control.h diff --git a/components/board/silabs/component/brd4325e.slcc b/components/board/silabs/component/brd4325e.slcc index 5c662f413..50b3065af 100644 --- a/components/board/silabs/component/brd4325e.slcc +++ b/components/board/silabs/component/brd4325e.slcc @@ -15,12 +15,12 @@ - name: external_flash_8mb - name: external_psram_none - name: rsilib_board + - name: si91x_dual_flash - provides: - name: brd4325e - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_dual_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -35,42 +35,6 @@ value: '1' - name: SLI_SI91X_MCU_ENABLE_FLASH_BASED_EXECUTION value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 134291456 # 0x0801 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 4059136 # 0x003D F000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 134291456 # 0x0801 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 4059136 # 0x003D F000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 134291456 # 0x0801 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 4059136 # 0x003D F000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4325 - board:variant:E diff --git a/components/board/silabs/component/brd4325e_config.slcc b/components/board/silabs/component/brd4325e_config.slcc index 99015da20..5e635eaa5 100644 --- a/components/board/silabs/component/brd4325e_config.slcc +++ b/components/board/silabs/component/brd4325e_config.slcc @@ -7,142 +7,134 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4325e" +- root_path: "components/board/silabs/config" - provides: - name: brd4325e_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4325e/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4325e/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h \ No newline at end of file + path: brd4325e/sl_board_control.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4325f.slcc b/components/board/silabs/component/brd4325f.slcc index 22b038639..2cc3e2db7 100644 --- a/components/board/silabs/component/brd4325f.slcc +++ b/components/board/silabs/component/brd4325f.slcc @@ -15,12 +15,12 @@ - name: external_flash_8mb - name: external_psram_none - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4325f - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -33,42 +33,6 @@ value: '1' - name: SLI_SI91X_MCU_ENABLE_FLASH_BASED_EXECUTION value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136060928 # 0x081C 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 450560 # 0x0006 E000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136060928 # 0x081C 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 450560 # 0x0006 E000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136060928 # 0x081C 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 450560 # 0x0006 E000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4325 - board:variant:F diff --git a/components/board/silabs/component/brd4325f_config.slcc b/components/board/silabs/component/brd4325f_config.slcc index 4c40c7251..46f416960 100644 --- a/components/board/silabs/component/brd4325f_config.slcc +++ b/components/board/silabs/component/brd4325f_config.slcc @@ -7,146 +7,138 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4325f" +- root_path: "components/board/silabs/config" - provides: - name: brd4325f_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%psram_core" file_id: psram_pin_config - path: sl_si91x_psram_pin_config.h + path: brd4325f/sl_si91x_psram_pin_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4325f/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h + path: brd4325f/sl_board_control.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h \ No newline at end of file + path: brd4325f/RTE_Device_917.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4325g.slcc b/components/board/silabs/component/brd4325g.slcc index a1c805cbc..e4955afdf 100644 --- a/components/board/silabs/component/brd4325g.slcc +++ b/components/board/silabs/component/brd4325g.slcc @@ -15,12 +15,12 @@ - name: external_flash_none - name: external_psram_8mb - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4325g - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -34,42 +34,6 @@ value: '1' - name: SLI_SI91X_MCU_COMMON_FLASH_MODE value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4325 - board:variant:G diff --git a/components/board/silabs/component/brd4325g_config.slcc b/components/board/silabs/component/brd4325g_config.slcc index edde9bc38..08754e52a 100644 --- a/components/board/silabs/component/brd4325g_config.slcc +++ b/components/board/silabs/component/brd4325g_config.slcc @@ -7,146 +7,138 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4325g" +- root_path: "components/board/silabs/config" - provides: - name: brd4325g_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%psram_core" file_id: psram_pin_config - path: sl_si91x_psram_pin_config.h + path: brd4325g/sl_si91x_psram_pin_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4325g/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4325g/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h \ No newline at end of file + path: brd4325g/sl_board_control.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4338a.slcc b/components/board/silabs/component/brd4338a.slcc index 47c0d7470..46f81d62f 100644 --- a/components/board/silabs/component/brd4338a.slcc +++ b/components/board/silabs/component/brd4338a.slcc @@ -15,12 +15,12 @@ - name: external_flash_none - name: external_psram_none - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4338a - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -35,42 +35,6 @@ value: '1' - name: SLI_SI91X_MCU_COMMON_FLASH_MODE value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4338 - board:variant:A diff --git a/components/board/silabs/component/brd4338a_config.slcc b/components/board/silabs/component/brd4338a_config.slcc index b27905748..1ba22b4cf 100644 --- a/components/board/silabs/component/brd4338a_config.slcc +++ b/components/board/silabs/component/brd4338a_config.slcc @@ -5,158 +5,150 @@ - package: platform - category: Board|Configuration - quality: production -- root_path: "components/board/silabs/config/brd4338a" +- root_path: "components/board/silabs/config" - ui_hints: visibility: never - provides: - name: brd4338a_config -- requires: - - name: freertos_config - condition: [freertos] - config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4338a/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4338a/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h + path: brd4338a/sl_board_control.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: pin_config - path: pin_config.h + path: brd4338a/pin_config.h - override: component: "%extension-wiseconnect3_sdk%analog_comparator_instance" file_id: analog_comparator_config instance: comparator1 - path: sl_si91x_analog_comparator_comparator1_config.h + path: common_config/sl_si91x_analog_comparator_comparator1_config.h - override: component: "%extension-wiseconnect3_sdk%analog_comparator_instance" file_id: analog_comparator_config instance: comparator2 - path: sl_si91x_analog_comparator_comparator2_config.h \ No newline at end of file + path: common_config/sl_si91x_analog_comparator_comparator2_config.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4339a.slcc b/components/board/silabs/component/brd4339a.slcc index 2903da252..937636fbd 100644 --- a/components/board/silabs/component/brd4339a.slcc +++ b/components/board/silabs/component/brd4339a.slcc @@ -15,12 +15,12 @@ - name: external_flash_8mb - name: external_psram_none - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4339a - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -38,42 +38,8 @@ value: '1' - name: INTERNAL_LDO_FOR_PSRAM value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_3 - + - name: SLI_SI91X_MCU_COMMON_FLASH_MODE + value: '1' - tag: - board:pn:BRD4339 - board:variant:A diff --git a/components/board/silabs/component/brd4339a_config.slcc b/components/board/silabs/component/brd4339a_config.slcc index 2bfedf889..8eac88d3c 100644 --- a/components/board/silabs/component/brd4339a_config.slcc +++ b/components/board/silabs/component/brd4339a_config.slcc @@ -7,146 +7,138 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4339a" +- root_path: "components/board/silabs/config" - provides: - name: brd4339a_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%psram_core" file_id: psram_pin_config - path: sl_si91x_psram_pin_config.h + path: brd4339a/sl_si91x_psram_pin_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4339a/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h + path: brd4339a/sl_board_control.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h \ No newline at end of file + path: brd4339a/RTE_Device_917.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4339b.slcc b/components/board/silabs/component/brd4339b.slcc index 73f315118..6370a4d4a 100644 --- a/components/board/silabs/component/brd4339b.slcc +++ b/components/board/silabs/component/brd4339b.slcc @@ -15,12 +15,12 @@ - name: external_flash_8mb - name: external_psram_none - name: rsilib_board + - name: si91x_dual_flash - provides: - name: brd4339b - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_dual_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -35,42 +35,6 @@ value: '1' - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 134291456 # 0x0801 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 4059136 # 0x003D F000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 134291456 # 0x0801 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 4059136 # 0x003D F000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 134291456 # 0x0801 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 4059136 # 0x003D F000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4339 - board:variant:B diff --git a/components/board/silabs/component/brd4339b_config.slcc b/components/board/silabs/component/brd4339b_config.slcc index 8efd4321f..41b057435 100644 --- a/components/board/silabs/component/brd4339b_config.slcc +++ b/components/board/silabs/component/brd4339b_config.slcc @@ -7,148 +7,140 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4339b" +- root_path: "components/board/silabs/config" - requires: - name: brd4339b - provides: - name: brd4339b_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4339b/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4339b/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h + path: brd4339b/sl_board_control.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: pin_config - path: pin_config.h \ No newline at end of file + path: brd4339b/pin_config.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4340a.slcc b/components/board/silabs/component/brd4340a.slcc index 9ee2d459f..4b77c6cf2 100644 --- a/components/board/silabs/component/brd4340a.slcc +++ b/components/board/silabs/component/brd4340a.slcc @@ -15,12 +15,12 @@ - name: external_flash_none - name: external_psram_8mb - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4340a - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -39,43 +39,7 @@ - name: SLI_SI91X_MCU_COMMON_FLASH_MODE value: '1' - name: SLI_SI91X_MCU_EXTERNAL_LDO_FOR_PSRAM - value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_3 - + value: '1' - tag: - board:pn:BRD4340 - board:variant:A diff --git a/components/board/silabs/component/brd4340a_config.slcc b/components/board/silabs/component/brd4340a_config.slcc index 70ae28e6f..fed364dee 100644 --- a/components/board/silabs/component/brd4340a_config.slcc +++ b/components/board/silabs/component/brd4340a_config.slcc @@ -7,146 +7,138 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4340a" +- root_path: "components/board/silabs/config" - provides: - name: brd4340a_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4340a/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%psram_core" file_id: psram_pin_config - path: sl_si91x_psram_pin_config.h + path: brd4340a/sl_si91x_psram_pin_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4340a/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h \ No newline at end of file + path: brd4340a/sl_board_control.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4340b.slcc b/components/board/silabs/component/brd4340b.slcc index e8fe29293..49ede9dde 100644 --- a/components/board/silabs/component/brd4340b.slcc +++ b/components/board/silabs/component/brd4340b.slcc @@ -15,12 +15,12 @@ - name: external_flash_none - name: external_psram_none - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4340b - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -37,42 +37,6 @@ value: '1' - name: SLI_SI91X_MCU_COMMON_FLASH_MODE value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136060928 # 0x081C 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 450560 # 0x0006 E000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136060928 # 0x081C 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 450560 # 0x0006 E000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136060928 # 0x081C 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 450560 # 0x0006 E000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4340 - board:variant:B diff --git a/components/board/silabs/component/brd4340b_config.slcc b/components/board/silabs/component/brd4340b_config.slcc index 1bf61f080..5951923f6 100644 --- a/components/board/silabs/component/brd4340b_config.slcc +++ b/components/board/silabs/component/brd4340b_config.slcc @@ -7,142 +7,134 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4340b" +- root_path: "components/board/silabs/config" - provides: - name: brd4340b_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4340b/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4340b/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h \ No newline at end of file + path: brd4340b/sl_board_control.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4341a.slcc b/components/board/silabs/component/brd4341a.slcc index fb1bbb87f..1bc07d0f6 100644 --- a/components/board/silabs/component/brd4341a.slcc +++ b/components/board/silabs/component/brd4341a.slcc @@ -15,12 +15,12 @@ - name: external_flash_8mb - name: external_psram_none - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4341a - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -35,42 +35,6 @@ value: '1' - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136060928 # 0x081C 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 450560 # 0x0006 E000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136060928 # 0x081C 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 450560 # 0x0006 E000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136060928 # 0x081C 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 450560 # 0x0006 E000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4341 - board:variant:A diff --git a/components/board/silabs/component/brd4341a_config.slcc b/components/board/silabs/component/brd4341a_config.slcc index 48673b17f..909622e57 100644 --- a/components/board/silabs/component/brd4341a_config.slcc +++ b/components/board/silabs/component/brd4341a_config.slcc @@ -7,142 +7,134 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4341a" +- root_path: "components/board/silabs/config" - provides: - name: brd4341a_config -- requires: - - name: freertos_config - condition: [freertos] -- config_file: +- config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4341a/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4341a/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h \ No newline at end of file + path: brd4341a/sl_board_control.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4342a.slcc b/components/board/silabs/component/brd4342a.slcc index 04b99a451..88b30f17e 100644 --- a/components/board/silabs/component/brd4342a.slcc +++ b/components/board/silabs/component/brd4342a.slcc @@ -15,12 +15,12 @@ - name: external_flash_none - name: external_psram_8mb - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4342a - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -36,43 +36,7 @@ - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 value: '1' - name: SLI_SI91X_MCU_EXTERNAL_LDO_FOR_PSRAM - value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 2088960 # 0x001F E000 - priority: -1 - condition: - - si917_mem_config_3 - + value: '1' - tag: - board:pn:BRD4342 - board:variant:A diff --git a/components/board/silabs/component/brd4342a_config.slcc b/components/board/silabs/component/brd4342a_config.slcc index 3c4d67cf6..967b74615 100644 --- a/components/board/silabs/component/brd4342a_config.slcc +++ b/components/board/silabs/component/brd4342a_config.slcc @@ -7,146 +7,138 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4342a" +- root_path: "components/board/silabs/config" - provides: - name: brd4342a_config -- requires: - - name: freertos_config - condition: [freertos] - config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4342a/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%psram_core" file_id: psram_pin_config - path: sl_si91x_psram_pin_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: brd4342a/sl_si91x_psram_pin_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4342a/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h + path: brd4342a/sl_board_control.h diff --git a/components/board/silabs/component/brd4343a.slcc b/components/board/silabs/component/brd4343a.slcc index 5d5d4736f..80500beb5 100644 --- a/components/board/silabs/component/brd4343a.slcc +++ b/components/board/silabs/component/brd4343a.slcc @@ -15,12 +15,12 @@ - name: external_flash_none - name: external_psram_none - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4343a - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -35,42 +35,6 @@ value: '1' - name: SLI_SI91X_MCU_COMMON_FLASH_MODE value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 2093056 # 0x001F F000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 2093056 # 0x001F F000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 2093056 # 0x001F F000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4343 - board:variant:A diff --git a/components/board/silabs/component/brd4343a_config.slcc b/components/board/silabs/component/brd4343a_config.slcc index 8bd8634c8..ddfc1577d 100644 --- a/components/board/silabs/component/brd4343a_config.slcc +++ b/components/board/silabs/component/brd4343a_config.slcc @@ -7,142 +7,134 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4343a" +- root_path: "components/board/silabs/config" - provides: - name: brd4343a_config -- requires: - - name: freertos_config - condition: [freertos] - config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4343a/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4343a/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h \ No newline at end of file + path: brd4343a/sl_board_control.h \ No newline at end of file diff --git a/components/board/silabs/component/brd4343b.slcc b/components/board/silabs/component/brd4343b.slcc index 049bf4e1a..abd4033f5 100644 --- a/components/board/silabs/component/brd4343b.slcc +++ b/components/board/silabs/component/brd4343b.slcc @@ -15,12 +15,12 @@ - name: external_flash_none - name: external_psram_none - name: rsilib_board + - name: si91x_common_flash - provides: - name: brd4343b - name: hardware_board - name: hardware_board_rb - name: hardware_board_supports_multi_slave - - name: si91x_common_flash - name: si91x_b0_board - recommends: - id: brd4002a @@ -35,42 +35,6 @@ value: '1' - name: SLI_SI91X_MCU_COMMON_FLASH_MODE value: '1' - -- template_contribution: - # Default Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_1 - - name: device_flash_size - value: 2093056 # 0x001F F000 - priority: -1 - condition: - - si917_mem_config_1 - # Medium Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_2 - - name: device_flash_size - value: 2093056 # 0x001F F000 - priority: -1 - condition: - - si917_mem_config_2 - # Advanced Memory configuration - - name: device_flash_addr - value: 136323072 # 0x0820 2000 - priority: -1 - condition: - - si917_mem_config_3 - - name: device_flash_size - value: 2093056 # 0x001F F000 - priority: -1 - condition: - - si917_mem_config_3 - - tag: - board:pn:BRD4343 - board:variant:B diff --git a/components/board/silabs/component/brd4343b_config.slcc b/components/board/silabs/component/brd4343b_config.slcc index 41be2cf6e..caf2186a5 100644 --- a/components/board/silabs/component/brd4343b_config.slcc +++ b/components/board/silabs/component/brd4343b_config.slcc @@ -7,142 +7,134 @@ - quality: production - ui_hints: visibility: never -- root_path: "components/board/silabs/config/brd4343b" +- root_path: "components/board/silabs/config" - provides: - name: brd4343b_config -- requires: - - name: freertos_config - condition: [freertos] - config_file: - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: RTE_Device_917 - path: RTE_Device_917.h + path: brd4343b/RTE_Device_917.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_0 - path: sl_si91x_adc_init_channel_0_config.h + path: common_config/sl_si91x_adc_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_1 - path: sl_si91x_adc_init_channel_1_config.h + path: common_config/sl_si91x_adc_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_2 - path: sl_si91x_adc_init_channel_2_config.h + path: common_config/sl_si91x_adc_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_3 - path: sl_si91x_adc_init_channel_3_config.h + path: common_config/sl_si91x_adc_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_4 - path: sl_si91x_adc_init_channel_4_config.h + path: common_config/sl_si91x_adc_init_channel_4_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_5 - path: sl_si91x_adc_init_channel_5_config.h + path: common_config/sl_si91x_adc_init_channel_5_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_6 - path: sl_si91x_adc_init_channel_6_config.h + path: common_config/sl_si91x_adc_init_channel_6_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_7 - path: sl_si91x_adc_init_channel_7_config.h + path: common_config/sl_si91x_adc_init_channel_7_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_8 - path: sl_si91x_adc_init_channel_8_config.h + path: common_config/sl_si91x_adc_init_channel_8_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_9 - path: sl_si91x_adc_init_channel_9_config.h + path: common_config/sl_si91x_adc_init_channel_9_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_10 - path: sl_si91x_adc_init_channel_10_config.h + path: common_config/sl_si91x_adc_init_channel_10_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_11 - path: sl_si91x_adc_init_channel_11_config.h + path: common_config/sl_si91x_adc_init_channel_11_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_12 - path: sl_si91x_adc_init_channel_12_config.h + path: common_config/sl_si91x_adc_init_channel_12_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_13 - path: sl_si91x_adc_init_channel_13_config.h + path: common_config/sl_si91x_adc_init_channel_13_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_14 - path: sl_si91x_adc_init_channel_14_config.h + path: common_config/sl_si91x_adc_init_channel_14_config.h - override: component: "%extension-wiseconnect3_sdk%adc_instance" file_id: adc_config instance: channel_15 - path: sl_si91x_adc_init_channel_15_config.h - - override: - component: "%extension-wiseconnect3_sdk%pwm_instance" - file_id: pwm_config - instance: led0 - path: sl_si91x_pwm_init_led0_config.h + path: common_config/sl_si91x_adc_init_channel_15_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_0 - path: sl_si91x_pwm_init_channel_0_config.h + path: common_config/sl_si91x_pwm_init_channel_0_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_1 - path: sl_si91x_pwm_init_channel_1_config.h + path: common_config/sl_si91x_pwm_init_channel_1_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_2 - path: sl_si91x_pwm_init_channel_2_config.h + path: common_config/sl_si91x_pwm_init_channel_2_config.h - override: component: "%extension-wiseconnect3_sdk%pwm_instance" file_id: pwm_config instance: channel_3 - path: sl_si91x_pwm_init_channel_3_config.h + path: common_config/sl_si91x_pwm_init_channel_3_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c0 - path: sl_si91x_i2c_init_i2c0_config.h + path: common_config/sl_si91x_i2c_init_i2c0_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c1 - path: sl_si91x_i2c_init_i2c1_config.h + path: common_config/sl_si91x_i2c_init_i2c1_config.h - override: component: "%extension-wiseconnect3_sdk%i2c_instance" file_id: i2c_config instance: i2c2 - path: sl_si91x_i2c_init_i2c2_config.h + path: common_config/sl_si91x_i2c_init_i2c2_config.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_configuration - path: sl_board_configuration.h + path: brd4343b/sl_board_configuration.h - override: component: "%extension-wiseconnect3_sdk%board_configuration_headers" file_id: sl_board_control - path: sl_board_control.h \ No newline at end of file + path: brd4343b/sl_board_control.h \ No newline at end of file diff --git a/components/board/silabs/component/efx32_si91x_wireless_connector.slcc b/components/board/silabs/component/efx32_si91x_wireless_connector.slcc index 2bc084180..e9a08251b 100644 --- a/components/board/silabs/component/efx32_si91x_wireless_connector.slcc +++ b/components/board/silabs/component/efx32_si91x_wireless_connector.slcc @@ -67,10 +67,23 @@ include: - path: sl_power_manager_config.h - path: sl_sleeptimer_config.h condition: [brd4186c] + - path: "config/brd4271a" + condition: [brd4271a] + file_list: + - path: FreeRTOSConfig.h + - path: sl_board_configuration.h + - path: sl_board_control_config.h + - path: sl_device_init_emu_config.h + - path: sl_device_init_hfrco_config.h + - path: sl_device_init_hfxo_config.h + - path: sl_device_init_lfxo_config.h + - path: sl_hfxo_manager_config.h + - path: sl_power_manager_config.h + - path: sl_sleeptimer_config.h - path: "config/brd8036a" condition: [brd8036a] define: - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 value: '1' - name: SLI_SI917B0 - value: '1' \ No newline at end of file + value: '1' diff --git a/components/board/silabs/config/brd2204a/FreeRTOSConfig.h b/components/board/silabs/config/brd2204a/FreeRTOSConfig.h index 70c2ad42f..b901d9405 100644 --- a/components/board/silabs/config/brd2204a/FreeRTOSConfig.h +++ b/components/board/silabs/config/brd2204a/FreeRTOSConfig.h @@ -1,271 +1,271 @@ -/* -------------------------------------------------------------------------- - * Copyright (c) 2013-2019 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * -------------------------------------------------------------------------- - * - * $Revision: V10.2.0 - * - * Project: CMSIS-FreeRTOS - * Title: FreeRTOS configuration definitions - * - * --------------------------------------------------------------------------*/ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - -/*----------------------------------------------------------- -* Application specific definitions. -* -* These definitions should be adjusted for your particular hardware and -* application requirements. -* -* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE -* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. -* -* See http://www.freertos.org/a00110.html -*----------------------------------------------------------*/ - -#if !defined(__IAR_SYSTEMS_ASM__) -#if (defined(__ARMCC_VERSION) || defined(__GNUC__) || defined(__ICCARM__)) -#include - -//#include "RTE_Components.h" -//#include CMSIS_device_header -#endif - -#include "em_assert.h" -#include "em_device.h" - -#if defined(SL_COMPONENT_CATALOG_PRESENT) -#include "sl_component_catalog.h" -#endif -#endif - -#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) -#include "SEGGER_SYSVIEW_FreeRTOS.h" -#endif - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Minimal stack size [words] <0-65535> -// Stack for idle task and default task stack in words. -// Default: 160 -#define configMINIMAL_STACK_SIZE 160 - -// Total heap size [bytes] <0-0xFFFFFFFF> -// Heap memory size in bytes. -// Default: 8192 -#define configTOTAL_HEAP_SIZE 40000 - -// Kernel tick frequency [Hz] <0-0xFFFFFFFF> -// Kernel tick rate in Hz. -// Default: 1000 -#define configTICK_RATE_HZ 1000 - -// Timer task stack depth [words] <0-65535> -// Stack for timer task in words. -// Default: 160 -#define configTIMER_TASK_STACK_DEPTH 160 - -// Timer task priority <0-56> -// Timer task priority. -// Default: 40 (High) -#define configTIMER_TASK_PRIORITY 40 - -// Timer queue length <0-1024> -// Timer command queue length. -// Default: 10 -#define configTIMER_QUEUE_LENGTH 10 - -// Preemption interrupt priority -// Maximum priority of interrupts that are safe to call FreeRTOS API. -// Default: 96 -#define configMAX_SYSCALL_INTERRUPT_PRIORITY 96 - -// Use time slicing -// Enable setting to use timeslicing. -// Default: 1 -#define configUSE_TIME_SLICING 1 - -// Idle should yield -// Control Yield behaviour of the idle task. -// Default: 1 -#define configIDLE_SHOULD_YIELD 1 - -// Check for stack overflow -// <0=>Disable <1=>Method one <2=>Method two -// Enable or disable stack overflow checking. -// Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled. -// Default: 2 -#define configCHECK_FOR_STACK_OVERFLOW 2 - -// Use idle hook -// Enable callback function call on each idle task iteration. -// Callback function vApplicationIdleHook implementation is required when idle hook is enabled. -// Default: 0 -#define configUSE_IDLE_HOOK 0 - -// Use tick hook -// Enable callback function call during each tick interrupt. -// Callback function vApplicationTickHook implementation is required when tick hook is enabled. -// Default: 0 -#define configUSE_TICK_HOOK 0 - -// Use deamon task startup hook -// Enable callback function call when timer service starts. -// Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled. -// Default: 0 -#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 - -// Use malloc failed hook -// Enable callback function call when out of dynamic memory. -// Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled. -// Default: 0 -#define configUSE_MALLOC_FAILED_HOOK 0 - -// Queue registry size -// Define maximum number of queue objects registered for debug purposes. -// The queue registry is used by kernel aware debuggers to locate queue and semaphore structures and display associated text names. -// Default: 10 -#define configQUEUE_REGISTRY_SIZE 10 - -// Port Specific Features -// Enable and configure port specific features. -// Check FreeRTOS documentation for definitions that apply for the used port. - -// Use Floating Point Unit -// Using Floating Point Unit (FPU) affects context handling. -// Enable FPU when application uses floating point operations. -// Default: 1 -#define configENABLE_FPU 1 - -// Use Memory Protection Unit -// Using Memory Protection Unit (MPU) requires detailed memory map definition. -// This setting is only releavant for MPU enabled ports. -// Default: 0 -#define configENABLE_MPU 0 - -// Minimal secure stack size [words] <0-65535> -// Stack for idle task Secure side context in words. -// This setting is only relevant when TrustZone extension is enabled. -// Default: 128 -#define configMINIMAL_SECURE_STACK_SIZE 128 -// - -// Thread Local Storage Settings -// Thread local storage pointers -// Thread local storage (or TLS) allows the application writer to store -// values inside a task's control block, making the value specific to -// (local to) the task itself. -// Default: 0 -#define configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS 0 -// - -// Use Threadsafe Errno -// Enable Threadsafe Errno support. -// Default: 0 -#define configUSE_POSIX_ERRNO 1 - -//------------- <<< end of configuration section >>> --------------------------- - -/* Defines needed by FreeRTOS to implement CMSIS RTOS2 API. Do not change! */ -#define configCPU_CLOCK_HZ (SystemCoreClock) -#define configSUPPORT_STATIC_ALLOCATION 1 -#define configSUPPORT_DYNAMIC_ALLOCATION 1 -#define configUSE_PREEMPTION 1 -#define configUSE_TIMERS 1 -#define configUSE_MUTEXES 1 -#define configUSE_RECURSIVE_MUTEXES 1 -#define configUSE_COUNTING_SEMAPHORES 1 -#define configUSE_TASK_NOTIFICATIONS 1 -#define configUSE_TRACE_FACILITY 1 -#define configUSE_16_BIT_TICKS 0 -#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 -#define configMAX_PRIORITIES 56 -#define configKERNEL_INTERRUPT_PRIORITY 255 - -/* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */ -#define INCLUDE_xEventGroupSetBitsFromISR 1 -#define INCLUDE_xSemaphoreGetMutexHolder 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelete 1 -#define INCLUDE_xTaskGetCurrentTaskHandle 1 -#define INCLUDE_xTaskGetSchedulerState 1 -#define INCLUDE_uxTaskGetStackHighWaterMark 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_eTaskGetState 1 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_xTimerPendFunctionCall 1 - -/* Map the FreeRTOS port interrupt handlers to their CMSIS standard names. */ -#define xPortPendSVHandler PendSV_Handler -#define vPortSVCHandler SVC_Handler - -/* Ensure Cortex-M port compatibility. */ -#define SysTick_Handler xPortSysTickHandler - -/* Implement FreeRTOS configASSERT as emlib assert. */ -#define configASSERT(x) EFM_ASSERT(x) - -/* Energy saving modes. */ -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) -#define configUSE_TICKLESS_IDLE 1 -#else -#define configUSE_TICKLESS_IDLE 0 -#endif - -/* Definition used by Keil to replace default system clock source. */ -#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 - -/* Maximum size of task name. */ -#define configMAX_TASK_NAME_LEN 10 - -/* Use queue sets? */ -#define configUSE_QUEUE_SETS 0 - -/* Generate run-time statistics? */ -#define configGENERATE_RUN_TIME_STATS 0 - -/* Co-routine related definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES 1 - -/* Optional resume from ISR functionality. */ -#define INCLUDE_xResumeFromISR 1 - -/* FreeRTOS Secure Side Only and TrustZone Security Extension */ -#define configRUN_FREERTOS_SECURE_ONLY 0 -#define configENABLE_TRUSTZONE 1 - -/* Thread local storage pointers used by the SDK */ -#ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS -#define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 1 -#endif - -/* PRINT_STRING implementation. iostream_retarget_stdio or third party - printf should be added if this is used */ -#define configPRINT_STRING(X) printf(X) - -#define configNUM_THREAD_LOCAL_STORAGE_POINTERS \ - (configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS + configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS) - -//#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) -//#include "SEGGER_SYSVIEW_FreeRTOS.h" -//#endif -#endif /* FREERTOS_CONFIG_H */ +/* -------------------------------------------------------------------------- + * Copyright (c) 2013-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * $Revision: V10.2.0 + * + * Project: CMSIS-FreeRTOS + * Title: FreeRTOS configuration definitions + * + * --------------------------------------------------------------------------*/ + +#ifndef FREERTOS_CONFIG_H +#define FREERTOS_CONFIG_H + +/*----------------------------------------------------------- +* Application specific definitions. +* +* These definitions should be adjusted for your particular hardware and +* application requirements. +* +* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE +* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. +* +* See http://www.freertos.org/a00110.html +*----------------------------------------------------------*/ + +#if !defined(__IAR_SYSTEMS_ASM__) +#if (defined(__ARMCC_VERSION) || defined(__GNUC__) || defined(__ICCARM__)) +#include + +//#include "RTE_Components.h" +//#include CMSIS_device_header +#endif + +#include "em_assert.h" +#include "em_device.h" + +#if defined(SL_COMPONENT_CATALOG_PRESENT) +#include "sl_component_catalog.h" +#endif +#endif + +#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) +#include "SEGGER_SYSVIEW_FreeRTOS.h" +#endif + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Minimal stack size [words] <0-65535> +// Stack for idle task and default task stack in words. +// Default: 160 +#define configMINIMAL_STACK_SIZE 160 + +// Total heap size [bytes] <0-0xFFFFFFFF> +// Heap memory size in bytes. +// Default: 8192 +#define configTOTAL_HEAP_SIZE 40000 + +// Kernel tick frequency [Hz] <0-0xFFFFFFFF> +// Kernel tick rate in Hz. +// Default: 1000 +#define configTICK_RATE_HZ 1000 + +// Timer task stack depth [words] <0-65535> +// Stack for timer task in words. +// Default: 160 +#define configTIMER_TASK_STACK_DEPTH 160 + +// Timer task priority <0-56> +// Timer task priority. +// Default: 40 (High) +#define configTIMER_TASK_PRIORITY 55 + +// Timer queue length <0-1024> +// Timer command queue length. +// Default: 10 +#define configTIMER_QUEUE_LENGTH 10 + +// Preemption interrupt priority +// Maximum priority of interrupts that are safe to call FreeRTOS API. +// Default: 96 +#define configMAX_SYSCALL_INTERRUPT_PRIORITY 96 + +// Use time slicing +// Enable setting to use timeslicing. +// Default: 1 +#define configUSE_TIME_SLICING 1 + +// Idle should yield +// Control Yield behaviour of the idle task. +// Default: 1 +#define configIDLE_SHOULD_YIELD 1 + +// Check for stack overflow +// <0=>Disable <1=>Method one <2=>Method two +// Enable or disable stack overflow checking. +// Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled. +// Default: 2 +#define configCHECK_FOR_STACK_OVERFLOW 2 + +// Use idle hook +// Enable callback function call on each idle task iteration. +// Callback function vApplicationIdleHook implementation is required when idle hook is enabled. +// Default: 0 +#define configUSE_IDLE_HOOK 0 + +// Use tick hook +// Enable callback function call during each tick interrupt. +// Callback function vApplicationTickHook implementation is required when tick hook is enabled. +// Default: 0 +#define configUSE_TICK_HOOK 0 + +// Use deamon task startup hook +// Enable callback function call when timer service starts. +// Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled. +// Default: 0 +#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 + +// Use malloc failed hook +// Enable callback function call when out of dynamic memory. +// Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled. +// Default: 0 +#define configUSE_MALLOC_FAILED_HOOK 0 + +// Queue registry size +// Define maximum number of queue objects registered for debug purposes. +// The queue registry is used by kernel aware debuggers to locate queue and semaphore structures and display associated text names. +// Default: 10 +#define configQUEUE_REGISTRY_SIZE 10 + +// Port Specific Features +// Enable and configure port specific features. +// Check FreeRTOS documentation for definitions that apply for the used port. + +// Use Floating Point Unit +// Using Floating Point Unit (FPU) affects context handling. +// Enable FPU when application uses floating point operations. +// Default: 1 +#define configENABLE_FPU 1 + +// Use Memory Protection Unit +// Using Memory Protection Unit (MPU) requires detailed memory map definition. +// This setting is only releavant for MPU enabled ports. +// Default: 0 +#define configENABLE_MPU 0 + +// Minimal secure stack size [words] <0-65535> +// Stack for idle task Secure side context in words. +// This setting is only relevant when TrustZone extension is enabled. +// Default: 128 +#define configMINIMAL_SECURE_STACK_SIZE 128 +// + +// Thread Local Storage Settings +// Thread local storage pointers +// Thread local storage (or TLS) allows the application writer to store +// values inside a task's control block, making the value specific to +// (local to) the task itself. +// Default: 0 +#define configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS 0 +// + +// Use Threadsafe Errno +// Enable Threadsafe Errno support. +// Default: 0 +#define configUSE_POSIX_ERRNO 1 + +//------------- <<< end of configuration section >>> --------------------------- + +/* Defines needed by FreeRTOS to implement CMSIS RTOS2 API. Do not change! */ +#define configCPU_CLOCK_HZ (SystemCoreClock) +#define configSUPPORT_STATIC_ALLOCATION 1 +#define configSUPPORT_DYNAMIC_ALLOCATION 1 +#define configUSE_PREEMPTION 1 +#define configUSE_TIMERS 1 +#define configUSE_MUTEXES 1 +#define configUSE_RECURSIVE_MUTEXES 1 +#define configUSE_COUNTING_SEMAPHORES 1 +#define configUSE_TASK_NOTIFICATIONS 1 +#define configUSE_TRACE_FACILITY 1 +#define configUSE_16_BIT_TICKS 0 +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 +#define configMAX_PRIORITIES 56 +#define configKERNEL_INTERRUPT_PRIORITY 255 + +/* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */ +#define INCLUDE_xEventGroupSetBitsFromISR 1 +#define INCLUDE_xSemaphoreGetMutexHolder 1 +#define INCLUDE_vTaskDelay 1 +#define INCLUDE_vTaskDelayUntil 1 +#define INCLUDE_vTaskDelete 1 +#define INCLUDE_xTaskGetCurrentTaskHandle 1 +#define INCLUDE_xTaskGetSchedulerState 1 +#define INCLUDE_uxTaskGetStackHighWaterMark 1 +#define INCLUDE_uxTaskPriorityGet 1 +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_eTaskGetState 1 +#define INCLUDE_vTaskSuspend 1 +#define INCLUDE_xTimerPendFunctionCall 1 + +/* Map the FreeRTOS port interrupt handlers to their CMSIS standard names. */ +#define xPortPendSVHandler PendSV_Handler +#define vPortSVCHandler SVC_Handler + +/* Ensure Cortex-M port compatibility. */ +#define SysTick_Handler xPortSysTickHandler + +/* Implement FreeRTOS configASSERT as emlib assert. */ +#define configASSERT(x) EFM_ASSERT(x) + +/* Energy saving modes. */ +#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) +#define configUSE_TICKLESS_IDLE 1 +#else +#define configUSE_TICKLESS_IDLE 0 +#endif + +/* Definition used by Keil to replace default system clock source. */ +#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 + +/* Maximum size of task name. */ +#define configMAX_TASK_NAME_LEN 10 + +/* Use queue sets? */ +#define configUSE_QUEUE_SETS 0 + +/* Generate run-time statistics? */ +#define configGENERATE_RUN_TIME_STATS 0 + +/* Co-routine related definitions. */ +#define configUSE_CO_ROUTINES 0 +#define configMAX_CO_ROUTINE_PRIORITIES 1 + +/* Optional resume from ISR functionality. */ +#define INCLUDE_xResumeFromISR 1 + +/* FreeRTOS Secure Side Only and TrustZone Security Extension */ +#define configRUN_FREERTOS_SECURE_ONLY 0 +#define configENABLE_TRUSTZONE 1 + +/* Thread local storage pointers used by the SDK */ +#ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS +#define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 1 +#endif + +/* PRINT_STRING implementation. iostream_retarget_stdio or third party + printf should be added if this is used */ +#define configPRINT_STRING(X) printf(X) + +#define configNUM_THREAD_LOCAL_STORAGE_POINTERS \ + (configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS + configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS) + +//#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) +//#include "SEGGER_SYSVIEW_FreeRTOS.h" +//#endif +#endif /* FREERTOS_CONFIG_H */ diff --git a/components/board/silabs/config/brd2204a/emlib_core_debug_config.h b/components/board/silabs/config/brd2204a/emlib_core_debug_config.h index 4a9cbf250..41befe0f9 100644 --- a/components/board/silabs/config/brd2204a/emlib_core_debug_config.h +++ b/components/board/silabs/config/brd2204a/emlib_core_debug_config.h @@ -1,46 +1,46 @@ -/***************************************************************************/ /** - * @file - * @brief emlib_core Configuration - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef EM_CORE_DEBUG_CONFIG_H -#define EM_CORE_DEBUG_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Core Configuration - -// Enables measuring of interrupt disable time for debugging purposes. -// Default: 0 -// If Enabled, either cycle_counter or systemview component must be added to project. -#define SL_EMLIB_CORE_ENABLE_INTERRUPT_DISABLED_TIMING 0 - -// - -// <<< end of configuration section >>> -#endif // EM_CORE_CONFIG_H +/***************************************************************************/ /** + * @file + * @brief emlib_core Configuration + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef EM_CORE_DEBUG_CONFIG_H +#define EM_CORE_DEBUG_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Core Configuration + +// Enables measuring of interrupt disable time for debugging purposes. +// Default: 0 +// If Enabled, either cycle_counter or systemview component must be added to project. +#define SL_EMLIB_CORE_ENABLE_INTERRUPT_DISABLED_TIMING 0 + +// + +// <<< end of configuration section >>> +#endif // EM_CORE_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/pin_config.h b/components/board/silabs/config/brd2204a/pin_config.h index f311d1b68..4afc174b0 100644 --- a/components/board/silabs/config/brd2204a/pin_config.h +++ b/components/board/silabs/config/brd2204a/pin_config.h @@ -1,238 +1,238 @@ -#ifndef PIN_CONFIG_H -#define PIN_CONFIG_H - -// $[ACMP0] -// [ACMP0]$ - -// $[ACMP1] -// [ACMP1]$ - -// $[ACMP2] -// [ACMP2]$ - -// $[ACMP3] -// [ACMP3]$ - -// $[ADC0] -// [ADC0]$ - -// $[ADC1] -// [ADC1]$ - -// $[BU] -// [BU]$ - -// $[CAN0] -// [CAN0]$ - -// $[CAN1] -// [CAN1]$ - -// $[CMU] -// [CMU]$ - -// $[DBG] -// [DBG]$ - -// $[EBI] -// [EBI]$ - -// $[ETH] -// [ETH]$ - -// $[ETM] -// [ETM]$ - -// $[GPIO] -// [GPIO]$ - -// $[I2C0] -// [I2C0]$ - -// $[I2C1] -// [I2C1]$ - -// $[I2C2] -// [I2C2]$ - -// $[IDAC0] -// [IDAC0]$ - -// $[LCD] -// [LCD]$ - -// $[LESENSE] -// [LESENSE]$ - -// $[LETIMER0] -// [LETIMER0]$ - -// $[LETIMER1] -// [LETIMER1]$ - -// $[LEUART0] -// [LEUART0]$ - -// $[LEUART1] -// [LEUART1]$ - -// $[LFXO] -// [LFXO]$ - -// $[PCNT0] -// [PCNT0]$ - -// $[PCNT1] -// [PCNT1]$ - -// $[PCNT2] -// [PCNT2]$ - -// $[PRS.CH0] -// [PRS.CH0]$ - -// $[PRS.CH1] -// [PRS.CH1]$ - -// $[PRS.CH2] -// [PRS.CH2]$ - -// $[PRS.CH3] -// [PRS.CH3]$ - -// $[PRS.CH4] -// [PRS.CH4]$ - -// $[PRS.CH5] -// [PRS.CH5]$ - -// $[PRS.CH6] -// [PRS.CH6]$ - -// $[PRS.CH7] -// [PRS.CH7]$ - -// $[PRS.CH8] -// [PRS.CH8]$ - -// $[PRS.CH9] -// [PRS.CH9]$ - -// $[PRS.CH10] -// [PRS.CH10]$ - -// $[PRS.CH11] -// [PRS.CH11]$ - -// $[PRS.CH12] -// [PRS.CH12]$ - -// $[PRS.CH13] -// [PRS.CH13]$ - -// $[PRS.CH14] -// [PRS.CH14]$ - -// $[PRS.CH15] -// [PRS.CH15]$ - -// $[PRS.CH16] -// [PRS.CH16]$ - -// $[PRS.CH17] -// [PRS.CH17]$ - -// $[PRS.CH18] -// [PRS.CH18]$ - -// $[PRS.CH19] -// [PRS.CH19]$ - -// $[PRS.CH20] -// [PRS.CH20]$ - -// $[PRS.CH21] -// [PRS.CH21]$ - -// $[PRS.CH22] -// [PRS.CH22]$ - -// $[PRS.CH23] -// [PRS.CH23]$ - -// $[QSPI0] -// [QSPI0]$ - -// $[SDIO] -// [SDIO]$ - -// $[TIMER0] -// [TIMER0]$ - -// $[TIMER1] -// [TIMER1]$ - -// $[TIMER2] -// [TIMER2]$ - -// $[TIMER3] -// [TIMER3]$ - -// $[TIMER4] -// [TIMER4]$ - -// $[TIMER5] -// [TIMER5]$ - -// $[TIMER6] -// [TIMER6]$ - -// $[UART0] -// [UART0]$ - -// $[UART1] -// [UART1]$ - -// $[USART0] -// [USART0]$ - -// $[USART1] -// [USART1]$ - -// $[USART2] -// [USART2]$ - -// $[USART3] -// [USART3]$ - -// $[USART4] -// [USART4]$ - -// $[USART5] -// [USART5]$ - -// $[USB] -// [USB]$ - -// $[VDAC0] -// [VDAC0]$ - -// $[WFXO] -// [WFXO]$ - -// $[WTIMER0] -// [WTIMER0]$ - -// $[WTIMER1] -// [WTIMER1]$ - -// $[WTIMER2] -// [WTIMER2]$ - -// $[WTIMER3] -// [WTIMER3]$ - -// $[CUSTOM_PIN_NAME] -// [CUSTOM_PIN_NAME]$ - -#endif // PIN_CONFIG_H +#ifndef PIN_CONFIG_H +#define PIN_CONFIG_H + +// $[ACMP0] +// [ACMP0]$ + +// $[ACMP1] +// [ACMP1]$ + +// $[ACMP2] +// [ACMP2]$ + +// $[ACMP3] +// [ACMP3]$ + +// $[ADC0] +// [ADC0]$ + +// $[ADC1] +// [ADC1]$ + +// $[BU] +// [BU]$ + +// $[CAN0] +// [CAN0]$ + +// $[CAN1] +// [CAN1]$ + +// $[CMU] +// [CMU]$ + +// $[DBG] +// [DBG]$ + +// $[EBI] +// [EBI]$ + +// $[ETH] +// [ETH]$ + +// $[ETM] +// [ETM]$ + +// $[GPIO] +// [GPIO]$ + +// $[I2C0] +// [I2C0]$ + +// $[I2C1] +// [I2C1]$ + +// $[I2C2] +// [I2C2]$ + +// $[IDAC0] +// [IDAC0]$ + +// $[LCD] +// [LCD]$ + +// $[LESENSE] +// [LESENSE]$ + +// $[LETIMER0] +// [LETIMER0]$ + +// $[LETIMER1] +// [LETIMER1]$ + +// $[LEUART0] +// [LEUART0]$ + +// $[LEUART1] +// [LEUART1]$ + +// $[LFXO] +// [LFXO]$ + +// $[PCNT0] +// [PCNT0]$ + +// $[PCNT1] +// [PCNT1]$ + +// $[PCNT2] +// [PCNT2]$ + +// $[PRS.CH0] +// [PRS.CH0]$ + +// $[PRS.CH1] +// [PRS.CH1]$ + +// $[PRS.CH2] +// [PRS.CH2]$ + +// $[PRS.CH3] +// [PRS.CH3]$ + +// $[PRS.CH4] +// [PRS.CH4]$ + +// $[PRS.CH5] +// [PRS.CH5]$ + +// $[PRS.CH6] +// [PRS.CH6]$ + +// $[PRS.CH7] +// [PRS.CH7]$ + +// $[PRS.CH8] +// [PRS.CH8]$ + +// $[PRS.CH9] +// [PRS.CH9]$ + +// $[PRS.CH10] +// [PRS.CH10]$ + +// $[PRS.CH11] +// [PRS.CH11]$ + +// $[PRS.CH12] +// [PRS.CH12]$ + +// $[PRS.CH13] +// [PRS.CH13]$ + +// $[PRS.CH14] +// [PRS.CH14]$ + +// $[PRS.CH15] +// [PRS.CH15]$ + +// $[PRS.CH16] +// [PRS.CH16]$ + +// $[PRS.CH17] +// [PRS.CH17]$ + +// $[PRS.CH18] +// [PRS.CH18]$ + +// $[PRS.CH19] +// [PRS.CH19]$ + +// $[PRS.CH20] +// [PRS.CH20]$ + +// $[PRS.CH21] +// [PRS.CH21]$ + +// $[PRS.CH22] +// [PRS.CH22]$ + +// $[PRS.CH23] +// [PRS.CH23]$ + +// $[QSPI0] +// [QSPI0]$ + +// $[SDIO] +// [SDIO]$ + +// $[TIMER0] +// [TIMER0]$ + +// $[TIMER1] +// [TIMER1]$ + +// $[TIMER2] +// [TIMER2]$ + +// $[TIMER3] +// [TIMER3]$ + +// $[TIMER4] +// [TIMER4]$ + +// $[TIMER5] +// [TIMER5]$ + +// $[TIMER6] +// [TIMER6]$ + +// $[UART0] +// [UART0]$ + +// $[UART1] +// [UART1]$ + +// $[USART0] +// [USART0]$ + +// $[USART1] +// [USART1]$ + +// $[USART2] +// [USART2]$ + +// $[USART3] +// [USART3]$ + +// $[USART4] +// [USART4]$ + +// $[USART5] +// [USART5]$ + +// $[USB] +// [USB]$ + +// $[VDAC0] +// [VDAC0]$ + +// $[WFXO] +// [WFXO]$ + +// $[WTIMER0] +// [WTIMER0]$ + +// $[WTIMER1] +// [WTIMER1]$ + +// $[WTIMER2] +// [WTIMER2]$ + +// $[WTIMER3] +// [WTIMER3]$ + +// $[CUSTOM_PIN_NAME] +// [CUSTOM_PIN_NAME]$ + +#endif // PIN_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/sl_board_control_config.h b/components/board/silabs/config/brd2204a/sl_board_control_config.h index 251f263b4..348d9543d 100644 --- a/components/board/silabs/config/brd2204a/sl_board_control_config.h +++ b/components/board/silabs/config/brd2204a/sl_board_control_config.h @@ -1,82 +1,82 @@ -#ifndef SL_BOARD_CONTROL_CONFIG_H -#define SL_BOARD_CONTROL_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Enable Virtual COM UART -// Default: 0 -#define SL_BOARD_ENABLE_VCOM 0 - -// Enable Display -// Default: 0 -#define SL_BOARD_ENABLE_DISPLAY 0 - -// Enable Relative Humidity and Temperature sensor -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_RHT 0 - -// Enable Hall Effect sensor -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_HALL 0 - -// Enable Microphone -// Default: 0 -#define SL_BOARD_ENABLE_SENSOR_MICROPHONE 0 - -// Enable QSPI Flash -// Default: 0 -#define SL_BOARD_ENABLE_MEMORY_QSPI 0 - -// Enable SD Card -// Default: 0 -#define SL_BOARD_ENABLE_MEMORY_SDCARD 0 - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_BOARD_ENABLE_VCOM -// $[GPIO_SL_BOARD_ENABLE_VCOM] -#define SL_BOARD_ENABLE_VCOM_PORT gpioPortE -#define SL_BOARD_ENABLE_VCOM_PIN 1 -// [GPIO_SL_BOARD_ENABLE_VCOM]$ - -// SL_BOARD_ENABLE_DISPLAY -// $[GPIO_SL_BOARD_ENABLE_DISPLAY] -#define SL_BOARD_ENABLE_DISPLAY_PORT gpioPortA -#define SL_BOARD_ENABLE_DISPLAY_PIN 9 -// [GPIO_SL_BOARD_ENABLE_DISPLAY]$ - -// SL_BOARD_ENABLE_SENSOR_RHT -// $[GPIO_SL_BOARD_ENABLE_SENSOR_RHT] -#define SL_BOARD_ENABLE_SENSOR_RHT_PORT gpioPortB -#define SL_BOARD_ENABLE_SENSOR_RHT_PIN 3 -// [GPIO_SL_BOARD_ENABLE_SENSOR_RHT]$ - -// SL_BOARD_ENABLE_SENSOR_HALL -// $[GPIO_SL_BOARD_ENABLE_SENSOR_HALL] -#define SL_BOARD_ENABLE_SENSOR_HALL_PORT gpioPortB -#define SL_BOARD_ENABLE_SENSOR_HALL_PIN 3 -// [GPIO_SL_BOARD_ENABLE_SENSOR_HALL]$ - -// SL_BOARD_ENABLE_SENSOR_MICROPHONE -// $[GPIO_SL_BOARD_ENABLE_SENSOR_MICROPHONE] -#define SL_BOARD_ENABLE_SENSOR_MICROPHONE_PORT gpioPortD -#define SL_BOARD_ENABLE_SENSOR_MICROPHONE_PIN 0 -// [GPIO_SL_BOARD_ENABLE_SENSOR_MICROPHONE]$ - -// SL_BOARD_ENABLE_MEMORY_QSPI -// $[GPIO_SL_BOARD_ENABLE_MEMORY_QSPI] -#define SL_BOARD_ENABLE_MEMORY_QSPI_PORT gpioPortG -#define SL_BOARD_ENABLE_MEMORY_QSPI_PIN 13 -// [GPIO_SL_BOARD_ENABLE_MEMORY_QSPI]$ - -// SL_BOARD_ENABLE_MEMORY_SDCARD -// $[GPIO_SL_BOARD_ENABLE_MEMORY_SDCARD] -#define SL_BOARD_ENABLE_MEMORY_SDCARD_PORT gpioPortE -#define SL_BOARD_ENABLE_MEMORY_SDCARD_PIN 7 -// [GPIO_SL_BOARD_ENABLE_MEMORY_SDCARD]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_BOARD_CONTROL_CONFIG_H +#ifndef SL_BOARD_CONTROL_CONFIG_H +#define SL_BOARD_CONTROL_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Enable Virtual COM UART +// Default: 0 +#define SL_BOARD_ENABLE_VCOM 0 + +// Enable Display +// Default: 0 +#define SL_BOARD_ENABLE_DISPLAY 0 + +// Enable Relative Humidity and Temperature sensor +// Default: 0 +#define SL_BOARD_ENABLE_SENSOR_RHT 0 + +// Enable Hall Effect sensor +// Default: 0 +#define SL_BOARD_ENABLE_SENSOR_HALL 0 + +// Enable Microphone +// Default: 0 +#define SL_BOARD_ENABLE_SENSOR_MICROPHONE 0 + +// Enable QSPI Flash +// Default: 0 +#define SL_BOARD_ENABLE_MEMORY_QSPI 0 + +// Enable SD Card +// Default: 0 +#define SL_BOARD_ENABLE_MEMORY_SDCARD 0 + +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> + +// SL_BOARD_ENABLE_VCOM +// $[GPIO_SL_BOARD_ENABLE_VCOM] +#define SL_BOARD_ENABLE_VCOM_PORT gpioPortE +#define SL_BOARD_ENABLE_VCOM_PIN 1 +// [GPIO_SL_BOARD_ENABLE_VCOM]$ + +// SL_BOARD_ENABLE_DISPLAY +// $[GPIO_SL_BOARD_ENABLE_DISPLAY] +#define SL_BOARD_ENABLE_DISPLAY_PORT gpioPortA +#define SL_BOARD_ENABLE_DISPLAY_PIN 9 +// [GPIO_SL_BOARD_ENABLE_DISPLAY]$ + +// SL_BOARD_ENABLE_SENSOR_RHT +// $[GPIO_SL_BOARD_ENABLE_SENSOR_RHT] +#define SL_BOARD_ENABLE_SENSOR_RHT_PORT gpioPortB +#define SL_BOARD_ENABLE_SENSOR_RHT_PIN 3 +// [GPIO_SL_BOARD_ENABLE_SENSOR_RHT]$ + +// SL_BOARD_ENABLE_SENSOR_HALL +// $[GPIO_SL_BOARD_ENABLE_SENSOR_HALL] +#define SL_BOARD_ENABLE_SENSOR_HALL_PORT gpioPortB +#define SL_BOARD_ENABLE_SENSOR_HALL_PIN 3 +// [GPIO_SL_BOARD_ENABLE_SENSOR_HALL]$ + +// SL_BOARD_ENABLE_SENSOR_MICROPHONE +// $[GPIO_SL_BOARD_ENABLE_SENSOR_MICROPHONE] +#define SL_BOARD_ENABLE_SENSOR_MICROPHONE_PORT gpioPortD +#define SL_BOARD_ENABLE_SENSOR_MICROPHONE_PIN 0 +// [GPIO_SL_BOARD_ENABLE_SENSOR_MICROPHONE]$ + +// SL_BOARD_ENABLE_MEMORY_QSPI +// $[GPIO_SL_BOARD_ENABLE_MEMORY_QSPI] +#define SL_BOARD_ENABLE_MEMORY_QSPI_PORT gpioPortG +#define SL_BOARD_ENABLE_MEMORY_QSPI_PIN 13 +// [GPIO_SL_BOARD_ENABLE_MEMORY_QSPI]$ + +// SL_BOARD_ENABLE_MEMORY_SDCARD +// $[GPIO_SL_BOARD_ENABLE_MEMORY_SDCARD] +#define SL_BOARD_ENABLE_MEMORY_SDCARD_PORT gpioPortE +#define SL_BOARD_ENABLE_MEMORY_SDCARD_PIN 7 +// [GPIO_SL_BOARD_ENABLE_MEMORY_SDCARD]$ + +// <<< sl:end pin_tool >>> + +#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/sl_device_init_dcdc_config.h b/components/board/silabs/config/brd2204a/sl_device_init_dcdc_config.h index 80bf07a34..dd98be811 100644 --- a/components/board/silabs/config/brd2204a/sl_device_init_dcdc_config.h +++ b/components/board/silabs/config/brd2204a/sl_device_init_dcdc_config.h @@ -1,28 +1,28 @@ -#ifndef SL_DEVICE_INIT_DCDC_CONFIG_H -#define SL_DEVICE_INIT_DCDC_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Enable DC/DC Converter -// -// Default: 1 -#define SL_DEVICE_INIT_DCDC_ENABLE 1 - -// Set DC/DC Converter in Bypass Mode -// -// Default: 0 -#define SL_DEVICE_INIT_DCDC_BYPASS 0 - -// Override for DCDC PFMX Mode Peak Current Setting -// -// Default: 0 -#define SL_DEVICE_INIT_DCDC_PFMX_IPKVAL_OVERRIDE 0 - -// DCDC PFMX Mode Peak Current Setting <0-15> -// -// Default: DCDC_PFMXCTRL_IPKVAL_DEFAULT -#define SL_DEVICE_INIT_DCDC_PFMX_IPKVAL DCDC_PFMXCTRL_IPKVAL_DEFAULT - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_DCDC_CONFIG_H +#ifndef SL_DEVICE_INIT_DCDC_CONFIG_H +#define SL_DEVICE_INIT_DCDC_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Enable DC/DC Converter +// +// Default: 1 +#define SL_DEVICE_INIT_DCDC_ENABLE 1 + +// Set DC/DC Converter in Bypass Mode +// +// Default: 0 +#define SL_DEVICE_INIT_DCDC_BYPASS 0 + +// Override for DCDC PFMX Mode Peak Current Setting +// +// Default: 0 +#define SL_DEVICE_INIT_DCDC_PFMX_IPKVAL_OVERRIDE 0 + +// DCDC PFMX Mode Peak Current Setting <0-15> +// +// Default: DCDC_PFMXCTRL_IPKVAL_DEFAULT +#define SL_DEVICE_INIT_DCDC_PFMX_IPKVAL DCDC_PFMXCTRL_IPKVAL_DEFAULT + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_DCDC_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/sl_device_init_emu_config.h b/components/board/silabs/config/brd2204a/sl_device_init_emu_config.h index fb07dc4b2..ea0d19036 100644 --- a/components/board/silabs/config/brd2204a/sl_device_init_emu_config.h +++ b/components/board/silabs/config/brd2204a/sl_device_init_emu_config.h @@ -1,68 +1,68 @@ -/***************************************************************************/ /** - * @file - * @brief DEVICE_INIT_EMU Config - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_DEVICE_INIT_EMU_CONFIG_H -#define SL_DEVICE_INIT_EMU_CONFIG_H - -#include "em_emu.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// EM4H Voltage scaling level -// Fast-wakeup voltage level -// Low-power optimized voltage level -// Default: emuVScaleEM4H_LowPower -#define SL_DEVICE_INIT_EMU_EM4_VSCALE emuVScaleEM4H_LowPower - -// Retain LFXO in EM4 -#define SL_DEVICE_INIT_EMU_EM4_RETAIN_LFXO 0 - -// Retain LFRCO in EM4 -#define SL_DEVICE_INIT_EMU_EM4_RETAIN_LFRCO 0 - -// Retain ULFRCO in EM4S -#define SL_DEVICE_INIT_EMU_EM4_RETAIN_ULFRCO 0 - -// Hibernate or shutoff EM4 state -// EM4 Shutoff -// EM4 Hibernate -// Default: emuEM4Shutoff -#define SL_DEVICE_INIT_EMU_EM4_STATE emuEM4Shutoff - -// EM4 pin retention mode -// No Retention: Pads enter reset state when entering EM4. -// Retention through EM4: Pads enter reset state when exiting EM4. -// Retention through EM4 and wakeup. -// Default: emuPinRetentionDisable -#define SL_DEVICE_INIT_EMU_EM4_PIN_RETENTION_MODE emuPinRetentionDisable - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_EMU_CONFIG_H +/***************************************************************************/ /** + * @file + * @brief DEVICE_INIT_EMU Config + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_DEVICE_INIT_EMU_CONFIG_H +#define SL_DEVICE_INIT_EMU_CONFIG_H + +#include "em_emu.h" + +// <<< Use Configuration Wizard in Context Menu >>> + +// EM4H Voltage scaling level +// Fast-wakeup voltage level +// Low-power optimized voltage level +// Default: emuVScaleEM4H_LowPower +#define SL_DEVICE_INIT_EMU_EM4_VSCALE emuVScaleEM4H_LowPower + +// Retain LFXO in EM4 +#define SL_DEVICE_INIT_EMU_EM4_RETAIN_LFXO 0 + +// Retain LFRCO in EM4 +#define SL_DEVICE_INIT_EMU_EM4_RETAIN_LFRCO 0 + +// Retain ULFRCO in EM4S +#define SL_DEVICE_INIT_EMU_EM4_RETAIN_ULFRCO 0 + +// Hibernate or shutoff EM4 state +// EM4 Shutoff +// EM4 Hibernate +// Default: emuEM4Shutoff +#define SL_DEVICE_INIT_EMU_EM4_STATE emuEM4Shutoff + +// EM4 pin retention mode +// No Retention: Pads enter reset state when entering EM4. +// Retention through EM4: Pads enter reset state when exiting EM4. +// Retention through EM4 and wakeup. +// Default: emuPinRetentionDisable +#define SL_DEVICE_INIT_EMU_EM4_PIN_RETENTION_MODE emuPinRetentionDisable + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_EMU_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/sl_device_init_hfxo_config.h b/components/board/silabs/config/brd2204a/sl_device_init_hfxo_config.h index 36a17de8b..bd3d66099 100644 --- a/components/board/silabs/config/brd2204a/sl_device_init_hfxo_config.h +++ b/components/board/silabs/config/brd2204a/sl_device_init_hfxo_config.h @@ -1,39 +1,39 @@ -#ifndef SL_DEVICE_INIT_HFXO_CONFIG_H -#define SL_DEVICE_INIT_HFXO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Mode -// -// Crystal oscillator -// AC-coupled buffer -// External digital clock -// Default: cmuOscMode_Crystal -#define SL_DEVICE_INIT_HFXO_MODE cmuOscMode_Crystal - -// Frequency <4000000-48000000> -// Default: 50000000 -#define SL_DEVICE_INIT_HFXO_FREQ 50000000 - -// CTUNE <0-511> -// Default: 360 -#define SL_DEVICE_INIT_HFXO_CTUNE 132 - -// Advanced Configurations -// Auto-start HFXO. This feature is incompatible with Power Manager and can only be enabled in applications that do not use Power Manager or a radio protocol stack. - DEPRECATED -// True -// False -// Default: false -#define SL_DEVICE_INIT_HFXO_AUTOSTART false - -// Auto-select HFXO. This feature is incompatible with Power Manager and can only be enabled in applications that do not use Power Manager or a radio protocol stack. - DEPRECATED -// True -// False -// Default: false -#define SL_DEVICE_INIT_HFXO_AUTOSELECT false - -// - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFXO_CONFIG_H +#ifndef SL_DEVICE_INIT_HFXO_CONFIG_H +#define SL_DEVICE_INIT_HFXO_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Mode +// +// Crystal oscillator +// AC-coupled buffer +// External digital clock +// Default: cmuOscMode_Crystal +#define SL_DEVICE_INIT_HFXO_MODE cmuOscMode_Crystal + +// Frequency <4000000-48000000> +// Default: 50000000 +#define SL_DEVICE_INIT_HFXO_FREQ 50000000 + +// CTUNE <0-511> +// Default: 360 +#define SL_DEVICE_INIT_HFXO_CTUNE 132 + +// Advanced Configurations +// Auto-start HFXO. This feature is incompatible with Power Manager and can only be enabled in applications that do not use Power Manager or a radio protocol stack. - DEPRECATED +// True +// False +// Default: false +#define SL_DEVICE_INIT_HFXO_AUTOSTART false + +// Auto-select HFXO. This feature is incompatible with Power Manager and can only be enabled in applications that do not use Power Manager or a radio protocol stack. - DEPRECATED +// True +// False +// Default: false +#define SL_DEVICE_INIT_HFXO_AUTOSELECT false + +// + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_HFXO_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/sl_device_init_lfxo_config.h b/components/board/silabs/config/brd2204a/sl_device_init_lfxo_config.h index bd8f70eb7..41467ebd6 100644 --- a/components/board/silabs/config/brd2204a/sl_device_init_lfxo_config.h +++ b/components/board/silabs/config/brd2204a/sl_device_init_lfxo_config.h @@ -1,37 +1,37 @@ -#ifndef SL_DEVICE_INIT_LFXO_CONFIG_H -#define SL_DEVICE_INIT_LFXO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Mode -// -// Crystal oscillator -// AC-coupled buffer -// External digital clock -// Default: cmuOscMode_Crystal -#define SL_DEVICE_INIT_LFXO_MODE cmuOscMode_Crystal - -// CTUNE <0-127> -// Default: 63 -#define SL_DEVICE_INIT_LFXO_CTUNE 70 - -// LFXO precision in PPM <0-65535> -// Default: 500 -#define SL_DEVICE_INIT_LFXO_PRECISION 100 - -// Startup Timeout Delay -// -// <_CMU_LFXOCTRL_TIMEOUT_2CYCLES=> 2 cycles -// <_CMU_LFXOCTRL_TIMEOUT_256CYCLES=> 256 cycles -// <_CMU_LFXOCTRL_TIMEOUT_1KCYCLES=> 1K cycles -// <_CMU_LFXOCTRL_TIMEOUT_2KCYCLES=> 2K cycles -// <_CMU_LFXOCTRL_TIMEOUT_4KCYCLES=> 4K cycles -// <_CMU_LFXOCTRL_TIMEOUT_8KCYCLES=> 8K cycles -// <_CMU_LFXOCTRL_TIMEOUT_16KCYCLES=> 16K cycles -// <_CMU_LFXOCTRL_TIMEOUT_32KCYCLES=> 32K cycles -// <_CMU_LFXOCTRL_TIMEOUT_DEFAULT=> Default -// Default: _CMU_LFXOCTRL_TIMEOUT_DEFAULT -#define SL_DEVICE_INIT_LFXO_TIMEOUT _CMU_LFXOCTRL_TIMEOUT_DEFAULT -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_LFXO_CONFIG_H +#ifndef SL_DEVICE_INIT_LFXO_CONFIG_H +#define SL_DEVICE_INIT_LFXO_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Mode +// +// Crystal oscillator +// AC-coupled buffer +// External digital clock +// Default: cmuOscMode_Crystal +#define SL_DEVICE_INIT_LFXO_MODE cmuOscMode_Crystal + +// CTUNE <0-127> +// Default: 63 +#define SL_DEVICE_INIT_LFXO_CTUNE 70 + +// LFXO precision in PPM <0-65535> +// Default: 500 +#define SL_DEVICE_INIT_LFXO_PRECISION 100 + +// Startup Timeout Delay +// +// <_CMU_LFXOCTRL_TIMEOUT_2CYCLES=> 2 cycles +// <_CMU_LFXOCTRL_TIMEOUT_256CYCLES=> 256 cycles +// <_CMU_LFXOCTRL_TIMEOUT_1KCYCLES=> 1K cycles +// <_CMU_LFXOCTRL_TIMEOUT_2KCYCLES=> 2K cycles +// <_CMU_LFXOCTRL_TIMEOUT_4KCYCLES=> 4K cycles +// <_CMU_LFXOCTRL_TIMEOUT_8KCYCLES=> 8K cycles +// <_CMU_LFXOCTRL_TIMEOUT_16KCYCLES=> 16K cycles +// <_CMU_LFXOCTRL_TIMEOUT_32KCYCLES=> 32K cycles +// <_CMU_LFXOCTRL_TIMEOUT_DEFAULT=> Default +// Default: _CMU_LFXOCTRL_TIMEOUT_DEFAULT +#define SL_DEVICE_INIT_LFXO_TIMEOUT _CMU_LFXOCTRL_TIMEOUT_DEFAULT +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_LFXO_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/sl_memory_config.h b/components/board/silabs/config/brd2204a/sl_memory_config.h index cb53654ea..0cd0031b1 100644 --- a/components/board/silabs/config/brd2204a/sl_memory_config.h +++ b/components/board/silabs/config/brd2204a/sl_memory_config.h @@ -1,28 +1,28 @@ -#ifndef SL_MEMORY_CONFIG_H -#define SL_MEMORY_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -// Memory configuration - -// Stack size for the application. -// Default: 4096 -// The stack size configured here will be used by the stack that the -// application uses when coming out of a reset. -#ifndef SL_STACK_SIZE -#define SL_STACK_SIZE 4096 -#endif - -// Minimum heap size for the application. -// Default: 2048 -// Note that this value will configure the c heap which is normally used by -// malloc() and free() from the c library. The value defines a minimum heap -// size that is guaranteed to be available. The available heap may be larger -// to make use of any memory that would otherwise remain unused. -#ifndef SL_HEAP_SIZE -#define SL_HEAP_SIZE 2048 -#endif - -// -// <<< end of configuration section >>> - -#endif +#ifndef SL_MEMORY_CONFIG_H +#define SL_MEMORY_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> +// Memory configuration + +// Stack size for the application. +// Default: 4096 +// The stack size configured here will be used by the stack that the +// application uses when coming out of a reset. +#ifndef SL_STACK_SIZE +#define SL_STACK_SIZE 4096 +#endif + +// Minimum heap size for the application. +// Default: 2048 +// Note that this value will configure the c heap which is normally used by +// malloc() and free() from the c library. The value defines a minimum heap +// size that is guaranteed to be available. The available heap may be larger +// to make use of any memory that would otherwise remain unused. +#ifndef SL_HEAP_SIZE +#define SL_HEAP_SIZE 2048 +#endif + +// +// <<< end of configuration section >>> + +#endif diff --git a/components/board/silabs/config/brd2204a/sl_usbd_class_mouse0_config.h b/components/board/silabs/config/brd2204a/sl_usbd_class_mouse0_config.h index 1bbe39384..afd94d89b 100644 --- a/components/board/silabs/config/brd2204a/sl_usbd_class_mouse0_config.h +++ b/components/board/silabs/config/brd2204a/sl_usbd_class_mouse0_config.h @@ -1,154 +1,154 @@ -/***************************************************************************/ /** - * @file - * @brief USBD HID Configuration - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * The licensor of this software is Silicon Laboratories Inc. Your use of this - * software is governed by the terms of Silicon Labs Master Software License - * Agreement (MSLA) available at - * www.silabs.com/about-us/legal/master-software-license-agreement. This - * software is distributed to you in Source Code format and is governed by the - * sections of the MSLA applicable to Source Code. - * - ******************************************************************************/ - -#ifndef SL_USBD_HID_MOUSE0_CONFIG_H -#define SL_USBD_HID_MOUSE0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Class Configuration - -// Configuration(s) to add this class instance to -// Default: all -// Comma separated list of configuration instances (like inst0, inst1) -// that this HID class instance will be attached to. You can -// use "all" to attach the class to all configs, or use an empty -// string if you do not want to attach the interface to any configuration. -#define SL_USBD_HID_MOUSE0_CONFIGURATIONS "all" - -// - -// Type Codes - -// Subclass code -// None -// Boot -// Default: SL_USBD_HID_SUBCLASS_BOOT -// This defines the standard USB subclass code for this interface. -// For most use cases, you can just select "Boot". -#define SL_USBD_HID_MOUSE0_SUBCLASS SL_USBD_HID_SUBCLASS_BOOT - -// Protocol code -// None -// Keyboard -// Mouse -// Default: SL_USBD_HID_PROTOCOL_MOUSE -// You can choose "Mouse" or "Keyboard" depending on what functionality -// this HID class instance will provide. -#define SL_USBD_HID_MOUSE0_PROTOCOL SL_USBD_HID_PROTOCOL_MOUSE - -// Country code -// Not supported -// Arabic -// Belgian -// Canadian Multilingual -// Canadian French -// Czech Republic -// Danish -// Finnish -// French -// German -// Greek -// Hebrew -// Hungary -// International -// Italian -// Japan Katakana -// Korean -// Latin American -// Netherlands Dutch -// Norwegian -// Persian Farsi -// Poland -// Portuguese -// Russia -// Slovakia -// Spanish -// Swedish -// Swiss French -// Swiss German -// Switzerland -// Taiwan -// Turkish Q -// Turkish F -// United Kingdom -// United States -// Yugoslavia -// Default: SL_USBD_HID_COUNTRY_CODE_US -// If this instance is implementing a keyboard interface, this -// field helps the host operating system know which layout/language -// the keyboard is manufactured for, or which country/localization -// setting to use by default. -#define SL_USBD_HID_MOUSE0_COUNTRY_CODE SL_USBD_HID_COUNTRY_CODE_US - -// - -// Protocol Details - -// IN polling interval -// <1=> 1ms -// <2=> 2ms -// <4=> 4ms -// <8=> 8ms -// <16=> 16ms -// <32=> 32ms -// <64=> 64ms -// <128=> 128ms -// <256=> 256ms -// <512=> 512ms -// <1024=> 1024ms -// <2048=> 2048ms -// <4096=> 4096ms -// <8192=> 8192ms -// <16384=> 16384ms -// <32768=> 32768ms -// Default: 2 -// Polling interval for input transfers, in milliseconds. -// It must be a power of 2. -#define SL_USBD_HID_MOUSE0_INTERVAL_IN 2 - -// OUT polling interval -// <1=> 1ms -// <2=> 2ms -// <4=> 4ms -// <8=> 8ms -// <16=> 16ms -// <32=> 32ms -// <64=> 64ms -// <128=> 128ms -// <256=> 256ms -// <512=> 512ms -// <1024=> 1024ms -// <2048=> 2048ms -// <4096=> 4096ms -// <8192=> 8192ms -// <16384=> 16384ms -// <32768=> 32768ms -// Default: 2 -// Polling interval for input transfers, in milliseconds. -// It must be a power of 2. -#define SL_USBD_HID_MOUSE0_INTERVAL_OUT 2 - -// Enable Control Read -// Default: 1 -// Enable read operations through the control transfers. -#define SL_USBD_HID_MOUSE0_ENABLE_CTRL_RD 1 - -// - -// <<< end of configuration section >>> -#endif // SL_USBD_HID_MOUSE0_CONFIG_H +/***************************************************************************/ /** + * @file + * @brief USBD HID Configuration + ******************************************************************************* + * # License + * Copyright 2021 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ + +#ifndef SL_USBD_HID_MOUSE0_CONFIG_H +#define SL_USBD_HID_MOUSE0_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Class Configuration + +// Configuration(s) to add this class instance to +// Default: all +// Comma separated list of configuration instances (like inst0, inst1) +// that this HID class instance will be attached to. You can +// use "all" to attach the class to all configs, or use an empty +// string if you do not want to attach the interface to any configuration. +#define SL_USBD_HID_MOUSE0_CONFIGURATIONS "all" + +// + +// Type Codes + +// Subclass code +// None +// Boot +// Default: SL_USBD_HID_SUBCLASS_BOOT +// This defines the standard USB subclass code for this interface. +// For most use cases, you can just select "Boot". +#define SL_USBD_HID_MOUSE0_SUBCLASS SL_USBD_HID_SUBCLASS_BOOT + +// Protocol code +// None +// Keyboard +// Mouse +// Default: SL_USBD_HID_PROTOCOL_MOUSE +// You can choose "Mouse" or "Keyboard" depending on what functionality +// this HID class instance will provide. +#define SL_USBD_HID_MOUSE0_PROTOCOL SL_USBD_HID_PROTOCOL_MOUSE + +// Country code +// Not supported +// Arabic +// Belgian +// Canadian Multilingual +// Canadian French +// Czech Republic +// Danish +// Finnish +// French +// German +// Greek +// Hebrew +// Hungary +// International +// Italian +// Japan Katakana +// Korean +// Latin American +// Netherlands Dutch +// Norwegian +// Persian Farsi +// Poland +// Portuguese +// Russia +// Slovakia +// Spanish +// Swedish +// Swiss French +// Swiss German +// Switzerland +// Taiwan +// Turkish Q +// Turkish F +// United Kingdom +// United States +// Yugoslavia +// Default: SL_USBD_HID_COUNTRY_CODE_US +// If this instance is implementing a keyboard interface, this +// field helps the host operating system know which layout/language +// the keyboard is manufactured for, or which country/localization +// setting to use by default. +#define SL_USBD_HID_MOUSE0_COUNTRY_CODE SL_USBD_HID_COUNTRY_CODE_US + +// + +// Protocol Details + +// IN polling interval +// <1=> 1ms +// <2=> 2ms +// <4=> 4ms +// <8=> 8ms +// <16=> 16ms +// <32=> 32ms +// <64=> 64ms +// <128=> 128ms +// <256=> 256ms +// <512=> 512ms +// <1024=> 1024ms +// <2048=> 2048ms +// <4096=> 4096ms +// <8192=> 8192ms +// <16384=> 16384ms +// <32768=> 32768ms +// Default: 2 +// Polling interval for input transfers, in milliseconds. +// It must be a power of 2. +#define SL_USBD_HID_MOUSE0_INTERVAL_IN 2 + +// OUT polling interval +// <1=> 1ms +// <2=> 2ms +// <4=> 4ms +// <8=> 8ms +// <16=> 16ms +// <32=> 32ms +// <64=> 64ms +// <128=> 128ms +// <256=> 256ms +// <512=> 512ms +// <1024=> 1024ms +// <2048=> 2048ms +// <4096=> 4096ms +// <8192=> 8192ms +// <16384=> 16384ms +// <32768=> 32768ms +// Default: 2 +// Polling interval for input transfers, in milliseconds. +// It must be a power of 2. +#define SL_USBD_HID_MOUSE0_INTERVAL_OUT 2 + +// Enable Control Read +// Default: 1 +// Enable read operations through the control transfers. +#define SL_USBD_HID_MOUSE0_ENABLE_CTRL_RD 1 + +// + +// <<< end of configuration section >>> +#endif // SL_USBD_HID_MOUSE0_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/sl_usbd_config0_config.h b/components/board/silabs/config/brd2204a/sl_usbd_config0_config.h index e39ef64b7..b1375ca67 100644 --- a/components/board/silabs/config/brd2204a/sl_usbd_config0_config.h +++ b/components/board/silabs/config/brd2204a/sl_usbd_config0_config.h @@ -1,62 +1,62 @@ -/***************************************************************************/ /** - * @file - * @brief USBD CDC ACM Configuration - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * The licensor of this software is Silicon Laboratories Inc. Your use of this - * software is governed by the terms of Silicon Labs Master Software License - * Agreement (MSLA) available at - * www.silabs.com/about-us/legal/master-software-license-agreement. This - * software is distributed to you in Source Code format and is governed by the - * sections of the MSLA applicable to Source Code. - * - ******************************************************************************/ - -#ifndef SL_USB_CONFIGURATION_CONFIG0_CONFIG_H -#define SL_USB_CONFIGURATION_CONFIG0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Configuration Settings - -// Configuration Name -// Default: "Main Configuration" -// This creates a string descriptor that the USB host -// can use to retrieve the name of this USB configuration descriptor. -// It can be scanned with "sudo lsusb -vv" on Linux. It appears next -// to iConfiguration field. -#define SL_USB_CONFIGURATION_CONFIG0_NAME "Main Configuration" - -// Power Source -// <0=> Bus-Powered -// <1=> Self-Powered -// Default: 1 -// Indicates whether the device will be powered using USB bus or -// or using a self-power source (like battery or a debugger) -// if the host configures the device using this configuration. -#define SL_USB_CONFIGURATION_CONFIG0_POWER_SOURCE 1 - -// Enable Remote Wakeup -// Default: 0 -// Enables or disables remote wakeup feature. -#define SL_USB_CONFIGURATION_CONFIG0_REMOTE_WAKEUP 0 - -// Maximum Power (mA) -// <100=> 100 mA -// <500=> 500 mA -// Default: 100 -// Specifies the maximum current that the device will draw. -// Most USB devices consume 100mA at most, but the USB standard -// allows the device to consume up to 500mA. When the host -// operating system scans this value, it will configure the USB port -// on the host controller to allow the device to consume the -// configured current. -#define SL_USB_CONFIGURATION_CONFIG0_MAXIMUM_POWER 100 - -// - -// <<< end of configuration section >>> -#endif // SL_USB_CONFIGURATION_CONFIG0_CONFIG_H +/***************************************************************************/ /** + * @file + * @brief USBD CDC ACM Configuration + ******************************************************************************* + * # License + * Copyright 2021 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ + +#ifndef SL_USB_CONFIGURATION_CONFIG0_CONFIG_H +#define SL_USB_CONFIGURATION_CONFIG0_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Configuration Settings + +// Configuration Name +// Default: "Main Configuration" +// This creates a string descriptor that the USB host +// can use to retrieve the name of this USB configuration descriptor. +// It can be scanned with "sudo lsusb -vv" on Linux. It appears next +// to iConfiguration field. +#define SL_USB_CONFIGURATION_CONFIG0_NAME "Main Configuration" + +// Power Source +// <0=> Bus-Powered +// <1=> Self-Powered +// Default: 1 +// Indicates whether the device will be powered using USB bus or +// or using a self-power source (like battery or a debugger) +// if the host configures the device using this configuration. +#define SL_USB_CONFIGURATION_CONFIG0_POWER_SOURCE 1 + +// Enable Remote Wakeup +// Default: 0 +// Enables or disables remote wakeup feature. +#define SL_USB_CONFIGURATION_CONFIG0_REMOTE_WAKEUP 0 + +// Maximum Power (mA) +// <100=> 100 mA +// <500=> 500 mA +// Default: 100 +// Specifies the maximum current that the device will draw. +// Most USB devices consume 100mA at most, but the USB standard +// allows the device to consume up to 500mA. When the host +// operating system scans this value, it will configure the USB port +// on the host controller to allow the device to consume the +// configured current. +#define SL_USB_CONFIGURATION_CONFIG0_MAXIMUM_POWER 100 + +// + +// <<< end of configuration section >>> +#endif // SL_USB_CONFIGURATION_CONFIG0_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/sl_usbd_core_config.h b/components/board/silabs/config/brd2204a/sl_usbd_core_config.h index 695d8d03c..013653e17 100644 --- a/components/board/silabs/config/brd2204a/sl_usbd_core_config.h +++ b/components/board/silabs/config/brd2204a/sl_usbd_core_config.h @@ -1,313 +1,313 @@ -/***************************************************************************/ /** - * @file - * @brief USBD Configuration - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * The licensor of this software is Silicon Laboratories Inc. Your use of this - * software is governed by the terms of Silicon Labs Master Software License - * Agreement (MSLA) available at - * www.silabs.com/about-us/legal/master-software-license-agreement. This - * software is distributed to you in Source Code format and is governed by the - * sections of the MSLA applicable to Source Code. - * - ******************************************************************************/ - -#ifndef SL_USBD_CONFIG_H -#define SL_USBD_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// USB Configuration - -// Auto-start USB device -// Default: 1 -// If enabled, the USB device will be automatically started up, -// using sl_usbd_core_start_device(), by the core task (which starts -// running after kernel scheduler is ready) when the USB stack is all -// initialized. You can disable this config if you want to call -// sl_usbd_core_start_device() manually from your code. This might -// be helpful if you do not want USB to start anytime before all -// your initializations are complete, or if you want to enable/disable -// USB on demand. -#define SL_USBD_AUTO_START_USB_DEVICE 1 - -// Enable SCSI 64-Bit LBA -// Default: 0 -// MSC SCSI Configuration for enabling 64-bit LBA support. -#define SL_USBD_MSC_SCSI_64_BIT_LBA_EN 0 - -// - -// USB Core Configuration - -// Core Pools - -// Number of configurations <1-255> -// Default: 1 -// The total number of configurations. -#define SL_USBD_CONFIGURATION_QUANTITY 1 - -// Number of interfaces <1-255> -// Default: 10 -// The total number of interfaces (for all of your USB configurations). -#define SL_USBD_INTERFACE_QUANTITY 10 - -// Number of alternate interfaces <1-255> -// Default: 10 -// The total number of alternate interfaces (for all of your USB configurations). -// Must be equal to or bigger than SL_USBD_INTERFACE_QUANTITY -#define SL_USBD_ALT_INTERFACE_QUANTITY 10 - -// Number of interface groups <0-255> -// Default: 20 -// The total number of interface groups (for all of your USB configurations). -#define SL_USBD_INTERFACE_GROUP_QUANTITY 20 - -// Number of endpoint descriptors <1-255> -// Default: 20 -// The total number of endpoint descriptors (for all of your USB configurations). -#define SL_USBD_DESCRIPTOR_QUANTITY 20 - -// Number of strings <0-100> -// Default: 30 -// The total number of strings per device. -#define SL_USBD_STRING_QUANTITY 30 - -// Number of opened endpoints <2-255> -// Default: 20 -// The total number of opened endpoints per device. -#define SL_USBD_OPEN_ENDPOINTS_QUANTITY 20 - -// - -// Core Task - -// Stack size of USBD core task in bytes -// Default: 4096 -// Stack size in bytes of the USBD core task. -#define SL_USBD_TASK_STACK_SIZE 4096U - -// Priority of USBD core task <8-55> -// low + 1 -// low + 2 -// low + 3 -// low + 4 -// low + 5 -// low + 6 -// low + 7 -// below normal -// below normal + 1 -// below normal + 2 -// below normal + 3 -// below normal + 4 -// below normal + 5 -// below normal + 6 -// below normal + 7 -// normal -// normal + 1 -// normal + 2 -// normal + 3 -// normal + 4 -// normal + 5 -// normal + 6 -// normal + 7 -// above normal -// above normal + 1 -// above normal + 2 -// above normal + 3 -// above normal + 4 -// above normal + 5 -// above normal + 6 -// above normal + 7 -// high -// high + 1 -// high + 2 -// high + 3 -// high + 4 -// high + 5 -// high + 6 -// high + 7 -// realtime -// realtime + 1 -// realtime + 2 -// realtime + 3 -// realtime + 4 -// realtime + 5 -// realtime + 6 -// realtime + 7 -// Default: osPriorityHigh -// CMSIS-RTOS2 priority of the USBD core task. -#define SL_USBD_TASK_PRIORITY osPriorityHigh - -// - -// - -// USB CDC Configuration - -// CDC Pools - -// Number of class instances <1-255> -// Default: 2 -// Number of class instances. -#define SL_USBD_CDC_CLASS_INSTANCE_QUANTITY 2 - -// Number of configurations <1-255> -// Default: 1 -// Number of configurations. -#define SL_USBD_CDC_CONFIGURATION_QUANTITY 1 - -// Number of subclass instances <1-255> -// Default: 2 -// Number of subclass instances. -#define SL_USBD_CDC_ACM_SUBCLASS_INSTANCE_QUANTITY 2 - -// Number of data interfaces <1-255> -// Default: 2 -// Number of data interfaces. -#define SL_USBD_CDC_DATA_INTERFACE_QUANTITY 2 - -// - -// - -// USB HID Configuration - -// HID Pools - -// Number of class instances <1-255> -// Default: 2 -// Number of class instances. -#define SL_USBD_HID_CLASS_INSTANCE_QUANTITY 2 - -// Number of configurations <1-255> -// Default: 1 -// Number of configurations. -#define SL_USBD_HID_CONFIGURATION_QUANTITY 1 - -// Number of report ids <0-255> -// Default: 2 -// Number of report ids. -#define SL_USBD_HID_REPORT_ID_QUANTITY 2 - -// Number of push/pop items <0-255> -// Default: 0 -// Number of push/pop items. -#define SL_USBD_HID_PUSH_POP_ITEM_QUANTITY 0 - -// - -// HID Task - -// Stack size of USBD HID timer task in bytes -// Default: 2048 -// HID Timer task stack size in bytes. -#define SL_USBD_HID_TIMER_TASK_STACK_SIZE 2048 - -// Priority of USBD HID timer task <8-55> -// low + 1 -// low + 2 -// low + 3 -// low + 4 -// low + 5 -// low + 6 -// low + 7 -// below normal -// below normal + 1 -// below normal + 2 -// below normal + 3 -// below normal + 4 -// below normal + 5 -// below normal + 6 -// below normal + 7 -// normal -// normal + 1 -// normal + 2 -// normal + 3 -// normal + 4 -// normal + 5 -// normal + 6 -// normal + 7 -// above normal -// above normal + 1 -// above normal + 2 -// above normal + 3 -// above normal + 4 -// above normal + 5 -// above normal + 6 -// above normal + 7 -// high -// high + 1 -// high + 2 -// high + 3 -// high + 4 -// high + 5 -// high + 6 -// high + 7 -// realtime -// realtime + 1 -// realtime + 2 -// realtime + 3 -// realtime + 4 -// realtime + 5 -// realtime + 6 -// realtime + 7 -// Default: osPriorityHigh -// CMSIS-RTOS2 priority of the USBD HID task. -#define SL_USBD_HID_TIMER_TASK_PRIORITY osPriorityHigh - -// - -// - -// USB MSC Configuration - -// MSC Pools - -// Number of class instances <1-255> -// Default: 2 -// Number of class instances. -#define SL_USBD_MSC_CLASS_INSTANCE_QUANTITY 2 - -// Number of configurations <1-255> -// Default: 1 -// Number of configurations. -#define SL_USBD_MSC_CONFIGURATION_QUANTITY 1 - -// Number of Logical Units per class instance <1-255> -// Default: 2 -// Number of Logical Units. -#define SL_USBD_MSC_LUN_QUANTITY 2 - -// Size of data buffer per class instance in bytes <1-4294967295> -// Default: 512 -// Size of data buffer in bytes. -#define SL_USBD_MSC_DATA_BUFFER_SIZE 512 - -// - -// - -// USB Vendor Configuration - -// Vendor Pools - -// Number of class instances <1-255> -// Default: 2 -// Number of class instances. -#define SL_USBD_VENDOR_CLASS_INSTANCE_QUANTITY 2 - -// Number of configurations <1-255> -// Default: 1 -// Number of configurations. -#define SL_USBD_VENDOR_CONFIGURATION_QUANTITY 1 - -// - -// - -// <<< end of configuration section >>> -#endif // SL_USBD_CONFIG_H +/***************************************************************************/ /** + * @file + * @brief USBD Configuration + ******************************************************************************* + * # License + * Copyright 2021 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ + +#ifndef SL_USBD_CONFIG_H +#define SL_USBD_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// USB Configuration + +// Auto-start USB device +// Default: 1 +// If enabled, the USB device will be automatically started up, +// using sl_usbd_core_start_device(), by the core task (which starts +// running after kernel scheduler is ready) when the USB stack is all +// initialized. You can disable this config if you want to call +// sl_usbd_core_start_device() manually from your code. This might +// be helpful if you do not want USB to start anytime before all +// your initializations are complete, or if you want to enable/disable +// USB on demand. +#define SL_USBD_AUTO_START_USB_DEVICE 1 + +// Enable SCSI 64-Bit LBA +// Default: 0 +// MSC SCSI Configuration for enabling 64-bit LBA support. +#define SL_USBD_MSC_SCSI_64_BIT_LBA_EN 0 + +// + +// USB Core Configuration + +// Core Pools + +// Number of configurations <1-255> +// Default: 1 +// The total number of configurations. +#define SL_USBD_CONFIGURATION_QUANTITY 1 + +// Number of interfaces <1-255> +// Default: 10 +// The total number of interfaces (for all of your USB configurations). +#define SL_USBD_INTERFACE_QUANTITY 10 + +// Number of alternate interfaces <1-255> +// Default: 10 +// The total number of alternate interfaces (for all of your USB configurations). +// Must be equal to or bigger than SL_USBD_INTERFACE_QUANTITY +#define SL_USBD_ALT_INTERFACE_QUANTITY 10 + +// Number of interface groups <0-255> +// Default: 20 +// The total number of interface groups (for all of your USB configurations). +#define SL_USBD_INTERFACE_GROUP_QUANTITY 20 + +// Number of endpoint descriptors <1-255> +// Default: 20 +// The total number of endpoint descriptors (for all of your USB configurations). +#define SL_USBD_DESCRIPTOR_QUANTITY 20 + +// Number of strings <0-100> +// Default: 30 +// The total number of strings per device. +#define SL_USBD_STRING_QUANTITY 30 + +// Number of opened endpoints <2-255> +// Default: 20 +// The total number of opened endpoints per device. +#define SL_USBD_OPEN_ENDPOINTS_QUANTITY 20 + +// + +// Core Task + +// Stack size of USBD core task in bytes +// Default: 4096 +// Stack size in bytes of the USBD core task. +#define SL_USBD_TASK_STACK_SIZE 4096U + +// Priority of USBD core task <8-55> +// low + 1 +// low + 2 +// low + 3 +// low + 4 +// low + 5 +// low + 6 +// low + 7 +// below normal +// below normal + 1 +// below normal + 2 +// below normal + 3 +// below normal + 4 +// below normal + 5 +// below normal + 6 +// below normal + 7 +// normal +// normal + 1 +// normal + 2 +// normal + 3 +// normal + 4 +// normal + 5 +// normal + 6 +// normal + 7 +// above normal +// above normal + 1 +// above normal + 2 +// above normal + 3 +// above normal + 4 +// above normal + 5 +// above normal + 6 +// above normal + 7 +// high +// high + 1 +// high + 2 +// high + 3 +// high + 4 +// high + 5 +// high + 6 +// high + 7 +// realtime +// realtime + 1 +// realtime + 2 +// realtime + 3 +// realtime + 4 +// realtime + 5 +// realtime + 6 +// realtime + 7 +// Default: osPriorityHigh +// CMSIS-RTOS2 priority of the USBD core task. +#define SL_USBD_TASK_PRIORITY osPriorityHigh + +// + +// + +// USB CDC Configuration + +// CDC Pools + +// Number of class instances <1-255> +// Default: 2 +// Number of class instances. +#define SL_USBD_CDC_CLASS_INSTANCE_QUANTITY 2 + +// Number of configurations <1-255> +// Default: 1 +// Number of configurations. +#define SL_USBD_CDC_CONFIGURATION_QUANTITY 1 + +// Number of subclass instances <1-255> +// Default: 2 +// Number of subclass instances. +#define SL_USBD_CDC_ACM_SUBCLASS_INSTANCE_QUANTITY 2 + +// Number of data interfaces <1-255> +// Default: 2 +// Number of data interfaces. +#define SL_USBD_CDC_DATA_INTERFACE_QUANTITY 2 + +// + +// + +// USB HID Configuration + +// HID Pools + +// Number of class instances <1-255> +// Default: 2 +// Number of class instances. +#define SL_USBD_HID_CLASS_INSTANCE_QUANTITY 2 + +// Number of configurations <1-255> +// Default: 1 +// Number of configurations. +#define SL_USBD_HID_CONFIGURATION_QUANTITY 1 + +// Number of report ids <0-255> +// Default: 2 +// Number of report ids. +#define SL_USBD_HID_REPORT_ID_QUANTITY 2 + +// Number of push/pop items <0-255> +// Default: 0 +// Number of push/pop items. +#define SL_USBD_HID_PUSH_POP_ITEM_QUANTITY 0 + +// + +// HID Task + +// Stack size of USBD HID timer task in bytes +// Default: 2048 +// HID Timer task stack size in bytes. +#define SL_USBD_HID_TIMER_TASK_STACK_SIZE 2048 + +// Priority of USBD HID timer task <8-55> +// low + 1 +// low + 2 +// low + 3 +// low + 4 +// low + 5 +// low + 6 +// low + 7 +// below normal +// below normal + 1 +// below normal + 2 +// below normal + 3 +// below normal + 4 +// below normal + 5 +// below normal + 6 +// below normal + 7 +// normal +// normal + 1 +// normal + 2 +// normal + 3 +// normal + 4 +// normal + 5 +// normal + 6 +// normal + 7 +// above normal +// above normal + 1 +// above normal + 2 +// above normal + 3 +// above normal + 4 +// above normal + 5 +// above normal + 6 +// above normal + 7 +// high +// high + 1 +// high + 2 +// high + 3 +// high + 4 +// high + 5 +// high + 6 +// high + 7 +// realtime +// realtime + 1 +// realtime + 2 +// realtime + 3 +// realtime + 4 +// realtime + 5 +// realtime + 6 +// realtime + 7 +// Default: osPriorityHigh +// CMSIS-RTOS2 priority of the USBD HID task. +#define SL_USBD_HID_TIMER_TASK_PRIORITY osPriorityHigh + +// + +// + +// USB MSC Configuration + +// MSC Pools + +// Number of class instances <1-255> +// Default: 2 +// Number of class instances. +#define SL_USBD_MSC_CLASS_INSTANCE_QUANTITY 2 + +// Number of configurations <1-255> +// Default: 1 +// Number of configurations. +#define SL_USBD_MSC_CONFIGURATION_QUANTITY 1 + +// Number of Logical Units per class instance <1-255> +// Default: 2 +// Number of Logical Units. +#define SL_USBD_MSC_LUN_QUANTITY 2 + +// Size of data buffer per class instance in bytes <1-4294967295> +// Default: 512 +// Size of data buffer in bytes. +#define SL_USBD_MSC_DATA_BUFFER_SIZE 512 + +// + +// + +// USB Vendor Configuration + +// Vendor Pools + +// Number of class instances <1-255> +// Default: 2 +// Number of class instances. +#define SL_USBD_VENDOR_CLASS_INSTANCE_QUANTITY 2 + +// Number of configurations <1-255> +// Default: 1 +// Number of configurations. +#define SL_USBD_VENDOR_CONFIGURATION_QUANTITY 1 + +// + +// + +// <<< end of configuration section >>> +#endif // SL_USBD_CONFIG_H diff --git a/components/board/silabs/config/brd2204a/sl_usbd_device_config.h b/components/board/silabs/config/brd2204a/sl_usbd_device_config.h index d9ba43a41..f0b635281 100644 --- a/components/board/silabs/config/brd2204a/sl_usbd_device_config.h +++ b/components/board/silabs/config/brd2204a/sl_usbd_device_config.h @@ -1,73 +1,73 @@ -/***************************************************************************/ /** - * @file - * @brief USBD Configuration - ******************************************************************************* - * # License - * Copyright 2021 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * The licensor of this software is Silicon Laboratories Inc. Your use of this - * software is governed by the terms of Silicon Labs Master Software License - * Agreement (MSLA) available at - * www.silabs.com/about-us/legal/master-software-license-agreement. This - * software is distributed to you in Source Code format and is governed by the - * sections of the MSLA applicable to Source Code. - * - ******************************************************************************/ - -#ifndef SL_USBD_DEVICE_CONFIG_H -#define SL_USBD_DEVICE_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// USB Device Configuration - -// Device Vendor ID -// Default: 0xFFFE -// Device vendor ID. -#define SL_USBD_DEVICE_VENDOR_ID 0xFFFE - -// Device Product ID -// Default: 0x1234 -// Device product ID. -#define SL_USBD_DEVICE_PRODUCT_ID 0x1234 - -// Device Release Number -// Default: 0x0100 -// Device release number. -#define SL_USBD_DEVICE_RELEASE_NUMBER 0x0100 - -// Device Manufacturer Name -// Default: "Silicon Labs" -// Device manufacturer string. -#define SL_USBD_DEVICE_MANUFACTURER_STRING "Silicon Labs" - -// Device Product Name -// Default: "Product" -// Device product string. -#define SL_USBD_DEVICE_PRODUCT_STRING "Product" - -// Device Serial Number -// Default: "1234567890ABCDEF" -// Device serial number string. -#define SL_USBD_DEVICE_SERIAL_NUMBER_STRING "1234567890ABCDEF" - -// Device Language ID -// Arabic -// Chinese -// US English -// UK English -// French -// German -// Greek -// Italian -// Portuguese -// Sanskrit -// ID of language of strings of device. -// Default: USBD_LANG_ID_ENGLISH_US -#define SL_USBD_DEVICE_LANGUAGE_ID SL_USBD_LANG_ID_ENGLISH_US - -// - -// <<< end of configuration section >>> -#endif // SL_USBD_DEVICE_CONFIG_H +/***************************************************************************/ /** + * @file + * @brief USBD Configuration + ******************************************************************************* + * # License + * Copyright 2021 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ + +#ifndef SL_USBD_DEVICE_CONFIG_H +#define SL_USBD_DEVICE_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// USB Device Configuration + +// Device Vendor ID +// Default: 0xFFFE +// Device vendor ID. +#define SL_USBD_DEVICE_VENDOR_ID 0xFFFE + +// Device Product ID +// Default: 0x1234 +// Device product ID. +#define SL_USBD_DEVICE_PRODUCT_ID 0x1234 + +// Device Release Number +// Default: 0x0100 +// Device release number. +#define SL_USBD_DEVICE_RELEASE_NUMBER 0x0100 + +// Device Manufacturer Name +// Default: "Silicon Labs" +// Device manufacturer string. +#define SL_USBD_DEVICE_MANUFACTURER_STRING "Silicon Labs" + +// Device Product Name +// Default: "Product" +// Device product string. +#define SL_USBD_DEVICE_PRODUCT_STRING "Product" + +// Device Serial Number +// Default: "1234567890ABCDEF" +// Device serial number string. +#define SL_USBD_DEVICE_SERIAL_NUMBER_STRING "1234567890ABCDEF" + +// Device Language ID +// Arabic +// Chinese +// US English +// UK English +// French +// German +// Greek +// Italian +// Portuguese +// Sanskrit +// ID of language of strings of device. +// Default: USBD_LANG_ID_ENGLISH_US +#define SL_USBD_DEVICE_LANGUAGE_ID SL_USBD_LANG_ID_ENGLISH_US + +// + +// <<< end of configuration section >>> +#endif // SL_USBD_DEVICE_CONFIG_H diff --git a/components/board/silabs/config/brd2605a/RTE_Device_917.h b/components/board/silabs/config/brd2605a/RTE_Device_917.h new file mode 100644 index 000000000..415f4c62b --- /dev/null +++ b/components/board/silabs/config/brd2605a/RTE_Device_917.h @@ -0,0 +1,3093 @@ +/* ----------------------------------------------------------------------------- + * Copyright (c) 2013-2016 ARM Ltd. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from + * the use of this software. Permission is granted to anyone to use this + * software for any purpose, including commercial applications, and to alter + * it and redistribute it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in + * a product, an acknowledgement in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source distribution. + * + * $Date: 4 January 2024 + * $Revision: V2.4.4 + * + * Project: RTE Device Configuration for Si91x 2.0 B0 BRD2605A + * -------------------------------------------------------------------------- */ + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +#ifndef __RTE_DEVICE_H +#define __RTE_DEVICE_H +#include "rsi_ccp_user_config.h" + +#define GPIO_PORT_0 0 // GPIO port 0 +#define ULP_GPIO_MODE_6 6 // ULP GPIO mode 6 +#define HOST_PAD_GPIO_MIN 25 // GPIO host pad minimum pin number +#define HOST_PAD_GPIO_MAX 30 // GPIO host pad maximum pin number +#define GPIO_MAX_PIN 64 // GPIO maximum pin number + +#define BUTTON_0_GPIO_PIN 2 + +#define RTE_BUTTON0_PORT 0 +#define RTE_BUTTON0_NUMBER 0 +#define RTE_BUTTON0_PIN (2U) + +#define RTE_BUTTON1_PORT 0 +#define RTE_BUTTON1_NUMBER 1 +#define RTE_BUTTON1_PIN (11U) +#define RTE_BUTTON1_PAD 6 + +#define RTE_LED0_PORT 0 +#define RTE_LED0_NUMBER 0 +#define RTE_LED0_PIN (2U) + +#define RTE_LED1_PORT 0 +#define RTE_LED1_NUMBER 1 +#define RTE_LED1_PIN (10U) +#define BOARD_ACTIVITY_LED (2U) // LED0 +#define RTE_LED1_PAD 5 + +// USART0 [Driver_USART0] +// Configuration settings for Driver_USART0 in component ::CMSIS Driver:USART +#define RTE_ENABLE_FIFO 1 + +#define RTE_USART0 1 + +#define RTE_USART0_CLK_SRC USART_ULPREFCLK +#define RTE_USART0_CLK_DIV_FACT 1 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER + +#define RTE_USART_MODE 0 //!Usart mode macros +#define RTE_CONTINUOUS_CLOCK_MODE 0 + +#define RTE_USART0_LOOPBACK 0 +#define RTE_USART0_DTR_EANBLE 0 + +#define RTE_USART0_DMA_MODE1_EN 0 //!dma mode + +#define RTE_USART0_TX_FIFO_THRESHOLD USART_TRIGGER_TX_EMPTY +#define RTE_USART0_RX_FIFO_THRESHOLD USART_TRIGGER_RX_AEMPTY + +#define RTE_USART0_DMA_TX_LEN_PER_DES 1024 +#define RTE_USART0_DMA_RX_LEN_PER_DES 1024 + +#define RTE_USART0_CHNL_UDMA_TX_CH 25 + +#define RTE_USART0_CHNL_UDMA_RX_CH 24 + +// USART0_CLK <0=>P0_8 <1=>P0_25 <2=>P0_52 <3=>P0_64 +// CLK of USART0 +#define RTE_USART0_CLK_PORT_ID 0 + +#if (RTE_USART0_CLK_PORT_ID == 0) +#define RTE_USART0_CLK_PORT 0 +#define RTE_USART0_CLK_PIN 8 +#define RTE_USART0_CLK_MUX 2 +#define RTE_USART0_CLK_PAD 3 +#elif (RTE_USART0_CLK_PORT_ID == 1) +#define RTE_USART0_CLK_PORT 0 +#define RTE_USART0_CLK_PIN 25 +#define RTE_USART0_CLK_MUX 2 +#define RTE_USART0_CLK_PAD 0 //NO PAD +#elif (RTE_USART0_CLK_PORT_ID == 2) +#define RTE_USART0_CLK_PORT 0 +#define RTE_USART0_CLK_PIN 52 +#define RTE_USART0_CLK_MUX 2 +#define RTE_USART0_CLK_PAD 16 +#else +#error "Invalid USART0 RTE_USART0_CLK_PIN Pin Configuration!" +#endif + +// USART0_TX <0=>P0_15 <1=>P0_30 <2=>P0_54 <3=>P0_68 <4=>P0_71 +// TX for USART0 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_USART0_TX_PORT_ID 1 +#else +#define RTE_USART0_TX_PORT_ID 0 +#endif + +#if (RTE_USART0_TX_PORT_ID == 0) +#define RTE_USART0_TX_PORT 0 +#define RTE_USART0_TX_PIN 15 +#define RTE_USART0_TX_MUX 2 +#define RTE_USART0_TX_PAD 8 +#elif (RTE_USART0_TX_PORT_ID == 1) +#define RTE_USART0_TX_PORT 0 +#define RTE_USART0_TX_PIN 30 +#define RTE_USART0_TX_MUX 2 +#define RTE_USART0_TX_PAD 0 //NO PAD +#elif (RTE_USART0_TX_PORT_ID == 2) +#define RTE_USART0_TX_PORT 0 +#define RTE_USART0_TX_PIN 54 +#define RTE_USART0_TX_MUX 2 +#define RTE_USART0_TX_PAD 18 +#elif (RTE_USART0_TX_PORT_ID == 3) +#define RTE_USART0_TX_PORT 0 +#define RTE_USART0_TX_PIN 71 +#define RTE_USART0_TX_MUX 4 +#define RTE_USART0_TX_PAD 29 +#else +#error "Invalid USART0 RTE_USART0_TX_PIN Pin Configuration!" +#endif + +// USART0_RX <0=>P0_10 <1=>P0_29 <2=>P0_55 <3=>P0_65 <4=>P0_70 +// RX for USART0 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_USART0_RX_PORT_ID 1 +#else +#define RTE_USART0_RX_PORT_ID 0 +#endif + +#if (RTE_USART0_RX_PORT_ID == 0) +#define RTE_USART0_RX_PORT 0 +#define RTE_USART0_RX_PIN 10 +#define RTE_USART0_RX_MUX 2 +#define RTE_USART0_RX_PAD 5 +#elif (RTE_USART0_RX_PORT_ID == 1) +#define RTE_USART0_RX_PORT 0 +#define RTE_USART0_RX_PIN 29 +#define RTE_USART0_RX_MUX 2 +#define RTE_USART0_RX_PAD 0 //no pad +#elif (RTE_USART0_RX_PORT_ID == 2) +#define RTE_USART0_RX_PORT 0 +#define RTE_USART0_RX_PIN 55 +#define RTE_USART0_RX_MUX 2 +#define RTE_USART0_RX_PAD 19 +#elif (RTE_USART0_RX_PORT_ID == 3) +#define RTE_USART0_RX_PORT 0 +#define RTE_USART0_RX_PIN 65 +#define RTE_USART0_RX_MUX 2 +#define RTE_USART0_RX_PAD 24 +#elif (RTE_USART0_RX_PORT_ID == 4) +#define RTE_USART0_RX_PORT 0 +#define RTE_USART0_RX_PIN 70 +#define RTE_USART0_RX_MUX 4 +#define RTE_USART0_RX_PAD 28 +#else +#error "Invalid USART0 RTE_USART0_RX_PIN Pin Configuration!" +#endif + +// USART0_CTS <0=>P0_6 <1=>P0_26 <2=>P0_56 <3=>P0_70 +// CTS for USART0 +#define RTE_USART0_CTS_PORT_ID 0 + +#if (RTE_USART0_CTS_PORT_ID == 0) +#define RTE_USART0_CTS_PORT 0 +#define RTE_USART0_CTS_PIN 6 +#define RTE_USART0_CTS_MUX 2 +#define RTE_USART0_CTS_PAD 1 +#elif (RTE_USART0_CTS_PORT_ID == 1) +#define RTE_USART0_CTS_PORT 0 +#define RTE_USART0_CTS_PIN 26 +#define RTE_USART0_CTS_MUX 2 +#define RTE_USART0_CTS_PAD 0 //NO PAD +#elif (RTE_USART0_CTS_PORT_ID == 2) +#define RTE_USART0_CTS_PORT 0 +#define RTE_USART0_CTS_PIN 56 +#define RTE_USART0_CTS_MUX 2 +#define RTE_USART0_CTS_PAD 20 +#elif (RTE_USART0_CTS_PORT_ID == 3) +#define RTE_USART0_CTS_PORT 0 +#define RTE_USART0_CTS_PIN 70 +#define RTE_USART0_CTS_MUX 2 +#define RTE_USART0_CTS_PAD 28 +#else +#error "Invalid USART0 RTE_USART0_CTS_PIN Pin Configuration!" +#endif + +// USART0_RTS <0=>P0_9 <1=>P0_28 <2=>P0_53 <3=>P0_69 +// RTS for USART0 +#define RTE_USART0_RTS_PORT_ID 0 + +#if (RTE_USART0_RTS_PORT_ID == 0) +#define RTE_USART0_RTS_PORT 0 +#define RTE_USART0_RTS_PIN 9 +#define RTE_USART0_RTS_MUX 2 +#define RTE_USART0_RTS_PAD 4 +#elif (RTE_USART0_RTS_PORT_ID == 1) +#define RTE_USART0_RTS_PORT 0 +#define RTE_USART0_RTS_PIN 28 +#define RTE_USART0_RTS_MUX 2 +#define RTE_USART0_RTS_PAD 0 //NO PAD +#elif (RTE_USART0_RTS_PORT_ID == 2) +#define RTE_USART0_RTS_PORT 0 +#define RTE_USART0_RTS_PIN 53 +#define RTE_USART0_RTS_MUX 2 +#define RTE_USART0_RTS_PAD 17 +#else +#error "Invalid USART0 RTE_USART0_RTS_PIN Pin Configuration!" +#endif + +// USART0_IR_TX <0=>P0_48 <1=>P0_72 +// IR TX for USART0 + +#define RTE_IR_TX_PORT_ID 0 +#if ((RTE_IR_TX_PORT_ID == 2)) +#error "Invalid USART0 RTE_USART0_IR_TX_PIN Pin Configuration!" +#endif + +#if (RTE_IR_TX_PORT_ID == 0) +#define RTE_USART0_IR_TX_PORT 0 +#define RTE_USART0_IR_TX_PIN 48 +#define RTE_USART0_IR_TX_MUX 2 +#define RTE_USART0_IR_TX_PAD 12 +#elif (RTE_IR_TX_PORT_ID == 1) +#define RTE_USART0_IR_TX_PORT 0 +#define RTE_USART0_IR_TX_PIN 72 +#define RTE_USART0_IR_TX_MUX 2 +#define RTE_USART0_IR_TX_PAD 30 +#elif (RTE_IR_TX_PORT_ID == 2) +#define RTE_USART0_IR_TX_PORT 0 +#define RTE_USART0_IR_TX_PIN 26 +#define RTE_USART0_IR_TX_MUX 13 +#define RTE_USART0_IR_TX_PAD 0 //No pad +#else +#error "Invalid USART0 RTE_USART0_IR_TX_PIN Pin Configuration!" +#endif + +// USART0_IR_RX <0=>P0_47 <1=>P0_71 <2=>P0_64 <3=>P0_25 +// IR RX for USART0 + +#define RTE_IR_RX_PORT_ID 0 +#if ((RTE_IR_RX_PORT_ID == 2)) +#error "Invalid USART0 RTE_USART0_IR_RX_PIN Pin Configuration!" +#endif + +#if (RTE_IR_RX_PORT_ID == 0) +#define RTE_USART0_IR_RX_PORT 0 +#define RTE_USART0_IR_RX_PIN 47 +#define RTE_USART0_IR_RX_MUX 2 +#define RTE_USART0_IR_RX_PAD 11 +#elif (RTE_IR_RX_PORT_ID == 1) +#define RTE_USART0_IR_RX_PORT 0 +#define RTE_USART0_IR_RX_PIN 71 +#define RTE_USART0_IR_RX_MUX 2 +#define RTE_USART0_IR_RX_PAD 29 +#elif (RTE_IR_RX_PORT_ID == 2) +#define RTE_USART0_IR_RX_PORT 0 +#define RTE_USART0_IR_RX_PIN 25 +#define RTE_USART0_IR_RX_MUX 13 +#define RTE_USART0_IR_RX_PAD 0 //no pad +#else +#error "Invalid USART0 RTE_USART0_IR_RX_PIN Pin Configuration!" +#endif + +// USART0_RI <0=>P0_27 <1=>P0_46 <2=>P0_68 +// RI for USART0 +#define RTE_RI_PORT_ID 0 + +#if (RTE_RI_PORT_ID == 0) +#define RTE_USART0_RI_PORT 0 +#define RTE_USART0_RI_PIN 27 +#define RTE_USART0_RI_MUX 2 +#define RTE_USART0_RI_PAD 0 //no pad +#elif (RTE_RI_PORT_ID == 1) +#define RTE_USART0_RI_PORT 0 +#define RTE_USART0_RI_PIN 46 +#define RTE_USART0_RI_MUX 2 +#define RTE_USART0_RI_PAD 10 +#else +#error "Invalid USART0 RTE_USART0_RI_PIN Pin Configuration!" +#endif + +// USART0_DSR <0=>P0_11 <1=>P0_57 +// DSR for USART0 +#define RTE_DSR_PORT_ID 0 + +#if (RTE_DSR_PORT_ID == 0) +#define RTE_USART0_DSR_PORT 0 +#define RTE_USART0_DSR_PIN 11 +#define RTE_USART0_DSR_MUX 2 +#define RTE_USART0_DSR_PAD 6 +#elif (RTE_DSR_PORT_ID == 1) +#define RTE_USART0_DSR_PORT 0 +#define RTE_USART0_DSR_PIN 57 +#define RTE_USART0_DSR_MUX 2 +#define RTE_USART0_DSR_PAD 21 +#else +#error "Invalid USART0 RTE_USART0_RI_PIN Pin Configuration!" +#endif +// USART0_DCD <0=>P0_12 <1=>P0_29 +// DCD for USART0 + +#define RTE_USART0_DCD_PORT 0 +#define RTE_USART0_DCD_PIN 12 +#define RTE_USART0_DCD_MUX 2 +#define RTE_USART0_DCD_PAD 7 + +// USART0_DTR <0=>P0_7 +// DTR for USART0 +#define RTE_USART0_DTR_PORT 0 +#define RTE_USART0_DTR_PIN 7 +#define RTE_USART0_DTR_MUX 2 +#define RTE_USART0_DTR_PAD 2 +// + +// UART1 [Driver_UART1] +// Configuration settings for Driver_UART1 in component ::CMSIS Driver:USART +#define RTE_UART1 1 + +#define RTE_UART1_CLK_SRC USART_ULPREFCLK +#define RTE_UART1_CLK_DIV_FACT 1 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER + +#define RTE_UART1_LOOPBACK 0 +#define RTE_UART1_DMA_MODE1_EN 0 + +#define RTE_UART1_TX_FIFO_THRESHOLD USART_TRIGGER_TX_EMPTY +#define RTE_UART1_RX_FIFO_THRESHOLD USART_TRIGGER_RX_AEMPTY + +#define RTE_UART1_DMA_TX_LEN_PER_DES 1024 +#define RTE_UART1_DMA_RX_LEN_PER_DES 1024 + +#define RTE_UART1_CHNL_UDMA_TX_CH 27 + +#define RTE_UART1_CHNL_UDMA_RX_CH 26 + +/*UART1 PINS*/ +// UART1_TX <0=>P0_7 <1=>P0_30 <2=>P0_67 <3=>P0_69 <4=>P0_73 <5=>P0_75 <6=>P0_34 +// TX of UART1 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_UART1_TX_PORT_ID 3 +#else +#define RTE_UART1_TX_PORT_ID 0 + +#if ((RTE_UART1_TX_PORT_ID == 6)) +#error "Invalid UART1 RTE_UART1_TX_PIN Configuration!" +#endif +#endif + +#if (RTE_UART1_TX_PORT_ID == 0) +#define RTE_UART1_TX_PORT 0 +#define RTE_UART1_TX_PIN 7 +#define RTE_UART1_TX_MUX 6 +#define RTE_UART1_TX_PAD 2 +#elif (RTE_UART1_TX_PORT_ID == 1) +#define RTE_UART1_TX_PORT 0 +#define RTE_UART1_TX_PIN 30 +#define RTE_UART1_TX_MUX 6 +#define RTE_UART1_TX_PAD 0 //no pad +#elif (RTE_UART1_TX_PORT_ID == 2) +#define RTE_UART1_TX_PORT 0 +#define RTE_UART1_TX_PIN 67 +#define RTE_UART1_TX_MUX 9 +#define RTE_UART1_TX_PAD 25 +#elif (RTE_UART1_TX_PORT_ID == 3) +#define RTE_UART1_TX_PORT 0 +#define RTE_UART1_TX_PIN 73 +#define RTE_UART1_TX_MUX 6 +#define RTE_UART1_TX_PAD 31 +#elif (RTE_UART1_TX_PORT_ID == 4) +#define RTE_UART1_TX_PORT 0 +#define RTE_UART1_TX_PIN 75 +#define RTE_UART1_TX_MUX 9 +#define RTE_UART1_TX_PAD 33 +#else +#error "Invalid UART1 RTE_UART1_TX_PIN Pin Configuration!" +#endif + +// UART1_RX <0=>P0_6 <1=>P0_29 <2=>P0_66 <3=>P0_68 <4=>P0_72 <5=>P0_74 <6=>P0_33 +// RX of UART1 + +#define RTE_UART1_RX_PORT_ID 0 + +#if (RTE_UART1_RX_PORT_ID == 0) +#define RTE_UART1_RX_PORT 0 +#define RTE_UART1_RX_PIN 6 +#define RTE_UART1_RX_MUX 6 +#define RTE_UART1_RX_PAD 1 +#elif (RTE_UART1_RX_PORT_ID == 1) +#define RTE_UART1_RX_PORT 0 +#define RTE_UART1_RX_PIN 29 +#define RTE_UART1_RX_MUX 6 +#define RTE_UART1_RX_PAD 0 //no pad +#elif (RTE_UART1_RX_PORT_ID == 2) +#define RTE_UART1_RX_PORT 0 +#define RTE_UART1_RX_PIN 66 +#define RTE_UART1_RX_MUX 9 +#define RTE_UART1_RX_PAD 24 +#elif (RTE_UART1_RX_PORT_ID == 3) +#define RTE_UART1_RX_PORT 0 +#define RTE_UART1_RX_PIN 72 +#define RTE_UART1_RX_MUX 6 +#define RTE_UART1_RX_PAD 30 +#elif (RTE_UART1_RX_PORT_ID == 4) +#define RTE_UART1_RX_PORT 0 +#define RTE_UART1_RX_PIN 74 +#define RTE_UART1_RX_MUX 9 +#define RTE_UART1_RX_PAD 32 +#else +#error "Invalid UART1 RTE_UART1_RX_PIN Pin Configuration!" +#endif + +// UART1_CTS <0=>P0_11 <1=>P0_28 <2=>P0_51 <3=>P0_65 <4=>P0_71 <5=>P0_73 <6=>P0_32 +// CTS of UART1 +#define RTE_UART1_CTS_PORT_ID 0 + +#if (RTE_UART1_CTS_PORT_ID == 0) +#define RTE_UART1_CTS_PORT 0 +#define RTE_UART1_CTS_PIN 11 +#define RTE_UART1_CTS_MUX 6 +#define RTE_UART1_CTS_PAD 6 +#elif (RTE_UART1_CTS_PORT_ID == 1) +#define RTE_UART1_CTS_PORT 0 +#define RTE_UART1_CTS_PIN 28 +#define RTE_UART1_CTS_MUX 6 +#define RTE_UART1_CTS_PAD 0 //no pad +#elif (RTE_UART1_CTS_PORT_ID == 2) +#define RTE_UART1_CTS_PORT 0 +#define RTE_UART1_CTS_PIN 51 +#define RTE_UART1_CTS_MUX 9 +#define RTE_UART1_CTS_PAD 15 +#elif (RTE_UART1_CTS_PORT_ID == 3) +#define RTE_UART1_CTS_PORT 0 +#define RTE_UART1_CTS_PIN 65 +#define RTE_UART1_CTS_MUX 9 +#define RTE_UART1_CTS_PAD 23 +#elif (RTE_UART1_CTS_PORT_ID == 4) +#define RTE_UART1_CTS_PORT 0 +#define RTE_UART1_CTS_PIN 71 +#define RTE_UART1_CTS_MUX 6 +#define RTE_UART1_CTS_PAD 29 +#else +#error "Invalid UART1 RTE_UART1_CTS_PIN Pin Configuration!" +#endif + +// UART1_RTS <0=>P0_10 <1=>P0_27 <2=>P0_50 <3=>P0_64 <4=>P0_70 <5=>P0_72 <6=>P0_31 +// RTS of UART1 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_UART1_RTS_PORT_ID 0 +#else +#define RTE_UART1_RTS_PORT_ID 0 +#endif + +#if (RTE_UART1_RTS_PORT_ID == 0) +#define RTE_UART1_RTS_PORT 0 +#define RTE_UART1_RTS_PIN 10 +#define RTE_UART1_RTS_MUX 6 +#define RTE_UART1_RTS_PAD 5 +#elif (RTE_UART1_RTS_PORT_ID == 1) +#define RTE_UART1_RTS_PORT 0 +#define RTE_UART1_RTS_PIN 27 +#define RTE_UART1_RTS_MUX 6 +#define RTE_UART1_RTS_PAD 0 //no pad +#elif (RTE_UART1_RTS_PORT_ID == 2) +#define RTE_UART1_RTS_PORT 0 +#define RTE_UART1_RTS_PIN 50 +#define RTE_UART1_RTS_MUX 9 +#define RTE_UART1_RTS_PAD 14 +#elif (RTE_UART1_RTS_PORT_ID == 3) +#define RTE_UART1_RTS_PORT 0 +#define RTE_UART1_RTS_PIN 70 +#define RTE_UART1_RTS_MUX 6 +#define RTE_UART1_RTS_PAD 28 +#elif (RTE_UART1_RTS_PORT_ID == 4) +#define RTE_UART1_RTS_PORT 0 +#define RTE_UART1_RTS_PIN 72 +#define RTE_UART1_RTS_MUX 9 +#define RTE_UART1_RTS_PAD 30 +#else +#error "Invalid UART1 RTE_UART1_RTS_PIN Pin Configuration!" +#endif +// + +// ULP_UART [Driver_ULP_UART] +// Configuration settings for Driver_ULP_UART in component ::CMSIS Driver:USART +#define RTE_ULP_UART 1 + +#define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK +#define RTE_ULP_UART_CLK_DIV_FACT 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER + +#define RTE_ULP_UART_LOOPBACK 0 +#define RTE_ULP_UART_DMA_MODE1_EN 0 + +#define RTE_ULP_UART_TX_FIFO_THRESHOLD USART_TRIGGER_TX_EMPTY +#define RTE_ULP_UART_RX_FIFO_THRESHOLD USART_TRIGGER_RX_AEMPTY + +#define RTE_ULP_UART_DMA_TX_LEN_PER_DES 1024 +#define RTE_ULP_UART_DMA_RX_LEN_PER_DES 1024 + +#define RTE_ULPUART_CHNL_UDMA_TX_CH 1 + +#define RTE_ULPUART_CHNL_UDMA_RX_CH 0 + +/*ULPSS UART PINS*/ +// UART1_TX <0=>P0_3 <1=>P0_7 <2=>P0_11 +// TX of ULPSS UART +#define RTE_ULP_UART_TX_PORT_ID 1 +#if (RTE_ULP_UART_TX_PORT_ID == 0) +#define RTE_ULP_UART_TX_PORT 0 +#define RTE_ULP_UART_TX_PIN 7 +#define RTE_ULP_UART_TX_MUX 3 +#elif (RTE_ULP_UART_TX_PORT_ID == 1) +#define RTE_ULP_UART_TX_PORT 0 +#define RTE_ULP_UART_TX_PIN 11 +#define RTE_ULP_UART_TX_MUX 3 +#else +#error "Invalid ULPSS UART RTE_ULP_UART_TX_PIN Pin Configuration!" +#endif + +// UART1_RX <0=>P0_2 <1=>P0_6 <2=>P0_9 +// RX of ULPSS UART +#define RTE_ULP_UART_RX_PORT_ID 2 +#if (RTE_ULP_UART_RX_PORT_ID == 0) +#define RTE_ULP_UART_RX_PORT 0 +#define RTE_ULP_UART_RX_PIN 2 +#define RTE_ULP_UART_RX_MUX 3 +#elif (RTE_ULP_UART_RX_PORT_ID == 1) +#define RTE_ULP_UART_RX_PORT 0 +#define RTE_ULP_UART_RX_PIN 6 +#define RTE_ULP_UART_RX_MUX 3 +#elif (RTE_ULP_UART_RX_PORT_ID == 2) +#define RTE_ULP_UART_RX_PORT 0 +#define RTE_ULP_UART_RX_PIN 9 +#define RTE_ULP_UART_RX_MUX 3 +#else +#error "Invalid ULPSS UART RTE_ULP_UART_RX_PIN Pin Configuration!" +#endif + +// UART1_CTS <0=>P0_1 <1=>P0_5 <2=>P0_8 +// CTS of ULPSS UART +#define RTE_ULP_UART_CTS_PORT_ID 0 +#if (RTE_ULP_UART_CTS_PORT_ID == 0) +#define RTE_ULP_UART_CTS_PORT 0 +#define RTE_ULP_UART_CTS_PIN 1 +#define RTE_ULP_UART_CTS_MUX 3 +#elif (RTE_ULP_UART_CTS_PORT_ID == 1) +#define RTE_ULP_UART_CTS_PORT 0 +#define RTE_ULP_UART_CTS_PIN 8 +#define RTE_ULP_UART_CTS_MUX 3 +#else +#error "Invalid ULPSS UART RTE_ULP_UART_CTS_PIN Pin Configuration!" +#endif + +// UART1_RTS <0=>P0_0 <1=>P0_4 <2=>P0_10 +// RTS of ULPSS UART +#define RTE_ULP_UART_RTS_PORT_ID 0 +#if (RTE_ULP_UART_RTS_PORT_ID == 0) +#define RTE_ULP_UART_RTS_PORT 0 +#define RTE_ULP_UART_RTS_PIN 10 +#define RTE_ULP_UART_RTS_MUX 8 +#else +#error "Invalid ULPSS UART RTE_ULP_UART_RTS_PIN Pin Configuration!" +#endif +// + +// SSI_MASTER (Serial Peripheral Interface 1) [Driver_SSI_MASTER] +// Configuration settings for Driver_SSI_MASTER in component ::CMSIS Driver:SPI +#define RTE_SSI_MASTER 1 + +#define RTE_SSI_MASTER_INPUT_CLOCK SSI_SOCPLLCLK + +// SSI_MASTER_MISO Pin <0=>GPIO_12 <1=>GPIO_27 <2=>GPIO_57 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_SSI_MASTER_MISO_PORT_ID 1 +#else +#define RTE_SSI_MASTER_MISO_PORT_ID 0 +#endif + +#if (RTE_SSI_MASTER_MISO_PORT_ID == 0) +#define RTE_SSI_MASTER_MISO 1 +#define RTE_SSI_MASTER_MISO_PORT 0 +#define RTE_SSI_MASTER_MISO_PIN 12 +#define RTE_SSI_MASTER_MISO_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_MISO_PADSEL 7 +#elif (RTE_SSI_MASTER_MISO_PORT_ID == 1) +#define RTE_SSI_MASTER_MISO 1 +#define RTE_SSI_MASTER_MISO_PORT 0 +#define RTE_SSI_MASTER_MISO_PIN 27 +#define RTE_SSI_MASTER_MISO_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_MISO_PADSEL 0 //NO PAD +#elif (RTE_SSI_MASTER_MISO_PORT_ID == 2) +#define RTE_SSI_MASTER_MISO 1 +#define RTE_SSI_MASTER_MISO_PORT 0 +#define RTE_SSI_MASTER_MISO_PIN 57 +#define RTE_SSI_MASTER_MISO_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_MISO_PADSEL 21 +#else +#error "Invalid SSI_MASTER_MISO Pin Configuration!" +#endif + +// SSI_MASTER_MOSI Pin <0=>GPIO_11 <1=>GPIO_26 <2=>GPIO_56 +#define RTE_SSI_MASTER_MOSI_PORT_ID 1 + +#if (RTE_SSI_MASTER_MOSI_PORT_ID == 0) +#define RTE_SSI_MASTER_MOSI 1 +#define RTE_SSI_MASTER_MOSI_PORT 0 +#define RTE_SSI_MASTER_MOSI_PIN 11 +#define RTE_SSI_MASTER_MOSI_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_MOSI_PADSEL 6 +#elif (RTE_SSI_MASTER_MOSI_PORT_ID == 1) +#define RTE_SSI_MASTER_MOSI 1 +#define RTE_SSI_MASTER_MOSI_PORT 0 +#define RTE_SSI_MASTER_MOSI_PIN 26 +#define RTE_SSI_MASTER_MOSI_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_MOSI_PADSEL 0 //NO PAD +#elif (RTE_SSI_MASTER_MOSI_PORT_ID == 2) +#define RTE_SSI_MASTER_MOSI 1 +#define RTE_SSI_MASTER_MOSI_PORT 0 +#define RTE_SSI_MASTER_MOSI_PIN 56 +#define RTE_SSI_MASTER_MOSI_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_MOSI_PADSEL 20 +#else +#error "Invalid SSI_MASTER_MOSI Pin Configuration!" +#endif + +// SSI_MASTER_SCK Pin <0=>GPIO_8 <1=>GPIO_25 <2=>GPIO_52 +#define RTE_SSI_MASTER_SCK_PORT_ID 1 + +#if (RTE_SSI_MASTER_SCK_PORT_ID == 0) +#define RTE_SSI_MASTER_SCK 1 +#define RTE_SSI_MASTER_SCK_PORT 0 +#define RTE_SSI_MASTER_SCK_PIN 8 +#define RTE_SSI_MASTER_SCK_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_SCK_PADSEL 3 +#elif (RTE_SSI_MASTER_SCK_PORT_ID == 1) +#define RTE_SSI_MASTER_SCK 1 +#define RTE_SSI_MASTER_SCK_PORT 0 +#define RTE_SSI_MASTER_SCK_PIN 25 +#define RTE_SSI_MASTER_SCK_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_SCK_PADSEL 0 //NO PAD +#elif (RTE_SSI_MASTER_SCK_PORT_ID == 2) +#define RTE_SSI_MASTER_SCK 1 +#define RTE_SSI_MASTER_SCK_PORT 0 +#define RTE_SSI_MASTER_SCK_PIN 52 +#define RTE_SSI_MASTER_SCK_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_SCK_PADSEL 16 +#else +#error "Invalid SSI_MASTER_SCK Pin Configuration!" +#endif + +#define M4_SSI_CS0 1 +#define M4_SSI_CS1 0 +#define M4_SSI_CS2 0 +#define M4_SSI_CS3 0 + +// SSI_MASTER_CS Pin <0=>GPIO_9 <1=>GPIO_28 <2=>GPIO_53 <3=>GPIO_10 <4=>GPIO_15 <5=>GPIO_50 <6=>GPIO_51 +#define RTE_SSI_MASTER_CS0_PORT_ID 1 + +#if (RTE_SSI_MASTER_CS0_PORT_ID == 0) +#define RTE_SSI_MASTER_CS0 M4_SSI_CS0 +#define RTE_SSI_MASTER_CS0_PORT 0 +#define RTE_SSI_MASTER_CS0_PIN 9 +#define RTE_SSI_MASTER_CS0_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_CS0_PADSEL 4 +#elif (RTE_SSI_MASTER_CS0_PORT_ID == 1) +#define RTE_SSI_MASTER_CS0 M4_SSI_CS0 +#define RTE_SSI_MASTER_CS0_PORT 0 +#define RTE_SSI_MASTER_CS0_PIN 28 +#define RTE_SSI_MASTER_CS0_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_CS0_PADSEL 0 //NO PAD +#elif (RTE_SSI_MASTER_CS0_PORT_ID == 2) +#define RTE_SSI_MASTER_CS0 M4_SSI_CS0 +#define RTE_SSI_MASTER_CS0_PORT 0 +#define RTE_SSI_MASTER_CS0_PIN 53 +#define RTE_SSI_MASTER_CS0_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_CS0_PADSEL 17 +#else +#error "Invalid SSI_MASTER_CS0 Pin Configuration!" +#endif + +//CS1 +#define RTE_SSI_MASTER_CS1_PORT_ID 0 +#if (RTE_SSI_MASTER_CS1_PORT_ID == 0) +#define RTE_SSI_MASTER_CS1 M4_SSI_CS1 +#define RTE_SSI_MASTER_CS1_PORT 0 +#define RTE_SSI_MASTER_CS1_PIN 10 +#define RTE_SSI_MASTER_CS1_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_CS1_PADSEL 5 +#else +#error "Invalid SSI_MASTER_CS1 Pin Configuration!" +#endif + +//CS2 +#define RTE_SSI_MASTER_CS2_PORT_ID 1 +#if (RTE_SSI_MASTER_CS2_PORT_ID == 0) +#define RTE_SSI_MASTER_CS2 M4_SSI_CS2 +#define RTE_SSI_MASTER_CS2_PORT 0 +#define RTE_SSI_MASTER_CS2_PIN 15 +#define RTE_SSI_MASTER_CS2_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_CS2_PADSEL 8 +#elif (RTE_SSI_MASTER_CS2_PORT_ID == 1) +#define RTE_SSI_MASTER_CS2 M4_SSI_CS2 +#define RTE_SSI_MASTER_CS2_PORT 0 +#define RTE_SSI_MASTER_CS2_PIN 50 +#define RTE_SSI_MASTER_CS2_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_CS2_PADSEL 14 +#else +#error "Invalid SSI_MASTER_CS2 Pin Configuration!" +#endif + +//CS3 +#define RTE_SSI_MASTER_CS3_PORT_ID 0 +#if (RTE_SSI_MASTER_CS3_PORT_ID == 0) +#define RTE_SSI_MASTER_CS3 M4_SSI_CS3 +#define RTE_SSI_MASTER_CS3_PORT 0 +#define RTE_SSI_MASTER_CS3_PIN 51 +#define RTE_SSI_MASTER_CS3_MODE EGPIO_PIN_MUX_MODE3 +#define RTE_SSI_MASTER_CS3_PADSEL 15 +#else +#error "Invalid SSI_MASTER_CS3 Pin Configuration!" +#endif + +// DMA Rx +// Channel <28=>28 +// Selects DMA Channel (only Channel 28 can be used) +// +#define RTE_SSI_MASTER_UDMA_RX_CH 28 + +// DMA Tx +// Channel <29=>29 +// Selects DMA Channel (only Channel 29 can be used) +// +#define RTE_SSI_MASTER_UDMA_TX_CH 29 +// + +// SSI_SLAVE (Serial Peripheral Interface 2) [Driver_SSI_SLAVE] +// Configuration settings for Driver_SSI_SLAVE in component ::CMSIS Driver:SPI +#define RTE_SSI_SLAVE 1 + +#define RTE_SSI_SLAVE_INPUT_CLOCK SSISLAVE_CLK + +// SSI_SLAVE_MISO Pin <0=>Not Used <1=>GPIO_11 <2=>GPIO_28 <3=>GPIO_49 <4=>GPIO_57 +#define RTE_SSI_SLAVE_MISO_PORT_ID 2 + +#if (RTE_SSI_SLAVE_MISO_PORT_ID == 0) +#define RTE_SSI_SLAVE_MISO 0 +#elif (RTE_SSI_SLAVE_MISO_PORT_ID == 1) +#define RTE_SSI_SLAVE_MISO 1 +#define RTE_SSI_SLAVE_MISO_PORT 0 +#define RTE_SSI_SLAVE_MISO_PIN 11 +#define RTE_SSI_SLAVE_MISO_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_MISO_PADSEL 6 +#elif (RTE_SSI_SLAVE_MISO_PORT_ID == 2) +#define RTE_SSI_SLAVE_MISO 1 +#define RTE_SSI_SLAVE_MISO_PORT 0 +#define RTE_SSI_SLAVE_MISO_PIN 28 +#define RTE_SSI_SLAVE_MISO_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_MISO_PADSEL 0 //no pad +#elif (RTE_SSI_SLAVE_MISO_PORT_ID == 3) +#define RTE_SSI_SLAVE_MISO 1 +#define RTE_SSI_SLAVE_MISO_PORT 0 +#define RTE_SSI_SLAVE_MISO_PIN 49 +#define RTE_SSI_SLAVE_MISO_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_MISO_PADSEL 13 +#elif (RTE_SSI_SLAVE_MISO_PORT_ID == 4) +#define RTE_SSI_SLAVE_MISO 1 +#define RTE_SSI_SLAVE_MISO_PORT 0 +#define RTE_SSI_SLAVE_MISO_PIN 57 +#define RTE_SSI_SLAVE_MISO_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_MISO_PADSEL 21 +#else +#error "Invalid SSI_SLAVE_MISO Pin Configuration!" +#endif + +// SSI_SLAVE_MOSI Pin <0=>Not Used <1=>GPIO_10 <2=>GPIO_27 <3=>GPIO_48 <4=>GPIO_56 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_SSI_SLAVE_MOSI_PORT_ID 2 +#else +#define RTE_SSI_SLAVE_MOSI_PORT_ID 1 +#endif + +#if (RTE_SSI_SLAVE_MOSI_PORT_ID == 0) +#define RTE_SSI_SLAVE_MOSI 0 +#elif (RTE_SSI_SLAVE_MOSI_PORT_ID == 1) +#define RTE_SSI_SLAVE_MOSI 1 +#define RTE_SSI_SLAVE_MOSI_PORT 0 +#define RTE_SSI_SLAVE_MOSI_PIN 10 +#define RTE_SSI_SLAVE_MOSI_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_MOSI_PADSEL 5 +#elif (RTE_SSI_SLAVE_MOSI_PORT_ID == 2) +#define RTE_SSI_SLAVE_MOSI 1 +#define RTE_SSI_SLAVE_MOSI_PORT 0 +#define RTE_SSI_SLAVE_MOSI_PIN 27 +#define RTE_SSI_SLAVE_MOSI_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_MOSI_PADSEL 0 //no pad +#elif (RTE_SSI_SLAVE_MOSI_PORT_ID == 3) +#define RTE_SSI_SLAVE_MOSI 1 +#define RTE_SSI_SLAVE_MOSI_PORT 0 +#define RTE_SSI_SLAVE_MOSI_PIN 48 +#define RTE_SSI_SLAVE_MOSI_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_MOSI_PADSEL 12 +#elif (RTE_SSI_SLAVE_MOSI_PORT_ID == 4) +#define RTE_SSI_SLAVE_MOSI 1 +#define RTE_SSI_SLAVE_MOSI_PORT 0 +#define RTE_SSI_SLAVE_MOSI_PIN 56 +#define RTE_SSI_SLAVE_MOSI_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_MOSI_PADSEL 20 +#else +#error "Invalid SSI_SLAVE_MOSI Pin Configuration!" +#endif + +// SSI_SLAVE_SCK Pin <0=>Not Used <1=>GPIO_8 <2=>GPIO_26 <3=>GPIO_47 <4=>GPIO_52 +#define RTE_SSI_SLAVE_SCK_PORT_ID 2 + +#if (RTE_SSI_SLAVE_SCK_PORT_ID == 0) +#define RTE_SSI_SLAVE_SCK 0 +#elif (RTE_SSI_SLAVE_SCK_PORT_ID == 1) +#define RTE_SSI_SLAVE_SCK 1 +#define RTE_SSI_SLAVE_SCK_PORT 0 +#define RTE_SSI_SLAVE_SCK_PIN 8 +#define RTE_SSI_SLAVE_SCK_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_SCK_PADSEL 3 +#elif (RTE_SSI_SLAVE_SCK_PORT_ID == 2) +#define RTE_SSI_SLAVE_SCK 1 +#define RTE_SSI_SLAVE_SCK_PORT 0 +#define RTE_SSI_SLAVE_SCK_PIN 26 +#define RTE_SSI_SLAVE_SCK_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_SCK_PADSEL 0 //no pad +#elif (RTE_SSI_SLAVE_SCK_PORT_ID == 3) +#define RTE_SSI_SLAVE_SCK 1 +#define RTE_SSI_SLAVE_SCK_PORT 0 +#define RTE_SSI_SLAVE_SCK_PIN 47 +#define RTE_SSI_SLAVE_SCK_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_SCK_PADSEL 11 +#elif (RTE_SSI_SLAVE_SCK_PORT_ID == 4) +#define RTE_SSI_SLAVE_SCK 1 +#define RTE_SSI_SLAVE_SCK_PORT 0 +#define RTE_SSI_SLAVE_SCK_PIN 52 +#define RTE_SSI_SLAVE_SCK_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_SCK_PADSEL 16 +#else +#error "Invalid SSI_SLAVE_SCK Pin Configuration!" +#endif + +// SSI_SLAVE_CS Pin <0=>Not Used <1=>GPIO_9 <2=>GPIO_25 <3=>GPIO_46 <4=>GPIO_53 +#define RTE_SSI_SLAVE_CS_PORT_ID 1 + +#if (RTE_SSI_SLAVE_CS_PORT_ID == 0) +#define RTE_SSI_SLAVE_CS 0 +#elif (RTE_SSI_SLAVE_CS_PORT_ID == 1) +#define RTE_SSI_SLAVE_CS 1 +#define RTE_SSI_SLAVE_CS_PORT 0 +#define RTE_SSI_SLAVE_CS_PIN 9 +#define RTE_SSI_SLAVE_CS_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_CS_PADSEL 4 +#elif (RTE_SSI_SLAVE_CS_PORT_ID == 2) +#define RTE_SSI_SLAVE_CS 1 +#define RTE_SSI_SLAVE_CS_PORT 0 +#define RTE_SSI_SLAVE_CS_PIN 25 +#define RTE_SSI_SLAVE_CS_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_CS_PADSEL 0 //no pad +#elif (RTE_SSI_SLAVE_CS_PORT_ID == 3) +#define RTE_SSI_SLAVE_CS 1 +#define RTE_SSI_SLAVE_CS_PORT 0 +#define RTE_SSI_SLAVE_CS_PIN 46 +#define RTE_SSI_SLAVE_CS_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_CS_PADSEL 10 +#elif (RTE_SSI_SLAVE_CS_PORT_ID == 4) +#define RTE_SSI_SLAVE_CS 1 +#define RTE_SSI_SLAVE_CS_PORT 0 +#define RTE_SSI_SLAVE_CS_PIN 53 +#define RTE_SSI_SLAVE_CS_MODE EGPIO_PIN_MUX_MODE8 +#define RTE_SSI_SLAVE_CS_PADSEL 17 +#else +#error "Invalid SSI_SLAVE_CS Pin Configuration!" +#endif + +// DMA Rx +// Channel <22=>22 +// Selects DMA Channel (only Channel 22 can be used) +// +#define RTE_SSI_SLAVE_UDMA_RX_CH 22 +#define RTE_SSI_SLAVE_DMA_RX_LEN_PER_DES 1024 + +// DMA Tx +// Channel <23=>23 +// Selects DMA Channel (only Channel 23 can be used) +// +#define RTE_SSI_SLAVE_UDMA_TX_CH 23 +#define RTE_SSI_SLAVE_DMA_TX_LEN_PER_DES 1024 + +// + +// SSI_ULP_MASTER (Serial Peripheral Interface 3) [Driver_SSI_ULP_MASTER] +// Configuration settings for Driver_SSI_ULP_MASTER in component ::CMSIS Driver:SPI +#define RTE_SSI_ULP_MASTER 1 + +#define RTE_SSI_ULP_MASTER_INPUT_CLOCK ULP_SSI_ULP_32MHZ_RC_CLK + +// Enable multiple CSN lines +#define ULP_SSI_CS0 1 +#define ULP_SSI_CS1 0 +#define ULP_SSI_CS2 0 + +// SSI_ULP_MASTER_MISO Pin <0=>Not Used <1=>ULP_GPIO_2 <2=>ULP_GPIO_9 +#define RTE_SSI_ULP_MASTER_MISO_PORT_ID 0 +#if (RTE_SSI_ULP_MASTER_MISO_PORT_ID == 0) +#define RTE_SSI_ULP_MASTER_MISO 1 +#define RTE_SSI_ULP_MASTER_MISO_PORT 0 +#define RTE_SSI_ULP_MASTER_MISO_PIN 2 +#define RTE_SSI_ULP_MASTER_MISO_MODE 1 +#elif (RTE_SSI_ULP_MASTER_MISO_PORT_ID == 1) +#define RTE_SSI_ULP_MASTER_MISO 1 +#define RTE_SSI_ULP_MASTER_MISO_PORT 0 +#define RTE_SSI_ULP_MASTER_MISO_PIN 9 +#define RTE_SSI_ULP_MASTER_MISO_MODE 1 +#else +#error "Invalid SSI_ULP_MISO Pin Configuration!" +#endif + +// SSI_ULP_MASTER_MOSI Pin <0=>Not Used <1=>ULP_GPIO_1 <2=>ULP_GPIO_11 +#define RTE_SSI_ULP_MASTER_MOSI_PORT_ID 0 +#if (RTE_SSI_ULP_MASTER_MOSI_PORT_ID == 0) +#define RTE_SSI_ULP_MASTER_MOSI 1 +#define RTE_SSI_ULP_MASTER_MOSI_PORT 0 +#define RTE_SSI_ULP_MASTER_MOSI_PIN 1 +#define RTE_SSI_ULP_MASTER_MOSI_MODE 1 +#elif (RTE_SSI_ULP_MASTER_MOSI_PORT_ID == 1) +#define RTE_SSI_ULP_MASTER_MOSI 1 +#define RTE_SSI_ULP_MASTER_MOSI_PORT 0 +#define RTE_SSI_ULP_MASTER_MOSI_PIN 11 +#define RTE_SSI_ULP_MASTER_MOSI_MODE 1 +#else +#error "Invalid SSI_ULP_MOSI Pin Configuration!" +#endif + +// SSI_ULP_MASTER_SCK Pin <0=>Not Used <1=>ULP_GPIO_0 <2=>ULP_GPIO_8 +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_SSI_ULP_MASTER_SCK_PORT_ID 2 +#else +#define RTE_SSI_ULP_MASTER_SCK_PORT_ID 2 +#endif +#if (RTE_SSI_ULP_MASTER_SCK_PORT_ID == 0) +#define RTE_SSI_ULP_MASTER_SCK 0 +#elif (RTE_SSI_ULP_MASTER_SCK_PORT_ID == 1) +#define RTE_SSI_ULP_MASTER_SCK 1 +#define RTE_SSI_ULP_MASTER_SCK_PORT 0 +#define RTE_SSI_ULP_MASTER_SCK_PIN 0 +#define RTE_SSI_ULP_MASTER_SCK_MODE 1 +#elif (RTE_SSI_ULP_MASTER_SCK_PORT_ID == 2) +#define RTE_SSI_ULP_MASTER_SCK 1 +#define RTE_SSI_ULP_MASTER_SCK_PORT 0 +#define RTE_SSI_ULP_MASTER_SCK_PIN 8 +#define RTE_SSI_ULP_MASTER_SCK_MODE 1 +#else +#error "Invalid SSI_ULP_SCK Pin Configuration!" +#endif + +// CS0 +#define RTE_SSI_ULP_MASTER_CS0_PORT_ID 1 +#if (RTE_SSI_ULP_MASTER_CS0_PORT_ID == 0) +#define RTE_SSI_ULP_MASTER_CS0 ULP_SSI_CS0 +#define RTE_SSI_ULP_MASTER_CS0_PORT 0 +#define RTE_SSI_ULP_MASTER_CS0_PIN 3 +#define RTE_SSI_ULP_MASTER_CS0_MODE 1 +#elif (RTE_SSI_ULP_MASTER_CS0_PORT_ID == 1) +#define RTE_SSI_ULP_MASTER_CS0 ULP_SSI_CS0 +#define RTE_SSI_ULP_MASTER_CS0_PORT 0 +#define RTE_SSI_ULP_MASTER_CS0_PIN 10 +#define RTE_SSI_ULP_MASTER_CS0_MODE 1 +#else +#error "Change RTE_SSI_ULP_MASTER_CS_PORT_ID other than '1' or'3' as per PACKAGE_TYPE" +#endif + +// CS1 +#define RTE_SSI_ULP_MASTER_CS1 ULP_SSI_CS1 +#define RTE_SSI_ULP_MASTER_CS1_PORT 0 +#define RTE_SSI_ULP_MASTER_CS1_PIN 4 +#define RTE_SSI_ULP_MASTER_CS1_MODE 1 + +// CS2 +#define RTE_SSI_ULP_MASTER_CS2 ULP_SSI_CS2 +#define RTE_SSI_ULP_MASTER_CS2_PORT 0 +#define RTE_SSI_ULP_MASTER_CS2_PIN 6 +#define RTE_SSI_ULP_MASTER_CS2_MODE 1 + +// DMA Rx +// Channel <2=>2 +// Selects DMA Channel (only Channel 2 can be used) +// +#define RTE_SSI_ULP_MASTER_UDMA_RX_CH 2 +#define RTE_SSI_ULP_MASTER_DMA_RX_LEN_PER_DES 96 + +// DMA Tx +// Channel <3=>3 +// Selects DMA Channel (only Channel 3 can be used) +// +#define RTE_SSI_ULP_MASTER_UDMA_TX_CH 3 +#define RTE_SSI_ULP_MASTER_DMA_TX_LEN_PER_DES 96 + +// +/*=================================================================== + UDMA Defines +====================================================================*/ +// UDMA [Driver_UDMA] +#define DESC_MAX_LEN 0x400 +#define RTE_UDMA0 1 +#define UDMA0_IRQHandler IRQ033_Handler +#define CHNL_MASK_REQ0 0 +#define CHNL_PRIORITY0 0 +#define DMA_PERI_ACK0 0 +#define BURST_REQ0_EN 1 +#define UDMA0_CHNL_PRIO_LVL 1 +#define UDMA0_SRAM_BASE 0x1FC00 + +#define RTE_UDMA1 1 +#define UDMA1_IRQHandler IRQ010_Handler +#define CHNL_MASK_REQ1 0 +#define CHNL_PRIORITY1 0 +#define BURST_REQ1_EN 1 +#define CHNL_HIGH_PRIO_EN1 1 +#define UDMA1_CHNL_PRIO_LVL 1 +#define ULP_SRAM_START_ADDR 0x24060000 +#define ULP_SRAM_END_ADDR 0x24063E00 +// RTE_UDMA1_BASE_MEM <0=>PS2 <1=>PS4 +#define RTE_UDMA1_BASE_MEM 0 +#if (RTE_UDMA1_BASE_MEM == 0) +#define UDMA1_SRAM_BASE 0x24061C00 +#elif (RTE_UDMA1_BASE_MEM == 1) +#define UDMA1_SRAM_BASE 0x1CC00 +#else +#error "Invalid UDMA1 Control Base Address!" +#endif +// + +// I2S0 [Driver_I2S0] +// Configuration settings for Driver_I2S0 in component ::CMSIS Driver:I2S + +#define RTE_I2S0 1 +#define I2S0_IRQHandler IRQ064_Handler +/*I2S0 PINS*/ + +// I2S0_SCLK <0=>P0_8 <1=>P0_25 <2=>P0_46 <3=>P0_52 +// SCLK of I2S0 +#define RTE_I2S0_SCLK_PORT_ID 1 + +#if (RTE_I2S0_SCLK_PORT_ID == 0) +#define RTE_I2S0_SCLK_PORT 0 +#define RTE_I2S0_SCLK_PIN 8 +#define RTE_I2S0_SCLK_MUX 7 +#define RTE_I2S0_SCLK_PAD 3 +#elif (RTE_I2S0_SCLK_PORT_ID == 1) +#define RTE_I2S0_SCLK_PORT 0 +#define RTE_I2S0_SCLK_PIN 25 +#define RTE_I2S0_SCLK_MUX 7 +#define RTE_I2S0_SCLK_PAD 0 //no pad +#elif (RTE_I2S0_SCLK_PORT_ID == 2) +#define RTE_I2S0_SCLK_PORT 0 +#define RTE_I2S0_SCLK_PIN 46 +#define RTE_I2S0_SCLK_MUX 7 +#define RTE_I2S0_SCLK_PAD 10 +#elif (RTE_I2S0_SCLK_PORT_ID == 3) +#define RTE_I2S0_SCLK_PORT 0 +#define RTE_I2S0_SCLK_PIN 52 +#define RTE_I2S0_SCLK_MUX 7 +#define RTE_I2S0_SCLK_PAD 16 +#else +#error "Invalid I2S0 RTE_I2S0_SCLK Pin Configuration!" +#endif + +// I2S0_WSCLK <0=>P0_9 <1=>P0_26 <2=>P0_47 <3=>P0_53 +// WSCLK for I2S0 +#define RTE_I2S0_WSCLK_PORT_ID 1 + +#if (RTE_I2S0_WSCLK_PORT_ID == 0) +#define RTE_I2S0_WSCLK_PORT 0 +#define RTE_I2S0_WSCLK_PIN 9 +#define RTE_I2S0_WSCLK_MUX 7 +#define RTE_I2S0_WSCLK_PAD 4 +#elif (RTE_I2S0_WSCLK_PORT_ID == 1) +#define RTE_I2S0_WSCLK_PORT 0 +#define RTE_I2S0_WSCLK_PIN 26 +#define RTE_I2S0_WSCLK_MUX 7 +#define RTE_I2S0_WSCLK_PAD 0 //no pad +#elif (RTE_I2S0_WSCLK_PORT_ID == 2) +#define RTE_I2S0_WSCLK_PORT 0 +#define RTE_I2S0_WSCLK_PIN 47 +#define RTE_I2S0_WSCLK_MUX 7 +#define RTE_I2S0_WSCLK_PAD 11 +#elif (RTE_I2S0_WSCLK_PORT_ID == 3) +#define RTE_I2S0_WSCLK_PORT 0 +#define RTE_I2S0_WSCLK_PIN 53 +#define RTE_I2S0_WSCLK_MUX 7 +#define RTE_I2S0_WSCLK_PAD 17 +#else +#error "Invalid I2S0 RTE_I2S0_WSCLK Pin Configuration!" +#endif + +// I2S0_DOUT0 <0=>P0_11 <1=>P0_28 <2=>P0_49 <3=>P0_57 +// DOUT0 for I2S0 +#define RTE_I2S0_DOUT0_PORT_ID 1 + +#if (RTE_I2S0_DOUT0_PORT_ID == 0) +#define RTE_I2S0_DOUT0_PORT 0 +#define RTE_I2S0_DOUT0_PIN 11 +#define RTE_I2S0_DOUT0_MUX 7 +#define RTE_I2S0_DOUT0_PAD 6 +#elif (RTE_I2S0_DOUT0_PORT_ID == 1) +#define RTE_I2S0_DOUT0_PORT 0 +#define RTE_I2S0_DOUT0_PIN 28 +#define RTE_I2S0_DOUT0_MUX 7 +#define RTE_I2S0_DOUT0_PAD 0 // no pad +#elif (RTE_I2S0_DOUT0_PORT_ID == 2) +#define RTE_I2S0_DOUT0_PORT 0 +#define RTE_I2S0_DOUT0_PIN 49 +#define RTE_I2S0_DOUT0_MUX 7 +#define RTE_I2S0_DOUT0_PAD 13 +#elif (RTE_I2S0_DOUT0_PORT_ID == 3) +#define RTE_I2S0_DOUT0_PORT 0 +#define RTE_I2S0_DOUT0_PIN 57 +#define RTE_I2S0_DOUT0_MUX 7 +#define RTE_I2S0_DOUT0_PAD 21 +#else +#error "Invalid I2S0 RTE_I2S0_DOUT0 Pin Configuration!" +#endif + +// I2S0_DIN0 <0=>P0_10 <1=>P0_27 <2=>P0_48 <3=>P0_56 +// DIN0 for I2S0 +#define RTE_I2S0_DIN0_PORT_ID 1 + +#if (RTE_I2S0_DIN0_PORT_ID == 0) +#define RTE_I2S0_DIN0_PORT 0 +#define RTE_I2S0_DIN0_PIN 10 +#define RTE_I2S0_DIN0_MUX 7 +#define RTE_I2S0_DIN0_PAD 5 +#elif (RTE_I2S0_DIN0_PORT_ID == 1) +#define RTE_I2S0_DIN0_PORT 0 +#define RTE_I2S0_DIN0_PIN 27 +#define RTE_I2S0_DIN0_MUX 7 +#define RTE_I2S0_DIN0_PAD 0 // no pad +#elif (RTE_I2S0_DIN0_PORT_ID == 2) +#define RTE_I2S0_DIN0_PORT 0 +#define RTE_I2S0_DIN0_PIN 48 +#define RTE_I2S0_DIN0_MUX 7 +#define RTE_I2S0_DIN0_PAD 12 +#elif (RTE_I2S0_DIN0_PORT_ID == 3) +#define RTE_I2S0_DIN0_PORT 0 +#define RTE_I2S0_DIN0_PIN 56 +#define RTE_I2S0_DIN0_MUX 7 +#define RTE_I2S0_DIN0_PAD 20 +#else +#error "Invalid I2S0 RTE_I2S0_DIN0 Pin Configuration!" +#endif + +// I2S0_DOUT1 <0=>P0_7 <1=>P0_30 <2=>P0_51 <3=>P0_55 +// DOUT1 for I2S0 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_I2S0_DOUT1_PORT_ID 1 +#else +#define RTE_I2S0_DOUT1_PORT_ID 0 +#endif + +#if (RTE_I2S0_DOUT1_PORT_ID == 0) +#define RTE_I2S0_DOUT1_PORT 0 +#define RTE_I2S0_DOUT1_PIN 7 +#define RTE_I2S0_DOUT1_MUX 7 +#define RTE_I2S0_DOUT1_PAD 2 +#elif (RTE_I2S0_DOUT1_PORT_ID == 1) +#define RTE_I2S0_DOUT1_PORT 0 +#define RTE_I2S0_DOUT1_PIN 30 +#define RTE_I2S0_DOUT1_MUX 7 +#define RTE_I2S0_DOUT1_PAD 0 //no pad +#elif (RTE_I2S0_DOUT1_PORT_ID == 2) +#define RTE_I2S0_DOUT1_PORT 0 +#define RTE_I2S0_DOUT1_PIN 51 +#define RTE_I2S0_DOUT1_MUX 7 +#define RTE_I2S0_DOUT1_PAD 15 +#elif (RTE_I2S0_DOUT1_PORT_ID == 3) +#define RTE_I2S0_DOUT1_PORT 0 +#define RTE_I2S0_DOUT1_PIN 55 +#define RTE_I2S0_DOUT1_MUX 7 +#define RTE_I2S0_DOUT1_PAD 19 +#else +#error "Invalid I2S0 RTE_I2S0_DOUT1 Pin Configuration!" +#endif + +// I2S0_DIN1 <0=>P0_6 <1=>P0_29 <2=>P0_50 <3=>P0_54 +// DIN1 for I2S0 +#define RTE_I2S0_DIN1_PORT_ID 0 + +#if (RTE_I2S0_DIN1_PORT_ID == 0) +#define RTE_I2S0_DIN1_PORT 0 +#define RTE_I2S0_DIN1_PIN 6 +#define RTE_I2S0_DIN1_MUX 7 +#define RTE_I2S0_DIN1_PAD 1 +#elif (RTE_I2S0_DIN1_PORT_ID == 1) +#define RTE_I2S0_DIN1_PORT 0 +#define RTE_I2S0_DIN1_PIN 29 +#define RTE_I2S0_DIN1_MUX 7 +#define RTE_I2S0_DIN1_PAD 0 //no pad +#elif (RTE_I2S0_DIN1_PORT_ID == 2) +#define RTE_I2S0_DIN1_PORT 0 +#define RTE_I2S0_DIN1_PIN 50 +#define RTE_I2S0_DIN1_MUX 7 +#define RTE_I2S0_DIN1_PAD 14 +#elif (RTE_I2S0_DIN1_PORT_ID == 3) +#define RTE_I2S0_DIN1_PORT 0 +#define RTE_I2S0_DIN1_PIN 54 +#define RTE_I2S0_DIN1_MUX 7 +#define RTE_I2S0_DIN1_PAD 18 +#else +#error "Invalid I2S0 RTE_I2S0_DIN1 Pin Configuration!" +#endif +// FIFO level can have value 1 to 7 +#define I2S0_TX_FIFO_LEVEL (2U) +#define I2S0_RX_FIFO_LEVEL (2U) + +// I2S0_TX_RES <0=>12 +// <1=>16 +// <2=>20 +// <3=>24 +#define RTE_I2S0_TX_RES 1 +#if (RTE_I2S0_TX_RES == 0) +#define I2S0_TX_RES RES_12_BIT +#elif (RTE_I2S0_TX_RES == 1) +#define I2S0_TX_RES RES_16_BIT +#elif (RTE_I2S0_TX_RES == 2) +#define I2S0_TX_RES RES_20_BIT +#elif (RTE_I2S0_TX_RES == 3) +#define I2S0_TX_RES RES_24_BIT +#else +#error "Invalid I2S0 TX channel resolution!" +#endif + +// I2S0_RX_RES <0=>12 +// <1=>16 +// <2=>20 +// <3=>24 +#define RTE_I2S0_RX_RES 1 +#if (RTE_I2S0_RX_RES == 0) +#define I2S0_RX_RES RES_12_BIT +#elif (RTE_I2S0_RX_RES == 1) +#define I2S0_RX_RES RES_16_BIT +#elif (RTE_I2S0_RX_RES == 2) +#define I2S0_RX_RES RES_20_BIT +#elif (RTE_I2S0_RX_RES == 3) +#define I2S0_RX_RES RES_24_BIT +#else +#error "Invalid I2S0 RX channel resolution!" +#endif + +#define RTE_I2S0_CHNL_UDMA_TX_EN 1 +#define RTE_I2S0_CHNL_UDMA_TX_CH 15 + +#define RTE_I2S0_CHNL_UDMA_RX_EN 1 +#define RTE_I2S0_CHNL_UDMA_RX_CH 14 + +#define RTE_I2S0_CLK_SRC 0 +#define RTE_I2S0_CLK_DIV_FACT 0 +#define RTE_I2S_PLL_FREQ 2000 + +#define RTE_I2S0_DMA_TX_LEN_PER_DES 1024 +#define RTE_I2S0_DMA_RX_LEN_PER_DES 1024 + +// + +// I2S1 [Driver_I2S1] +// Configuration settings for Driver_I2S1 in component ::Drivers:I2S +#define RTE_I2S1 1 +#define I2S1_IRQHandler IRQ014_Handler + +// I2S1_SCLK Pin <0=>P0_3 <1=>P0_7 <2=>P0_8 +/*I2S1 PINS*/ +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_I2S1_SCLK_PORT_ID 0 +#else +#define RTE_I2S1_SCLK_PORT_ID 2 +#endif +#if (RTE_I2S1_SCLK_PORT_ID == 0) +#define RTE_I2S1_SCLK_PORT 0 +#define RTE_I2S1_SCLK_PIN 3 +#define RTE_I2S1_SCLK_MUX 2 +#elif (RTE_I2S1_SCLK_PORT_ID == 1) +#define RTE_I2S1_SCLK_PORT 0 +#define RTE_I2S1_SCLK_PIN 7 +#define RTE_I2S1_SCLK_MUX 2 +#elif (RTE_I2S1_SCLK_PORT_ID == 2) +#define RTE_I2S1_SCLK_PORT 0 +#define RTE_I2S1_SCLK_PIN 8 +#define RTE_I2S1_SCLK_MUX 2 +#else +#error "Invalid I2S1 RTE_I2S1_SCLK Pin Configuration!" +#endif + +// I2S1_WSCLK Pin <0=>P0_2 <1=>P0_4 <2=>P0_10 +#define RTE_I2S1_WSCLK_PORT_ID 0 +#if (RTE_I2S1_WSCLK_PORT_ID == 0) +#define RTE_I2S1_WSCLK_PORT 0 +#define RTE_I2S1_WSCLK_PIN 2 +#define RTE_I2S1_WSCLK_MUX 2 +#elif (RTE_I2S1_WSCLK_PORT_ID == 1) +#define RTE_I2S1_WSCLK_PORT 0 +#define RTE_I2S1_WSCLK_PIN 10 +#define RTE_I2S1_WSCLK_MUX 2 +#else +#error "Invalid I2S1 RTE_I2S1_WSCLK Pin Configuration!" +#endif + +// I2S1_DOUT0 Pin <0=>P0_1 <1=>P0_5 <2=>P0_11 +#define RTE_I2S1_DOUT0_PORT_ID 0 +#if (RTE_I2S1_DOUT0_PORT_ID == 0) +#define RTE_I2S1_DOUT0_PORT 0 +#define RTE_I2S1_DOUT0_PIN 1 +#define RTE_I2S1_DOUT0_MUX 2 +#elif (RTE_I2S1_DOUT0_PORT_ID == 1) +#define RTE_I2S1_DOUT0_PORT 0 +#define RTE_I2S1_DOUT0_PIN 11 +#define RTE_I2S1_DOUT0_MUX 2 +#else +#error "Invalid I2S1 RTE_I2S1_DOUT0 Pin Configuration!" +#endif + +// I2S1_DIN0 Pin <0=>P0_0 <1=>P0_6 <2=>P0_9 <3=>P0_13 +#define RTE_I2S1_DIN0_PORT_ID 1 +#if (RTE_I2S1_DIN0_PORT_ID == 0) +#define RTE_I2S1_DIN0_PORT 0 +#define RTE_I2S1_DIN0_PIN 0 +#define RTE_I2S1_DIN0_MUX 2 +#elif (RTE_I2S1_DIN0_PORT_ID == 1) +#define RTE_I2S1_DIN0_PORT 0 +#define RTE_I2S1_DIN0_PIN 6 +#define RTE_I2S1_DIN0_MUX 2 +#elif (RTE_I2S1_DIN0_PORT_ID == 2) +#define RTE_I2S1_DIN0_PORT 0 +#define RTE_I2S1_DIN0_PIN 9 +#define RTE_I2S1_DIN0_MUX 2 +#else +#error "Invalid I2S1 RTE_I2S1_DIN0 Pin Configuration!" +#endif + +// FIFO level can have value 1 to 7 +#define I2S1_TX_FIFO_LEVEL (2U) +#define I2S1_RX_FIFO_LEVEL (2U) + +// I2S1_TX_RES <0=>12 +// <1=>16 +// <2=>20 +// <3=>24 +#define RTE_I2S1_TX_RES 1 +#if (RTE_I2S1_TX_RES == 0) +#define I2S1_TX_RES RES_12_BIT +#elif (RTE_I2S1_TX_RES == 1) +#define I2S1_TX_RES RES_16_BIT +#elif (RTE_I2S1_TX_RES == 2) +#define I2S1_TX_RES RES_20_BIT +#elif (RTE_I2S1_TX_RES == 3) +#define I2S1_TX_RES RES_24_BIT +#else +#error "Invalid I2S1 TX channel resolution!" +#endif + +// I2S1_RX_RES <0=>12 +// <1=>16 +// <2=>20 +// <3=>24 +#define RTE_I2S1_RX_RES 1 +#if (RTE_I2S1_RX_RES == 0) +#define I2S1_RX_RES RES_12_BIT +#elif (RTE_I2S1_RX_RES == 1) +#define I2S1_RX_RES RES_16_BIT +#elif (RTE_I2S1_RX_RES == 2) +#define I2S1_RX_RES RES_20_BIT +#elif (RTE_I2S1_RX_RES == 3) +#define I2S1_RX_RES RES_24_BIT +#else +#error "Invalid I2S1 RX channel resolution!" +#endif + +#define RTE_I2S1_CHNL_UDMA_TX_EN 1 +#define RTE_I2S1_CHNL_UDMA_TX_CH 7 + +#define RTE_I2S1_CHNL_UDMA_RX_EN 1 +#define RTE_I2S1_CHNL_UDMA_RX_CH 6 + +#define I2S1_CLK_DIV_FACT 0 +// I2S1_CLK_SRC <0=>ULP_I2S_REF_CLK +// <1=>ULP_I2S_ULP_32KHZ_RO_CLK +// <2=>ULP_I2S_ULP_32KHZ_RC_CLK +// <3=>ULP_I2S_ULP_32KHZ_XTAL_CLK +// <4=>ULP_I2S_ULP_32MHZ_RC_CLK +// <5=>ULP_I2S_ULP_20MHZ_RO_CLK +// <6=>ULP_I2S_SOC_CLK +// <7=>ULP_I2S_ULP_DOUBLER_CLK +// <8=>ULP_I2S_PLL_CLK + +#define RTE_I2S1_CLK_SEL_ID 5 +#if (RTE_I2S1_CLK_SEL_ID == 0) +#define RTE_I2S1_CLK_SRC ULP_I2S_REF_CLK +#elif (RTE_I2S1_CLK_SEL_ID == 1) +#define RTE_I2S1_CLK_SRC ULP_I2S_ULP_32KHZ_RO_CLK +#elif (RTE_I2S1_CLK_SEL_ID == 2) +#define RTE_I2S1_CLK_SRC ULP_I2S_ULP_32KHZ_RC_CLK +#elif (RTE_I2S1_CLK_SEL_ID == 3) +#define RTE_I2S1_CLK_SRC ULP_I2S_ULP_32KHZ_XTAL_CLK +#elif (RTE_I2S1_CLK_SEL_ID == 4) +#define RTE_I2S1_CLK_SRC ULP_I2S_ULP_32MHZ_RC_CLK +#elif (RTE_I2S1_CLK_SEL_ID == 5) +#define RTE_I2S1_CLK_SRC ULP_I2S_ULP_20MHZ_RO_CLK +#elif (RTE_I2S1_CLK_SEL_ID == 6) +#define RTE_I2S1_CLK_SRC ULP_I2S_SOC_CLK +#elif (RTE_I2S1_CLK_SEL_ID == 7) +#define RTE_I2S1_CLK_SRC ULP_I2S_ULP_DOUBLER_CLK +#elif (RTE_I2S1_CLK_SEL_ID == 8) +#define RTE_I2S1_CLK_SRC ULP_I2S_PLL_CLK +#else +#error "Invalid I2S1 Clock source selection!" +#endif +#define RTE_I2S1_DMA_TX_LEN_PER_DES 1024 +#define RTE_I2S1_DMA_RX_LEN_PER_DES 1024 + +// I2S1 [Driver_I2S1] + +// I2C0 (Inter-integrated Circuit Interface 0) [Driver_I2C0] +// Configuration settings for Driver_I2C0 in component ::Drivers:I2C + +#define RTE_I2C0 1 +#define I2C0_IRQHandler IRQ042_Handler + +// I2C0_SCL Pin <0=>P0_7 <1=>P0_65 <2=>P0_66 <3=>P0_75 <4=>P0_32 + +#define RTE_I2C0_SCL_PORT_ID 1 + +#if (RTE_I2C0_SCL_PORT_ID == 0) +#define RTE_I2C0_SCL_PORT 0 +#define RTE_I2C0_SCL_PIN 7 +#define RTE_I2C0_SCL_MUX 4 +#define RTE_I2C0_SCL_PAD 2 +#define RTE_I2C0_SCL_I2C_REN 7 +#elif (RTE_I2C0_SCL_PORT_ID == 1) +#define RTE_I2C0_SCL_PORT 0 +#define RTE_I2C0_SCL_PIN 65 +#define RTE_I2C0_SCL_MUX 4 +#define RTE_I2C0_SCL_PAD 23 +#define RTE_I2C0_SCL_I2C_REN 1 +#elif (RTE_I2C0_SCL_PORT_ID == 2) +#define RTE_I2C0_SCL_PORT 0 +#define RTE_I2C0_SCL_PIN 66 +#define RTE_I2C0_SCL_MUX 4 +#define RTE_I2C0_SCL_PAD 24 +#define RTE_I2C0_SCL_I2C_REN 2 +#elif (RTE_I2C0_SCL_PORT_ID == 3) +#define RTE_I2C0_SCL_PORT 0 +#define RTE_I2C0_SCL_PIN 75 +#define RTE_I2C0_SCL_MUX 4 +#define RTE_I2C0_SCL_PAD 33 +#define RTE_I2C0_SCL_I2C_REN 11 +#else +#error "Invalid I2C0 RTE_I2C0_SCL Pin Configuration!" +#endif + +// I2C0_SCL Pin <0=>P0_6 <1=>P0_64 <2=>P0_67 <3=>P0_74 <4=>P0_31 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_I2C0_SDA_PORT_ID 2 +#else +#define RTE_I2C0_SDA_PORT_ID 0 +#endif + +#if (RTE_I2C0_SDA_PORT_ID == 0) +#define RTE_I2C0_SDA_PORT 0 +#define RTE_I2C0_SDA_PIN 6 +#define RTE_I2C0_SDA_MUX 4 +#define RTE_I2C0_SDA_PAD 1 +#define RTE_I2C0_SDA_I2C_REN 6 +#elif (RTE_I2C0_SDA_PORT_ID == 1) +#define RTE_I2C0_SDA_PORT 0 +#define RTE_I2C0_SDA_PIN 67 +#define RTE_I2C0_SDA_MUX 4 +#define RTE_I2C0_SDA_PAD 25 +#define RTE_I2C0_SDA_I2C_REN 3 +#elif (RTE_I2C0_SDA_PORT_ID == 2) +#define RTE_I2C0_SDA_PORT 0 +#define RTE_I2C0_SDA_PIN 74 +#define RTE_I2C0_SDA_MUX 4 +#define RTE_I2C0_SDA_PAD 32 +#define RTE_I2C0_SDA_I2C_REN 10 +#else +#error "Invalid I2C0 RTE_I2C0_SDA Pin Configuration!" +#endif + +#define IC_SCL_STUCK_TIMEOUT 20 +#define IC_SDA_STUCK_TIMEOUT 20 + +#define I2C_DMA 0 +#if (I2C_DMA == 1) +#define DMA_TX_TL 1 +#define DMA_RX_TL 1 +#endif +// I2C0 [Driver_I2C0] + +// I2C1 (Inter-integrated Circuit Interface 1) [Driver_I2C1] +// Configuration settings for Driver_I2C1 in component ::Drivers:I2C + +#define RTE_I2C1 1 +#define I2C1_IRQHandler IRQ061_Handler +// I2C1_SCL Pin <0=>P0_6 <1=>P0_29 <2=>P0_50 <3=>P0_54 <4=>P0_64 <4=>P0_66 <4=>P0_70 <7=>P0_33 +#define RTE_I2C1_SCL_PORT_ID 2 + +#if (RTE_I2C1_SCL_PORT_ID == 0) +#define RTE_I2C1_SCL_PORT 0 +#define RTE_I2C1_SCL_PIN 6 +#define RTE_I2C1_SCL_MUX 5 +#define RTE_I2C1_SCL_PAD 1 +#define RTE_I2C1_SCL_REN 6 +#elif (RTE_I2C1_SCL_PORT_ID == 1) +#define RTE_I2C1_SCL_PORT 0 +#define RTE_I2C1_SCL_PIN 29 +#define RTE_I2C1_SCL_MUX 5 +#define RTE_I2C1_SCL_PAD 0 //no pad +#define RTE_I2C1_SCL_REN 29 +#elif (RTE_I2C1_SCL_PORT_ID == 2) +#define RTE_I2C1_SCL_PORT 0 +#define RTE_I2C1_SCL_PIN 50 +#define RTE_I2C1_SCL_MUX 5 +#define RTE_I2C1_SCL_PAD 14 +#define RTE_I2C1_SCL_REN 50 +#elif (RTE_I2C1_SCL_PORT_ID == 3) +#define RTE_I2C1_SCL_PORT 0 +#define RTE_I2C1_SCL_PIN 54 +#define RTE_I2C1_SCL_MUX 5 +#define RTE_I2C1_SCL_PAD 18 +#define RTE_I2C1_SCL_REN 54 +#elif (RTE_I2C1_SCL_PORT_ID == 5) +#define RTE_I2C1_SCL_PORT 0 +#define RTE_I2C1_SCL_PIN 66 +#define RTE_I2C1_SCL_MUX 5 +#define RTE_I2C1_SCL_PAD 24 +#define RTE_I2C1_SCL_REN 2 +#elif (RTE_I2C1_SCL_PORT_ID == 6) +#define RTE_I2C1_SCL_PORT 0 +#define RTE_I2C1_SCL_PIN 70 +#define RTE_I2C1_SCL_MUX 5 +#define RTE_I2C1_SCL_PAD 29 +#define RTE_I2C1_SCL_REN 6 +#else +#error "Invalid I2C1_SCL Pin Configuration!" +#endif + +// I2C1_SCL Pin <0=>P0_7 <1=>P0_30 <2=>P0_51 <3=>P0_55 <4=>P0_65 <4=>P0_67 <4=>P0_71 <7=>P0_34 + +#define RTE_I2C1_SDA_PORT_ID 2 + +#if (RTE_I2C1_SDA_PORT_ID == 0) +#define RTE_I2C1_SDA_PORT 0 +#define RTE_I2C1_SDA_PIN 7 +#define RTE_I2C1_SDA_MUX 5 +#define RTE_I2C1_SDA_PAD 2 +#define RTE_I2C1_SDA_REN 7 +#elif (RTE_I2C1_SDA_PORT_ID == 1) +#define RTE_I2C1_SDA_PORT 0 +#define RTE_I2C1_SDA_PIN 30 +#define RTE_I2C1_SDA_MUX 5 +#define RTE_I2C1_SDA_PAD 0 //no pad +#define RTE_I2C1_SDA_REN 30 +#elif (RTE_I2C1_SDA_PORT_ID == 2) +#define RTE_I2C1_SDA_PORT 0 +#define RTE_I2C1_SDA_PIN 51 +#define RTE_I2C1_SDA_MUX 5 +#define RTE_I2C1_SDA_PAD 15 +#define RTE_I2C1_SDA_REN 51 +#elif (RTE_I2C1_SDA_PORT_ID == 3) +#define RTE_I2C1_SDA_PORT 0 +#define RTE_I2C1_SDA_PIN 55 +#define RTE_I2C1_SDA_MUX 5 +#define RTE_I2C1_SDA_PAD 19 +#define RTE_I2C1_SDA_REN 55 +#elif (RTE_I2C1_SDA_PORT_ID == 4) +#define RTE_I2C1_SDA_PORT 0 +#define RTE_I2C1_SDA_PIN 65 +#define RTE_I2C1_SDA_MUX 5 +#define RTE_I2C1_SDA_PAD 23 +#define RTE_I2C1_SDA_REN 1 +#elif (RTE_I2C1_SDA_PORT_ID == 5) +#define RTE_I2C1_SDA_PORT 0 +#define RTE_I2C1_SDA_PIN 67 +#define RTE_I2C1_SDA_MUX 5 +#define RTE_I2C1_SDA_PAD 25 +#define RTE_I2C1_SDA_REN 3 +#elif (RTE_I2C1_SDA_PORT_ID == 6) +#define RTE_I2C1_SDA_PORT 0 +#define RTE_I2C1_SDA_PIN 71 +#define RTE_I2C1_SDA_MUX 5 +#define RTE_I2C1_SDA_PAD 29 +#define RTE_I2C1_SDA_REN 7 +#else +#error "Invalid I2C1_SDA Pin Configuration!" +#endif + +#define IC_SCL_STUCK_TIMEOUT 20 +#define IC_SDA_STUCK_TIMEOUT 20 + +#define DMA_EN 0 +#if (DMA_EN == 1) +#define DMA_TX_TL 1 +#define DMA_RX_TL 1 +#endif + +// I2C1 [Driver_I2C1] + +// I2C2 (Inter-integrated Circuit Interface 2) [Driver_I2C2] +// Configuration settings for Driver_I2C2 in component ::Drivers:I2C +#define RTE_I2C2 1 +#define I2C2_IRQHandler IRQ013_Handler + +// I2C2_SCL Pin <0=>P0_1 <1=>P0_5 <2=>P0_7 <3=>P0_8 <4=>P0_13 +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_I2C2_SCL_PORT_ID 0 +#else +#define RTE_I2C2_SCL_PORT_ID 0 +#endif +#if (RTE_I2C2_SCL_PORT_ID == 0) +#define RTE_I2C2_SCL_PORT 0 +#define RTE_I2C2_SCL_PIN 7 +#define RTE_I2C2_SCL_MUX 4 +#define RTE_I2C2_SCL_REN 7 +#elif (RTE_I2C2_SCL_PORT_ID == 1) +#define RTE_I2C2_SCL_PORT 0 +#define RTE_I2C2_SCL_PIN 8 +#define RTE_I2C2_SCL_MUX 4 +#define RTE_I2C2_SCL_REN 8 +#else +#error "Invalid I2C2_SCL Pin Configuration!" +#endif + +// I2C2_SDA Pin <0=>P0_0 <1=>P0_4 <2=>P0_6 <3=>P0_9 <4=>P0_11 <5=>P0_12 +#define RTE_I2C2_SDA_PORT_ID 0 +#if (RTE_I2C2_SDA_PORT_ID == 0) +#define RTE_I2C2_SDA_PORT 0 +#define RTE_I2C2_SDA_PIN 6 +#define RTE_I2C2_SDA_MUX 4 +#define RTE_I2C2_SDA_REN 6 +#elif (RTE_I2C2_SDA_PORT_ID == 1) +#define RTE_I2C2_SDA_PORT 0 +#define RTE_I2C2_SDA_PIN 9 +#define RTE_I2C2_SDA_MUX 4 +#define RTE_I2C2_SDA_I2C_REN 9 +#elif (RTE_I2C2_SDA_PORT_ID == 2) +#define RTE_I2C2_SDA_PORT 0 +#define RTE_I2C2_SDA_PIN 11 +#define RTE_I2C2_SDA_MUX 4 +#define RTE_I2C2_SDA_REN 11 +#else +#error "Invalid I2C2_SDA Pin Configuration!" +#endif + +#define IC_SCL_STUCK_TIMEOUT 20 +#define IC_SDA_STUCK_TIMEOUT 20 + +#define DMA_EN 0 +#if (DMA_EN == 1) +#define DMA_TX_TL 1 +#define DMA_RX_TL 1 +#endif + +// I2C2 [Driver_I2C2] + +// GSPI (Generic SPI master) [Driver_GSPI_MASTER] +// Configuration settings for Driver_GSPI_MASTER in component ::Drivers:GSPI +#define RTE_GSPI_MASTER 1 + +// GSPI_MASTER_CLK <0=>P0_8 <1=>P0_25 <2=>P0_46 <3=>P0_52 +// CLK of GSPI0 +#define RTE_GSPI_MASTER_CLK_PORT_ID 1 + +#if (RTE_GSPI_MASTER_CLK_PORT_ID == 0) +#define RTE_GSPI_MASTER_CLK_PORT 0 +#define RTE_GSPI_MASTER_CLK_PIN 8 +#define RTE_GSPI_MASTER_CLK_MUX 4 +#define RTE_GSPI_MASTER_CLK_PAD 3 +#elif (RTE_GSPI_MASTER_CLK_PORT_ID == 1) +#define RTE_GSPI_MASTER_CLK_PORT 0 +#define RTE_GSPI_MASTER_CLK_PIN 25 +#define RTE_GSPI_MASTER_CLK_MUX 4 +#define RTE_GSPI_MASTER_CLK_PAD 0 //NO PAD +#elif (RTE_GSPI_MASTER_CLK_PORT_ID == 2) +#define RTE_GSPI_MASTER_CLK_PORT 0 +#define RTE_GSPI_MASTER_CLK_PIN 46 +#define RTE_GSPI_MASTER_CLK_MUX 4 +#define RTE_GSPI_MASTER_CLK_PAD 10 +#elif (RTE_GSPI_MASTER_CLK_PORT_ID == 3) +#define RTE_GSPI_MASTER_CLK_PORT 0 +#define RTE_GSPI_MASTER_CLK_PIN 52 +#define RTE_GSPI_MASTER_CLK_MUX 4 +#define RTE_GSPI_MASTER_CLK_PAD 16 +#else +#error "Invalid GSPI0 RTE_GSPI_MASTER_CLK_PIN Pin Configuration!" +#endif + +// GSPI_MASTER_CS0 +// <0=>P0_9 <1=>P0_28 <2=>P0_49 <3=>P0_53 +// CS0 of GSPI0 +// + +#define RTE_GSPI_MASTER_CS0_PORT_ID 2 + +#if (RTE_GSPI_MASTER_CS0_PORT_ID == 0) +#define RTE_GSPI_MASTER_CS0 1 +#define RTE_GSPI_MASTER_CS0_PORT 0 +#define RTE_GSPI_MASTER_CS0_PIN 9 +#define RTE_GSPI_MASTER_CS0_MUX 4 +#define RTE_GSPI_MASTER_CS0_PAD 4 +#elif (RTE_GSPI_MASTER_CS0_PORT_ID == 1) +#define RTE_GSPI_MASTER_CS0 1 +#define RTE_GSPI_MASTER_CS0_PORT 0 +#define RTE_GSPI_MASTER_CS0_PIN 28 +#define RTE_GSPI_MASTER_CS0_MUX 4 +#define RTE_GSPI_MASTER_CS0_PAD 0 //NO PAD +#elif (RTE_GSPI_MASTER_CS0_PORT_ID == 2) +#define RTE_GSPI_MASTER_CS0 1 +#define RTE_GSPI_MASTER_CS0_PORT 0 +#define RTE_GSPI_MASTER_CS0_PIN 49 +#define RTE_GSPI_MASTER_CS0_MUX 4 +#define RTE_GSPI_MASTER_CS0_PAD 13 +#elif (RTE_GSPI_MASTER_CS0_PORT_ID == 3) +#define RTE_GSPI_MASTER_CS0 1 +#define RTE_GSPI_MASTER_CS0_PORT 0 +#define RTE_GSPI_MASTER_CS0_PIN 53 +#define RTE_GSPI_MASTER_CS0_MUX 4 +#define RTE_GSPI_MASTER_CS0_PAD 17 +#else +#error "Invalid GSPI0 RTE_GSPI_MASTER_CS0_PIN Pin Configuration!" +#endif + +// GSPI_MASTER_CS1 +// <0=>P0_10 <1=>P0_29 <2=>P0_50 <3=>P0_54 +// CS1 of GSPI0 +// +#define RTE_GSPI_MASTER_CS1_PORT_ID 2 +#if (RTE_GSPI_MASTER_CS1_PORT_ID == 0) +#define RTE_GSPI_MASTER_CS1 1 +#define RTE_GSPI_MASTER_CS1_PORT 0 +#define RTE_GSPI_MASTER_CS1_PIN 10 +#define RTE_GSPI_MASTER_CS1_MUX 4 +#define RTE_GSPI_MASTER_CS1_PAD 5 +#elif (RTE_GSPI_MASTER_CS1_PORT_ID == 1) +#define RTE_GSPI_MASTER_CS1 1 +#define RTE_GSPI_MASTER_CS1_PORT 0 +#define RTE_GSPI_MASTER_CS1_PIN 29 +#define RTE_GSPI_MASTER_CS1_MUX 4 +#define RTE_GSPI_MASTER_CS1_PAD 0 //NO PAD +#elif (RTE_GSPI_MASTER_CS1_PORT_ID == 2) +#define RTE_GSPI_MASTER_CS1 1 +#define RTE_GSPI_MASTER_CS1_PORT 0 +#define RTE_GSPI_MASTER_CS1_PIN 50 +#define RTE_GSPI_MASTER_CS1_MUX 4 +#define RTE_GSPI_MASTER_CS1_PAD 14 +#elif (RTE_GSPI_MASTER_CS1_PORT_ID == 3) +#define RTE_GSPI_MASTER_CS1 1 +#define RTE_GSPI_MASTER_CS1_PORT 0 +#define RTE_GSPI_MASTER_CS1_PIN 54 +#define RTE_GSPI_MASTER_CS1_MUX 4 +#define RTE_GSPI_MASTER_CS1_PAD 18 +#else +#error "Invalid GSPI0 RTE_GSPI_MASTER_CS1_PIN Pin Configuration!" +#endif + +// GSPI_MASTER_CS2 +// <0=>P0_15 <1=>P0_30 <2=>P0_51 <3=>P0_55 +// CS2 of GSPI0 +// +#define RTE_GSPI_MASTER_CS2_PORT_ID 1 +#if (RTE_GSPI_MASTER_CS2_PORT_ID == 0) +#define RTE_GSPI_MASTER_CS2 1 +#define RTE_GSPI_MASTER_CS2_PORT 0 +#define RTE_GSPI_MASTER_CS2_PIN 15 +#define RTE_GSPI_MASTER_CS2_MUX 4 +#define RTE_GSPI_MASTER_CS2_PAD 8 +#elif (RTE_GSPI_MASTER_CS2_PORT_ID == 1) +#define RTE_GSPI_MASTER_CS2 1 +#define RTE_GSPI_MASTER_CS2_PORT 0 +#define RTE_GSPI_MASTER_CS2_PIN 30 +#define RTE_GSPI_MASTER_CS2_MUX 4 +#define RTE_GSPI_MASTER_CS2_PAD 0 //NO PAD +#elif (RTE_GSPI_MASTER_CS2_PORT_ID == 2) +#define RTE_GSPI_MASTER_CS2 1 +#define RTE_GSPI_MASTER_CS2_PORT 0 +#define RTE_GSPI_MASTER_CS2_PIN 51 +#define RTE_GSPI_MASTER_CS2_MUX 4 +#define RTE_GSPI_MASTER_CS2_PAD 15 +#elif (RTE_GSPI_MASTER_CS2_PORT_ID == 3) +#define RTE_GSPI_MASTER_CS2 1 +#define RTE_GSPI_MASTER_CS2_PORT 0 +#define RTE_GSPI_MASTER_CS2_PIN 55 +#define RTE_GSPI_MASTER_CS2_MUX 4 +#define RTE_GSPI_MASTER_CS2_PAD 19 +#else +#error "Invalid GSPI0 RTE_GSPI_MASTER_CS2_PIN Pin Configuration!" +#endif + +// GSPI_MASTER_MOSI <0=>P0_12 <1=>P0_27 <2=>P0_48 <3=>P0_57 <4=>P0_6 +// MOSI of GSPI0 + +#define RTE_GSPI_MASTER_MOSI_PORT_ID 1 +#if ((RTE_GSPI_MASTER_MOSI_PORT_ID == 4)) +#error "Invalid GSPI0 RTE_GSPI_MASTER_MOSI_PIN pin Configuration!" +#endif + +#if (RTE_GSPI_MASTER_MOSI_PORT_ID == 0) +#define RTE_GSPI_MASTER_MOSI_PORT 0 +#define RTE_GSPI_MASTER_MOSI_PIN 12 +#define RTE_GSPI_MASTER_MOSI_MUX 4 +#define RTE_GSPI_MASTER_MOSI_PAD 7 +#elif (RTE_GSPI_MASTER_MOSI_PORT_ID == 1) +#define RTE_GSPI_MASTER_MOSI_PORT 0 +#define RTE_GSPI_MASTER_MOSI_PIN 27 +#define RTE_GSPI_MASTER_MOSI_MUX 4 +#define RTE_GSPI_MASTER_MOSI_PAD 0 //NO PAD +#elif (RTE_GSPI_MASTER_MOSI_PORT_ID == 2) +#define RTE_GSPI_MASTER_MOSI_PORT 0 +#define RTE_GSPI_MASTER_MOSI_PIN 48 +#define RTE_GSPI_MASTER_MOSI_MUX 4 +#define RTE_GSPI_MASTER_MOSI_PAD 12 +#elif (RTE_GSPI_MASTER_MOSI_PORT_ID == 3) +#define RTE_GSPI_MASTER_MOSI_PORT 0 +#define RTE_GSPI_MASTER_MOSI_PIN 57 +#define RTE_GSPI_MASTER_MOSI_MUX 4 +#define RTE_GSPI_MASTER_MOSI_PAD 21 +#elif (RTE_GSPI_MASTER_MOSI_PORT_ID == 4) +#define RTE_GSPI_MASTER_MOSI_PORT 0 +#define RTE_GSPI_MASTER_MOSI_PIN 6 +#define RTE_GSPI_MASTER_MOSI_MUX 12 +#define RTE_GSPI_MASTER_MOSI_PAD 1 +#else +#error "Invalid GSPI0 RTE_GSPI_MASTER_MOSI_PIN Pin Configuration!" +#endif + +// GSPI_MASTER_MISO <0=>P0_11 <1=>P0_26 <2=>P0_47 <3=>P0_56 +// MISO of GSPI0 + +#define RTE_GSPI_MASTER_MISO_PORT_ID 1 + +#if (RTE_GSPI_MASTER_MISO_PORT_ID == 0) +#define RTE_GSPI_MASTER_MISO_PORT 0 +#define RTE_GSPI_MASTER_MISO_PIN 11 +#define RTE_GSPI_MASTER_MISO_MUX 4 +#define RTE_GSPI_MASTER_MISO_PAD 6 +#elif (RTE_GSPI_MASTER_MISO_PORT_ID == 1) +#define RTE_GSPI_MASTER_MISO_PORT 0 +#define RTE_GSPI_MASTER_MISO_PIN 26 +#define RTE_GSPI_MASTER_MISO_MUX 4 +#define RTE_GSPI_MASTER_MISO_PAD 0 //NO PAD +#elif (RTE_GSPI_MASTER_MISO_PORT_ID == 2) +#define RTE_GSPI_MASTER_MISO_PORT 0 +#define RTE_GSPI_MASTER_MISO_PIN 47 +#define RTE_GSPI_MASTER_MISO_MUX 4 +#define RTE_GSPI_MASTER_MISO_PAD 11 +#elif (RTE_GSPI_MASTER_MISO_PORT_ID == 3) +#define RTE_GSPI_MASTER_MISO_PORT 0 +#define RTE_GSPI_MASTER_MISO_PIN 56 +#define RTE_GSPI_MASTER_MISO_MUX 4 +#define RTE_GSPI_MASTER_MISO_PAD 20 +#else +#error "Invalid GSPI0 RTE_GSPI_MASTER_MISO_PIN Pin Configuration!" +#endif + +#if HIGH_THROUGHPUT_EN +#define RTE_GSPI_MASTER_CHNL_UDMA_TX_EN 1 +#define RTE_GSPI_MASTER_CHNL_UDMA_TX_CH 11 + +#define RTE_GSPI_MASTER_CHNL_UDMA_RX_EN 1 +#define RTE_GSPI_MASTER_CHNL_UDMA_RX_CH 10 + +#define RTE_GSPI_CLOCK_SOURCE GSPI_SOC_PLL_CLK + +#define RTE_FIFO_AFULL_THRLD 3 +#define RTE_FIFO_AEMPTY_THRLD 7 + +#define TX_DMA_ARB_SIZE ARBSIZE_4 +#define RX_DMA_ARB_SIZE ARBSIZE_8 +#else +#define RTE_GSPI_MASTER_CHNL_UDMA_TX_EN 0 +#define RTE_GSPI_MASTER_CHNL_UDMA_TX_CH 11 + +#define RTE_GSPI_MASTER_CHNL_UDMA_RX_EN 0 +#define RTE_GSPI_MASTER_CHNL_UDMA_RX_CH 10 + +#define RTE_GSPI_CLOCK_SOURCE GSPI_SOC_PLL_CLK + +#define RTE_FIFO_AFULL_THRLD 0 +#define RTE_FIFO_AEMPTY_THRLD 0 + +#define TX_DMA_ARB_SIZE ARBSIZE_1 +#define RX_DMA_ARB_SIZE ARBSIZE_1 +#endif + +// (Generic SPI master)[Driver_GSPI_MASTER] + +// (State Configurable Timer) Interface +#define SCT_CLOCK_SOURCE M4_SOCCLKFOROTHERCLKSCT +#define SCT_CLOCK_DIV_FACT 1 + +//SCT_IN_0 <0=>GPIO_25 <1=>GPIO_64 <2=>GPIO_68 + +#define RTE_SCT_IN_0_PORT_ID 0 + +#if (RTE_SCT_IN_0_PORT_ID == 0) +#define RTE_SCT_IN_0_PORT 0 +#define RTE_SCT_IN_0_PIN 25 +#define RTE_SCT_IN_0_MUX 9 +#define RTE_SCT_IN_0_PAD 0 //no pad +#else +#error "Invalid RTE_SCT_IN_0_PIN Pin Configuration!" +#endif + +//SCT_IN_1 <0=>GPIO_26 <1=>GPIO_65 <2=>GPIO_69 + +#define RTE_SCT_IN_1_PORT_ID 1 + +#if (RTE_SCT_IN_1_PORT_ID == 0) +#define RTE_SCT_IN_1_PORT 0 +#define RTE_SCT_IN_1_PIN 26 +#define RTE_SCT_IN_1_MUX 9 +#define RTE_SCT_IN_1_PAD 0 //no pad +#elif (RTE_SCT_IN_1_PORT_ID == 1) +#define RTE_SCT_IN_1_PORT 0 +#define RTE_SCT_IN_1_PIN 65 +#define RTE_SCT_IN_1_MUX 7 +#define RTE_SCT_IN_1_PAD 23 +#else +#error "Invalid RTE_SCT_IN_1_PIN Pin Configuration!" +#endif + +//SCT_IN_2 <0=>GPIO_27 <1=>GPIO_66 <2=>GPIO_70 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_SCT_IN_2_PORT_ID 0 +#else +#define RTE_SCT_IN_2_PORT_ID 1 +#endif + +#if (RTE_SCT_IN_2_PORT_ID == 0) +#define RTE_SCT_IN_2_PORT 0 +#define RTE_SCT_IN_2_PIN 27 +#define RTE_SCT_IN_2_MUX 9 +#define RTE_SCT_IN_2_PAD 0 //no pad +#elif (RTE_SCT_IN_2_PORT_ID == 1) +#define RTE_SCT_IN_2_PORT 0 +#define RTE_SCT_IN_2_PIN 66 +#define RTE_SCT_IN_2_MUX 7 +#define RTE_SCT_IN_2_PAD 24 +#elif (RTE_SCT_IN_2_PORT_ID == 2) +#define RTE_SCT_IN_2_PORT 0 +#define RTE_SCT_IN_2_PIN 70 +#define RTE_SCT_IN_2_MUX 9 +#define RTE_SCT_IN_2_PAD 28 +#else +#error "Invalid RTE_SCT_IN_0_PIN Pin Configuration!" +#endif + +//SCT_IN_3 <0=>GPIO_28 <1=>GPIO_67 <2=>GPIO_71 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_SCT_IN_3_PORT_ID 0 +#else +#define RTE_SCT_IN_3_PORT_ID 1 +#endif + +#if (RTE_SCT_IN_3_PORT_ID == 0) +#define RTE_SCT_IN_3_PORT 0 +#define RTE_SCT_IN_3_PIN 28 +#define RTE_SCT_IN_3_MUX 9 +#define RTE_SCT_IN_3_PAD 0 //no pad +#elif (RTE_SCT_IN_3_PORT_ID == 1) +#define RTE_SCT_IN_3_PORT 0 +#define RTE_SCT_IN_3_PIN 67 +#define RTE_SCT_IN_3_MUX 7 +#define RTE_SCT_IN_3_PAD 25 +#elif (RTE_SCT_IN_3_PORT_ID == 2) +#define RTE_SCT_IN_3_PORT 0 +#define RTE_SCT_IN_3_PIN 71 +#define RTE_SCT_IN_3_MUX 9 +#define RTE_SCT_IN_3_PAD 29 +#else +#error "Invalid RTE_SCT_IN_0_PIN Pin Configuration!" +#endif + +// SCT_OUT_0 <0=>GPIO_29 <1=>GPIO_68 +#define RTE_SCT_OUT_0_PORT_ID 0 +#if (RTE_SCT_OUT_0_PORT_ID == 0) +#define RTE_SCT_OUT_0_PORT 0 +#define RTE_SCT_OUT_0_PIN 29 +#define RTE_SCT_OUT_0_MUX 9 +#define RTE_SCT_OUT_0_PAD 0 //no pad +#else +#error "Invalid RTE_SCT_OUT_0_PIN Pin Configuration!" +#endif + +// SCT_OUT_1 <0=>GPIO_30 <1=>GPIO_69 +#define RTE_SCT_OUT_1_PORT_ID 0 +#if (RTE_SCT_OUT_1_PORT_ID == 0) +#define RTE_SCT_OUT_1_PORT 0 +#define RTE_SCT_OUT_1_PIN 30 +#define RTE_SCT_OUT_1_MUX 9 +#define RTE_SCT_OUT_1_PAD 0 //no pad +#else +#error "Invalid RTE_SCT_OUT_1_PIN Pin Configuration!" +#endif + +/// SCT_OUT_2 <0=>GPIO_70 <1=>GPIO_8 +#define RTE_SCT_OUT_2_PORT_ID 0 +#if ((RTE_SCT_OUT_2_PORT_ID == 1)) +#error "Invalid RTE_SCT_OUT_2_PIN pin Configuration!" +#endif + +#if (RTE_SCT_OUT_2_PORT_ID == 0) +#define RTE_SCT_OUT_2_PORT 0 +#define RTE_SCT_OUT_2_PIN 70 +#define RTE_SCT_OUT_2_MUX 7 +#define RTE_SCT_OUT_2_PAD 28 +#elif (RTE_SCT_OUT_2_PORT_ID == 1) +#define RTE_SCT_OUT_2_PORT 0 +#define RTE_SCT_OUT_2_PIN 8 +#define RTE_SCT_OUT_2_MUX 12 +#define RTE_SCT_OUT_2_PAD 3 +#else +#error "Invalid RTE_SCT_OUT_2_PIN Pin Configuration!" +#endif +/**/ +//SCT_OUT_3 <0=>GPIO_71 <1=>GPIO_9 +#define RTE_SCT_OUT_3_PORT_ID 0 +#if ((RTE_SCT_OUT_3_PORT_ID == 1)) +#error "Invalid RTE_SCT_OUT_3_PIN pin Configuration!" +#endif + +#if (RTE_SCT_OUT_3_PORT_ID == 0) +#define RTE_SCT_OUT_3_PORT 0 +#define RTE_SCT_OUT_3_PIN 71 +#define RTE_SCT_OUT_3_MUX 7 +#define RTE_SCT_OUT_3_PAD 29 +#elif (RTE_SCT_OUT_3_PORT_ID == 1) +#define RTE_SCT_OUT_3_PORT 0 +#define RTE_SCT_OUT_3_PIN 9 +#define RTE_SCT_OUT_3_MUX 12 +#define RTE_SCT_OUT_3_PAD 4 +#else +#error "Invalid RTE_SCT_OUT_3_PIN Pin Configuration!" +#endif + +//SCT_OUT_4 <0=>GPIO_72 <1=>GPIO_68 + +#define RTE_SCT_OUT_4_PORT_ID 0 +#if ((RTE_SCT_OUT_4_PORT_ID == 1)) +#error "Invalid RTE_SCT_OUT_4_PIN pin Configuration!" +#endif + +#if (RTE_SCT_OUT_4_PORT_ID == 0) +/**/ +#define RTE_SCT_OUT_4_PORT 0 +#define RTE_SCT_OUT_4_PIN 72 +#define RTE_SCT_OUT_4_MUX 7 +#define RTE_SCT_OUT_4_PAD 30 +#else +#error "Invalid RTE_SCT_OUT_4_PIN Pin Configuration!" +#endif +//SCT_OUT_5 <0=>GPIO_73 <1=>GPIO_69 + +#define RTE_SCT_OUT_5_PORT_ID 0 +#if ((RTE_SCT_OUT_5_PORT_ID == 1)) +#error "Invalid RTE_SCT_OUT_5_PIN pin Configuration!" +#endif + +#if (RTE_SCT_OUT_5_PORT_ID == 0) +#define RTE_SCT_OUT_5_PORT 2 +#define RTE_SCT_OUT_5_PIN 73 +#define RTE_SCT_OUT_5_MUX 7 +#define RTE_SCT_OUT_5_PAD 31 +#else +#error "Invalid RTE_SCT_OUT_5_PIN Pin Configuration!" +#endif + +//SCT_OUT_6 <0=>GPIO_74 <1=>GPIO_70 + +#define RTE_SCT_OUT_6_PORT_ID 0 +#if ((RTE_SCT_OUT_6_PORT_ID == 1)) +#error "Invalid RTE_SCT_OUT_6_PIN pin Configuration!" +#endif + +#if (RTE_SCT_OUT_6_PORT_ID == 0) +#define RTE_SCT_OUT_6_PORT 0 +#define RTE_SCT_OUT_6_PIN 74 +#define RTE_SCT_OUT_6_MUX 7 +#define RTE_SCT_OUT_6_PAD 32 +#elif (RTE_SCT_OUT_6_PORT_ID == 1) +#define RTE_SCT_OUT_6_PORT 0 +#define RTE_SCT_OUT_6_PIN 70 +#define RTE_SCT_OUT_6_MUX 13 +#define RTE_SCT_OUT_6_PAD 28 +#else +#error "Invalid RTE_SCT_OUT_6_PIN Pin Configuration!" +#endif + +// SCT_OUT_7 <0=>GPIO_75 <1=>GPIO_71 + +#define RTE_SCT_OUT_7_PORT_ID 0 + +#if (RTE_SCT_OUT_7_PORT_ID == 0) +#define RTE_SCT_OUT_7_PORT 0 +#define RTE_SCT_OUT_7_PIN 75 +#define RTE_SCT_OUT_7_MUX 7 +#define RTE_SCT_OUT_7_PAD 33 +#else +#error "Invalid RTE_SCT_OUT_7_PIN Pin Configuration!" +#endif + +// SIO // +//<> Serial Input Output +//SIO_0 <0=>GPIO_6 <1=>GPIO_25 <2=>GPIO_64 <3=>GPIO_72 + +#define RTE_SIO_0_PORT_ID 0 + +#if (RTE_SIO_0_PORT_ID == 0) +#define RTE_SIO_0_PORT 0 +#define RTE_SIO_0_PIN 6 +#define RTE_SIO_0_MUX 1 +#define RTE_SIO_0_PAD 1 +#elif (RTE_SIO_0_PORT_ID == 1) +#define RTE_SIO_0_PORT 0 +#define RTE_SIO_0_PIN 25 +#define RTE_SIO_0_MUX 1 +#define RTE_SIO_0_PAD 0 //no pad +#elif (RTE_SIO_0_PORT_ID == 2) +#define RTE_SIO_0_PORT 0 +#define RTE_SIO_0_PIN 72 +#define RTE_SIO_0_MUX 1 +#define RTE_SIO_0_PAD 30 +#else +#error "Invalid RTE_SIO_0_PIN Pin Configuration!" +#endif + +//SIO_1 <0=>GPIO_7 <1=>GPIO_26 <2=>GPIO_65 <3=>GPIO_73 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_SIO_1_PORT_ID 1 +#else +#define RTE_SIO_1_PORT_ID 0 +#endif + +#if (RTE_SIO_1_PORT_ID == 0) +#define RTE_SIO_1_PORT 0 +#define RTE_SIO_1_PIN 7 +#define RTE_SIO_1_MUX 1 +#define RTE_SIO_1_PAD 2 +#elif (RTE_SIO_1_PORT_ID == 1) +#define RTE_SIO_1_PORT 0 +#define RTE_SIO_1_PIN 26 +#define RTE_SIO_1_MUX 1 +#define RTE_SIO_1_PAD 0 // no pad +#elif (RTE_SIO_1_PORT_ID == 2) +#define RTE_SIO_1_PORT 0 +#define RTE_SIO_1_PIN 65 +#define RTE_SIO_1_MUX 1 +#define RTE_SIO_1_PAD 23 +#elif (RTE_SIO_1_PORT_ID == 3) +#define RTE_SIO_1_PORT 0 +#define RTE_SIO_1_PIN 73 +#define RTE_SIO_1_MUX 1 +#define RTE_SIO_1_PAD 31 +#else +#error "Invalid RTE_SIO_1_PIN Pin Configuration!" +#endif + +// SIO_2 <0=>GPIO_8 <1=>GPIO_27 <2=>GPIO_66 <3=>GPIO_74 + +#define RTE_SIO_2_PORT_ID 1 + +#if (RTE_SIO_2_PORT_ID == 0) +#define RTE_SIO_2_PORT 0 +#define RTE_SIO_2_PIN 8 +#define RTE_SIO_2_MUX 1 +#define RTE_SIO_2_PAD 3 +#elif (RTE_SIO_2_PORT_ID == 1) +#define RTE_SIO_2_PORT 0 +#define RTE_SIO_2_PIN 27 +#define RTE_SIO_2_MUX 1 +#define RTE_SIO_2_PAD 0 //no pad +#elif (RTE_SIO_2_PORT_ID == 2) +#define RTE_SIO_2_PORT 0 +#define RTE_SIO_2_PIN 66 +#define RTE_SIO_2_MUX 1 +#define RTE_SIO_2_PAD 24 +#elif (RTE_SIO_2_PORT_ID == 3) +#define RTE_SIO_2_PORT 0 +#define RTE_SIO_2_PIN 74 +#define RTE_SIO_2_MUX 1 +#define RTE_SIO_2_PAD 32 +#else +#error "Invalid RTE_SIO_2_PIN Pin Configuration!" +#endif + +//SIO_3 <0=>GPIO_9 <1=>GPIO_28 <2=>GPIO_67 <3=>GPIO_75 + +#define RTE_SIO_3_PORT_ID 1 + +#if (RTE_SIO_3_PORT_ID == 0) +#define RTE_SIO_3_PORT 0 +#define RTE_SIO_3_PIN 9 +#define RTE_SIO_3_MUX 1 +#define RTE_SIO_3_PAD 4 +#elif (RTE_SIO_3_PORT_ID == 1) +#define RTE_SIO_3_PORT 0 +#define RTE_SIO_3_PIN 28 +#define RTE_SIO_3_MUX 1 +#define RTE_SIO_3_PAD 0 //no pad +#elif (RTE_SIO_3_PORT_ID == 2) +#define RTE_SIO_3_PORT 0 +#define RTE_SIO_3_PIN 67 +#define RTE_SIO_3_MUX 1 +#define RTE_SIO_3_PAD 25 +#elif (RTE_SIO_3_PORT_ID == 3) +#define RTE_SIO_3_PORT 0 +#define RTE_SIO_3_PIN 75 +#define RTE_SIO_3_MUX 1 +#define RTE_SIO_3_PAD 33 +#else +#error "Invalid RTE_SIO_3_PIN Pin Configuration!" +#endif + +//SIO_4 <0=>GPIO_10 <1=>GPIO_29 <2=>GPIO_68 +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_SIO_4_PORT_ID 1 +#else +#define RTE_SIO_4_PORT_ID 0 +#endif +#if (RTE_SIO_4_PORT_ID == 0) +#define RTE_SIO_4_PORT 0 +#define RTE_SIO_4_PIN 10 +#define RTE_SIO_4_MUX 1 +#define RTE_SIO_4_PAD 5 +#elif (RTE_SIO_4_PORT_ID == 1) +#define RTE_SIO_4_PORT 0 +#define RTE_SIO_4_PIN 29 +#define RTE_SIO_4_MUX 1 +#define RTE_SIO_4_PAD 0 //NO PAD +#else +#error "Invalid RTE_SIO_3_PIN Pin Configuration!" +#endif + +// SIO_5 <0=>GPIO_11 <1=>GPIO_30 <2=>GPIO_69 +#define RTE_SIO_5_PORT_ID 0 +#if (RTE_SIO_5_PORT_ID == 0) +#define RTE_SIO_5_PORT 0 +#define RTE_SIO_5_PIN 11 +#define RTE_SIO_5_MUX 1 +#define RTE_SIO_5_PAD 6 +#elif (RTE_SIO_5_PORT_ID == 1) +#define RTE_SIO_5_PORT 0 +#define RTE_SIO_5_PIN 30 +#define RTE_SIO_5_MUX 1 +#define RTE_SIO_5_PAD 0 //no pad +#else +#error "Invalid RTE_SIO_5_PIN Pin Configuration!" +#endif + +// SIO_6 GPIO_70 +#define RTE_SIO_6_PORT 0 +#define RTE_SIO_6_PIN 70 +#define RTE_SIO_6_MUX 1 +#define RTE_SIO_6_PAD 28 + +// SIO_7 <0=>GPIO_15 <1=>GPIO_71 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_SIO_7_PORT_ID 1 +#else +#define RTE_SIO_7_PORT_ID 0 +#endif + +#if (RTE_SIO_7_PORT_ID == 0) +#define RTE_SIO_7_PORT 0 +#define RTE_SIO_7_PIN 15 +#define RTE_SIO_7_MUX 1 +#define RTE_SIO_7_PAD 8 +#elif (RTE_SIO_7_PORT_ID == 1) +#define RTE_SIO_7_PORT 0 +#define RTE_SIO_7_PIN 71 +#define RTE_SIO_7_MUX 1 +#define RTE_SIO_7_PAD 29 +#else +#error "Invalid RTE_SIO_7_PIN Pin Configuration!" +#endif + +//<> Pulse Width Modulation +//PWM_1H <0=>GPIO_7 <1=>GPIO_64 <2=>GPIO_65 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_PWM_1H_PORT_ID 0 +#else +#define RTE_PWM_1H_PORT_ID 0 +#endif + +#if (RTE_PWM_1H_PORT_ID == 0) +#define RTE_PWM_1H_PORT 0 +#define RTE_PWM_1H_PIN 7 +#define RTE_PWM_1H_MUX 10 +#define RTE_PWM_1H_PAD 2 +#elif (RTE_PWM_1H_PORT_ID == 1) +#define RTE_PWM_1H_PORT 0 +#define RTE_PWM_1H_PIN 65 +#define RTE_PWM_1H_MUX 8 +#define RTE_PWM_1H_PAD 22 +#else +#error "Invalid RTE_PWM_1H_PIN Pin Configuration!" +#endif + +// PWM_1L <0=>GPIO_6 <1=>GPIO_64 <2=>GPIO_64 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_PWM_1L_PORT_ID 0 +#else +#define RTE_PWM_1L_PORT_ID 1 +#endif + +#if (RTE_PWM_1L_PORT_ID == 0) +#define RTE_PWM_1L_PORT 0 +#define RTE_PWM_1L_PIN 6 +#define RTE_PWM_1L_MUX 10 +#define RTE_PWM_1L_PAD 1 +#else +#error "Invalid RTE_PWM_1L_PIN Pin Configuration!" +#endif + +//PWM_2H <0=>GPIO_9 <1=>GPIO_67 <2=>GPIO_69 + +#define RTE_PWM_2H_PORT_ID 0 +#if ((RTE_PWM_2H_PORT_ID == 2)) +#error "Invalid RTE_PWM_2H_PIN pin Configuration!" +#endif + +#if (RTE_PWM_2H_PORT_ID == 0) +#define RTE_PWM_2H_PORT 0 +#define RTE_PWM_2H_PIN 9 +#define RTE_PWM_2H_MUX 10 +#define RTE_PWM_2H_PAD 4 +#elif (RTE_PWM_2H_PORT_ID == 1) +#define RTE_PWM_2H_PORT 0 +#define RTE_PWM_2H_PIN 67 +#define RTE_PWM_2H_MUX 8 +#define RTE_PWM_2H_PAD 25 +#else +#error "Invalid RTE_PWM_2H_PIN Pin Configuration!" +#endif + +// PWM_2L <0=>GPIO_8 <1=>GPIO_66 <2=>GPIO_68 + +#define RTE_PWM_2L_PORT_ID 0 +#if ((RTE_PWM_2L_PORT_ID == 2)) +#error "Invalid RTE_PWM_2L_PIN pin Configuration!" +#endif + +#if (RTE_PWM_2L_PORT_ID == 0) +#define RTE_PWM_2L_PORT 0 +#define RTE_PWM_2L_PIN 8 +#define RTE_PWM_2L_MUX 10 +#define RTE_PWM_2L_PAD 3 +#elif (RTE_PWM_2L_PORT_ID == 1) +#define RTE_PWM_2L_PORT 0 +#define RTE_PWM_2L_PIN 66 +#define RTE_PWM_2L_MUX 8 +#define RTE_PWM_2L_PAD 24 +#else +#error "Invalid RTE_PWM_2L_PIN Pin Configuration!" +#endif + +// PWM_3H <0=>GPIO_11 <1=>GPIO_69 +#define RTE_PWM_3H_PORT_ID 0 +#if (RTE_PWM_3H_PORT_ID == 0) +#define RTE_PWM_3H_PORT 0 +#define RTE_PWM_3H_PIN 11 +#define RTE_PWM_3H_MUX 10 +#define RTE_PWM_3H_PAD 6 +#else +#error "Invalid RTE_PWM_3H_PIN Pin Configuration!" +#endif + +// PWM_3L <0=>GPIO_10 <1=>GPIO_68 +#define RTE_PWM_3L_PORT_ID 0 + +#if (RTE_PWM_3L_PORT_ID == 0) +#define RTE_PWM_3L_PORT 0 +#define RTE_PWM_3L_PIN 10 +#define RTE_PWM_3L_MUX 10 +#define RTE_PWM_3L_PAD 5 +#else +#error "Invalid RTE_PWM_3L_PIN Pin Configuration!" +#endif + +// PWM_4H <0=>GPIO_15 <1=>GPIO_71 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_PWM_4H_PORT_ID 1 +#else +#define RTE_PWM_4H_PORT_ID 0 +#endif + +#if (RTE_PWM_4H_PORT_ID == 0) +#define RTE_PWM_4H_PORT 0 +#define RTE_PWM_4H_PIN 15 +#define RTE_PWM_4H_MUX 10 +#define RTE_PWM_4H_PAD 8 +#elif (RTE_PWM_4H_PORT_ID == 1) +#define RTE_PWM_4H_PORT 0 +#define RTE_PWM_4H_PIN 71 +#define RTE_PWM_4H_MUX 8 +#define RTE_PWM_4H_PAD 29 +#else +#error "Invalid RTE_PWM_4H_PIN Pin Configuration!" +#endif + +// PWM_4H <0=>GPIO_12 <1=>GPIO_70 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_PWM_4L_PORT_ID 1 +#else +#define RTE_PWM_4L_PORT_ID 0 +#endif + +#if (RTE_PWM_4L_PORT_ID == 0) +#define RTE_PWM_4L_PORT 0 +#define RTE_PWM_4L_PIN 12 +#define RTE_PWM_4L_MUX 10 +#define RTE_PWM_4L_PAD 7 +#elif (RTE_PWM_4L_PORT_ID == 1) +#define RTE_PWM_4L_PORT 0 +#define RTE_PWM_4L_PIN 70 +#define RTE_PWM_4L_MUX 8 +#define RTE_PWM_4L_PAD 28 +#else +#error "Invalid RTE_PWM_4L_PIN Pin Configuration!" +#endif + +// PWM_FAULTA <0=>GPIO_25 <1=>GPIO_68 <1=>GPIO_73 +#define RTE_PWM_FAULTA_PORT_ID 0 + +#if (RTE_PWM_FAULTA_PORT_ID == 0) +#define RTE_PWM_FAULTA_PORT 0 +#define RTE_PWM_FAULTA_PIN 25 +#define RTE_PWM_FAULTA_MUX 10 +#define RTE_PWM_FAULTA_PAD 0 //no pad +#elif (RTE_PWM_FAULTA_PORT_ID == 2) +#define RTE_PWM_FAULTA_PORT 0 +#define RTE_PWM_FAULTA_PIN 73 +#define RTE_PWM_FAULTA_MUX 8 +#define RTE_PWM_FAULTA_PAD 31 +#else +#error "Invalid RTE_PWM_FAULTA_PIN Pin Configuration!" +#endif + +// PWM_FAULTB <0=>GPIO_26 <1=>GPIO_69 <1=>GPIO_74 +#define RTE_PWM_FAULTB_PORT_ID 0 + +#if (RTE_PWM_FAULTB_PORT_ID == 0) +#define RTE_PWM_FAULTB_PORT 0 +#define RTE_PWM_FAULTB_PIN 26 +#define RTE_PWM_FAULTB_MUX 10 +#define RTE_PWM_FAULTB_PAD 0 //no pad +#elif (RTE_PWM_FAULTB_PORT_ID == 2) +#define RTE_PWM_FAULTB_PORT 0 +#define RTE_PWM_FAULTB_PIN 74 +#define RTE_PWM_FAULTB_MUX 8 +#define RTE_PWM_FAULTB_PAD 32 +#else +#error "Invalid RTE_PWM_FAULTB_PIN Pin Configuration!" +#endif +//PWM_SLP_EVENT_TRIG GPIO_72 +#define RTE_PWM_SLP_EVENT_TRIG_PORT 0 +#define RTE_PWM_SLP_EVENT_TRIG_PIN 72 +#define RTE_PWM_SLP_EVENT_TRIG_MUX 8 +#define RTE_PWM_SLP_EVENT_TRIG_PAD 30 + +//PWM_TMR_EXT_TRIG_1 <0=>GPIO_27 <1=>GPIO_51 <2=>GPIO_70 <3=>GPIO_75 +#define RTE_PWM_TMR_EXT_TRIG_1_PORT_ID 0 + +#if (RTE_PWM_TMR_EXT_TRIG_1_PORT_ID == 0) +#define RTE_PWM_TMR_EXT_TRIG_1_PORT 0 +#define RTE_PWM_TMR_EXT_TRIG_1_PIN 27 +#define RTE_PWM_TMR_EXT_TRIG_1_MUX 10 +#define RTE_PWM_TMR_EXT_TRIG_1_PAD 0 //no pad +#elif (RTE_PWM_TMR_EXT_TRIG_1_PORT_ID == 1) +#define RTE_PWM_TMR_EXT_TRIG_1_PORT 0 +#define RTE_PWM_TMR_EXT_TRIG_1_PIN 51 +#define RTE_PWM_TMR_EXT_TRIG_1_MUX 8 +#define RTE_PWM_TMR_EXT_TRIG_1_PAD 15 +#elif (RTE_PWM_TMR_EXT_TRIG_1_PORT_ID == 2) +#define RTE_PWM_TMR_EXT_TRIG_1_PORT 0 +#define RTE_PWM_TMR_EXT_TRIG_1_PIN 70 +#define RTE_PWM_TMR_EXT_TRIG_1_MUX 10 +#define RTE_PWM_TMR_EXT_TRIG_1_PAD 28 +#elif (RTE_PWM_TMR_EXT_TRIG_1_PORT_ID == 3) +#define RTE_PWM_TMR_EXT_TRIG_1_PORT 0 +#define RTE_PWM_TMR_EXT_TRIG_1_PIN 75 +#define RTE_PWM_TMR_EXT_TRIG_1_MUX 8 +#define RTE_PWM_TMR_EXT_TRIG_1_PAD 33 +#else +#error "Invalid RTE_PWM_TMR_EXT_TRIG_1_PIN Pin Configuration!" +#endif + +//PWM_TMR_EXT_TRIG_2 <0=>GPIO_28 <1=>GPIO_54 <2=>GPIO_71 +#define RTE_PWM_TMR_EXT_TRIG_2_PORT_ID 0 + +#if (RTE_PWM_TMR_EXT_TRIG_2_PORT_ID == 0) +#define RTE_PWM_TMR_EXT_TRIG_2_PORT 0 +#define RTE_PWM_TMR_EXT_TRIG_2_PIN 28 +#define RTE_PWM_TMR_EXT_TRIG_2_MUX 10 +#define RTE_PWM_TMR_EXT_TRIG_2_PAD 0 //no pad +#elif (RTE_PWM_TMR_EXT_TRIG_2_PORT_ID == 1) +#define RTE_PWM_TMR_EXT_TRIG_2_PORT 0 +#define RTE_PWM_TMR_EXT_TRIG_2_PIN 54 +#define RTE_PWM_TMR_EXT_TRIG_2_MUX 8 +#define RTE_PWM_TMR_EXT_TRIG_2_PAD 18 +#elif (RTE_PWM_TMR_EXT_TRIG_2_PORT_ID == 2) +#define RTE_PWM_TMR_EXT_TRIG_2_PORT 0 +#define RTE_PWM_TMR_EXT_TRIG_2_PIN 71 +#define RTE_PWM_TMR_EXT_TRIG_2_MUX 10 +#define RTE_PWM_TMR_EXT_TRIG_2_PAD 29 +#else +#error "Invalid RTE_PWM_TMR_EXT_TRIG_2_PIN Pin Configuration!" +#endif + +//<> QEI (Quadrature Encode Interface) + +//QEI_DIR <0=>GPIO_28 <1=>GPIO_49 <2=>GPIO_57 <3=>GPIO_67 <4=>GPIO_71 <5=>GPIO_73 <6=>GPIO_11 <7=>GPIO_34 + +#define RTE_QEI_DIR_PORT_ID 4 + +#if (RTE_QEI_DIR_PORT_ID == 0) +#define RTE_QEI_DIR_PORT 0 +#define RTE_QEI_DIR_PIN 28 +#define RTE_QEI_DIR_MUX 5 +#define RTE_QEI_DIR_PAD 0 //no pad +#elif (RTE_QEI_DIR_PORT_ID == 1) +#define RTE_QEI_DIR_PORT 0 +#define RTE_QEI_DIR_PIN 49 +#define RTE_QEI_DIR_MUX 3 +#define RTE_QEI_DIR_PAD 13 +#elif (RTE_QEI_DIR_PORT_ID == 2) +#define RTE_QEI_DIR_PORT 0 +#define RTE_QEI_DIR_PIN 57 +#define RTE_QEI_DIR_MUX 5 +#define RTE_QEI_DIR_PAD 21 +#elif (RTE_QEI_DIR_PORT_ID == 3) +#define RTE_QEI_DIR_PORT 0 +#define RTE_QEI_DIR_PIN 67 +#define RTE_QEI_DIR_MUX 3 +#define RTE_QEI_DIR_PAD 25 +#elif (RTE_QEI_DIR_PORT_ID == 4) +#define RTE_QEI_DIR_PORT 0 +#define RTE_QEI_DIR_PIN 71 +#define RTE_QEI_DIR_MUX 3 +#define RTE_QEI_DIR_PAD 29 +#elif (RTE_QEI_DIR_PORT_ID == 5) +#define RTE_QEI_DIR_PORT 0 +#define RTE_QEI_DIR_PIN 73 +#define RTE_QEI_DIR_MUX 3 +#define RTE_QEI_DIR_PAD 31 +#else +#error "Invalid RTE_QEI_DIR_PIN Pin Configuration!" +#endif + +//QEI_IDX <0=>GPIO_25 <1=>GPIO_46 <2=>GPIO_52 <3=>GPIO_64 <4=>GPIO_68 <5=>GPIO_72 <6=>GPIO_8 <7=>GPIO_13 + +#define RTE_QEI_IDX_PORT_ID 3 + +#if (RTE_QEI_IDX_PORT_ID == 0) +#define RTE_QEI_IDX_PORT 0 +#define RTE_QEI_IDX_PIN 25 +#define RTE_QEI_IDX_MUX 5 +#define RTE_QEI_IDX_PAD 0 //no pad +#elif (RTE_QEI_IDX_PORT_ID == 1) +#define RTE_QEI_IDX_PORT 0 +#define RTE_QEI_IDX_PIN 46 +#define RTE_QEI_IDX_MUX 3 +#define RTE_QEI_IDX_PAD 10 +#elif (RTE_QEI_IDX_PORT_ID == 2) +#define RTE_QEI_IDX_PORT 0 +#define RTE_QEI_IDX_PIN 52 +#define RTE_QEI_IDX_MUX 5 +#define RTE_QEI_IDX_PAD 16 +#elif (RTE_QEI_IDX_PORT_ID == 3) +#define RTE_QEI_IDX_PORT 0 +#define RTE_QEI_IDX_PIN 72 +#define RTE_QEI_IDX_MUX 3 +#define RTE_QEI_IDX_PAD 30 +#else +#error "Invalid RTE_QEI_IDX_PIN Pin Configuration!" +#endif + +//QEI_PHA <0=>GPIO_26 <1=>GPIO_47 <2=>GPIO_53 <3=>GPIO_65 <4=>GPIO_69 <5=>GPIO_73 <6=>GPIO_9 <7=>GPIO_32 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_QEI_PHA_PORT_ID 3 +#else +#define RTE_QEI_PHA_PORT_ID 5 +#endif + +#if (RTE_QEI_PHA_PORT_ID == 0) +#define RTE_QEI_PHA_PORT 0 +#define RTE_QEI_PHA_PIN 26 +#define RTE_QEI_PHA_MUX 5 +#define RTE_QEI_PHA_PAD 0 //no pad +#elif (RTE_QEI_PHA_PORT_ID == 1) +#define RTE_QEI_PHA_PORT 0 +#define RTE_QEI_PHA_PIN 47 +#define RTE_QEI_PHA_MUX 3 +#define RTE_QEI_PHA_PAD 11 +#elif (RTE_QEI_PHA_PORT_ID == 2) +#define RTE_QEI_PHA_PORT 0 +#define RTE_QEI_PHA_PIN 53 +#define RTE_QEI_PHA_MUX 5 +#define RTE_QEI_PHA_PAD 17 +#elif (RTE_QEI_PHA_PORT_ID == 3) +#define RTE_QEI_PHA_PORT 0 +#define RTE_QEI_PHA_PIN 65 +#define RTE_QEI_PHA_MUX 3 +#define RTE_QEI_PHA_PAD 23 +#elif (RTE_QEI_PHA_PORT_ID == 4) +#define RTE_QEI_PHA_PORT 0 +#define RTE_QEI_PHA_PIN 73 +#define RTE_QEI_PHA_MUX 3 +#define RTE_QEI_PHA_PAD 31 +#else +#error "Invalid RTE_QEI_PHA_PIN Pin Configuration!" +#endif + +//QEI_PHB <0=>GPIO_27 <1=>GPIO_48 <1=>GPIO_56 <1=>GPIO_66 <1=>GPIO_70 <1=>GPIO_74 <7=>GPIO_33 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_QEI_PHB_PORT_ID 5 +#else +#define RTE_QEI_PHB_PORT_ID 4 +#endif + +#if (RTE_QEI_PHB_PORT_ID == 0) +#define RTE_QEI_PHB_PORT 0 +#define RTE_QEI_PHB_PIN 27 +#define RTE_QEI_PHB_MUX 5 +#define RTE_QEI_PHB_PAD 0 //no pad +#elif (RTE_QEI_PHB_PORT_ID == 1) +#define RTE_QEI_PHB_PORT 0 +#define RTE_QEI_PHB_PIN 48 +#define RTE_QEI_PHB_MUX 3 +#define RTE_QEI_PHB_PAD 12 +#elif (RTE_QEI_PHB_PORT_ID == 2) +#define RTE_QEI_PHB_PORT 0 +#define RTE_QEI_PHB_PIN 56 +#define RTE_QEI_PHB_MUX 5 +#define RTE_QEI_PHB_PAD 20 +#elif (RTE_QEI_PHB_PORT_ID == 3) +#define RTE_QEI_PHB_PORT 0 +#define RTE_QEI_PHB_PIN 66 +#define RTE_QEI_PHB_MUX 3 +#define RTE_QEI_PHB_PAD 24 +#elif (RTE_QEI_PHB_PORT_ID == 4) +#define RTE_QEI_PHB_PORT 0 +#define RTE_QEI_PHB_PIN 70 +#define RTE_QEI_PHB_MUX 3 +#define RTE_QEI_PHB_PAD 28 +#elif (RTE_QEI_PHB_PORT_ID == 5) +#define RTE_QEI_PHB_PORT 0 +#define RTE_QEI_PHB_PIN 74 +#define RTE_QEI_PHB_MUX 3 +#define RTE_QEI_PHB_PAD 32 +#else +#error "Invalid RTE_QEI_PHB_PIN Pin Configuration!" +#endif + +#endif + +#define RTE_GPIO_6_PORT 0 +#define RTE_GPIO_6_PAD 1 +#define RTE_GPIO_6_PIN 6 +#define RTE_GPIO_6_MODE 0 + +#define RTE_GPIO_7_PORT 0 +#define RTE_GPIO_7_PAD 2 +#define RTE_GPIO_7_PIN 7 +#define RTE_GPIO_7_MODE 0 + +#define RTE_GPIO_8_PORT 0 +#define RTE_GPIO_8_PAD 3 +#define RTE_GPIO_8_PIN 8 +#define RTE_GPIO_8_MODE 0 + +#define RTE_GPIO_9_PORT 0 +#define RTE_GPIO_9_PAD 4 +#define RTE_GPIO_9_PIN 9 +#define RTE_GPIO_9_MODE 0 + +#define RTE_GPIO_10_PORT 0 +#define RTE_GPIO_10_PAD 5 +#define RTE_GPIO_10_PIN 10 +#define RTE_GPIO_10_MODE 0 + +#define RTE_GPIO_11_PORT 0 +#define RTE_GPIO_11_PAD 6 +#define RTE_GPIO_11_PIN 11 +#define RTE_GPIO_11_MODE 0 + +#define RTE_GPIO_12_PORT 0 +#define RTE_GPIO_12_PAD 7 +#define RTE_GPIO_12_PIN 12 +#define RTE_GPIO_12_MODE 0 + +#define RTE_GPIO_15_PORT 0 +#define RTE_GPIO_15_PAD 8 +#define RTE_GPIO_15_PIN 15 +#define RTE_GPIO_15_MODE 0 + +#define RTE_GPIO_25_PORT 1 +#define RTE_GPIO_25_PIN 25 +#define RTE_GPIO_25_MODE 0 + +#define RTE_GPIO_26_PORT 1 +#define RTE_GPIO_26_PIN 26 +#define RTE_GPIO_26_MODE 0 + +#define RTE_GPIO_27_PORT 1 +#define RTE_GPIO_27_PIN 27 +#define RTE_GPIO_27_MODE 0 + +#define RTE_GPIO_28_PORT 1 +#define RTE_GPIO_28_PIN 28 +#define RTE_GPIO_28_MODE 0 + +#define RTE_GPIO_29_PORT 1 +#define RTE_GPIO_29_PIN 29 +#define RTE_GPIO_29_MODE 0 + +#define RTE_GPIO_30_PORT 1 +#define RTE_GPIO_30_PIN 30 +#define RTE_GPIO_30_MODE 0 + +#define RTE_GPIO_31_PORT 1 +#define RTE_GPIO_31_PAD 9 +#define RTE_GPIO_31_PIN 31 +#define RTE_GPIO_31_MODE 0 + +#define RTE_GPIO_32_PORT 2 +#define RTE_GPIO_32_PAD 9 +#define RTE_GPIO_32_PIN 32 +#define RTE_GPIO_32_MODE 0 + +#define RTE_GPIO_33_PORT 2 +#define RTE_GPIO_33_PAD 9 +#define RTE_GPIO_33_PIN 33 +#define RTE_GPIO_33_MODE 0 + +#define RTE_GPIO_34_PORT 2 +#define RTE_GPIO_34_PAD 9 +#define RTE_GPIO_34_PIN 34 +#define RTE_GPIO_34_MODE 0 + +#define RTE_GPIO_46_PORT 2 +#define RTE_GPIO_46_PAD 10 +#define RTE_GPIO_46_PIN 46 +#define RTE_GPIO_46_MODE 0 + +#define RTE_GPIO_47_PORT 2 +#define RTE_GPIO_47_PAD 11 +#define RTE_GPIO_47_PIN 47 +#define RTE_GPIO_47_MODE 0 + +#define RTE_GPIO_48_PORT 3 +#define RTE_GPIO_48_PAD 12 +#define RTE_GPIO_48_PIN 48 +#define RTE_GPIO_48_MODE 0 + +#define RTE_GPIO_49_PORT 3 +#define RTE_GPIO_49_PAD 13 +#define RTE_GPIO_49_PIN 49 +#define RTE_GPIO_49_MODE 0 + +#define RTE_GPIO_50_PORT 3 +#define RTE_GPIO_50_PAD 14 +#define RTE_GPIO_50_PIN 50 +#define RTE_GPIO_50_MODE 0 + +#define RTE_GPIO_51_PORT 3 +#define RTE_GPIO_51_PAD 15 +#define RTE_GPIO_51_PIN 51 +#define RTE_GPIO_51_MODE 0 + +#define RTE_GPIO_52_PORT 3 +#define RTE_GPIO_52_PAD 16 +#define RTE_GPIO_52_PIN 52 +#define RTE_GPIO_52_MODE 0 + +#define RTE_GPIO_53_PORT 3 +#define RTE_GPIO_53_PAD 17 +#define RTE_GPIO_53_PIN 53 +#define RTE_GPIO_53_MODE 0 + +#define RTE_GPIO_54_PORT 3 +#define RTE_GPIO_54_PAD 18 +#define RTE_GPIO_54_PIN 54 +#define RTE_GPIO_54_MODE 0 + +#define RTE_GPIO_55_PORT 3 +#define RTE_GPIO_55_PAD 19 +#define RTE_GPIO_55_PIN 55 +#define RTE_GPIO_55_MODE 0 + +#define RTE_GPIO_56_PORT 3 +#define RTE_GPIO_56_PAD 20 +#define RTE_GPIO_56_PIN 56 +#define RTE_GPIO_56_MODE 0 + +#define RTE_GPIO_57_PORT 3 +#define RTE_GPIO_57_PAD 21 +#define RTE_GPIO_57_PIN 57 +#define RTE_GPIO_57_MODE 0 + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_0_PORT_ID 1 +#else +#define RTE_ULP_GPIO_0_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_0_PORT_ID == 0) +#define RTE_ULP_GPIO_0_PORT 0 +#define RTE_ULP_GPIO_0_PAD 22 +#define RTE_ULP_GPIO_0_PIN 64 +#define RTE_ULP_GPIO_0_MODE 0 +#elif (RTE_ULP_GPIO_0_PORT_ID == 1) +#define RTE_ULP_GPIO_0_PORT 4 +#define RTE_ULP_GPIO_0_PIN 0 +#define RTE_ULP_GPIO_0_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_0_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_1_PORT_ID 1 +#else +#define RTE_ULP_GPIO_1_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_1_PORT_ID == 0) +#define RTE_ULP_GPIO_1_PORT 0 +#define RTE_ULP_GPIO_1_PAD 23 +#define RTE_ULP_GPIO_1_PIN 65 +#define RTE_ULP_GPIO_1_MODE 0 +#elif (RTE_ULP_GPIO_1_PORT_ID == 1) +#define RTE_ULP_GPIO_1_PORT 4 +#define RTE_ULP_GPIO_1_PIN 1 +#define RTE_ULP_GPIO_1_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_1_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_2_PORT_ID 1 +#else +#define RTE_ULP_GPIO_2_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_2_PORT_ID == 0) +#define RTE_ULP_GPIO_2_PORT 0 +#define RTE_ULP_GPIO_2_PAD 24 +#define RTE_ULP_GPIO_2_PIN 66 +#define RTE_ULP_GPIO_2_MODE 0 +#elif (RTE_ULP_GPIO_2_PORT_ID == 1) +#define RTE_ULP_GPIO_2_PORT 4 +#define RTE_ULP_GPIO_2_PIN 2 +#define RTE_ULP_GPIO_2_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_2_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_3_PORT_ID 1 +#else +#define RTE_ULP_GPIO_3_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_3_PORT_ID == 0) +#define RTE_ULP_GPIO_3_PORT 0 +#define RTE_ULP_GPIO_3_PAD 25 +#define RTE_ULP_GPIO_3_PIN 67 +#define RTE_ULP_GPIO_3_MODE 0 +#elif (RTE_ULP_GPIO_3_PORT_ID == 1) +#define RTE_ULP_GPIO_3_PORT 4 +#define RTE_ULP_GPIO_3_PIN 3 +#define RTE_ULP_GPIO_3_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_3_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_4_PORT_ID 1 +#else +#define RTE_ULP_GPIO_4_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_4_PORT_ID == 0) +#define RTE_ULP_GPIO_4_PORT 0 +#define RTE_ULP_GPIO_4_PAD 26 +#define RTE_ULP_GPIO_4_PIN 68 +#define RTE_ULP_GPIO_4_MODE 0 +#elif (RTE_ULP_GPIO_4_PORT_ID == 1) +#define RTE_ULP_GPIO_4_PORT 4 +#define RTE_ULP_GPIO_4_PIN 4 +#define RTE_ULP_GPIO_4_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_4_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_5_PORT_ID 1 +#else +#define RTE_ULP_GPIO_5_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_5_PORT_ID == 0) +#define RTE_ULP_GPIO_5_PORT 4 +#define RTE_ULP_GPIO_5_PAD 27 +#define RTE_ULP_GPIO_5_PIN 69 +#define RTE_ULP_GPIO_5_MODE 0 +#elif (RTE_ULP_GPIO_5_PORT_ID == 1) +#define RTE_ULP_GPIO_5_PORT 4 +#define RTE_ULP_GPIO_5_PIN 5 +#define RTE_ULP_GPIO_5_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_5_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_6_PORT_ID 1 +#else +#define RTE_ULP_GPIO_6_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_6_PORT_ID == 0) +#define RTE_ULP_GPIO_6_PORT 4 +#define RTE_ULP_GPIO_6_PAD 28 +#define RTE_ULP_GPIO_6_PIN 70 +#define RTE_ULP_GPIO_6_MODE 0 +#elif (RTE_ULP_GPIO_6_PORT_ID == 1) +#define RTE_ULP_GPIO_6_PORT 4 +#define RTE_ULP_GPIO_6_PIN 6 +#define RTE_ULP_GPIO_6_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_6_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_7_PORT_ID 1 +#else +#define RTE_ULP_GPIO_7_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_7_PORT_ID == 0) +#define RTE_ULP_GPIO_7_PORT 4 +#define RTE_ULP_GPIO_7_PAD 29 +#define RTE_ULP_GPIO_7_PIN 71 +#define RTE_ULP_GPIO_7_MODE 0 +#elif (RTE_ULP_GPIO_7_PORT_ID == 1) +#define RTE_ULP_GPIO_7_PORT 4 +#define RTE_ULP_GPIO_7_PIN 7 +#define RTE_ULP_GPIO_7_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_7_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_8_PORT_ID 1 +#else +#define RTE_ULP_GPIO_8_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_8_PORT_ID == 0) +#define RTE_ULP_GPIO_8_PORT 4 +#define RTE_ULP_GPIO_8_PAD 30 +#define RTE_ULP_GPIO_8_PIN 72 +#define RTE_ULP_GPIO_8_MODE 0 +#elif (RTE_ULP_GPIO_8_PORT_ID == 1) +#define RTE_ULP_GPIO_8_PORT 4 +#define RTE_ULP_GPIO_8_PIN 8 +#define RTE_ULP_GPIO_8_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_8_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_9_PORT_ID 1 +#else +#define RTE_ULP_GPIO_9_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_9_PORT_ID == 0) +#define RTE_ULP_GPIO_9_PORT 4 +#define RTE_ULP_GPIO_9_PAD 31 +#define RTE_ULP_GPIO_9_PIN 73 +#define RTE_ULP_GPIO_9_MODE 0 +#elif (RTE_ULP_GPIO_9_PORT_ID == 1) +#define RTE_ULP_GPIO_9_PORT 4 +#define RTE_ULP_GPIO_9_PIN 9 +#define RTE_ULP_GPIO_9_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_9_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_10_PORT_ID 1 +#else +#define RTE_ULP_GPIO_10_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_10_PORT_ID == 0) +#define RTE_ULP_GPIO_10_PORT 4 +#define RTE_ULP_GPIO_10_PAD 32 +#define RTE_ULP_GPIO_10_PIN 74 +#define RTE_ULP_GPIO_10_MODE 0 +#elif (RTE_ULP_GPIO_10_PORT_ID == 1) +#define RTE_ULP_GPIO_10_PORT 4 +#define RTE_ULP_GPIO_10_PIN 10 +#define RTE_ULP_GPIO_10_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_10_PIN Pin Configuration!" +#endif + +#ifdef SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER +#define RTE_ULP_GPIO_11_PORT_ID 1 +#else +#define RTE_ULP_GPIO_11_PORT_ID 0 +#endif + +#if (RTE_ULP_GPIO_11_PORT_ID == 0) +#define RTE_ULP_GPIO_11_PORT 4 +#define RTE_ULP_GPIO_11_PAD 33 +#define RTE_ULP_GPIO_11_PIN 75 +#define RTE_ULP_GPIO_11_MODE 0 +#elif (RTE_ULP_GPIO_11_PORT_ID == 1) +#define RTE_ULP_GPIO_11_PORT 4 +#define RTE_ULP_GPIO_11_PIN 11 +#define RTE_ULP_GPIO_11_MODE 0 +#else +#error "Invalid RTE_ULP_GPIO_11_PIN Pin Configuration!" +#endif + +#define RTE_UULP_GPIO_0_PIN 0 +#define RTE_UULP_GPIO_0_MODE 0 + +#define RTE_UULP_GPIO_1_PIN 1 +#define RTE_UULP_GPIO_1_MODE 0 + +#define RTE_UULP_GPIO_2_PIN 2 +#define RTE_UULP_GPIO_2_MODE 0 + +#define RTE_UULP_GPIO_3_PIN 3 +#define RTE_UULP_GPIO_3_MODE 0 + +#define RTE_UULP_GPIO_4_PIN 4 +#define RTE_UULP_GPIO_4_MODE 0 + +#define RTE_UULP_GPIO_5_PIN 5 +#define RTE_UULP_GPIO_5_MODE 0 \ No newline at end of file diff --git a/examples/si91x_soc/peripheral/sl_si91x_ulp_ssi_master/app.h b/components/board/silabs/config/brd2605a/sl_board_configuration.h similarity index 58% rename from examples/si91x_soc/peripheral/sl_si91x_ulp_ssi_master/app.h rename to components/board/silabs/config/brd2605a/sl_board_configuration.h index 32a039e2a..635fe5f8a 100644 --- a/examples/si91x_soc/peripheral/sl_si91x_ulp_ssi_master/app.h +++ b/components/board/silabs/config/brd2605a/sl_board_configuration.h @@ -1,6 +1,6 @@ -/***************************************************************************/ /** -* @file app.h -* @brief Top level application functions +/******************************************************************************* +* @file sl_board_configuration.h +* @brief ******************************************************************************* * # License * Copyright 2023 Silicon Laboratories Inc. www.silabs.com @@ -14,17 +14,10 @@ * sections of the MSLA applicable to Source Code. * ******************************************************************************/ -#ifndef APP_H -#define APP_H -/***************************************************************************/ /** -* Initialize application. -******************************************************************************/ -void app_init(void); +#pragma once -/***************************************************************************/ /** -* App ticking function. -******************************************************************************/ -void app_process_action(void); +#include -#endif // APP_H \ No newline at end of file +#define DEFAULT_UART NULL +#define DEFAULT_UART_PIN_CONFIG NULL diff --git a/examples/si91x_soc/peripheral/sl_si91x_ulp_dma/app.h b/components/board/silabs/config/brd2605a/sl_board_control.h similarity index 58% rename from examples/si91x_soc/peripheral/sl_si91x_ulp_dma/app.h rename to components/board/silabs/config/brd2605a/sl_board_control.h index 6750242f8..8b85d7553 100644 --- a/examples/si91x_soc/peripheral/sl_si91x_ulp_dma/app.h +++ b/components/board/silabs/config/brd2605a/sl_board_control.h @@ -1,6 +1,6 @@ -/***************************************************************************/ /** -* @file app.h -* @brief Top level application functions +/******************************************************************************* +* @file sl_board_control.h +* @brief ******************************************************************************* * # License * Copyright 2023 Silicon Laboratories Inc. www.silabs.com @@ -14,17 +14,9 @@ * sections of the MSLA applicable to Source Code. * ******************************************************************************/ -#ifndef APP_H -#define APP_H -/***************************************************************************/ /** -* Initialize application. -******************************************************************************/ -void app_init(void); +#pragma once -/***************************************************************************/ /** -* App ticking function. -******************************************************************************/ -void app_process_action(void); +#include "sl_status.h" -#endif // APP_H +sl_status_t sl_board_enable_vcom(void); diff --git a/components/board/silabs/config/brd4180a/FreeRTOSConfig.h b/components/board/silabs/config/brd4180a/FreeRTOSConfig.h index 2608a0e39..42c87889f 100644 --- a/components/board/silabs/config/brd4180a/FreeRTOSConfig.h +++ b/components/board/silabs/config/brd4180a/FreeRTOSConfig.h @@ -1,271 +1,271 @@ -/* -------------------------------------------------------------------------- - * Copyright (c) 2013-2019 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * -------------------------------------------------------------------------- - * - * $Revision: V10.2.0 - * - * Project: CMSIS-FreeRTOS - * Title: FreeRTOS configuration definitions - * - * --------------------------------------------------------------------------*/ - -#ifndef FREERTOS_CONFIG_H -#define FREERTOS_CONFIG_H - -/*----------------------------------------------------------- -* Application specific definitions. -* -* These definitions should be adjusted for your particular hardware and -* application requirements. -* -* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE -* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. -* -* See http://www.freertos.org/a00110.html -*----------------------------------------------------------*/ - -#if !defined(__IAR_SYSTEMS_ASM__) -#if (defined(__ARMCC_VERSION) || defined(__GNUC__) || defined(__ICCARM__)) -#include - -//#include "RTE_Components.h" -//#include CMSIS_device_header -#endif - -#include "em_assert.h" -#include "em_device.h" - -#if defined(SL_COMPONENT_CATALOG_PRESENT) -#include "sl_component_catalog.h" -#endif -#endif - -#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) -#include "SEGGER_SYSVIEW_FreeRTOS.h" -#endif - -//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- - -// Minimal stack size [words] <0-65535> -// Stack for idle task and default task stack in words. -// Default: 160 -#define configMINIMAL_STACK_SIZE 160 - -// Total heap size [bytes] <0-0xFFFFFFFF> -// Heap memory size in bytes. -// Default: 8192 -#define configTOTAL_HEAP_SIZE 8192 - -// Kernel tick frequency [Hz] <0-0xFFFFFFFF> -// Kernel tick rate in Hz. -// Default: 1000 -#define configTICK_RATE_HZ 1000 - -// Timer task stack depth [words] <0-65535> -// Stack for timer task in words. -// Default: 160 -#define configTIMER_TASK_STACK_DEPTH 160 - -// Timer task priority <0-56> -// Timer task priority. -// Default: 40 (High) -#define configTIMER_TASK_PRIORITY 40 - -// Timer queue length <0-1024> -// Timer command queue length. -// Default: 10 -#define configTIMER_QUEUE_LENGTH 10 - -// Preemption interrupt priority -// Maximum priority of interrupts that are safe to call FreeRTOS API. -// Default: 48 -#define configMAX_SYSCALL_INTERRUPT_PRIORITY 48 - -// Use time slicing -// Enable setting to use timeslicing. -// Default: 1 -#define configUSE_TIME_SLICING 1 - -// Idle should yield -// Control Yield behaviour of the idle task. -// Default: 1 -#define configIDLE_SHOULD_YIELD 1 - -// Check for stack overflow -// <0=>Disable <1=>Method one <2=>Method two -// Enable or disable stack overflow checking. -// Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled. -// Default: 2 -#define configCHECK_FOR_STACK_OVERFLOW 2 - -// Use idle hook -// Enable callback function call on each idle task iteration. -// Callback function vApplicationIdleHook implementation is required when idle hook is enabled. -// Default: 0 -#define configUSE_IDLE_HOOK 0 - -// Use tick hook -// Enable callback function call during each tick interrupt. -// Callback function vApplicationTickHook implementation is required when tick hook is enabled. -// Default: 0 -#define configUSE_TICK_HOOK 0 - -// Use deamon task startup hook -// Enable callback function call when timer service starts. -// Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled. -// Default: 0 -#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 - -// Use malloc failed hook -// Enable callback function call when out of dynamic memory. -// Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled. -// Default: 0 -#define configUSE_MALLOC_FAILED_HOOK 0 - -// Queue registry size -// Define maximum number of queue objects registered for debug purposes. -// The queue registry is used by kernel aware debuggers to locate queue and semaphore structures and display associated text names. -// Default: 10 -#define configQUEUE_REGISTRY_SIZE 10 - -// Port Specific Features -// Enable and configure port specific features. -// Check FreeRTOS documentation for definitions that apply for the used port. - -// Use Floating Point Unit -// Using Floating Point Unit (FPU) affects context handling. -// Enable FPU when application uses floating point operations. -// Default: 1 -#define configENABLE_FPU 1 - -// Use Memory Protection Unit -// Using Memory Protection Unit (MPU) requires detailed memory map definition. -// This setting is only releavant for MPU enabled ports. -// Default: 0 -#define configENABLE_MPU 0 - -// Minimal secure stack size [words] <0-65535> -// Stack for idle task Secure side context in words. -// This setting is only relevant when TrustZone extension is enabled. -// Default: 128 -#define configMINIMAL_SECURE_STACK_SIZE 128 -// - -// Thread Local Storage Settings -// Thread local storage pointers -// Thread local storage (or TLS) allows the application writer to store -// values inside a task's control block, making the value specific to -// (local to) the task itself. -// Default: 0 -#define configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS 0 -// - -// Use Threadsafe Errno -// Enable Threadsafe Errno support. -// Default: 0 -#define configUSE_POSIX_ERRNO 1 - -//------------- <<< end of configuration section >>> --------------------------- - -/* Defines needed by FreeRTOS to implement CMSIS RTOS2 API. Do not change! */ -#define configCPU_CLOCK_HZ (SystemCoreClock) -#define configSUPPORT_STATIC_ALLOCATION 1 -#define configSUPPORT_DYNAMIC_ALLOCATION 1 -#define configUSE_PREEMPTION 1 -#define configUSE_TIMERS 1 -#define configUSE_MUTEXES 1 -#define configUSE_RECURSIVE_MUTEXES 1 -#define configUSE_COUNTING_SEMAPHORES 1 -#define configUSE_TASK_NOTIFICATIONS 1 -#define configUSE_TRACE_FACILITY 1 -#define configUSE_16_BIT_TICKS 0 -#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 -#define configMAX_PRIORITIES 56 -#define configKERNEL_INTERRUPT_PRIORITY 255 - -/* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */ -#define INCLUDE_xEventGroupSetBitsFromISR 1 -#define INCLUDE_xSemaphoreGetMutexHolder 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelete 1 -#define INCLUDE_xTaskGetCurrentTaskHandle 1 -#define INCLUDE_xTaskGetSchedulerState 1 -#define INCLUDE_uxTaskGetStackHighWaterMark 1 -#define INCLUDE_uxTaskPriorityGet 1 -#define INCLUDE_vTaskPrioritySet 1 -#define INCLUDE_eTaskGetState 1 -#define INCLUDE_vTaskSuspend 1 -#define INCLUDE_xTimerPendFunctionCall 1 - -/* Map the FreeRTOS port interrupt handlers to their CMSIS standard names. */ -#define xPortPendSVHandler PendSV_Handler -#define vPortSVCHandler SVC_Handler - -/* Ensure Cortex-M port compatibility. */ -#define SysTick_Handler xPortSysTickHandler - -/* Implement FreeRTOS configASSERT as emlib assert. */ -#define configASSERT(x) EFM_ASSERT(x) - -/* Energy saving modes. */ -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) -#define configUSE_TICKLESS_IDLE 1 -#else -#define configUSE_TICKLESS_IDLE 0 -#endif - -/* Definition used by Keil to replace default system clock source. */ -#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 - -/* Maximum size of task name. */ -#define configMAX_TASK_NAME_LEN 10 - -/* Use queue sets? */ -#define configUSE_QUEUE_SETS 0 - -/* Generate run-time statistics? */ -#define configGENERATE_RUN_TIME_STATS 0 - -/* Co-routine related definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES 1 - -/* Optional resume from ISR functionality. */ -#define INCLUDE_xResumeFromISR 1 - -/* FreeRTOS Secure Side Only and TrustZone Security Extension */ -#define configRUN_FREERTOS_SECURE_ONLY 1 -#define configENABLE_TRUSTZONE 0 - -/* Thread local storage pointers used by the SDK */ -#ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS -#define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 1 -#endif - -/* PRINT_STRING implementation. iostream_retarget_stdio or third party - printf should be added if this is used */ -#define configPRINT_STRING(X) printf(X) - -#define configNUM_THREAD_LOCAL_STORAGE_POINTERS \ - (configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS + configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS) - -//#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) -//#include "SEGGER_SYSVIEW_FreeRTOS.h" -//#endif -#endif /* FREERTOS_CONFIG_H */ +/* -------------------------------------------------------------------------- + * Copyright (c) 2013-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * $Revision: V10.2.0 + * + * Project: CMSIS-FreeRTOS + * Title: FreeRTOS configuration definitions + * + * --------------------------------------------------------------------------*/ + +#ifndef FREERTOS_CONFIG_H +#define FREERTOS_CONFIG_H + +/*----------------------------------------------------------- +* Application specific definitions. +* +* These definitions should be adjusted for your particular hardware and +* application requirements. +* +* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE +* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. +* +* See http://www.freertos.org/a00110.html +*----------------------------------------------------------*/ + +#if !defined(__IAR_SYSTEMS_ASM__) +#if (defined(__ARMCC_VERSION) || defined(__GNUC__) || defined(__ICCARM__)) +#include + +//#include "RTE_Components.h" +//#include CMSIS_device_header +#endif + +#include "em_assert.h" +#include "em_device.h" + +#if defined(SL_COMPONENT_CATALOG_PRESENT) +#include "sl_component_catalog.h" +#endif +#endif + +#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) +#include "SEGGER_SYSVIEW_FreeRTOS.h" +#endif + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Minimal stack size [words] <0-65535> +// Stack for idle task and default task stack in words. +// Default: 160 +#define configMINIMAL_STACK_SIZE 160 + +// Total heap size [bytes] <0-0xFFFFFFFF> +// Heap memory size in bytes. +// Default: 8192 +#define configTOTAL_HEAP_SIZE 8192 + +// Kernel tick frequency [Hz] <0-0xFFFFFFFF> +// Kernel tick rate in Hz. +// Default: 1000 +#define configTICK_RATE_HZ 1000 + +// Timer task stack depth [words] <0-65535> +// Stack for timer task in words. +// Default: 160 +#define configTIMER_TASK_STACK_DEPTH 160 + +// Timer task priority <0-56> +// Timer task priority. +// Default: 40 (High) +#define configTIMER_TASK_PRIORITY 55 + +// Timer queue length <0-1024> +// Timer command queue length. +// Default: 10 +#define configTIMER_QUEUE_LENGTH 10 + +// Preemption interrupt priority +// Maximum priority of interrupts that are safe to call FreeRTOS API. +// Default: 48 +#define configMAX_SYSCALL_INTERRUPT_PRIORITY 48 + +// Use time slicing +// Enable setting to use timeslicing. +// Default: 1 +#define configUSE_TIME_SLICING 1 + +// Idle should yield +// Control Yield behaviour of the idle task. +// Default: 1 +#define configIDLE_SHOULD_YIELD 1 + +// Check for stack overflow +// <0=>Disable <1=>Method one <2=>Method two +// Enable or disable stack overflow checking. +// Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled. +// Default: 2 +#define configCHECK_FOR_STACK_OVERFLOW 2 + +// Use idle hook +// Enable callback function call on each idle task iteration. +// Callback function vApplicationIdleHook implementation is required when idle hook is enabled. +// Default: 0 +#define configUSE_IDLE_HOOK 0 + +// Use tick hook +// Enable callback function call during each tick interrupt. +// Callback function vApplicationTickHook implementation is required when tick hook is enabled. +// Default: 0 +#define configUSE_TICK_HOOK 0 + +// Use deamon task startup hook +// Enable callback function call when timer service starts. +// Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled. +// Default: 0 +#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 + +// Use malloc failed hook +// Enable callback function call when out of dynamic memory. +// Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled. +// Default: 0 +#define configUSE_MALLOC_FAILED_HOOK 0 + +// Queue registry size +// Define maximum number of queue objects registered for debug purposes. +// The queue registry is used by kernel aware debuggers to locate queue and semaphore structures and display associated text names. +// Default: 10 +#define configQUEUE_REGISTRY_SIZE 10 + +// Port Specific Features +// Enable and configure port specific features. +// Check FreeRTOS documentation for definitions that apply for the used port. + +// Use Floating Point Unit +// Using Floating Point Unit (FPU) affects context handling. +// Enable FPU when application uses floating point operations. +// Default: 1 +#define configENABLE_FPU 1 + +// Use Memory Protection Unit +// Using Memory Protection Unit (MPU) requires detailed memory map definition. +// This setting is only releavant for MPU enabled ports. +// Default: 0 +#define configENABLE_MPU 0 + +// Minimal secure stack size [words] <0-65535> +// Stack for idle task Secure side context in words. +// This setting is only relevant when TrustZone extension is enabled. +// Default: 128 +#define configMINIMAL_SECURE_STACK_SIZE 128 +// + +// Thread Local Storage Settings +// Thread local storage pointers +// Thread local storage (or TLS) allows the application writer to store +// values inside a task's control block, making the value specific to +// (local to) the task itself. +// Default: 0 +#define configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS 0 +// + +// Use Threadsafe Errno +// Enable Threadsafe Errno support. +// Default: 0 +#define configUSE_POSIX_ERRNO 1 + +//------------- <<< end of configuration section >>> --------------------------- + +/* Defines needed by FreeRTOS to implement CMSIS RTOS2 API. Do not change! */ +#define configCPU_CLOCK_HZ (SystemCoreClock) +#define configSUPPORT_STATIC_ALLOCATION 1 +#define configSUPPORT_DYNAMIC_ALLOCATION 1 +#define configUSE_PREEMPTION 1 +#define configUSE_TIMERS 1 +#define configUSE_MUTEXES 1 +#define configUSE_RECURSIVE_MUTEXES 1 +#define configUSE_COUNTING_SEMAPHORES 1 +#define configUSE_TASK_NOTIFICATIONS 1 +#define configUSE_TRACE_FACILITY 1 +#define configUSE_16_BIT_TICKS 0 +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 +#define configMAX_PRIORITIES 56 +#define configKERNEL_INTERRUPT_PRIORITY 255 + +/* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */ +#define INCLUDE_xEventGroupSetBitsFromISR 1 +#define INCLUDE_xSemaphoreGetMutexHolder 1 +#define INCLUDE_vTaskDelay 1 +#define INCLUDE_vTaskDelayUntil 1 +#define INCLUDE_vTaskDelete 1 +#define INCLUDE_xTaskGetCurrentTaskHandle 1 +#define INCLUDE_xTaskGetSchedulerState 1 +#define INCLUDE_uxTaskGetStackHighWaterMark 1 +#define INCLUDE_uxTaskPriorityGet 1 +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_eTaskGetState 1 +#define INCLUDE_vTaskSuspend 1 +#define INCLUDE_xTimerPendFunctionCall 1 + +/* Map the FreeRTOS port interrupt handlers to their CMSIS standard names. */ +#define xPortPendSVHandler PendSV_Handler +#define vPortSVCHandler SVC_Handler + +/* Ensure Cortex-M port compatibility. */ +#define SysTick_Handler xPortSysTickHandler + +/* Implement FreeRTOS configASSERT as emlib assert. */ +#define configASSERT(x) EFM_ASSERT(x) + +/* Energy saving modes. */ +#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) +#define configUSE_TICKLESS_IDLE 1 +#else +#define configUSE_TICKLESS_IDLE 0 +#endif + +/* Definition used by Keil to replace default system clock source. */ +#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 + +/* Maximum size of task name. */ +#define configMAX_TASK_NAME_LEN 10 + +/* Use queue sets? */ +#define configUSE_QUEUE_SETS 0 + +/* Generate run-time statistics? */ +#define configGENERATE_RUN_TIME_STATS 0 + +/* Co-routine related definitions. */ +#define configUSE_CO_ROUTINES 0 +#define configMAX_CO_ROUTINE_PRIORITIES 1 + +/* Optional resume from ISR functionality. */ +#define INCLUDE_xResumeFromISR 1 + +/* FreeRTOS Secure Side Only and TrustZone Security Extension */ +#define configRUN_FREERTOS_SECURE_ONLY 1 +#define configENABLE_TRUSTZONE 0 + +/* Thread local storage pointers used by the SDK */ +#ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS +#define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 1 +#endif + +/* PRINT_STRING implementation. iostream_retarget_stdio or third party + printf should be added if this is used */ +#define configPRINT_STRING(X) printf(X) + +#define configNUM_THREAD_LOCAL_STORAGE_POINTERS \ + (configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS + configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS) + +//#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) +//#include "SEGGER_SYSVIEW_FreeRTOS.h" +//#endif +#endif /* FREERTOS_CONFIG_H */ diff --git a/components/board/silabs/config/brd4180a/sl_board_control_config.h b/components/board/silabs/config/brd4180a/sl_board_control_config.h index eda0cf1a0..96f762b48 100644 --- a/components/board/silabs/config/brd4180a/sl_board_control_config.h +++ b/components/board/silabs/config/brd4180a/sl_board_control_config.h @@ -1,32 +1,32 @@ -#ifndef SL_BOARD_CONTROL_CONFIG_H -#define SL_BOARD_CONTROL_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Enable Virtual COM UART -// Default: 0 -#define SL_BOARD_ENABLE_VCOM 1 - -// Enable Display -// Default: 0 -#define SL_BOARD_ENABLE_DISPLAY 0 - -// <<< end of configuration section >>> - -// <<< sl:start pin_tool >>> - -// SL_BOARD_ENABLE_VCOM -// $[GPIO_SL_BOARD_ENABLE_VCOM] -#define SL_BOARD_ENABLE_VCOM_PORT gpioPortD -#define SL_BOARD_ENABLE_VCOM_PIN 4 -// [GPIO_SL_BOARD_ENABLE_VCOM]$ - -// SL_BOARD_ENABLE_DISPLAY -// $[GPIO_SL_BOARD_ENABLE_DISPLAY] -#define SL_BOARD_ENABLE_DISPLAY_PORT gpioPortD -#define SL_BOARD_ENABLE_DISPLAY_PIN 4 -// [GPIO_SL_BOARD_ENABLE_DISPLAY]$ - -// <<< sl:end pin_tool >>> - -#endif // SL_BOARD_CONTROL_CONFIG_H +#ifndef SL_BOARD_CONTROL_CONFIG_H +#define SL_BOARD_CONTROL_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Enable Virtual COM UART +// Default: 0 +#define SL_BOARD_ENABLE_VCOM 1 + +// Enable Display +// Default: 0 +#define SL_BOARD_ENABLE_DISPLAY 0 + +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> + +// SL_BOARD_ENABLE_VCOM +// $[GPIO_SL_BOARD_ENABLE_VCOM] +#define SL_BOARD_ENABLE_VCOM_PORT gpioPortD +#define SL_BOARD_ENABLE_VCOM_PIN 4 +// [GPIO_SL_BOARD_ENABLE_VCOM]$ + +// SL_BOARD_ENABLE_DISPLAY +// $[GPIO_SL_BOARD_ENABLE_DISPLAY] +#define SL_BOARD_ENABLE_DISPLAY_PORT gpioPortD +#define SL_BOARD_ENABLE_DISPLAY_PIN 4 +// [GPIO_SL_BOARD_ENABLE_DISPLAY]$ + +// <<< sl:end pin_tool >>> + +#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/components/board/silabs/config/brd4180a/sl_device_init_emu_config.h b/components/board/silabs/config/brd4180a/sl_device_init_emu_config.h index c6e89bd03..88ca8942e 100644 --- a/components/board/silabs/config/brd4180a/sl_device_init_emu_config.h +++ b/components/board/silabs/config/brd4180a/sl_device_init_emu_config.h @@ -1,53 +1,53 @@ -/***************************************************************************/ /** - * @file - * @brief DEVICE_INIT_EMU Config - ******************************************************************************* - * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_DEVICE_INIT_EMU_CONFIG_H -#define SL_DEVICE_INIT_EMU_CONFIG_H - -#include "em_emu.h" - -// <<< Use Configuration Wizard in Context Menu >>> - -// Allow debugger to remain connected in EM2 -// Force PD0B to stay on on EM2 entry. This allows the debugger to remain connected in EM2 and EM3. -// Enabling debug connectivity results in an increased power consumption in EM2/EM3. -// Default: 1 -#define SL_DEVICE_INIT_EMU_EM2_DEBUG_ENABLE 1 - -// EM4 pin retention mode -// No Retention: Pads enter reset state when entering EM4. -// Retention through EM4: Pads enter reset state when exiting EM4. -// Retention through EM4 and wakeup. -// Default: emuPinRetentionDisable -#define SL_DEVICE_INIT_EMU_EM4_PIN_RETENTION_MODE emuPinRetentionDisable - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_EMU_CONFIG_H +/***************************************************************************/ /** + * @file + * @brief DEVICE_INIT_EMU Config + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_DEVICE_INIT_EMU_CONFIG_H +#define SL_DEVICE_INIT_EMU_CONFIG_H + +#include "em_emu.h" + +// <<< Use Configuration Wizard in Context Menu >>> + +// Allow debugger to remain connected in EM2 +// Force PD0B to stay on on EM2 entry. This allows the debugger to remain connected in EM2 and EM3. +// Enabling debug connectivity results in an increased power consumption in EM2/EM3. +// Default: 1 +#define SL_DEVICE_INIT_EMU_EM2_DEBUG_ENABLE 1 + +// EM4 pin retention mode +// No Retention: Pads enter reset state when entering EM4. +// Retention through EM4: Pads enter reset state when exiting EM4. +// Retention through EM4 and wakeup. +// Default: emuPinRetentionDisable +#define SL_DEVICE_INIT_EMU_EM4_PIN_RETENTION_MODE emuPinRetentionDisable + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_EMU_CONFIG_H diff --git a/components/board/silabs/config/brd4180a/sl_device_init_hfrco_config.h b/components/board/silabs/config/brd4180a/sl_device_init_hfrco_config.h index 7b8ab9066..2ccdcb1f9 100644 --- a/components/board/silabs/config/brd4180a/sl_device_init_hfrco_config.h +++ b/components/board/silabs/config/brd4180a/sl_device_init_hfrco_config.h @@ -1,27 +1,27 @@ -#ifndef SL_DEVICE_INIT_HFRCO_CONFIG_H -#define SL_DEVICE_INIT_HFRCO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Frequency Band -// RC Oscillator Frequency Band -// 1 MHz -// 2 MHz -// 4 MHz -// 7 MHz -// 13 MHz -// 16 MHz -// 19 MHz -// 26 MHz -// 32 MHz -// 38 MHz -// 48 MHz -// 56 MHz -// 64 MHz -// 80 MHz -// Default: cmuHFRCODPLLFreq_80M0Hz -#define SL_DEVICE_INIT_HFRCO_BAND cmuHFRCODPLLFreq_80M0Hz - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFRCO_CONFIG_H +#ifndef SL_DEVICE_INIT_HFRCO_CONFIG_H +#define SL_DEVICE_INIT_HFRCO_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Frequency Band +// RC Oscillator Frequency Band +// 1 MHz +// 2 MHz +// 4 MHz +// 7 MHz +// 13 MHz +// 16 MHz +// 19 MHz +// 26 MHz +// 32 MHz +// 38 MHz +// 48 MHz +// 56 MHz +// 64 MHz +// 80 MHz +// Default: cmuHFRCODPLLFreq_80M0Hz +#define SL_DEVICE_INIT_HFRCO_BAND cmuHFRCODPLLFreq_80M0Hz + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_HFRCO_CONFIG_H diff --git a/components/board/silabs/config/brd4180a/sl_device_init_hfxo_config.h b/components/board/silabs/config/brd4180a/sl_device_init_hfxo_config.h index 624b74671..93c31ad9d 100644 --- a/components/board/silabs/config/brd4180a/sl_device_init_hfxo_config.h +++ b/components/board/silabs/config/brd4180a/sl_device_init_hfxo_config.h @@ -1,23 +1,23 @@ -#ifndef SL_DEVICE_INIT_HFXO_CONFIG_H -#define SL_DEVICE_INIT_HFXO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Mode -// -// Crystal oscillator -// External sine wave -// Default: cmuHfxoOscMode_Crystal -#define SL_DEVICE_INIT_HFXO_MODE cmuHfxoOscMode_Crystal - -// Frequency <38000000-40000000> -// Default: 38400000 -#define SL_DEVICE_INIT_HFXO_FREQ 38400000 - -// CTUNE <0-255> -// Default: 140 -#define SL_DEVICE_INIT_HFXO_CTUNE 129 - -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_HFXO_CONFIG_H +#ifndef SL_DEVICE_INIT_HFXO_CONFIG_H +#define SL_DEVICE_INIT_HFXO_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Mode +// +// Crystal oscillator +// External sine wave +// Default: cmuHfxoOscMode_Crystal +#define SL_DEVICE_INIT_HFXO_MODE cmuHfxoOscMode_Crystal + +// Frequency <38000000-40000000> +// Default: 38400000 +#define SL_DEVICE_INIT_HFXO_FREQ 38400000 + +// CTUNE <0-255> +// Default: 140 +#define SL_DEVICE_INIT_HFXO_CTUNE 129 + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_HFXO_CONFIG_H diff --git a/components/board/silabs/config/brd4180a/sl_device_init_lfxo_config.h b/components/board/silabs/config/brd4180a/sl_device_init_lfxo_config.h index c956f5f8d..5d52874f7 100644 --- a/components/board/silabs/config/brd4180a/sl_device_init_lfxo_config.h +++ b/components/board/silabs/config/brd4180a/sl_device_init_lfxo_config.h @@ -1,36 +1,36 @@ -#ifndef SL_DEVICE_INIT_LFXO_CONFIG_H -#define SL_DEVICE_INIT_LFXO_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// Mode -// -// Crystal oscillator -// AC-coupled buffer -// External digital clock -// Default: cmuLfxoOscMode_Crystal -#define SL_DEVICE_INIT_LFXO_MODE cmuLfxoOscMode_Crystal - -// CTUNE <0-127> -// Default: 63 -#define SL_DEVICE_INIT_LFXO_CTUNE 79 - -// LFXO precision in PPM <0-65535> -// Default: 500 -#define SL_DEVICE_INIT_LFXO_PRECISION 100 - -// Startup Timeout Delay -// -// 2 cycles -// 256 cycles -// 1K cycles -// 2K cycles -// 4K cycles -// 8K cycles -// 16K cycles -// 32K cycles -// Default: cmuLfxoStartupDelay_4KCycles -#define SL_DEVICE_INIT_LFXO_TIMEOUT cmuLfxoStartupDelay_4KCycles -// <<< end of configuration section >>> - -#endif // SL_DEVICE_INIT_LFXO_CONFIG_H +#ifndef SL_DEVICE_INIT_LFXO_CONFIG_H +#define SL_DEVICE_INIT_LFXO_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Mode +// +// Crystal oscillator +// AC-coupled buffer +// External digital clock +// Default: cmuLfxoOscMode_Crystal +#define SL_DEVICE_INIT_LFXO_MODE cmuLfxoOscMode_Crystal + +// CTUNE <0-127> +// Default: 63 +#define SL_DEVICE_INIT_LFXO_CTUNE 79 + +// LFXO precision in PPM <0-65535> +// Default: 500 +#define SL_DEVICE_INIT_LFXO_PRECISION 100 + +// Startup Timeout Delay +// +// 2 cycles +// 256 cycles +// 1K cycles +// 2K cycles +// 4K cycles +// 8K cycles +// 16K cycles +// 32K cycles +// Default: cmuLfxoStartupDelay_4KCycles +#define SL_DEVICE_INIT_LFXO_TIMEOUT cmuLfxoStartupDelay_4KCycles +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_LFXO_CONFIG_H diff --git a/components/board/silabs/config/brd4180a/sl_hfxo_manager_config.h b/components/board/silabs/config/brd4180a/sl_hfxo_manager_config.h index 5a096cbee..c5c306226 100644 --- a/components/board/silabs/config/brd4180a/sl_hfxo_manager_config.h +++ b/components/board/silabs/config/brd4180a/sl_hfxo_manager_config.h @@ -1,56 +1,56 @@ -/***************************************************************************/ /** - * @file - * @brief HFXO Manager configuration file. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef SL_HFXO_MANAGER_CONFIG_H -#define SL_HFXO_MANAGER_CONFIG_H - -// Power Manager Configuration - -// Enable custom IRQ handler for crystal HF oscillator. -// Enable if HFXO0_IRQHandler is needed from your application. -// The HFXO IRQ priority must not be changed as the HFXO Manager module needs it to be high priority -// and to stay enabled through atomic sections. -// The function sl_hfxo_manager_irq_handler() will have to be called from you custom handler if this is enabled. -// Default: 0 -#define SL_HFXO_MANAGER_CUSTOM_HFXO_IRQ_HANDLER 0 - -// Enable support for Sleepy Crystals. -// If Enabled and if HFXO fails to startup due to a sleepy crystal, HFXO Manager will retry the startup with more aggressive settings -// before falling back to the configured settings. -// Default: 1 -#define SL_HFXO_MANAGER_SLEEPY_CRYSTAL_SUPPORT 1 - -// - -#endif /* SL_HFXO_MANAGER_CONFIG_H */ - -// <<< end of configuration section >>> +/***************************************************************************/ /** + * @file + * @brief HFXO Manager configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_HFXO_MANAGER_CONFIG_H +#define SL_HFXO_MANAGER_CONFIG_H + +// Power Manager Configuration + +// Enable custom IRQ handler for crystal HF oscillator. +// Enable if HFXO0_IRQHandler is needed from your application. +// The HFXO IRQ priority must not be changed as the HFXO Manager module needs it to be high priority +// and to stay enabled through atomic sections. +// The function sl_hfxo_manager_irq_handler() will have to be called from you custom handler if this is enabled. +// Default: 0 +#define SL_HFXO_MANAGER_CUSTOM_HFXO_IRQ_HANDLER 0 + +// Enable support for Sleepy Crystals. +// If Enabled and if HFXO fails to startup due to a sleepy crystal, HFXO Manager will retry the startup with more aggressive settings +// before falling back to the configured settings. +// Default: 1 +#define SL_HFXO_MANAGER_SLEEPY_CRYSTAL_SUPPORT 1 + +// + +#endif /* SL_HFXO_MANAGER_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/components/board/silabs/config/brd4180a/sl_power_manager_config.h b/components/board/silabs/config/brd4180a/sl_power_manager_config.h index 9cb72faaf..d1d9ec6a8 100644 --- a/components/board/silabs/config/brd4180a/sl_power_manager_config.h +++ b/components/board/silabs/config/brd4180a/sl_power_manager_config.h @@ -1,70 +1,70 @@ -/***************************************************************************/ /** - * @file - * @brief Power Manager configuration file. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef SL_POWER_MANAGER_CONFIG_H -#define SL_POWER_MANAGER_CONFIG_H - -// Power Manager Configuration - -// Enable custom IRQ handler for external HF oscillator. -// Enable if CMU_IRQHandler/HFXO0_IRQHandler is needed from your application. -// The function sl_power_manager_irq_handler() will have to be called from you custom handler if this is enabled. -// Default: 0 -#define SL_POWER_MANAGER_CUSTOM_HF_OSCILLATOR_IRQ_HANDLER 0 - -// Lowest Energy mode allowed -// <2=> EM2 -// <3=> EM3 -// Default: 2 -#define SL_POWER_MANAGER_LOWEST_EM_ALLOWED 2 - -// Enable fast wakeup (disable voltage scaling in EM2/3 mode) -// Enable or disable voltage scaling in EM2/3 modes (when available). This decreases wakeup time by about 30 us. -// Deprecated. It is replaced by the function sl_power_manager_em23_voltage_scaling_enable_fast_wakeup() -// Default: 0 -#define SL_POWER_MANAGER_CONFIG_VOLTAGE_SCALING_FAST_WAKEUP 0 - -// Enable debugging feature -// Enable or disable debugging features (trace the different modules that have requirements). -// Default: 0 -#define SL_POWER_MANAGER_DEBUG 0 - -// Maximum numbers of requirements that can be logged -// Default: 10 -#define SL_POWER_MANAGER_DEBUG_POOL_SIZE 10 -// - -// - -#endif /* SL_POWER_MANAGER_CONFIG_H */ - -// <<< end of configuration section >>> +/***************************************************************************/ /** + * @file + * @brief Power Manager configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_POWER_MANAGER_CONFIG_H +#define SL_POWER_MANAGER_CONFIG_H + +// Power Manager Configuration + +// Enable custom IRQ handler for external HF oscillator. +// Enable if CMU_IRQHandler/HFXO0_IRQHandler is needed from your application. +// The function sl_power_manager_irq_handler() will have to be called from you custom handler if this is enabled. +// Default: 0 +#define SL_POWER_MANAGER_CUSTOM_HF_OSCILLATOR_IRQ_HANDLER 0 + +// Lowest Energy mode allowed +// <2=> EM2 +// <3=> EM3 +// Default: 2 +#define SL_POWER_MANAGER_LOWEST_EM_ALLOWED 2 + +// Enable fast wakeup (disable voltage scaling in EM2/3 mode) +// Enable or disable voltage scaling in EM2/3 modes (when available). This decreases wakeup time by about 30 us. +// Deprecated. It is replaced by the function sl_power_manager_em23_voltage_scaling_enable_fast_wakeup() +// Default: 0 +#define SL_POWER_MANAGER_CONFIG_VOLTAGE_SCALING_FAST_WAKEUP 0 + +// Enable debugging feature +// Enable or disable debugging features (trace the different modules that have requirements). +// Default: 0 +#define SL_POWER_MANAGER_DEBUG 0 + +// Maximum numbers of requirements that can be logged +// Default: 10 +#define SL_POWER_MANAGER_DEBUG_POOL_SIZE 10 +// + +// + +#endif /* SL_POWER_MANAGER_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/components/board/silabs/config/brd4180a/sl_sleeptimer_config.h b/components/board/silabs/config/brd4180a/sl_sleeptimer_config.h index 6b0ef21c7..603424e29 100644 --- a/components/board/silabs/config/brd4180a/sl_sleeptimer_config.h +++ b/components/board/silabs/config/brd4180a/sl_sleeptimer_config.h @@ -1,72 +1,72 @@ -/***************************************************************************/ /** - * @file - * @brief Sleep Timer configuration file. - ******************************************************************************* - * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -// <<< Use Configuration Wizard in Context Menu >>> - -#ifndef SL_SLEEPTIMER_CONFIG_H -#define SL_SLEEPTIMER_CONFIG_H - -#define SL_SLEEPTIMER_PERIPHERAL_DEFAULT 0 -#define SL_SLEEPTIMER_PERIPHERAL_RTCC 1 -#define SL_SLEEPTIMER_PERIPHERAL_PRORTC 2 -#define SL_SLEEPTIMER_PERIPHERAL_RTC 3 -#define SL_SLEEPTIMER_PERIPHERAL_SYSRTC 4 -#define SL_SLEEPTIMER_PERIPHERAL_BURTC 5 - -// Timer Peripheral Used by Sleeptimer -// Default (auto select) -// RTCC -// Radio internal RTC (PRORTC) -// RTC -// SYSRTC -// Back-Up RTC (BURTC) -// Selection of the Timer Peripheral Used by the Sleeptimer -#define SL_SLEEPTIMER_PERIPHERAL SL_SLEEPTIMER_PERIPHERAL_DEFAULT - -// Enable wallclock functionality -// Enable or disable wallclock functionalities (get_time, get_date, etc). -// Default: 0 -#define SL_SLEEPTIMER_WALLCLOCK_CONFIG 0 - -// Timer frequency divider -// Default: 1 -#define SL_SLEEPTIMER_FREQ_DIVIDER 1 - -// If Radio internal RTC (PRORTC) HAL is used, determines if it owns the IRQ handler. Enable, if no wireless stack is used. -// Default: 0 -#define SL_SLEEPTIMER_PRORTC_HAL_OWNS_IRQ_HANDLER 0 - -// Enable DEBUGRUN functionality on hardware RTC. -// Default: 0 -#define SL_SLEEPTIMER_DEBUGRUN 0 - -#endif /* SLEEPTIMER_CONFIG_H */ - -// <<< end of configuration section >>> +/***************************************************************************/ /** + * @file + * @brief Sleep Timer configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_SLEEPTIMER_CONFIG_H +#define SL_SLEEPTIMER_CONFIG_H + +#define SL_SLEEPTIMER_PERIPHERAL_DEFAULT 0 +#define SL_SLEEPTIMER_PERIPHERAL_RTCC 1 +#define SL_SLEEPTIMER_PERIPHERAL_PRORTC 2 +#define SL_SLEEPTIMER_PERIPHERAL_RTC 3 +#define SL_SLEEPTIMER_PERIPHERAL_SYSRTC 4 +#define SL_SLEEPTIMER_PERIPHERAL_BURTC 5 + +// Timer Peripheral Used by Sleeptimer +// Default (auto select) +// RTCC +// Radio internal RTC (PRORTC) +// RTC +// SYSRTC +// Back-Up RTC (BURTC) +// Selection of the Timer Peripheral Used by the Sleeptimer +#define SL_SLEEPTIMER_PERIPHERAL SL_SLEEPTIMER_PERIPHERAL_DEFAULT + +// Enable wallclock functionality +// Enable or disable wallclock functionalities (get_time, get_date, etc). +// Default: 0 +#define SL_SLEEPTIMER_WALLCLOCK_CONFIG 0 + +// Timer frequency divider +// Default: 1 +#define SL_SLEEPTIMER_FREQ_DIVIDER 1 + +// If Radio internal RTC (PRORTC) HAL is used, determines if it owns the IRQ handler. Enable, if no wireless stack is used. +// Default: 0 +#define SL_SLEEPTIMER_PRORTC_HAL_OWNS_IRQ_HANDLER 0 + +// Enable DEBUGRUN functionality on hardware RTC. +// Default: 0 +#define SL_SLEEPTIMER_DEBUGRUN 0 + +#endif /* SLEEPTIMER_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/components/board/silabs/config/brd4180b/FreeRTOSConfig.h b/components/board/silabs/config/brd4180b/FreeRTOSConfig.h index a24d2961c..42c87889f 100644 --- a/components/board/silabs/config/brd4180b/FreeRTOSConfig.h +++ b/components/board/silabs/config/brd4180b/FreeRTOSConfig.h @@ -84,7 +84,7 @@ // Timer task priority <0-56> // Timer task priority. // Default: 40 (High) -#define configTIMER_TASK_PRIORITY 40 +#define configTIMER_TASK_PRIORITY 55 // Timer queue length <0-1024> // Timer command queue length. diff --git a/components/board/silabs/config/brd4186c/FreeRTOSConfig.h b/components/board/silabs/config/brd4186c/FreeRTOSConfig.h index a24d2961c..42c87889f 100644 --- a/components/board/silabs/config/brd4186c/FreeRTOSConfig.h +++ b/components/board/silabs/config/brd4186c/FreeRTOSConfig.h @@ -84,7 +84,7 @@ // Timer task priority <0-56> // Timer task priority. // Default: 40 (High) -#define configTIMER_TASK_PRIORITY 40 +#define configTIMER_TASK_PRIORITY 55 // Timer queue length <0-1024> // Timer command queue length. diff --git a/components/board/silabs/config/brd4271a/FreeRTOSConfig.h b/components/board/silabs/config/brd4271a/FreeRTOSConfig.h new file mode 100644 index 000000000..9f6f7e819 --- /dev/null +++ b/components/board/silabs/config/brd4271a/FreeRTOSConfig.h @@ -0,0 +1,271 @@ +/* -------------------------------------------------------------------------- + * Copyright (c) 2013-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * $Revision: V10.2.0 + * + * Project: CMSIS-FreeRTOS + * Title: FreeRTOS configuration definitions + * + * --------------------------------------------------------------------------*/ + +#ifndef FREERTOS_CONFIG_H +#define FREERTOS_CONFIG_H + +/*----------------------------------------------------------- +* Application specific definitions. +* +* These definitions should be adjusted for your particular hardware and +* application requirements. +* +* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE +* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. +* +* See http://www.freertos.org/a00110.html +*----------------------------------------------------------*/ + +#if !defined(__IAR_SYSTEMS_ASM__) +#if (defined(__ARMCC_VERSION) || defined(__GNUC__) || defined(__ICCARM__)) +#include + +//#include "RTE_Components.h" +//#include CMSIS_device_header +#endif + +#include "em_assert.h" +#include "em_device.h" + +#if defined(SL_COMPONENT_CATALOG_PRESENT) +#include "sl_component_catalog.h" +#endif +#endif + +#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) +#include "SEGGER_SYSVIEW_FreeRTOS.h" +#endif + +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- + +// Minimal stack size [words] <0-65535> +// Stack for idle task and default task stack in words. +// Default: 160 +#define configMINIMAL_STACK_SIZE 160 + +// Total heap size [bytes] <0-0xFFFFFFFF> +// Heap memory size in bytes. +// Default: 8192 +#define configTOTAL_HEAP_SIZE 8192 + +// Kernel tick frequency [Hz] <0-0xFFFFFFFF> +// Kernel tick rate in Hz. +// Default: 1000 +#define configTICK_RATE_HZ 1000 + +// Timer task stack depth [words] <0-65535> +// Stack for timer task in words. +// Default: 160 +#define configTIMER_TASK_STACK_DEPTH 160 + +// Timer task priority <0-56> +// Timer task priority. +// Default: 40 (High) +#define configTIMER_TASK_PRIORITY 55 + +// Timer queue length <0-1024> +// Timer command queue length. +// Default: 10 +#define configTIMER_QUEUE_LENGTH 10 + +// Preemption interrupt priority +// Maximum priority of interrupts that are safe to call FreeRTOS API. +// Default: 48 +#define configMAX_SYSCALL_INTERRUPT_PRIORITY 48 + +// Use time slicing +// Enable setting to use timeslicing. +// Default: 1 +#define configUSE_TIME_SLICING 1 + +// Idle should yield +// Control Yield behaviour of the idle task. +// Default: 1 +#define configIDLE_SHOULD_YIELD 1 + +// Check for stack overflow +// <0=>Disable <1=>Method one <2=>Method two +// Enable or disable stack overflow checking. +// Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled. +// Default: 2 +#define configCHECK_FOR_STACK_OVERFLOW 2 + +// Use idle hook +// Enable callback function call on each idle task iteration. +// Callback function vApplicationIdleHook implementation is required when idle hook is enabled. +// Default: 0 +#define configUSE_IDLE_HOOK 0 + +// Use tick hook +// Enable callback function call during each tick interrupt. +// Callback function vApplicationTickHook implementation is required when tick hook is enabled. +// Default: 0 +#define configUSE_TICK_HOOK 0 + +// Use deamon task startup hook +// Enable callback function call when timer service starts. +// Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled. +// Default: 0 +#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 + +// Use malloc failed hook +// Enable callback function call when out of dynamic memory. +// Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled. +// Default: 0 +#define configUSE_MALLOC_FAILED_HOOK 0 + +// Queue registry size +// Define maximum number of queue objects registered for debug purposes. +// The queue registry is used by kernel aware debuggers to locate queue and semaphore structures and display associated text names. +// Default: 10 +#define configQUEUE_REGISTRY_SIZE 10 + +// Port Specific Features +// Enable and configure port specific features. +// Check FreeRTOS documentation for definitions that apply for the used port. + +// Use Floating Point Unit +// Using Floating Point Unit (FPU) affects context handling. +// Enable FPU when application uses floating point operations. +// Default: 1 +#define configENABLE_FPU 1 + +// Use Memory Protection Unit +// Using Memory Protection Unit (MPU) requires detailed memory map definition. +// This setting is only releavant for MPU enabled ports. +// Default: 0 +#define configENABLE_MPU 0 + +// Minimal secure stack size [words] <0-65535> +// Stack for idle task Secure side context in words. +// This setting is only relevant when TrustZone extension is enabled. +// Default: 128 +#define configMINIMAL_SECURE_STACK_SIZE 128 +// + +// Thread Local Storage Settings +// Thread local storage pointers +// Thread local storage (or TLS) allows the application writer to store +// values inside a task's control block, making the value specific to +// (local to) the task itself. +// Default: 0 +#define configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS 0 +// + +// Use Threadsafe Errno +// Enable Threadsafe Errno support. +// Default: 0 +#define configUSE_POSIX_ERRNO 0 + +//------------- <<< end of configuration section >>> --------------------------- + +/* Defines needed by FreeRTOS to implement CMSIS RTOS2 API. Do not change! */ +#define configCPU_CLOCK_HZ (SystemCoreClock) +#define configSUPPORT_STATIC_ALLOCATION 1 +#define configSUPPORT_DYNAMIC_ALLOCATION 1 +#define configUSE_PREEMPTION 1 +#define configUSE_TIMERS 1 +#define configUSE_MUTEXES 1 +#define configUSE_RECURSIVE_MUTEXES 1 +#define configUSE_COUNTING_SEMAPHORES 1 +#define configUSE_TASK_NOTIFICATIONS 1 +#define configUSE_TRACE_FACILITY 1 +#define configUSE_16_BIT_TICKS 0 +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 +#define configMAX_PRIORITIES 56 +#define configKERNEL_INTERRUPT_PRIORITY 255 + +/* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */ +#define INCLUDE_xEventGroupSetBitsFromISR 1 +#define INCLUDE_xSemaphoreGetMutexHolder 1 +#define INCLUDE_vTaskDelay 1 +#define INCLUDE_vTaskDelayUntil 1 +#define INCLUDE_vTaskDelete 1 +#define INCLUDE_xTaskGetCurrentTaskHandle 1 +#define INCLUDE_xTaskGetSchedulerState 1 +#define INCLUDE_uxTaskGetStackHighWaterMark 1 +#define INCLUDE_uxTaskPriorityGet 1 +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_eTaskGetState 1 +#define INCLUDE_vTaskSuspend 1 +#define INCLUDE_xTimerPendFunctionCall 1 + +/* Map the FreeRTOS port interrupt handlers to their CMSIS standard names. */ +#define xPortPendSVHandler PendSV_Handler +#define vPortSVCHandler SVC_Handler + +/* Ensure Cortex-M port compatibility. */ +#define SysTick_Handler xPortSysTickHandler + +/* Implement FreeRTOS configASSERT as emlib assert. */ +#define configASSERT(x) EFM_ASSERT(x) + +/* Energy saving modes. */ +#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) +#define configUSE_TICKLESS_IDLE 1 +#else +#define configUSE_TICKLESS_IDLE 0 +#endif + +/* Definition used by Keil to replace default system clock source. */ +#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 + +/* Maximum size of task name. */ +#define configMAX_TASK_NAME_LEN 10 + +/* Use queue sets? */ +#define configUSE_QUEUE_SETS 0 + +/* Generate run-time statistics? */ +#define configGENERATE_RUN_TIME_STATS 0 + +/* Co-routine related definitions. */ +#define configUSE_CO_ROUTINES 0 +#define configMAX_CO_ROUTINE_PRIORITIES 1 + +/* Optional resume from ISR functionality. */ +#define INCLUDE_xResumeFromISR 1 + +/* FreeRTOS Secure Side Only and TrustZone Security Extension */ +#define configRUN_FREERTOS_SECURE_ONLY 1 +#define configENABLE_TRUSTZONE 0 + +/* Thread local storage pointers used by the SDK */ +#ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS +#define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 1 +#endif + +/* PRINT_STRING implementation. iostream_retarget_stdio or third party + printf should be added if this is used */ +#define configPRINT_STRING(X) printf(X) + +#define configNUM_THREAD_LOCAL_STORAGE_POINTERS \ + (configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS + configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS) + +//#if defined(SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT) +//#include "SEGGER_SYSVIEW_FreeRTOS.h" +//#endif +#endif /* FREERTOS_CONFIG_H */ diff --git a/components/board/silabs/config/brd4271a/sl_board_configuration.h b/components/board/silabs/config/brd4271a/sl_board_configuration.h new file mode 100644 index 000000000..7a2978c50 --- /dev/null +++ b/components/board/silabs/config/brd4271a/sl_board_configuration.h @@ -0,0 +1,62 @@ +#pragma once + +#ifdef SL_UART +#include "sl_device_registers.h" +#include "sl_uart.h" + +#define DEFAULT_UART USART0 + +#define SL_UART_VCOM_PORT SL_GPIO_PORT_D +#define SL_UART_VCOM_PIN 4 +static const sl_gpio_t vcom_enable_pin = { SL_UART_VCOM_PORT, SL_UART_VCOM_PIN }; + +#define DEFAULT_UART_PIN_CONFIG &default_uart_pin_configuration + +// XXX: HACK to get things working +#define UART_CLOCK cmuClock_USART0 +#define UART_RX_IRQ USART0_RX_IRQn + +/* Note: This creates a static instance for each C file that includes this header and references the variable */ +static const sl_uart_pin_configuration_t default_uart_pin_configuration = { + .tx_port = SL_GPIO_PORT_A, + .tx_pin = 8, + .rx_port = SL_GPIO_PORT_A, + .rx_pin = 9, + .cts_port = SL_GPIO_PORT_A, + .cts_pin = 4, + .rts_port = SL_GPIO_PORT_C, + .rts_pin = 1, + .uart_number = 0, + //.route_loc = USART_ROUTELOC0_RXLOC_LOC4 | USART_ROUTELOC0_TXLOC_LOC4, +}; +#endif + +typedef struct { + unsigned char port; + unsigned char pin; +} sl_pin_t; + +#define PIN(port_id, pin_id) \ + (sl_pin_t) \ + { \ + .port = gpioPort##port_id, .pin = pin_id \ + } + +#define SLEEP_CONFIRM_PIN \ + PIN(B, 3) // For FG25, connect Pin No: 16 from Expansion header to Pin No: 9 on SiWx 917 NCP Adapter board. +#define WAKE_INDICATOR_PIN PIN(A, 5) +#define RESET_PIN PIN(A, 6) +#define INTERRUPT_PIN PIN(A, 7) + +#define SPI_CLOCK_PIN PIN(C, 2) +#define SPI_MOSI_PIN PIN(C, 0) +#define SPI_MISO_PIN PIN(C, 1) +#define SPI_CS_PIN PIN(B, 4) + +#define SPI_EUSART EUSART1 +#define SPI_EUSART_CMU_CLOCK cmuClock_EUSART1 +#define SPI_EUSART_LDMA_TX ldmaPeripheralSignal_EUSART1_TXFL +#define SPI_EUSART_LDMA_RX ldmaPeripheralSignal_EUSART1_RXFL +#define SPI_EUSART_ROUTE_INDEX 1 + +#define PACKET_PENDING_INT_PRI 3 diff --git a/components/board/silabs/config/brd4271a/sl_board_control_config.h b/components/board/silabs/config/brd4271a/sl_board_control_config.h new file mode 100644 index 000000000..96f762b48 --- /dev/null +++ b/components/board/silabs/config/brd4271a/sl_board_control_config.h @@ -0,0 +1,32 @@ +#ifndef SL_BOARD_CONTROL_CONFIG_H +#define SL_BOARD_CONTROL_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Enable Virtual COM UART +// Default: 0 +#define SL_BOARD_ENABLE_VCOM 1 + +// Enable Display +// Default: 0 +#define SL_BOARD_ENABLE_DISPLAY 0 + +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> + +// SL_BOARD_ENABLE_VCOM +// $[GPIO_SL_BOARD_ENABLE_VCOM] +#define SL_BOARD_ENABLE_VCOM_PORT gpioPortD +#define SL_BOARD_ENABLE_VCOM_PIN 4 +// [GPIO_SL_BOARD_ENABLE_VCOM]$ + +// SL_BOARD_ENABLE_DISPLAY +// $[GPIO_SL_BOARD_ENABLE_DISPLAY] +#define SL_BOARD_ENABLE_DISPLAY_PORT gpioPortD +#define SL_BOARD_ENABLE_DISPLAY_PIN 4 +// [GPIO_SL_BOARD_ENABLE_DISPLAY]$ + +// <<< sl:end pin_tool >>> + +#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/components/board/silabs/config/brd4271a/sl_device_init_emu_config.h b/components/board/silabs/config/brd4271a/sl_device_init_emu_config.h new file mode 100644 index 000000000..88ca8942e --- /dev/null +++ b/components/board/silabs/config/brd4271a/sl_device_init_emu_config.h @@ -0,0 +1,53 @@ +/***************************************************************************/ /** + * @file + * @brief DEVICE_INIT_EMU Config + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_DEVICE_INIT_EMU_CONFIG_H +#define SL_DEVICE_INIT_EMU_CONFIG_H + +#include "em_emu.h" + +// <<< Use Configuration Wizard in Context Menu >>> + +// Allow debugger to remain connected in EM2 +// Force PD0B to stay on on EM2 entry. This allows the debugger to remain connected in EM2 and EM3. +// Enabling debug connectivity results in an increased power consumption in EM2/EM3. +// Default: 1 +#define SL_DEVICE_INIT_EMU_EM2_DEBUG_ENABLE 1 + +// EM4 pin retention mode +// No Retention: Pads enter reset state when entering EM4. +// Retention through EM4: Pads enter reset state when exiting EM4. +// Retention through EM4 and wakeup. +// Default: emuPinRetentionDisable +#define SL_DEVICE_INIT_EMU_EM4_PIN_RETENTION_MODE emuPinRetentionDisable + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_EMU_CONFIG_H diff --git a/components/board/silabs/config/brd4271a/sl_device_init_hfrco_config.h b/components/board/silabs/config/brd4271a/sl_device_init_hfrco_config.h new file mode 100644 index 000000000..2ccdcb1f9 --- /dev/null +++ b/components/board/silabs/config/brd4271a/sl_device_init_hfrco_config.h @@ -0,0 +1,27 @@ +#ifndef SL_DEVICE_INIT_HFRCO_CONFIG_H +#define SL_DEVICE_INIT_HFRCO_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Frequency Band +// RC Oscillator Frequency Band +// 1 MHz +// 2 MHz +// 4 MHz +// 7 MHz +// 13 MHz +// 16 MHz +// 19 MHz +// 26 MHz +// 32 MHz +// 38 MHz +// 48 MHz +// 56 MHz +// 64 MHz +// 80 MHz +// Default: cmuHFRCODPLLFreq_80M0Hz +#define SL_DEVICE_INIT_HFRCO_BAND cmuHFRCODPLLFreq_80M0Hz + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_HFRCO_CONFIG_H diff --git a/components/board/silabs/config/brd4271a/sl_device_init_hfxo_config.h b/components/board/silabs/config/brd4271a/sl_device_init_hfxo_config.h new file mode 100644 index 000000000..93c31ad9d --- /dev/null +++ b/components/board/silabs/config/brd4271a/sl_device_init_hfxo_config.h @@ -0,0 +1,23 @@ +#ifndef SL_DEVICE_INIT_HFXO_CONFIG_H +#define SL_DEVICE_INIT_HFXO_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Mode +// +// Crystal oscillator +// External sine wave +// Default: cmuHfxoOscMode_Crystal +#define SL_DEVICE_INIT_HFXO_MODE cmuHfxoOscMode_Crystal + +// Frequency <38000000-40000000> +// Default: 38400000 +#define SL_DEVICE_INIT_HFXO_FREQ 38400000 + +// CTUNE <0-255> +// Default: 140 +#define SL_DEVICE_INIT_HFXO_CTUNE 129 + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_HFXO_CONFIG_H diff --git a/components/board/silabs/config/brd4271a/sl_device_init_lfxo_config.h b/components/board/silabs/config/brd4271a/sl_device_init_lfxo_config.h new file mode 100644 index 000000000..5d52874f7 --- /dev/null +++ b/components/board/silabs/config/brd4271a/sl_device_init_lfxo_config.h @@ -0,0 +1,36 @@ +#ifndef SL_DEVICE_INIT_LFXO_CONFIG_H +#define SL_DEVICE_INIT_LFXO_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Mode +// +// Crystal oscillator +// AC-coupled buffer +// External digital clock +// Default: cmuLfxoOscMode_Crystal +#define SL_DEVICE_INIT_LFXO_MODE cmuLfxoOscMode_Crystal + +// CTUNE <0-127> +// Default: 63 +#define SL_DEVICE_INIT_LFXO_CTUNE 79 + +// LFXO precision in PPM <0-65535> +// Default: 500 +#define SL_DEVICE_INIT_LFXO_PRECISION 100 + +// Startup Timeout Delay +// +// 2 cycles +// 256 cycles +// 1K cycles +// 2K cycles +// 4K cycles +// 8K cycles +// 16K cycles +// 32K cycles +// Default: cmuLfxoStartupDelay_4KCycles +#define SL_DEVICE_INIT_LFXO_TIMEOUT cmuLfxoStartupDelay_4KCycles +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_LFXO_CONFIG_H diff --git a/components/board/silabs/config/brd4271a/sl_hfxo_manager_config.h b/components/board/silabs/config/brd4271a/sl_hfxo_manager_config.h new file mode 100644 index 000000000..c5c306226 --- /dev/null +++ b/components/board/silabs/config/brd4271a/sl_hfxo_manager_config.h @@ -0,0 +1,56 @@ +/***************************************************************************/ /** + * @file + * @brief HFXO Manager configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_HFXO_MANAGER_CONFIG_H +#define SL_HFXO_MANAGER_CONFIG_H + +// Power Manager Configuration + +// Enable custom IRQ handler for crystal HF oscillator. +// Enable if HFXO0_IRQHandler is needed from your application. +// The HFXO IRQ priority must not be changed as the HFXO Manager module needs it to be high priority +// and to stay enabled through atomic sections. +// The function sl_hfxo_manager_irq_handler() will have to be called from you custom handler if this is enabled. +// Default: 0 +#define SL_HFXO_MANAGER_CUSTOM_HFXO_IRQ_HANDLER 0 + +// Enable support for Sleepy Crystals. +// If Enabled and if HFXO fails to startup due to a sleepy crystal, HFXO Manager will retry the startup with more aggressive settings +// before falling back to the configured settings. +// Default: 1 +#define SL_HFXO_MANAGER_SLEEPY_CRYSTAL_SUPPORT 1 + +// + +#endif /* SL_HFXO_MANAGER_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/components/board/silabs/config/brd4271a/sl_power_manager_config.h b/components/board/silabs/config/brd4271a/sl_power_manager_config.h new file mode 100644 index 000000000..d1d9ec6a8 --- /dev/null +++ b/components/board/silabs/config/brd4271a/sl_power_manager_config.h @@ -0,0 +1,70 @@ +/***************************************************************************/ /** + * @file + * @brief Power Manager configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_POWER_MANAGER_CONFIG_H +#define SL_POWER_MANAGER_CONFIG_H + +// Power Manager Configuration + +// Enable custom IRQ handler for external HF oscillator. +// Enable if CMU_IRQHandler/HFXO0_IRQHandler is needed from your application. +// The function sl_power_manager_irq_handler() will have to be called from you custom handler if this is enabled. +// Default: 0 +#define SL_POWER_MANAGER_CUSTOM_HF_OSCILLATOR_IRQ_HANDLER 0 + +// Lowest Energy mode allowed +// <2=> EM2 +// <3=> EM3 +// Default: 2 +#define SL_POWER_MANAGER_LOWEST_EM_ALLOWED 2 + +// Enable fast wakeup (disable voltage scaling in EM2/3 mode) +// Enable or disable voltage scaling in EM2/3 modes (when available). This decreases wakeup time by about 30 us. +// Deprecated. It is replaced by the function sl_power_manager_em23_voltage_scaling_enable_fast_wakeup() +// Default: 0 +#define SL_POWER_MANAGER_CONFIG_VOLTAGE_SCALING_FAST_WAKEUP 0 + +// Enable debugging feature +// Enable or disable debugging features (trace the different modules that have requirements). +// Default: 0 +#define SL_POWER_MANAGER_DEBUG 0 + +// Maximum numbers of requirements that can be logged +// Default: 10 +#define SL_POWER_MANAGER_DEBUG_POOL_SIZE 10 +// + +// + +#endif /* SL_POWER_MANAGER_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/components/board/silabs/config/brd4271a/sl_sleeptimer_config.h b/components/board/silabs/config/brd4271a/sl_sleeptimer_config.h new file mode 100644 index 000000000..603424e29 --- /dev/null +++ b/components/board/silabs/config/brd4271a/sl_sleeptimer_config.h @@ -0,0 +1,72 @@ +/***************************************************************************/ /** + * @file + * @brief Sleep Timer configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_SLEEPTIMER_CONFIG_H +#define SL_SLEEPTIMER_CONFIG_H + +#define SL_SLEEPTIMER_PERIPHERAL_DEFAULT 0 +#define SL_SLEEPTIMER_PERIPHERAL_RTCC 1 +#define SL_SLEEPTIMER_PERIPHERAL_PRORTC 2 +#define SL_SLEEPTIMER_PERIPHERAL_RTC 3 +#define SL_SLEEPTIMER_PERIPHERAL_SYSRTC 4 +#define SL_SLEEPTIMER_PERIPHERAL_BURTC 5 + +// Timer Peripheral Used by Sleeptimer +// Default (auto select) +// RTCC +// Radio internal RTC (PRORTC) +// RTC +// SYSRTC +// Back-Up RTC (BURTC) +// Selection of the Timer Peripheral Used by the Sleeptimer +#define SL_SLEEPTIMER_PERIPHERAL SL_SLEEPTIMER_PERIPHERAL_DEFAULT + +// Enable wallclock functionality +// Enable or disable wallclock functionalities (get_time, get_date, etc). +// Default: 0 +#define SL_SLEEPTIMER_WALLCLOCK_CONFIG 0 + +// Timer frequency divider +// Default: 1 +#define SL_SLEEPTIMER_FREQ_DIVIDER 1 + +// If Radio internal RTC (PRORTC) HAL is used, determines if it owns the IRQ handler. Enable, if no wireless stack is used. +// Default: 0 +#define SL_SLEEPTIMER_PRORTC_HAL_OWNS_IRQ_HANDLER 0 + +// Enable DEBUGRUN functionality on hardware RTC. +// Default: 0 +#define SL_SLEEPTIMER_DEBUGRUN 0 + +#endif /* SLEEPTIMER_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/components/board/silabs/config/brd4325a/RTE_Device_917.h b/components/board/silabs/config/brd4325a/RTE_Device_917.h index c16dc3061..303f15116 100644 --- a/components/board/silabs/config/brd4325a/RTE_Device_917.h +++ b/components/board/silabs/config/brd4325a/RTE_Device_917.h @@ -62,7 +62,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -356,7 +356,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -571,7 +571,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4325a/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4325a/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4325a/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4325a/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4325a/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4325a/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/RTE_Device_917.h b/components/board/silabs/config/brd4325b/RTE_Device_917.h index 4aa19942e..09dcf0111 100644 --- a/components/board/silabs/config/brd4325b/RTE_Device_917.h +++ b/components/board/silabs/config/brd4325b/RTE_Device_917.h @@ -62,7 +62,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -338,7 +338,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -508,7 +508,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4325b/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4325b/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4325b/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4325b/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4325b/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4325b/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/RTE_Device_917.h b/components/board/silabs/config/brd4325c/RTE_Device_917.h index b14cec4cd..870514008 100644 --- a/components/board/silabs/config/brd4325c/RTE_Device_917.h +++ b/components/board/silabs/config/brd4325c/RTE_Device_917.h @@ -62,7 +62,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -338,7 +338,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -508,7 +508,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4325c/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4325c/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4325c/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4325c/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4325c/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index ead5bb590..000000000 --- a/components/board/silabs/config/brd4325c/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 2 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_LED0_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_LED0_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_LED0_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_LED0_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_LED0_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_LED0_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_LED0_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/RTE_Device_917.h b/components/board/silabs/config/brd4325e/RTE_Device_917.h index 2a0382f11..510c737ed 100644 --- a/components/board/silabs/config/brd4325e/RTE_Device_917.h +++ b/components/board/silabs/config/brd4325e/RTE_Device_917.h @@ -38,7 +38,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -316,7 +316,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -488,7 +488,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4325e/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4325e/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4325e/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4325e/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4325e/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 3504e049e..000000000 --- a/components/board/silabs/config/brd4325e/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 2 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_LED0_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_LED0_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_LED0_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_LED0_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_LED0_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_LED0_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_LED0_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/RTE_Device_917.h b/components/board/silabs/config/brd4325f/RTE_Device_917.h index 273b03a9e..a13ccf3f6 100644 --- a/components/board/silabs/config/brd4325f/RTE_Device_917.h +++ b/components/board/silabs/config/brd4325f/RTE_Device_917.h @@ -64,7 +64,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -340,7 +340,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -510,7 +510,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4325f/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4325f/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4325f/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4325f/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4325f/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 3504e049e..000000000 --- a/components/board/silabs/config/brd4325f/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 2 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_LED0_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_LED0_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_LED0_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_LED0_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_LED0_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_LED0_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_LED0_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/RTE_Device_917.h b/components/board/silabs/config/brd4325g/RTE_Device_917.h index 5b4c180d1..c4a1995de 100644 --- a/components/board/silabs/config/brd4325g/RTE_Device_917.h +++ b/components/board/silabs/config/brd4325g/RTE_Device_917.h @@ -62,7 +62,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -338,7 +338,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -508,7 +508,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4325g/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4325g/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4325g/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4325g/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4325g/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 3504e049e..000000000 --- a/components/board/silabs/config/brd4325g/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 2 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_LED0_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_LED0_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_LED0_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_LED0_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_LED0_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_LED0_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_LED0_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4338a/RTE_Device_917.h b/components/board/silabs/config/brd4338a/RTE_Device_917.h index 9ac357172..b327b7e5d 100644 --- a/components/board/silabs/config/brd4338a/RTE_Device_917.h +++ b/components/board/silabs/config/brd4338a/RTE_Device_917.h @@ -65,7 +65,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -530,7 +530,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -822,7 +822,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 @@ -967,8 +967,8 @@ #else //Pintool data #define RTE_SSI_MASTER_MISO 1 -#define RTE_SSI_MASTER_MISO_PORT SSI_MASTER_MISO_PT_PORT -#define RTE_SSI_MASTER_MISO_PIN SSI_MASTER_MISO_PT_PIN +#define RTE_SSI_MASTER_MISO_PORT SSI_MASTER_MISO__PORT +#define RTE_SSI_MASTER_MISO_PIN SSI_MASTER_MISO__PIN #define RTE_SSI_MASTER_MISO_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_MISO_LOC == 0) #define RTE_SSI_MASTER_MISO_PADSEL 7 @@ -1010,8 +1010,8 @@ #else //Pintool data #define RTE_SSI_MASTER_MOSI 1 -#define RTE_SSI_MASTER_MOSI_PORT SSI_MASTER_MOSI_PT_PORT -#define RTE_SSI_MASTER_MOSI_PIN SSI_MASTER_MOSI_PT_PIN +#define RTE_SSI_MASTER_MOSI_PORT SSI_MASTER_MOSI__PORT +#define RTE_SSI_MASTER_MOSI_PIN SSI_MASTER_MOSI__PIN #define RTE_SSI_MASTER_MOSI_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_MOSI_LOC == 0) #define RTE_SSI_MASTER_MOSI_PADSEL 6 @@ -1053,8 +1053,8 @@ #else //Pintool data #define RTE_SSI_MASTER_SCK 1 -#define RTE_SSI_MASTER_SCK_PORT SSI_MASTER_SCK_PT_PORT -#define RTE_SSI_MASTER_SCK_PIN SSI_MASTER_SCK_PT_PIN +#define RTE_SSI_MASTER_SCK_PORT SSI_MASTER_SCK__PORT +#define RTE_SSI_MASTER_SCK_PIN SSI_MASTER_SCK__PIN #define RTE_SSI_MASTER_SCK_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_SCK_LOC == 0) #define RTE_SSI_MASTER_SCK_PADSEL 3 @@ -1101,8 +1101,8 @@ #else //Pintool data #define RTE_SSI_MASTER_CS0 M4_SSI_CS0 -#define RTE_SSI_MASTER_CS0_PORT SSI_MASTER_CS0_PT_PORT -#define RTE_SSI_MASTER_CS0_PIN SSI_MASTER_CS0_PT_PIN +#define RTE_SSI_MASTER_CS0_PORT SSI_MASTER_CS0__PORT +#define RTE_SSI_MASTER_CS0_PIN SSI_MASTER_CS0__PIN #define RTE_SSI_MASTER_CS0_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_CS0_LOC == 0) #define RTE_SSI_MASTER_CS0_PADSEL 4 @@ -1126,8 +1126,8 @@ #error "Invalid SSI_MASTER_CS1 Pin Configuration!" #endif #else -#define RTE_SSI_MASTER_CS1_PORT SSI_MASTER_CS1_PT_PORT -#define RTE_SSI_MASTER_CS1_PIN SSI_MASTER_CS1_PT_PIN +#define RTE_SSI_MASTER_CS1_PORT SSI_MASTER_CS1__PORT +#define RTE_SSI_MASTER_CS1_PIN SSI_MASTER_CS1__PIN #endif #define RTE_SSI_MASTER_CS1 M4_SSI_CS1 #define RTE_SSI_MASTER_CS1_MODE EGPIO_PIN_MUX_MODE3 @@ -1154,8 +1154,8 @@ #else //Pintool data #define RTE_SSI_MASTER_CS2 M4_SSI_CS2 -#define RTE_SSI_MASTER_CS2_PORT SSI_MASTER_CS2_PT_PORT -#define RTE_SSI_MASTER_CS2_PIN SSI_MASTER_CS2_PT_PIN +#define RTE_SSI_MASTER_CS2_PORT SSI_MASTER_CS2__PORT +#define RTE_SSI_MASTER_CS2_PIN SSI_MASTER_CS2__PIN #define RTE_SSI_MASTER_CS2_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_CS2_LOC == 0) #define RTE_SSI_MASTER_CS2_PADSEL 8 @@ -1176,8 +1176,8 @@ #error "Invalid SSI_MASTER_CS3 Pin Configuration!" #endif #else -#define RTE_SSI_MASTER_CS3_PORT SSI_MASTER_CS3_PT_PORT -#define RTE_SSI_MASTER_CS3_PIN SSI_MASTER_CS3_PT_PIN +#define RTE_SSI_MASTER_CS3_PORT SSI_MASTER_CS3__PORT +#define RTE_SSI_MASTER_CS3_PIN SSI_MASTER_CS3__PIN #endif #define RTE_SSI_MASTER_CS3 M4_SSI_CS3 #define RTE_SSI_MASTER_CS3_MODE EGPIO_PIN_MUX_MODE3 @@ -1238,8 +1238,8 @@ #else //Pintool data #define RTE_SSI_SLAVE_MISO 1 -#define RTE_SSI_SLAVE_MISO_PORT SSI_SLAVE_MISO_PT_PORT -#define RTE_SSI_SLAVE_MISO_PIN SSI_SLAVE_MISO_PT_PIN +#define RTE_SSI_SLAVE_MISO_PORT SSI_SLAVE_MISO__PORT +#define RTE_SSI_SLAVE_MISO_PIN SSI_SLAVE_MISO__PIN #define RTE_SSI_SLAVE_MISO_MODE EGPIO_PIN_MUX_MODE8 #if (SSI_SLAVE_MISO_LOC == 1) #define RTE_SSI_SLAVE_MISO_PADSEL 6 @@ -1296,8 +1296,8 @@ #else //Pintool data #define RTE_SSI_SLAVE_MOSI 1 -#define RTE_SSI_SLAVE_MOSI_PORT SSI_SLAVE_MOSI_PT_PORT -#define RTE_SSI_SLAVE_MOSI_PIN SSI_SLAVE_MOSI_PT_PIN +#define RTE_SSI_SLAVE_MOSI_PORT SSI_SLAVE_MOSI__PORT +#define RTE_SSI_SLAVE_MOSI_PIN SSI_SLAVE_MOSI__PIN #define RTE_SSI_SLAVE_MOSI_MODE EGPIO_PIN_MUX_MODE8 #if (SSI_SLAVE_MOSI_LOC == 1) #define RTE_SSI_SLAVE_MOSI_PADSEL 5 @@ -1350,8 +1350,8 @@ #else //Pintool data #define RTE_SSI_SLAVE_SCK 1 -#define RTE_SSI_SLAVE_SCK_PORT SSI_SLAVE_SCK_PT_PORT -#define RTE_SSI_SLAVE_SCK_PIN SSI_SLAVE_SCK_PT_PIN +#define RTE_SSI_SLAVE_SCK_PORT SSI_SLAVE_SCK__PORT +#define RTE_SSI_SLAVE_SCK_PIN SSI_SLAVE_SCK__PIN #define RTE_SSI_SLAVE_SCK_MODE EGPIO_PIN_MUX_MODE8 #if (SSI_SLAVE_SCK_LOC == 1) #define RTE_SSI_SLAVE_SCK_PADSEL 3 @@ -1369,7 +1369,7 @@ #endif // SSI_SLAVE_CS Pin <0=>Not Used <1=>GPIO_9 <2=>GPIO_25 <3=>GPIO_46 <4=>GPIO_53 -#ifndef SSI_SLAVE_CS_LOC +#ifndef SSI_SLAVE_CS0_LOC #define RTE_SSI_SLAVE_CS_PORT_ID 1 #if (RTE_SSI_SLAVE_CS_PORT_ID == 0) @@ -1404,19 +1404,19 @@ #else //Pintool data #define RTE_SSI_SLAVE_CS 1 -#define RTE_SSI_SLAVE_CS_PORT SSI_SLAVE_CS_PT_PORT -#define RTE_SSI_SLAVE_CS_PIN SSI_SLAVE_CS_PT_PIN +#define RTE_SSI_SLAVE_CS_PORT SSI_SLAVE_CS0__PORT +#define RTE_SSI_SLAVE_CS_PIN SSI_SLAVE_CS0__PIN #define RTE_SSI_SLAVE_CS_MODE EGPIO_PIN_MUX_MODE8 -#if (SSI_SLAVE_CS_LOC == 1) +#if (SSI_SLAVE_CS0_LOC == 1) #define RTE_SSI_SLAVE_CS_PADSEL 4 #endif -#if (SSI_SLAVE_CS_LOC == 2) +#if (SSI_SLAVE_CS0_LOC == 2) #define RTE_SSI_SLAVE_CS_PADSEL 0 //no pad #endif -#if (SSI_SLAVE_CS_LOC == 3) +#if (SSI_SLAVE_CS0_LOC == 3) #define RTE_SSI_SLAVE_CS_PADSEL 10 #endif -#if (SSI_SLAVE_CS_LOC == 4) +#if (SSI_SLAVE_CS0_LOC == 4) #define RTE_SSI_SLAVE_CS_PADSEL 17 #endif //Pintool data @@ -1468,8 +1468,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_MISO 1 -#define RTE_SSI_ULP_MASTER_MISO_PORT SSI_ULP_MASTER_MISO_PT_PORT -#define RTE_SSI_ULP_MASTER_MISO_PIN SSI_ULP_MASTER_MISO_PT_PIN +#define RTE_SSI_ULP_MASTER_MISO_PORT SSI_ULP_MASTER_MISO__PORT +#define RTE_SSI_ULP_MASTER_MISO_PIN SSI_ULP_MASTER_MISO__PIN #define RTE_SSI_ULP_MASTER_MISO_MODE 1 //Pintool data #endif @@ -1493,8 +1493,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_MOSI 1 -#define RTE_SSI_ULP_MASTER_MOSI_PORT SSI_ULP_MASTER_MOSI_PT_PORT -#define RTE_SSI_ULP_MASTER_MOSI_PIN SSI_ULP_MASTER_MOSI_PT_PIN +#define RTE_SSI_ULP_MASTER_MOSI_PORT SSI_ULP_MASTER_MOSI__PORT +#define RTE_SSI_ULP_MASTER_MOSI_PIN SSI_ULP_MASTER_MOSI__PIN #define RTE_SSI_ULP_MASTER_MOSI_MODE 1 //Pintool data #endif @@ -1524,8 +1524,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_SCK 1 -#define RTE_SSI_ULP_MASTER_SCK_PORT SSI_ULP_MASTER_SCK_PT_PORT -#define RTE_SSI_ULP_MASTER_SCK_PIN SSI_ULP_MASTER_SCK_PT_PIN +#define RTE_SSI_ULP_MASTER_SCK_PORT SSI_ULP_MASTER_SCK__PORT +#define RTE_SSI_ULP_MASTER_SCK_PIN SSI_ULP_MASTER_SCK__PIN #define RTE_SSI_ULP_MASTER_SCK_MODE 1 //Pintool data #endif @@ -1549,8 +1549,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_CS0 ULP_SSI_CS0 -#define RTE_SSI_ULP_MASTER_CS0_PORT SSI_ULP_MASTER_CS0_PT_PORT -#define RTE_SSI_ULP_MASTER_CS0_PIN SSI_ULP_MASTER_CS0_PT_PIN +#define RTE_SSI_ULP_MASTER_CS0_PORT SSI_ULP_MASTER_CS0__PORT +#define RTE_SSI_ULP_MASTER_CS0_PIN SSI_ULP_MASTER_CS0__PIN #define RTE_SSI_ULP_MASTER_CS0_MODE 1 //Pintool data #endif @@ -1560,8 +1560,8 @@ #define RTE_SSI_ULP_MASTER_CS1_PORT 0 #define RTE_SSI_ULP_MASTER_CS1_PIN 4 #else -#define RTE_SSI_ULP_MASTER_CS1_PORT SSI_ULP_MASTER_CS1_PT_PORT -#define RTE_SSI_ULP_MASTER_CS1_PIN SSI_ULP_MASTER_CS1_PT_PIN +#define RTE_SSI_ULP_MASTER_CS1_PORT SSI_ULP_MASTER_CS1__PORT +#define RTE_SSI_ULP_MASTER_CS1_PIN SSI_ULP_MASTER_CS1__PIN #endif #define RTE_SSI_ULP_MASTER_CS1 ULP_SSI_CS1 #define RTE_SSI_ULP_MASTER_CS1_MODE 1 @@ -1571,8 +1571,8 @@ #define RTE_SSI_ULP_MASTER_CS2_PORT 0 #define RTE_SSI_ULP_MASTER_CS2_PIN 6 #else -#define RTE_SSI_ULP_MASTER_CS2_PORT SSI_ULP_MASTER_CS2_PT_PORT -#define RTE_SSI_ULP_MASTER_CS2_PIN SSI_ULP_MASTER_CS2_PT_PIN +#define RTE_SSI_ULP_MASTER_CS2_PORT SSI_ULP_MASTER_CS2__PORT +#define RTE_SSI_ULP_MASTER_CS2_PIN SSI_ULP_MASTER_CS2__PIN #endif #define RTE_SSI_ULP_MASTER_CS2 ULP_SSI_CS2 #define RTE_SSI_ULP_MASTER_CS2_MODE 1 @@ -2587,7 +2587,7 @@ // GSPI_MASTER_CLK <0=>P0_8 <1=>P0_25 <2=>P0_46 <3=>P0_52 // CLK of GSPI0 -#ifndef GSPI_MASTER_CLK_LOC +#ifndef GSPI_MASTER_SCK_LOC #define RTE_GSPI_MASTER_CLK_PORT_ID 1 #if (RTE_GSPI_MASTER_CLK_PORT_ID == 0) @@ -2615,19 +2615,19 @@ #endif #else //Pintool data -#define RTE_GSPI_MASTER_CLK_PORT GSPI_MASTER_CLK_PORT -#define RTE_GSPI_MASTER_CLK_PIN GSPI_MASTER_CLK_PIN +#define RTE_GSPI_MASTER_CLK_PORT GSPI_MASTER_SCK__PORT +#define RTE_GSPI_MASTER_CLK_PIN GSPI_MASTER_SCK__PIN #define RTE_GSPI_MASTER_CLK_MUX 4 -#if (GSPI_MASTER_CLK_LOC == 0) +#if (GSPI_MASTER_SCK_LOC == 0) #define RTE_GSPI_MASTER_CLK_PAD 3 #endif -#if (GSPI_MASTER_CLK_LOC == 1) +#if (GSPI_MASTER_SCK_LOC == 1) #define RTE_GSPI_MASTER_CLK_PAD 0 #endif -#if (GSPI_MASTER_CLK_LOC == 2) +#if (GSPI_MASTER_SCK_LOC == 2) #define RTE_GSPI_MASTER_CLK_PAD 10 #endif -#if (GSPI_MASTER_CLK_LOC == 3) +#if (GSPI_MASTER_SCK_LOC == 3) #define RTE_GSPI_MASTER_CLK_PAD 16 #endif //Pintool data @@ -2670,8 +2670,8 @@ #else //Pintool data #define RTE_GSPI_MASTER_CS0 1 -#define RTE_GSPI_MASTER_CS0_PORT GSPI_MASTER_CS0_PORT -#define RTE_GSPI_MASTER_CS0_PIN GSPI_MASTER_CS0_PIN +#define RTE_GSPI_MASTER_CS0_PORT GSPI_MASTER_CS0__PORT +#define RTE_GSPI_MASTER_CS0_PIN GSPI_MASTER_CS0__PIN #define RTE_GSPI_MASTER_CS0_MUX 4 #if (GSPI_MASTER_CS0_LOC == 0) #define RTE_GSPI_MASTER_CS0_PAD 4 @@ -2724,8 +2724,8 @@ #else //Pintool data #define RTE_GSPI_MASTER_CS1 1 -#define RTE_GSPI_MASTER_CS1_PORT GSPI_MASTER_CS1_PORT -#define RTE_GSPI_MASTER_CS1_PIN GSPI_MASTER_CS1_PIN +#define RTE_GSPI_MASTER_CS1_PORT GSPI_MASTER_CS1__PORT +#define RTE_GSPI_MASTER_CS1_PIN GSPI_MASTER_CS1__PIN #define RTE_GSPI_MASTER_CS1_MUX 4 #if (GSPI_MASTER_CS1_LOC == 0) #define RTE_GSPI_MASTER_CS1_PAD 5 @@ -2778,8 +2778,8 @@ #else //Pintool data #define RTE_GSPI_MASTER_CS2 1 -#define RTE_GSPI_MASTER_CS2_PORT GSPI_MASTER_CS2_PORT -#define RTE_GSPI_MASTER_CS2_PIN GSPI_MASTER_CS2_PIN +#define RTE_GSPI_MASTER_CS2_PORT GSPI_MASTER_CS2__PORT +#define RTE_GSPI_MASTER_CS2_PIN GSPI_MASTER_CS2__PIN #define RTE_GSPI_MASTER_CS2_MUX 4 #if (GSPI_MASTER_CS2_LOC == 0) #define RTE_GSPI_MASTER_CS2_PAD 8 @@ -2834,8 +2834,8 @@ #endif #else //Pintool data -#define RTE_GSPI_MASTER_MOSI_PORT GSPI_MASTER_MOSI_PORT -#define RTE_GSPI_MASTER_MOSI_PIN GSPI_MASTER_MOSI_PIN +#define RTE_GSPI_MASTER_MOSI_PORT GSPI_MASTER_MOSI__PORT +#define RTE_GSPI_MASTER_MOSI_PIN GSPI_MASTER_MOSI__PIN #define RTE_GSPI_MASTER_MOSI_MUX 4 #if (GSPI_MASTER_MOSI_LOC == 0) #define RTE_GSPI_MASTER_MOSI_PAD 1 @@ -2882,8 +2882,8 @@ #endif #else //Pintool data -#define RTE_GSPI_MASTER_MISO_PORT GSPI_MASTER_MISO_PORT -#define RTE_GSPI_MASTER_MISO_PIN GSPI_MASTER_MISO_PIN +#define RTE_GSPI_MASTER_MISO_PORT GSPI_MASTER_MISO__PORT +#define RTE_GSPI_MASTER_MISO_PIN GSPI_MASTER_MISO__PIN #define RTE_GSPI_MASTER_MISO_MUX 4 #if (GSPI_MASTER_MISO_LOC == 0) #define RTE_GSPI_MASTER_MISO_PAD 6 @@ -3119,154 +3119,6 @@ #define RTE_SCT_OUT_1_MUX 9 #define RTE_SCT_OUT_1_PAD 0 //no pad -/// SCT_OUT_2 <0=>GPIO_70 <1=>GPIO_8 -#ifndef SCT_OUT2_LOC -#define RTE_SCT_OUT_2_PORT_ID 0 -#if ((RTE_SCT_OUT_2_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_2_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_2_PORT_ID == 0) -#define RTE_SCT_OUT_2_PORT 0 -#define RTE_SCT_OUT_2_PIN 70 -#elif (RTE_SCT_OUT_2_PORT_ID == 1) -#define RTE_SCT_OUT_2_PORT 0 -#define RTE_SCT_OUT_2_PIN 8 -#define RTE_SCT_OUT_2_MUX 12 -#define RTE_SCT_OUT_2_PAD 3 -#else -#error "Invalid RTE_SCT_OUT_2_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_2_PORT SCT_OUT2_PORT -#define RTE_SCT_OUT_2_PIN (SCT_OUT2_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_2_MUX 7 -#define RTE_SCT_OUT_2_PAD 28 - -/**/ -//SCT_OUT_3 <0=>GPIO_71 <1=>GPIO_9 -#ifndef SCT_OUT3_LOC -#define RTE_SCT_OUT_3_PORT_ID 0 -#if ((RTE_SCT_OUT_3_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_3_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_3_PORT_ID == 0) -#define RTE_SCT_OUT_3_PORT 0 -#define RTE_SCT_OUT_3_PIN 71 -#elif (RTE_SCT_OUT_3_PORT_ID == 1) -#define RTE_SCT_OUT_3_PORT 0 -#define RTE_SCT_OUT_3_PIN 9 -#define RTE_SCT_OUT_3_MUX 12 -#define RTE_SCT_OUT_3_PAD 4 -#else -#error "Invalid RTE_SCT_OUT_3_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_3_PORT SCT_OUT3_PORT -#define RTE_SCT_OUT_3_PIN (SCT_OUT3_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_3_MUX 7 -#define RTE_SCT_OUT_3_PAD 29 - -//SCT_OUT_4 <0=>GPIO_72 <1=>GPIO_68 -#ifndef SCT_OUT4_LOC -#define RTE_SCT_OUT_4_PORT_ID 0 -#if ((RTE_SCT_OUT_4_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_4_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_4_PORT_ID == 0) -/**/ -#define RTE_SCT_OUT_4_PORT 0 -#define RTE_SCT_OUT_4_PIN 72 -#else -#error "Invalid RTE_SCT_OUT_4_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_4_PORT SCT_OUT4_PORT -#define RTE_SCT_OUT_4_PIN (SCT_OUT4_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_4_MUX 7 -#define RTE_SCT_OUT_4_PAD 30 - -//SCT_OUT_5 <0=>GPIO_73 <1=>GPIO_69 -#ifndef SCT_OUT5_LOC -#define RTE_SCT_OUT_5_PORT_ID 0 -#if ((RTE_SCT_OUT_5_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_5_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_5_PORT_ID == 0) -#define RTE_SCT_OUT_5_PORT 2 -#define RTE_SCT_OUT_5_PIN 73 -#else -#error "Invalid RTE_SCT_OUT_5_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_5_PORT SCT_OUT5_PORT -#define RTE_SCT_OUT_5_PIN (SCT_OUT5_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_5_MUX 7 -#define RTE_SCT_OUT_5_PAD 31 - -//SCT_OUT_6 <0=>GPIO_74 <1=>GPIO_70 -#ifndef SCT_OUT6_LOC -#define RTE_SCT_OUT_6_PORT_ID 0 -#if ((RTE_SCT_OUT_6_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_6_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_6_PORT_ID == 0) -#define RTE_SCT_OUT_6_PORT 0 -#define RTE_SCT_OUT_6_PIN 74 -#define RTE_SCT_OUT_6_MUX 7 -#define RTE_SCT_OUT_6_PAD 32 -#elif (RTE_SCT_OUT_6_PORT_ID == 1) -#define RTE_SCT_OUT_6_PORT 0 -#define RTE_SCT_OUT_6_PIN 70 -#define RTE_SCT_OUT_6_MUX 13 -#define RTE_SCT_OUT_6_PAD 28 -#else -#error "Invalid RTE_SCT_OUT_6_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_6_PORT SCT_OUT6_PORT -#define RTE_SCT_OUT_6_PIN (SCT_OUT6_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_6_MUX 7 -#define RTE_SCT_OUT_6_PAD 32 - -// SCT_OUT_7 <0=>GPIO_75 <1=>GPIO_71 -#ifndef SCT_OUT7_LOC -#define RTE_SCT_OUT_7_PORT_ID 0 - -#if (RTE_SCT_OUT_7_PORT_ID == 0) -#define RTE_SCT_OUT_7_PORT 0 -#define RTE_SCT_OUT_7_PIN 75 -#else -#error "Invalid RTE_SCT_OUT_7_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_7_PORT SCT_OUT7_PORT -#define RTE_SCT_OUT_7_PIN (SCT_OUT7_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_7_MUX 7 -#define RTE_SCT_OUT_7_PAD 33 - // SIO // //<> Serial Input Output //SIO_0 <0=>GPIO_6 <1=>GPIO_25 <2=>GPIO_64 <3=>GPIO_72 @@ -3293,18 +3145,18 @@ #endif #else //Pintool data -#define RTE_SIO_0_PORT SIO_0_PORT +#define RTE_SIO_0_PORT SIO_SIO0_PORT #define RTE_SIO_0_MUX 1 #if (SIO_0_LOC == 0) -#define RTE_SIO_0_PIN SIO_0_PIN +#define RTE_SIO_0_PIN SIO_SIO0_PIN #define RTE_SIO_0_PAD 1 #endif #if (SIO_0_LOC == 1) -#define RTE_SIO_0_PIN SIO_0_PIN +#define RTE_SIO_0_PIN SIO_SIO0_PIN #define RTE_SIO_0_PAD 0 #endif #if (SIO_0_LOC == 2) -#define RTE_SIO_0_PIN (SIO_0_PIN + GPIO_MAX_PIN) +#define RTE_SIO_0_PIN (SIO_SIO0_PIN + GPIO_MAX_PIN) #define RTE_SIO_0_PAD 30 #endif //Pintool data @@ -3343,22 +3195,22 @@ #endif #else //Pintool data -#define RTE_SIO_1_PORT SIO_1_PORT +#define RTE_SIO_1_PORT SIO_SIO1_PORT #define RTE_SIO_1_MUX 1 #if (SIO_1_LOC == 0) -#define RTE_SIO_1_PIN SIO_1_PIN +#define RTE_SIO_1_PIN SIO_SIO1_PIN #define RTE_SIO_1_PAD 2 #endif #if (SIO_1_LOC == 1) -#define RTE_SIO_1_PIN SIO_1_PIN +#define RTE_SIO_1_PIN SIO_SIO1_PIN #define RTE_SIO_1_PAD 0 #endif #if (SIO_1_LOC == 2) -#define RTE_SIO_1_PIN (SIO_1_PIN + GPIO_MAX_PIN) +#define RTE_SIO_1_PIN (SIO_SIO1_PIN + GPIO_MAX_PIN) #define RTE_SIO_1_PAD 23 #endif #if (SIO_1_LOC == 3) -#define RTE_SIO_1_PIN (SIO_1_PIN + GPIO_MAX_PIN) +#define RTE_SIO_1_PIN (SIO_SIO1_PIN + GPIO_MAX_PIN) #define RTE_SIO_1_PAD 31 #endif //Pintool data @@ -3393,22 +3245,22 @@ #endif #else //Pintool data -#define RTE_SIO_2_PORT SIO_2_PORT +#define RTE_SIO_2_PORT SIO_SIO2_PORT #define RTE_SIO_2_MUX 1 #if (SIO_2_LOC == 0) -#define RTE_SIO_2_PIN SIO_2_PIN +#define RTE_SIO_2_PIN SIO_SIO2_PIN #define RTE_SIO_2_PAD 3 #endif #if (SIO_2_LOC == 1) -#define RTE_SIO_2_PIN SIO_2_PIN +#define RTE_SIO_2_PIN SIO_SIO2_PIN #define RTE_SIO_2_PAD 0 #endif #if (SIO_2_LOC == 2) -#define RTE_SIO_2_PIN (SIO_2_PIN + GPIO_MAX_PIN) +#define RTE_SIO_2_PIN (SIO_SIO2_PIN + GPIO_MAX_PIN) #define RTE_SIO_2_PAD 24 #endif #if (SIO_2_LOC == 3) -#define RTE_SIO_2_PIN (SIO_2_PIN + GPIO_MAX_PIN) +#define RTE_SIO_2_PIN (SIO_SIO2_PIN + GPIO_MAX_PIN) #define RTE_SIO_2_PAD 32 #endif //Pintool data @@ -3443,22 +3295,22 @@ #endif #else //Pintool data -#define RTE_SIO_3_PORT SIO_3_PORT +#define RTE_SIO_3_PORT SIO_SIO3_PORT #define RTE_SIO_3_MUX 1 #if (SIO_3_LOC == 0) -#define RTE_SIO_3_PIN SIO_3_PIN +#define RTE_SIO_3_PIN SIO_SIO3_PIN #define RTE_SIO_3_PAD 4 #endif #if (SIO_3_LOC == 1) -#define RTE_SIO_3_PIN SIO_3_PIN +#define RTE_SIO_3_PIN SIO_SIO3_PIN #define RTE_SIO_3_PAD 0 #endif #if (SIO_3_LOC == 2) -#define RTE_SIO_3_PIN (SIO_3_PIN + GPIO_MAX_PIN) +#define RTE_SIO_3_PIN (SIO_SIO3_PIN + GPIO_MAX_PIN) #define RTE_SIO_3_PAD 25 #endif #if (SIO_3_LOC == 3) -#define RTE_SIO_3_PIN (SIO_3_PIN + GPIO_MAX_PIN) +#define RTE_SIO_3_PIN (SIO_SIO3_PIN + GPIO_MAX_PIN) #define RTE_SIO_3_PAD 33 #endif //Pintool data @@ -3486,8 +3338,8 @@ #endif #else //Pintool data -#define RTE_SIO_4_PORT SIO_4_PORT -#define RTE_SIO_4_PIN SIO_4_PIN +#define RTE_SIO_4_PORT SIO_SIO4_PORT +#define RTE_SIO_4_PIN SIO_SIO4_PIN #define RTE_SIO_4_MUX 1 #if (SIO_4_LOC == 0) #define RTE_SIO_4_PAD 5 @@ -3516,8 +3368,8 @@ #endif #else //Pintool data -#define RTE_SIO_5_PORT SIO_5_PORT -#define RTE_SIO_5_PIN SIO_5_PIN +#define RTE_SIO_5_PORT SIO_SIO5_PORT +#define RTE_SIO_5_PIN SIO_SIO5_PIN #define RTE_SIO_5_MUX 1 #if (SIO_5_LOC == 0) #define RTE_SIO_5_PAD 6 @@ -3533,8 +3385,8 @@ #define RTE_SIO_6_PORT 0 #define RTE_SIO_6_PIN 70 #else -#define RTE_SIO_6_PORT SIO_6_PORT -#define RTE_SIO_6_PIN (SIO_6_PIN + GPIO_MAX_PIN) +#define RTE_SIO_6_PORT SIO_SIO6_PORT +#define RTE_SIO_6_PIN (SIO_SIO6_PIN + GPIO_MAX_PIN) #endif #define RTE_SIO_6_MUX 1 #define RTE_SIO_6_PAD 28 @@ -3562,14 +3414,14 @@ #endif #else //Pintool data -#define RTE_SIO_7_PORT SIO_6_PORT +#define RTE_SIO_7_PORT SIO_SIO7_PORT #define RTE_SIO_7_MUX 1 #if (SIO_7_LOC == 0) -#define RTE_SIO_7_PIN SIO_7_PIN +#define RTE_SIO_7_PIN SIO_SIO7_PIN #define RTE_SIO_7_PAD 8 #endif #if (SIO_7_LOC == 1) -#define RTE_SIO_7_PIN (SIO_7_PIN + GPIO_MAX_PIN) +#define RTE_SIO_7_PIN (SIO_SIO7_PIN + GPIO_MAX_PIN) #define RTE_SIO_7_PAD 29 #endif //Pintool data @@ -4864,4 +4716,4 @@ #define RTE_UULP_GPIO_4_MODE 0 #define RTE_UULP_GPIO_5_PIN 5 -#define RTE_UULP_GPIO_5_MODE 0 \ No newline at end of file +#define RTE_UULP_GPIO_5_MODE 0 diff --git a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 0bad473f5..000000000 --- a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 1 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L 66 -#define SL_PWM_LED0_PIN_H 67 - -#define SL_PWM_LED0_PORT_L 0 -#define SL_PWM_LED0_PORT_H 0 - -#define SL_PWM_LED0_MUX_L 8 -#define SL_PWM_LED0_MUX_H 8 - -#define SL_PWM_LED0_PAD_L 24 -#define SL_PWM_LED0_PAD_H 25 - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/RTE_Device_917.h b/components/board/silabs/config/brd4339a/RTE_Device_917.h index f1273d954..5b550e952 100644 --- a/components/board/silabs/config/brd4339a/RTE_Device_917.h +++ b/components/board/silabs/config/brd4339a/RTE_Device_917.h @@ -64,7 +64,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -340,7 +340,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -510,7 +510,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4339a/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4339a/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4339a/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4339a/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4339a/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 0bad473f5..000000000 --- a/components/board/silabs/config/brd4339a/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 1 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L 66 -#define SL_PWM_LED0_PIN_H 67 - -#define SL_PWM_LED0_PORT_L 0 -#define SL_PWM_LED0_PORT_H 0 - -#define SL_PWM_LED0_MUX_L 8 -#define SL_PWM_LED0_MUX_H 8 - -#define SL_PWM_LED0_PAD_L 24 -#define SL_PWM_LED0_PAD_H 25 - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/RTE_Device_917.h b/components/board/silabs/config/brd4339b/RTE_Device_917.h index 9624f8b45..45efc0cab 100644 --- a/components/board/silabs/config/brd4339b/RTE_Device_917.h +++ b/components/board/silabs/config/brd4339b/RTE_Device_917.h @@ -65,7 +65,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -530,7 +530,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -822,7 +822,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 @@ -967,8 +967,8 @@ #else //Pintool data #define RTE_SSI_MASTER_MISO 1 -#define RTE_SSI_MASTER_MISO_PORT SSI_MASTER_MISO_PT_PORT -#define RTE_SSI_MASTER_MISO_PIN SSI_MASTER_MISO_PT_PIN +#define RTE_SSI_MASTER_MISO_PORT SSI_MASTER_MISO__PORT +#define RTE_SSI_MASTER_MISO_PIN SSI_MASTER_MISO__PIN #define RTE_SSI_MASTER_MISO_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_MISO_LOC == 0) #define RTE_SSI_MASTER_MISO_PADSEL 7 @@ -1010,8 +1010,8 @@ #else //Pintool data #define RTE_SSI_MASTER_MOSI 1 -#define RTE_SSI_MASTER_MOSI_PORT SSI_MASTER_MOSI_PT_PORT -#define RTE_SSI_MASTER_MOSI_PIN SSI_MASTER_MOSI_PT_PIN +#define RTE_SSI_MASTER_MOSI_PORT SSI_MASTER_MOSI__PORT +#define RTE_SSI_MASTER_MOSI_PIN SSI_MASTER_MOSI__PIN #define RTE_SSI_MASTER_MOSI_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_MOSI_LOC == 0) #define RTE_SSI_MASTER_MOSI_PADSEL 6 @@ -1053,8 +1053,8 @@ #else //Pintool data #define RTE_SSI_MASTER_SCK 1 -#define RTE_SSI_MASTER_SCK_PORT SSI_MASTER_SCK_PT_PORT -#define RTE_SSI_MASTER_SCK_PIN SSI_MASTER_SCK_PT_PIN +#define RTE_SSI_MASTER_SCK_PORT SSI_MASTER_SCK__PORT +#define RTE_SSI_MASTER_SCK_PIN SSI_MASTER_SCK__PIN #define RTE_SSI_MASTER_SCK_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_SCK_LOC == 0) #define RTE_SSI_MASTER_SCK_PADSEL 3 @@ -1101,8 +1101,8 @@ #else //Pintool data #define RTE_SSI_MASTER_CS0 M4_SSI_CS0 -#define RTE_SSI_MASTER_CS0_PORT SSI_MASTER_CS0_PT_PORT -#define RTE_SSI_MASTER_CS0_PIN SSI_MASTER_CS0_PT_PIN +#define RTE_SSI_MASTER_CS0_PORT SSI_MASTER_CS0__PORT +#define RTE_SSI_MASTER_CS0_PIN SSI_MASTER_CS0__PIN #define RTE_SSI_MASTER_CS0_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_CS0_LOC == 0) #define RTE_SSI_MASTER_CS0_PADSEL 4 @@ -1126,8 +1126,8 @@ #error "Invalid SSI_MASTER_CS1 Pin Configuration!" #endif #else -#define RTE_SSI_MASTER_CS1_PORT SSI_MASTER_CS1_PT_PORT -#define RTE_SSI_MASTER_CS1_PIN SSI_MASTER_CS1_PT_PIN +#define RTE_SSI_MASTER_CS1_PORT SSI_MASTER_CS1__PORT +#define RTE_SSI_MASTER_CS1_PIN SSI_MASTER_CS1__PIN #endif #define RTE_SSI_MASTER_CS1 M4_SSI_CS1 #define RTE_SSI_MASTER_CS1_MODE EGPIO_PIN_MUX_MODE3 @@ -1154,8 +1154,8 @@ #else //Pintool data #define RTE_SSI_MASTER_CS2 M4_SSI_CS2 -#define RTE_SSI_MASTER_CS2_PORT SSI_MASTER_CS2_PT_PORT -#define RTE_SSI_MASTER_CS2_PIN SSI_MASTER_CS2_PT_PIN +#define RTE_SSI_MASTER_CS2_PORT SSI_MASTER_CS2__PORT +#define RTE_SSI_MASTER_CS2_PIN SSI_MASTER_CS2__PIN #define RTE_SSI_MASTER_CS2_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_CS2_LOC == 0) #define RTE_SSI_MASTER_CS2_PADSEL 8 @@ -1176,8 +1176,8 @@ #error "Invalid SSI_MASTER_CS3 Pin Configuration!" #endif #else -#define RTE_SSI_MASTER_CS3_PORT SSI_MASTER_CS3_PT_PORT -#define RTE_SSI_MASTER_CS3_PIN SSI_MASTER_CS3_PT_PIN +#define RTE_SSI_MASTER_CS3_PORT SSI_MASTER_CS3__PORT +#define RTE_SSI_MASTER_CS3_PIN SSI_MASTER_CS3__PIN #endif #define RTE_SSI_MASTER_CS3 M4_SSI_CS3 #define RTE_SSI_MASTER_CS3_MODE EGPIO_PIN_MUX_MODE3 @@ -1238,8 +1238,8 @@ #else //Pintool data #define RTE_SSI_SLAVE_MISO 1 -#define RTE_SSI_SLAVE_MISO_PORT SSI_SLAVE_MISO_PT_PORT -#define RTE_SSI_SLAVE_MISO_PIN SSI_SLAVE_MISO_PT_PIN +#define RTE_SSI_SLAVE_MISO_PORT SSI_SLAVE_MISO__PORT +#define RTE_SSI_SLAVE_MISO_PIN SSI_SLAVE_MISO__PIN #define RTE_SSI_SLAVE_MISO_MODE EGPIO_PIN_MUX_MODE8 #if (SSI_SLAVE_MISO_LOC == 1) #define RTE_SSI_SLAVE_MISO_PADSEL 6 @@ -1296,8 +1296,8 @@ #else //Pintool data #define RTE_SSI_SLAVE_MOSI 1 -#define RTE_SSI_SLAVE_MOSI_PORT SSI_SLAVE_MOSI_PT_PORT -#define RTE_SSI_SLAVE_MOSI_PIN SSI_SLAVE_MOSI_PT_PIN +#define RTE_SSI_SLAVE_MOSI_PORT SSI_SLAVE_MOSI__PORT +#define RTE_SSI_SLAVE_MOSI_PIN SSI_SLAVE_MOSI__PIN #define RTE_SSI_SLAVE_MOSI_MODE EGPIO_PIN_MUX_MODE8 #if (SSI_SLAVE_MOSI_LOC == 1) #define RTE_SSI_SLAVE_MOSI_PADSEL 5 @@ -1350,8 +1350,8 @@ #else //Pintool data #define RTE_SSI_SLAVE_SCK 1 -#define RTE_SSI_SLAVE_SCK_PORT SSI_SLAVE_SCK_PT_PORT -#define RTE_SSI_SLAVE_SCK_PIN SSI_SLAVE_SCK_PT_PIN +#define RTE_SSI_SLAVE_SCK_PORT SSI_SLAVE_SCK__PORT +#define RTE_SSI_SLAVE_SCK_PIN SSI_SLAVE_SCK__PIN #define RTE_SSI_SLAVE_SCK_MODE EGPIO_PIN_MUX_MODE8 #if (SSI_SLAVE_SCK_LOC == 1) #define RTE_SSI_SLAVE_SCK_PADSEL 3 @@ -1369,7 +1369,7 @@ #endif // SSI_SLAVE_CS Pin <0=>Not Used <1=>GPIO_9 <2=>GPIO_25 <3=>GPIO_46 <4=>GPIO_53 -#ifndef SSI_SLAVE_CS_LOC +#ifndef SSI_SLAVE_CS0_LOC #define RTE_SSI_SLAVE_CS_PORT_ID 1 #if (RTE_SSI_SLAVE_CS_PORT_ID == 0) @@ -1404,19 +1404,19 @@ #else //Pintool data #define RTE_SSI_SLAVE_CS 1 -#define RTE_SSI_SLAVE_CS_PORT SSI_SLAVE_CS_PT_PORT -#define RTE_SSI_SLAVE_CS_PIN SSI_SLAVE_CS_PT_PIN +#define RTE_SSI_SLAVE_CS_PORT SSI_SLAVE_CS0__PORT +#define RTE_SSI_SLAVE_CS_PIN SSI_SLAVE_CS0__PIN #define RTE_SSI_SLAVE_CS_MODE EGPIO_PIN_MUX_MODE8 -#if (SSI_SLAVE_CS_LOC == 1) +#if (SSI_SLAVE_CS0_LOC == 1) #define RTE_SSI_SLAVE_CS_PADSEL 4 #endif -#if (SSI_SLAVE_CS_LOC == 2) +#if (SSI_SLAVE_CS0_LOC == 2) #define RTE_SSI_SLAVE_CS_PADSEL 0 //no pad #endif -#if (SSI_SLAVE_CS_LOC == 3) +#if (SSI_SLAVE_CS0_LOC == 3) #define RTE_SSI_SLAVE_CS_PADSEL 10 #endif -#if (SSI_SLAVE_CS_LOC == 4) +#if (SSI_SLAVE_CS0_LOC == 4) #define RTE_SSI_SLAVE_CS_PADSEL 17 #endif //Pintool data @@ -1468,8 +1468,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_MISO 1 -#define RTE_SSI_ULP_MASTER_MISO_PORT SSI_ULP_MASTER_MISO_PT_PORT -#define RTE_SSI_ULP_MASTER_MISO_PIN SSI_ULP_MASTER_MISO_PT_PIN +#define RTE_SSI_ULP_MASTER_MISO_PORT SSI_ULP_MASTER_MISO__PORT +#define RTE_SSI_ULP_MASTER_MISO_PIN SSI_ULP_MASTER_MISO__PIN #define RTE_SSI_ULP_MASTER_MISO_MODE 1 //Pintool data #endif @@ -1493,8 +1493,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_MOSI 1 -#define RTE_SSI_ULP_MASTER_MOSI_PORT SSI_ULP_MASTER_MOSI_PT_PORT -#define RTE_SSI_ULP_MASTER_MOSI_PIN SSI_ULP_MASTER_MOSI_PT_PIN +#define RTE_SSI_ULP_MASTER_MOSI_PORT SSI_ULP_MASTER_MOSI__PORT +#define RTE_SSI_ULP_MASTER_MOSI_PIN SSI_ULP_MASTER_MOSI__PIN #define RTE_SSI_ULP_MASTER_MOSI_MODE 1 //Pintool data #endif @@ -1524,8 +1524,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_SCK 1 -#define RTE_SSI_ULP_MASTER_SCK_PORT SSI_ULP_MASTER_SCK_PT_PORT -#define RTE_SSI_ULP_MASTER_SCK_PIN SSI_ULP_MASTER_SCK_PT_PIN +#define RTE_SSI_ULP_MASTER_SCK_PORT SSI_ULP_MASTER_SCK__PORT +#define RTE_SSI_ULP_MASTER_SCK_PIN SSI_ULP_MASTER_SCK__PIN #define RTE_SSI_ULP_MASTER_SCK_MODE 1 //Pintool data #endif @@ -1549,8 +1549,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_CS0 ULP_SSI_CS0 -#define RTE_SSI_ULP_MASTER_CS0_PORT SSI_ULP_MASTER_CS0_PT_PORT -#define RTE_SSI_ULP_MASTER_CS0_PIN SSI_ULP_MASTER_CS0_PT_PIN +#define RTE_SSI_ULP_MASTER_CS0_PORT SSI_ULP_MASTER_CS0__PORT +#define RTE_SSI_ULP_MASTER_CS0_PIN SSI_ULP_MASTER_CS0__PIN #define RTE_SSI_ULP_MASTER_CS0_MODE 1 //Pintool data #endif @@ -1560,8 +1560,8 @@ #define RTE_SSI_ULP_MASTER_CS1_PORT 0 #define RTE_SSI_ULP_MASTER_CS1_PIN 4 #else -#define RTE_SSI_ULP_MASTER_CS1_PORT SSI_ULP_MASTER_CS1_PT_PORT -#define RTE_SSI_ULP_MASTER_CS1_PIN SSI_ULP_MASTER_CS1_PT_PIN +#define RTE_SSI_ULP_MASTER_CS1_PORT SSI_ULP_MASTER_CS1__PORT +#define RTE_SSI_ULP_MASTER_CS1_PIN SSI_ULP_MASTER_CS1__PIN #endif #define RTE_SSI_ULP_MASTER_CS1 ULP_SSI_CS1 #define RTE_SSI_ULP_MASTER_CS1_MODE 1 @@ -1571,8 +1571,8 @@ #define RTE_SSI_ULP_MASTER_CS2_PORT 0 #define RTE_SSI_ULP_MASTER_CS2_PIN 6 #else -#define RTE_SSI_ULP_MASTER_CS2_PORT SSI_ULP_MASTER_CS2_PT_PORT -#define RTE_SSI_ULP_MASTER_CS2_PIN SSI_ULP_MASTER_CS2_PT_PIN +#define RTE_SSI_ULP_MASTER_CS2_PORT SSI_ULP_MASTER_CS2__PORT +#define RTE_SSI_ULP_MASTER_CS2_PIN SSI_ULP_MASTER_CS2__PIN #endif #define RTE_SSI_ULP_MASTER_CS2 ULP_SSI_CS2 #define RTE_SSI_ULP_MASTER_CS2_MODE 1 @@ -2587,7 +2587,7 @@ // GSPI_MASTER_CLK <0=>P0_8 <1=>P0_25 <2=>P0_46 <3=>P0_52 // CLK of GSPI0 -#ifndef GSPI_MASTER_CLK_LOC +#ifndef GSPI_MASTER_SCK_LOC #define RTE_GSPI_MASTER_CLK_PORT_ID 1 #if (RTE_GSPI_MASTER_CLK_PORT_ID == 0) @@ -2615,19 +2615,19 @@ #endif #else //Pintool data -#define RTE_GSPI_MASTER_CLK_PORT GSPI_MASTER_CLK_PORT -#define RTE_GSPI_MASTER_CLK_PIN GSPI_MASTER_CLK_PIN +#define RTE_GSPI_MASTER_CLK_PORT GSPI_MASTER_SCK__PORT +#define RTE_GSPI_MASTER_CLK_PIN GSPI_MASTER_SCK__PIN #define RTE_GSPI_MASTER_CLK_MUX 4 -#if (GSPI_MASTER_CLK_LOC == 0) +#if (GSPI_MASTER_SCK_LOC == 0) #define RTE_GSPI_MASTER_CLK_PAD 3 #endif -#if (GSPI_MASTER_CLK_LOC == 1) +#if (GSPI_MASTER_SCK_LOC == 1) #define RTE_GSPI_MASTER_CLK_PAD 0 #endif -#if (GSPI_MASTER_CLK_LOC == 2) +#if (GSPI_MASTER_SCK_LOC == 2) #define RTE_GSPI_MASTER_CLK_PAD 10 #endif -#if (GSPI_MASTER_CLK_LOC == 3) +#if (GSPI_MASTER_SCK_LOC == 3) #define RTE_GSPI_MASTER_CLK_PAD 16 #endif //Pintool data @@ -2670,8 +2670,8 @@ #else //Pintool data #define RTE_GSPI_MASTER_CS0 1 -#define RTE_GSPI_MASTER_CS0_PORT GSPI_MASTER_CS0_PORT -#define RTE_GSPI_MASTER_CS0_PIN GSPI_MASTER_CS0_PIN +#define RTE_GSPI_MASTER_CS0_PORT GSPI_MASTER_CS0__PORT +#define RTE_GSPI_MASTER_CS0_PIN GSPI_MASTER_CS0__PIN #define RTE_GSPI_MASTER_CS0_MUX 4 #if (GSPI_MASTER_CS0_LOC == 0) #define RTE_GSPI_MASTER_CS0_PAD 4 @@ -2724,8 +2724,8 @@ #else //Pintool data #define RTE_GSPI_MASTER_CS1 1 -#define RTE_GSPI_MASTER_CS1_PORT GSPI_MASTER_CS1_PORT -#define RTE_GSPI_MASTER_CS1_PIN GSPI_MASTER_CS1_PIN +#define RTE_GSPI_MASTER_CS1_PORT GSPI_MASTER_CS1__PORT +#define RTE_GSPI_MASTER_CS1_PIN GSPI_MASTER_CS1__PIN #define RTE_GSPI_MASTER_CS1_MUX 4 #if (GSPI_MASTER_CS1_LOC == 0) #define RTE_GSPI_MASTER_CS1_PAD 5 @@ -2778,8 +2778,8 @@ #else //Pintool data #define RTE_GSPI_MASTER_CS2 1 -#define RTE_GSPI_MASTER_CS2_PORT GSPI_MASTER_CS2_PORT -#define RTE_GSPI_MASTER_CS2_PIN GSPI_MASTER_CS2_PIN +#define RTE_GSPI_MASTER_CS2_PORT GSPI_MASTER_CS2__PORT +#define RTE_GSPI_MASTER_CS2_PIN GSPI_MASTER_CS2__PIN #define RTE_GSPI_MASTER_CS2_MUX 4 #if (GSPI_MASTER_CS2_LOC == 0) #define RTE_GSPI_MASTER_CS2_PAD 8 @@ -2834,8 +2834,8 @@ #endif #else //Pintool data -#define RTE_GSPI_MASTER_MOSI_PORT GSPI_MASTER_MOSI_PORT -#define RTE_GSPI_MASTER_MOSI_PIN GSPI_MASTER_MOSI_PIN +#define RTE_GSPI_MASTER_MOSI_PORT GSPI_MASTER_MOSI__PORT +#define RTE_GSPI_MASTER_MOSI_PIN GSPI_MASTER_MOSI__PIN #define RTE_GSPI_MASTER_MOSI_MUX 4 #if (GSPI_MASTER_MOSI_LOC == 0) #define RTE_GSPI_MASTER_MOSI_PAD 1 @@ -2882,8 +2882,8 @@ #endif #else //Pintool data -#define RTE_GSPI_MASTER_MISO_PORT GSPI_MASTER_MISO_PORT -#define RTE_GSPI_MASTER_MISO_PIN GSPI_MASTER_MISO_PIN +#define RTE_GSPI_MASTER_MISO_PORT GSPI_MASTER_MISO__PORT +#define RTE_GSPI_MASTER_MISO_PIN GSPI_MASTER_MISO__PIN #define RTE_GSPI_MASTER_MISO_MUX 4 #if (GSPI_MASTER_MISO_LOC == 0) #define RTE_GSPI_MASTER_MISO_PAD 6 @@ -3293,18 +3293,18 @@ #endif #else //Pintool data -#define RTE_SIO_0_PORT SIO_0_PORT +#define RTE_SIO_0_PORT SIO_SIO0_PORT #define RTE_SIO_0_MUX 1 #if (SIO_0_LOC == 0) -#define RTE_SIO_0_PIN SIO_0_PIN +#define RTE_SIO_0_PIN SIO_SIO0_PIN #define RTE_SIO_0_PAD 1 #endif #if (SIO_0_LOC == 1) -#define RTE_SIO_0_PIN SIO_0_PIN +#define RTE_SIO_0_PIN SIO_SIO0_PIN #define RTE_SIO_0_PAD 0 #endif #if (SIO_0_LOC == 2) -#define RTE_SIO_0_PIN (SIO_0_PIN + GPIO_MAX_PIN) +#define RTE_SIO_0_PIN (SIO_SIO0_PIN + GPIO_MAX_PIN) #define RTE_SIO_0_PAD 30 #endif //Pintool data @@ -3343,22 +3343,22 @@ #endif #else //Pintool data -#define RTE_SIO_1_PORT SIO_1_PORT +#define RTE_SIO_1_PORT SIO_SIO1_PORT #define RTE_SIO_1_MUX 1 #if (SIO_1_LOC == 0) -#define RTE_SIO_1_PIN SIO_1_PIN +#define RTE_SIO_1_PIN SIO_SIO1_PIN #define RTE_SIO_1_PAD 2 #endif #if (SIO_1_LOC == 1) -#define RTE_SIO_1_PIN SIO_1_PIN +#define RTE_SIO_1_PIN SIO_SIO1_PIN #define RTE_SIO_1_PAD 0 #endif #if (SIO_1_LOC == 2) -#define RTE_SIO_1_PIN (SIO_1_PIN + GPIO_MAX_PIN) +#define RTE_SIO_1_PIN (SIO_SIO1_PIN + GPIO_MAX_PIN) #define RTE_SIO_1_PAD 23 #endif #if (SIO_1_LOC == 3) -#define RTE_SIO_1_PIN (SIO_1_PIN + GPIO_MAX_PIN) +#define RTE_SIO_1_PIN (SIO_SIO1_PIN + GPIO_MAX_PIN) #define RTE_SIO_1_PAD 31 #endif //Pintool data @@ -3393,22 +3393,22 @@ #endif #else //Pintool data -#define RTE_SIO_2_PORT SIO_2_PORT +#define RTE_SIO_2_PORT SIO_SIO2_PORT #define RTE_SIO_2_MUX 1 #if (SIO_2_LOC == 0) -#define RTE_SIO_2_PIN SIO_2_PIN +#define RTE_SIO_2_PIN SIO_SIO2_PIN #define RTE_SIO_2_PAD 3 #endif #if (SIO_2_LOC == 1) -#define RTE_SIO_2_PIN SIO_2_PIN +#define RTE_SIO_2_PIN SIO_SIO2_PIN #define RTE_SIO_2_PAD 0 #endif #if (SIO_2_LOC == 2) -#define RTE_SIO_2_PIN (SIO_2_PIN + GPIO_MAX_PIN) +#define RTE_SIO_2_PIN (SIO_SIO2_PIN + GPIO_MAX_PIN) #define RTE_SIO_2_PAD 24 #endif #if (SIO_2_LOC == 3) -#define RTE_SIO_2_PIN (SIO_2_PIN + GPIO_MAX_PIN) +#define RTE_SIO_2_PIN (SIO_SIO2_PIN + GPIO_MAX_PIN) #define RTE_SIO_2_PAD 32 #endif //Pintool data @@ -3443,22 +3443,22 @@ #endif #else //Pintool data -#define RTE_SIO_3_PORT SIO_3_PORT +#define RTE_SIO_3_PORT SIO_SIO3_PORT #define RTE_SIO_3_MUX 1 #if (SIO_3_LOC == 0) -#define RTE_SIO_3_PIN SIO_3_PIN +#define RTE_SIO_3_PIN SIO_SIO3_PIN #define RTE_SIO_3_PAD 4 #endif #if (SIO_3_LOC == 1) -#define RTE_SIO_3_PIN SIO_3_PIN +#define RTE_SIO_3_PIN SIO_SIO3_PIN #define RTE_SIO_3_PAD 0 #endif #if (SIO_3_LOC == 2) -#define RTE_SIO_3_PIN (SIO_3_PIN + GPIO_MAX_PIN) +#define RTE_SIO_3_PIN (SIO_SIO3_PIN + GPIO_MAX_PIN) #define RTE_SIO_3_PAD 25 #endif #if (SIO_3_LOC == 3) -#define RTE_SIO_3_PIN (SIO_3_PIN + GPIO_MAX_PIN) +#define RTE_SIO_3_PIN (SIO_SIO3_PIN + GPIO_MAX_PIN) #define RTE_SIO_3_PAD 33 #endif //Pintool data @@ -3486,8 +3486,8 @@ #endif #else //Pintool data -#define RTE_SIO_4_PORT SIO_4_PORT -#define RTE_SIO_4_PIN SIO_4_PIN +#define RTE_SIO_4_PORT SIO_SIO4_PORT +#define RTE_SIO_4_PIN SIO_SIO4_PIN #define RTE_SIO_4_MUX 1 #if (SIO_4_LOC == 0) #define RTE_SIO_4_PAD 5 @@ -3516,8 +3516,8 @@ #endif #else //Pintool data -#define RTE_SIO_5_PORT SIO_5_PORT -#define RTE_SIO_5_PIN SIO_5_PIN +#define RTE_SIO_5_PORT SIO_SIO5_PORT +#define RTE_SIO_5_PIN SIO_SIO5_PIN #define RTE_SIO_5_MUX 1 #if (SIO_5_LOC == 0) #define RTE_SIO_5_PAD 6 @@ -3533,8 +3533,8 @@ #define RTE_SIO_6_PORT 0 #define RTE_SIO_6_PIN 70 #else -#define RTE_SIO_6_PORT SIO_6_PORT -#define RTE_SIO_6_PIN (SIO_6_PIN + GPIO_MAX_PIN) +#define RTE_SIO_6_PORT SIO_SIO6_PORT +#define RTE_SIO_6_PIN (SIO_SIO6_PIN + GPIO_MAX_PIN) #endif #define RTE_SIO_6_MUX 1 #define RTE_SIO_6_PAD 28 @@ -3562,14 +3562,14 @@ #endif #else //Pintool data -#define RTE_SIO_7_PORT SIO_6_PORT +#define RTE_SIO_7_PORT SIO_SIO7_PORT #define RTE_SIO_7_MUX 1 #if (SIO_7_LOC == 0) -#define RTE_SIO_7_PIN SIO_7_PIN +#define RTE_SIO_7_PIN SIO_SIO7_PIN #define RTE_SIO_7_PAD 8 #endif #if (SIO_7_LOC == 1) -#define RTE_SIO_7_PIN (SIO_7_PIN + GPIO_MAX_PIN) +#define RTE_SIO_7_PIN (SIO_SIO7_PIN + GPIO_MAX_PIN) #define RTE_SIO_7_PAD 29 #endif //Pintool data diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4339b/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4339b/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4339b/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4339b/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4339b/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index b3238ce9f..000000000 --- a/components/board/silabs/config/brd4339b/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 2 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_LED0_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_LED0_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_LED0_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_LED0_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_LED0_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_LED0_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_LED0_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/RTE_Device_917.h b/components/board/silabs/config/brd4340a/RTE_Device_917.h index 35d1a9ffe..6a2335d8d 100644 --- a/components/board/silabs/config/brd4340a/RTE_Device_917.h +++ b/components/board/silabs/config/brd4340a/RTE_Device_917.h @@ -64,7 +64,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -340,7 +340,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -512,7 +512,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4340a/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4340a/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4340a/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4340a/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4340a/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 0bad473f5..000000000 --- a/components/board/silabs/config/brd4340a/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 1 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L 66 -#define SL_PWM_LED0_PIN_H 67 - -#define SL_PWM_LED0_PORT_L 0 -#define SL_PWM_LED0_PORT_H 0 - -#define SL_PWM_LED0_MUX_L 8 -#define SL_PWM_LED0_MUX_H 8 - -#define SL_PWM_LED0_PAD_L 24 -#define SL_PWM_LED0_PAD_H 25 - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/RTE_Device_917.h b/components/board/silabs/config/brd4340b/RTE_Device_917.h index 3b6420f07..14f4bc0d3 100644 --- a/components/board/silabs/config/brd4340b/RTE_Device_917.h +++ b/components/board/silabs/config/brd4340b/RTE_Device_917.h @@ -64,7 +64,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -340,7 +340,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -510,7 +510,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4340b/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4340b/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4340b/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4340b/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4340b/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 7c22f2be0..000000000 --- a/components/board/silabs/config/brd4340b/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 1 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L 66 -#define SL_PWM_LED0_PIN_H 67 - -#define SL_PWM_LED0_PORT_L 0 -#define SL_PWM_LED0_PORT_H 0 - -#define SL_PWM_LED0_MUX_L 8 -#define SL_PWM_LED0_MUX_H 8 - -#define SL_PWM_LED0_PAD_L 24 -#define SL_PWM_LED0_PAD_H 25 - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/RTE_Device_917.h b/components/board/silabs/config/brd4341a/RTE_Device_917.h index a9cde84be..08654a439 100644 --- a/components/board/silabs/config/brd4341a/RTE_Device_917.h +++ b/components/board/silabs/config/brd4341a/RTE_Device_917.h @@ -38,7 +38,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -316,7 +316,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -488,7 +488,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4341a/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4341a/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4341a/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4341a/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4341a/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 7c22f2be0..000000000 --- a/components/board/silabs/config/brd4341a/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 1 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L 66 -#define SL_PWM_LED0_PIN_H 67 - -#define SL_PWM_LED0_PORT_L 0 -#define SL_PWM_LED0_PORT_H 0 - -#define SL_PWM_LED0_MUX_L 8 -#define SL_PWM_LED0_MUX_H 8 - -#define SL_PWM_LED0_PAD_L 24 -#define SL_PWM_LED0_PAD_H 25 - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/RTE_Device_917.h b/components/board/silabs/config/brd4342a/RTE_Device_917.h index 1ca069829..dff8f69f8 100644 --- a/components/board/silabs/config/brd4342a/RTE_Device_917.h +++ b/components/board/silabs/config/brd4342a/RTE_Device_917.h @@ -64,7 +64,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -340,7 +340,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -510,7 +510,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4342a/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4342a/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4342a/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4342a/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4342a/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 0bad473f5..000000000 --- a/components/board/silabs/config/brd4342a/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 1 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L 66 -#define SL_PWM_LED0_PIN_H 67 - -#define SL_PWM_LED0_PORT_L 0 -#define SL_PWM_LED0_PORT_H 0 - -#define SL_PWM_LED0_MUX_L 8 -#define SL_PWM_LED0_MUX_H 8 - -#define SL_PWM_LED0_PAD_L 24 -#define SL_PWM_LED0_PAD_H 25 - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/RTE_Device_917.h b/components/board/silabs/config/brd4343a/RTE_Device_917.h index 772e9b4f8..0a30c3e6b 100644 --- a/components/board/silabs/config/brd4343a/RTE_Device_917.h +++ b/components/board/silabs/config/brd4343a/RTE_Device_917.h @@ -64,7 +64,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -340,7 +340,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -510,7 +510,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4343a/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4343a/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4343a/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4343a/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4343a/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 0bad473f5..000000000 --- a/components/board/silabs/config/brd4343a/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 1 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L 66 -#define SL_PWM_LED0_PIN_H 67 - -#define SL_PWM_LED0_PORT_L 0 -#define SL_PWM_LED0_PORT_H 0 - -#define SL_PWM_LED0_MUX_L 8 -#define SL_PWM_LED0_MUX_H 8 - -#define SL_PWM_LED0_PAD_L 24 -#define SL_PWM_LED0_PAD_H 25 - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/RTE_Device_917.h b/components/board/silabs/config/brd4343b/RTE_Device_917.h index 9b1e9d990..5dd3e5a52 100644 --- a/components/board/silabs/config/brd4343b/RTE_Device_917.h +++ b/components/board/silabs/config/brd4343b/RTE_Device_917.h @@ -64,7 +64,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -340,7 +340,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -510,7 +510,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_0_config.h deleted file mode 100644 index 339e37ca6..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_0_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_10_config.h deleted file mode 100644 index 0bc4f317a..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_10_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_11_config.h deleted file mode 100644 index f7f11be28..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_11_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_12_config.h deleted file mode 100644 index ff6777bc4..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_12_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_13_config.h deleted file mode 100644 index 07c5abec9..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_13_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_14_config.h deleted file mode 100644 index a748f635f..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_14_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_15_config.h deleted file mode 100644 index 71c3a4dda..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_15_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_1_config.h deleted file mode 100644 index 7cf1d46be..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_1_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_2_config.h deleted file mode 100644 index f59a0e17d..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_2_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_3_config.h deleted file mode 100644 index e1b56d655..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_3_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_4_config.h deleted file mode 100644 index 22e94964d..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_4_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_5_config.h deleted file mode 100644 index 5aee84d05..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_5_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_6_config.h deleted file mode 100644 index 70bd9d833..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_6_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_7_config.h deleted file mode 100644 index db28e71f9..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_7_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_8_config.h deleted file mode 100644 index ba3bdf82b..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_8_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_9_config.h deleted file mode 100644 index 26de7c0c5..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_adc_init_channel_9_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC -#endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/brd4343b/sl_si91x_i2c_init_i2c0_config.h deleted file mode 100644 index a54de224c..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_i2c_init_i2c0_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_12c0_config.h -* @brief I2c driver configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C0_CONFIG_H -#define SL_SI91X_I2C_I2C0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C0 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C0_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C0_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN -#define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX -#define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD -#define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN - -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN -#define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX -#define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD -#define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C0_CONFIG_H diff --git a/components/board/silabs/config/brd4343b/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/brd4343b/sl_si91x_i2c_init_i2c1_config.h deleted file mode 100644 index b51213994..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_i2c_init_i2c1_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c1_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C1_CONFIG_H -#define SL_SI91X_I2C_I2C1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C1 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C1_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C1_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN -#define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX -#define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD -#define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN - -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN -#define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX -#define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD -#define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C1_CONFIG_H diff --git a/components/board/silabs/config/brd4343b/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/brd4343b/sl_si91x_i2c_init_i2c2_config.h deleted file mode 100644 index 6c9e5b871..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_i2c_init_i2c2_config.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ /** -* @file sl_si91x_i2c_i2c2_config.h -* @brief I2c driver instance configuration file. -******************************************************************************* -* # License -* Copyright 2023 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* SPDX-License-Identifier: Zlib -* -* The licensor of this software is Silicon Laboratories Inc. -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would be -* appreciated but is not required. -* 2. Altered source versions must be plainly marked as such, and must not be -* misrepresented as being the original software. -* 3. This notice may not be removed or altered from any source distribution. -* -******************************************************************************/ - -#ifndef SL_SI91X_I2C_I2C2_CONFIG_H -#define SL_SI91X_I2C_I2C2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif - -#include "sl_si91x_i2c.h" -/******************************************************************************/ -/******************************* I2C Configuration **************************/ -// I2C2 Configuration - -// Mode -// Leader mode -// Follower mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_MODE SL_I2C_LEADER_MODE - -// Operating Mode -// Standard mode -// Fast mode -// Fast plus mode -// High speed mode -// Selection of the I2C Mode. -#define SL_I2C_I2C2_OPERATING_MODE SL_I2C_STANDARD_MODE - -// Transfer Type -// Using Interrupt -// Using DMA -// Selection of the I2C Mode. -#define SL_I2C_I2C2_TRANSFER_TYPE SL_I2C_USING_INTERRUPT - -// End I2C2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN -#define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX -#define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD -#define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN - -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN -#define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX -#define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD -#define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN - -#ifdef __cplusplus -} -#endif - -#endif // SL_SI91X_I2C_I2C2_CONFIG_H diff --git a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_0_config.h deleted file mode 100644 index 95910bff0..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_0_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_0_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_0_EVENT 0 - -// End PWM CHANNEL_0 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_0 instance -#define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 - -// Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN - -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT - -#define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX -#define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX - -#define SL_PWM_CHANNEL_0_PAD_L SL_SI91X_PWM_1L_PAD -#define SL_PWM_CHANNEL_0_PAD_H SL_SI91X_PWM_1H_PAD -#define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX 0 -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_1_config.h deleted file mode 100644 index 1e1b32448..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_1_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_1_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_1_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_1_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_1 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_1_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_1_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_1_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_1_EVENT 0 - -// End PWM CHANNEL_1 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_1 instance -#define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 - -// Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN - -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT - -#define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX -#define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX - -#define SL_PWM_CHANNEL_1_PAD_L SL_SI91X_PWM_2L_PAD -#define SL_PWM_CHANNEL_1_PAD_H SL_SI91X_PWM_2H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX 0 -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_1_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_2_config.h deleted file mode 100644 index 3c2d2866c..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_2_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_2_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_2_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_2_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_2 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_2_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_2_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_2_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_2_EVENT 0 - -// End PWM CHANNEL_2 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_2 instance -#define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 - -// Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN - -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT - -#define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX -#define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX - -#define SL_PWM_CHANNEL_2_PAD_L SL_SI91X_PWM_3L_PAD -#define SL_PWM_CHANNEL_2_PAD_H SL_SI91X_PWM_3H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX 0 -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_2_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_3_config.h deleted file mode 100644 index 76833adcf..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_channel_3_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_channel_3_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_CHANNEL_3_CONFIG_H -#define SL_SI91X_PWM_CHANNEL_3_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM CHANNEL_3 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_CHANNEL_3_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_CHANNEL_3_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_CHANNEL_3_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_CHANNEL_3_EVENT 0 - -// End PWM CHANNEL_3 Configuration -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for CHANNEL_3 instance -#define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 - -// Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN - -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT - -#define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX -#define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX - -#define SL_PWM_CHANNEL_3_PAD_L SL_SI91X_PWM_4L_PAD -#define SL_PWM_CHANNEL_3_PAD_H SL_SI91X_PWM_4H_PAD - -// PWM Fault Pin set resolution -#if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX 0 -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_CHANNEL_3_CONFIG_H */ diff --git a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_led0_config.h b/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_led0_config.h deleted file mode 100644 index 0bad473f5..000000000 --- a/components/board/silabs/config/brd4343b/sl_si91x_pwm_init_led0_config.h +++ /dev/null @@ -1,156 +0,0 @@ -/***************************************************************************/ /** - * @file sl_si91x_pwm_init_inst_config.h - * @brief PWM configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_PWM_LED0_CONFIG_H -#define SL_SI91X_PWM_LED0_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* PWM Configuration **************************/ -// PWM LED0 Configuration - -// Frequency <500-200000> -// Default: 25000 -#define SL_PWM_LED0_FREQUENCY 25000 - -// Output Polarity Low -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYL_HIGH -#define SL_PWM_LED0_POLARITY_LOW SL_POLARITYL_HIGH - -// Output Polarity High -// POLARITY_LOW -// POLARITY_HIGH -// Default: SL_POLARITYH_HIGH -#define SL_PWM_LED0_POLARITY_HIGH SL_POLARITYH_HIGH - -// PWM Mode -// Independent -// Complementary -// Default: SL_INDEPENDENT -#define SL_PWM_LED0_MODE SL_MODE_INDEPENDENT - -// Timer Counter <0-655365> -// Default: 0 -#define SL_PWM_LED0_TIMER_COUNTER 0 - -// Duty Cycle <0-100> -// Default: 50 -#define SL_PWM_LED0_DUTY_CYCLE 50 - -// Base Timer Mode -// Free Run -// Single Event -// Down Count -// Up_Down -// Up_Down Double -// Default: SL_FREE_RUN_MODE -#define SL_PWM_LED0_TIMER_MODE SL_FREE_RUN_MODE - -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_LED0_TIMER_SELECTION SL_BASE_TIMER_EACH_CHANNEL - -// Ext Trigger -// <0=> None -// <1=> Fault A -// <2=> Fault B -// <3=> Ext Trigger1 -// <4=> Ext Trigger2 -// Default: 0 -#define SL_PWM_LED0_EVENT 0 - -// -/******************************************************************************/ -// <<< end of configuration section >>> - -// PWM channel number for LED0 instance -#define SL_PWM_LED0_OUTPUT_CHANNEL 1 - -// Pin set for LED0 PWM channel -#define SL_PWM_LED0_PIN_L 66 -#define SL_PWM_LED0_PIN_H 67 - -#define SL_PWM_LED0_PORT_L 0 -#define SL_PWM_LED0_PORT_H 0 - -#define SL_PWM_LED0_MUX_L 8 -#define SL_PWM_LED0_MUX_H 8 - -#define SL_PWM_LED0_PAD_L 24 -#define SL_PWM_LED0_PAD_H 25 - -// PWM Fault Pin set resolution -#if (SL_PWM_LED0_EVENT == 0) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX 0 -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 1) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTA_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTA_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTA_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 2) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_FAULTB_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 3) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD -#endif - -#if (SL_PWM_LED0_EVENT == 4) -#define SL_PWM_LED0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_LED0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_LED0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_LED0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SL_SI91X_PWM_LED0_CONFIG_H */ diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_0_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_0_config.h similarity index 78% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_0_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_0_config.h index 4c1a8fb53..640ce8e99 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_0_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_0_config.h @@ -1,66 +1,97 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_0_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_0_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/******************************* ADC Channel Configuration **************************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_0_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_0_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_0_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P0 on ULP_GPIO_1/GPIO_65 +#ifndef SL_ADC_P0_PORT +#define SL_ADC_P0_PORT 0 +#endif +#ifndef SL_ADC_P0_PIN +#define SL_ADC_P0_PIN 1 +#endif +#ifndef SL_ADC_P0_LOC +#define SL_ADC_P0_LOC 10 +#endif + +// ADC N0 on ULP_GPIO_7/GPIO_71 +#ifndef SL_ADC_N0_PORT +#define SL_ADC_N0_PORT 0 +#endif +#ifndef SL_ADC_N0_PIN +#define SL_ADC_N0_PIN 7 +#endif +#ifndef SL_ADC_N0_LOC +#define SL_ADC_N0_LOC 5 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_0_POS_INPUT_CHNL_SEL SL_ADC_P0_LOC +#define SL_ADC_CHANNEL_0_NEG_INPUT_CHNL_SEL SL_ADC_N0_LOC + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_0_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_10_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_10_config.h similarity index 84% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_10_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_10_config.h index f57b5d33b..ef8a43552 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_10_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_10_config.h @@ -1,66 +1,86 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_10_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_10_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/******************************* ADC Channel Configuration **************************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_10_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_10_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_10_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P10 on ULP_GPIO_1/GPIO_65 +#ifndef SL_ADC_P10_PORT +#define SL_ADC_P10_PORT 1 +#endif +#ifndef SL_ADC_P10_PIN +#define SL_ADC_P10_PIN 1 +#endif +#ifndef SL_ADC_P10_LOC +#define SL_ADC_P10_LOC 10 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_10_POS_INPUT_CHNL_SEL SL_ADC_P10_LOC +#define SL_ADC_CHANNEL_10_NEG_INPUT_CHNL_SEL 8 + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_10_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_11_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_11_config.h similarity index 84% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_11_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_11_config.h index ca3addf22..4b9d40ddf 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_11_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_11_config.h @@ -1,66 +1,86 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL 10 -#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_11_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_11_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_11_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_11_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_11_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P11 on ULP_GPIO_1/GPIO_65 +#ifndef SL_ADC_P11_PORT +#define SL_ADC_P11_PORT 1 +#endif +#ifndef SL_ADC_P11_PIN +#define SL_ADC_P11_PIN 1 +#endif +#ifndef SL_ADC_P11_LOC +#define SL_ADC_P11_LOC 10 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_11_POS_INPUT_CHNL_SEL SL_ADC_P11_LOC +#define SL_ADC_CHANNEL_11_NEG_INPUT_CHNL_SEL 7 + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_11_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_12_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_12_config.h similarity index 84% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_12_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_12_config.h index ffe01625d..51388154d 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_12_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_12_config.h @@ -1,66 +1,86 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_12_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_12_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_12_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_12_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_12_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P12 on ULP_GPIO_7/GPIO_71 +#ifndef SL_ADC_P12_PORT +#define SL_ADC_P12_PORT 1 +#endif +#ifndef SL_ADC_P12_PIN +#define SL_ADC_P12_PIN 7 +#endif +#ifndef SL_ADC_P12_LOC +#define SL_ADC_P12_LOC 15 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_12_POS_INPUT_CHNL_SEL SL_ADC_P12_LOC +#define SL_ADC_CHANNEL_12_NEG_INPUT_CHNL_SEL 6 + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_12_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_13_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_13_config.h similarity index 85% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_13_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_13_config.h index ea2e47f88..c632745f5 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_13_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_13_config.h @@ -1,66 +1,86 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL 16 -#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_13_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_13_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_13_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_13_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_13_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P13 on GPIO_26 +#ifndef SL_ADC_P13_PORT +#define SL_ADC_P13_PORT 0 +#endif +#ifndef SL_ADC_P13_PIN +#define SL_ADC_P13_PIN 26 +#endif +#ifndef SL_ADC_P13_LOC +#define SL_ADC_P13_LOC 16 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_13_POS_INPUT_CHNL_SEL SL_ADC_P13_LOC +#define SL_ADC_CHANNEL_13_NEG_INPUT_CHNL_SEL 5 + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_13_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_14_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_14_config.h similarity index 85% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_14_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_14_config.h index ab0eb94ad..d40096855 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_14_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_14_config.h @@ -1,66 +1,86 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_14_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_14_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/******************************* ADC Channel Configuration **************************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_14_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_14_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_14_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P14 on GPIO_30 +#ifndef SL_ADC_P14_PORT +#define SL_ADC_P14_PORT 0 +#endif +#ifndef SL_ADC_P14_PIN +#define SL_ADC_P14_PIN 30 +#endif +#ifndef SL_ADC_P14_LOC +#define SL_ADC_P14_LOC 18 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_14_POS_INPUT_CHNL_SEL SL_ADC_P14_LOC +#define SL_ADC_CHANNEL_14_NEG_INPUT_CHNL_SEL 5 + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_14_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_15_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_15_config.h similarity index 85% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_15_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_15_config.h index 7df11700b..7668862a0 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_15_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_15_config.h @@ -1,66 +1,86 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL 18 -#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_15_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_15_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_15_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_15_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_15_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P15 on GPIO_30 +#ifndef SL_ADC_P15_PORT +#define SL_ADC_P15_PORT 0 +#endif +#ifndef SL_ADC_P15_PIN +#define SL_ADC_P15_PIN 30 +#endif +#ifndef SL_ADC_P15_LOC +#define SL_ADC_P15_LOC 18 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_15_POS_INPUT_CHNL_SEL SL_ADC_P15_LOC +#define SL_ADC_CHANNEL_15_NEG_INPUT_CHNL_SEL 5 + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_15_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_1_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_1_config.h similarity index 78% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_1_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_1_config.h index 9f4ed90de..0a56a9d91 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_1_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_1_config.h @@ -1,66 +1,97 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_1_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_1_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_1_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_1_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_1_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P1 on ULP_GPIO_10/GPIO_74 +#ifndef SL_ADC_P1_PORT +#define SL_ADC_P1_PORT 0 +#endif +#ifndef SL_ADC_P1_PIN +#define SL_ADC_P1_PIN 10 +#endif +#ifndef SL_ADC_P1_LOC +#define SL_ADC_P1_LOC 5 +#endif + +// ADC N1 on GPIO_30 +#ifndef SL_ADC_N1_PORT +#define SL_ADC_N1_PORT 0 +#endif +#ifndef SL_ADC_N1_PIN +#define SL_ADC_N1_PIN 30 +#endif +#ifndef SL_ADC_N1_LOC +#define SL_ADC_N1_LOC 8 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_1_POS_INPUT_CHNL_SEL SL_ADC_P1_LOC +#define SL_ADC_CHANNEL_1_NEG_INPUT_CHNL_SEL SL_ADC_N1_LOC + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_1_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_2_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_2_config.h similarity index 70% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_2_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_2_config.h index 7f70427cf..c695dc1ba 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_2_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_2_config.h @@ -1,71 +1,120 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#else -#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL 6 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_2_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_2_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_2_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_2_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_2_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +#ifdef ULP_MODE_EXECUTION +// ADC P2 on ULP_GPIO_8/GPIO_72 +#ifndef SL_ADC_P2_PORT +#define SL_ADC_P2_PORT 1 +#endif +#ifndef SL_ADC_P2_PIN +#define SL_ADC_P2_PIN 8 +#endif +#ifndef SL_ADC_P2_LOC +#define SL_ADC_P2_LOC 4 +#endif + +// ADC N2 on GPIO_26 +#ifndef SL_ADC_N2_PORT +#define SL_ADC_N2_PORT 0 +#endif +#ifndef SL_ADC_N2_PIN +#define SL_ADC_N2_PIN 26 +#endif +#ifndef SL_ADC_N2_LOC +#define SL_ADC_N2_LOC 6 +#endif +#else +// ADC P2 on GPIO_25 +#ifndef SL_ADC_P2_PORT +#define SL_ADC_P2_PORT 0 +#endif +#ifndef SL_ADC_P2_PIN +#define SL_ADC_P2_PIN 25 +#endif +#ifndef SL_ADC_P2_LOC +#define SL_ADC_P2_LOC 6 +#endif + +// ADC N2 on GPIO_26 +#ifndef SL_ADC_N2_PORT +#define SL_ADC_N2_PORT 0 +#endif +#ifndef SL_ADC_N2_PIN +#define SL_ADC_N2_PIN 26 +#endif +#ifndef SL_ADC_N2_LOC +#define SL_ADC_N2_LOC 6 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> +#endif +#define SL_ADC_CHANNEL_2_POS_INPUT_CHNL_SEL SL_ADC_P2_LOC +#define SL_ADC_CHANNEL_2_NEG_INPUT_CHNL_SEL SL_ADC_N2_LOC + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_2_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_3_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_3_config.h similarity index 70% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_3_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_3_config.h index 198d2fd61..d96b34300 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_3_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_3_config.h @@ -1,71 +1,120 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#ifdef ULP_MODE_EXECUTION -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 15 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#else -#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL 7 -#endif - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_3_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_3_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_3_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_3_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_3_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +#ifdef ULP_MODE_EXECUTION +// ADC P3 on ULP_GPIO_7/GPIO_71 +#ifndef SL_ADC_P3_PORT +#define SL_ADC_P3_PORT 1 +#endif +#ifndef SL_ADC_P3_PIN +#define SL_ADC_P3_PIN 7 +#endif +#ifndef SL_ADC_P3_LOC +#define SL_ADC_P3_LOC 15 +#endif + +// ADC N3 on GPIO_28 +#ifndef SL_ADC_N3_PORT +#define SL_ADC_N3_PORT 0 +#endif +#ifndef SL_ADC_N3_PIN +#define SL_ADC_N3_PIN 28 +#endif +#ifndef SL_ADC_N3_LOC +#define SL_ADC_N3_LOC 7 +#endif +#else +// ADC P3 on GPIO_27 +#ifndef SL_ADC_P3_PORT +#define SL_ADC_P3_PORT 0 +#endif +#ifndef SL_ADC_P3_PIN +#define SL_ADC_P3_PIN 27 +#endif +#ifndef SL_ADC_P3_LOC +#define SL_ADC_P3_LOC 7 +#endif + +// ADC N3 on GPIO_28 +#ifndef SL_ADC_N3_PORT +#define SL_ADC_N3_PORT 0 +#endif +#ifndef SL_ADC_N3_PIN +#define SL_ADC_N3_PIN 28 +#endif +#ifndef SL_ADC_N3_LOC +#define SL_ADC_N3_LOC 7 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> +#endif +#define SL_ADC_CHANNEL_3_POS_INPUT_CHNL_SEL SL_ADC_P3_LOC +#define SL_ADC_CHANNEL_3_NEG_INPUT_CHNL_SEL SL_ADC_N3_LOC + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_3_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_4_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_4_config.h similarity index 77% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_4_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_4_config.h index d2a11840c..0692f1b08 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_4_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_4_config.h @@ -1,66 +1,97 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL 4 -#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL 0 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_4_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_4_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_4_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_4_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_4_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P4 on ULP_GPIO_8/GPIO_72 +#ifndef SL_ADC_P4_PORT +#define SL_ADC_P4_PORT 1 +#endif +#ifndef SL_ADC_P4_PIN +#define SL_ADC_P4_PIN 8 +#endif +#ifndef SL_ADC_P4_LOC +#define SL_ADC_P4_LOC 4 +#endif + +// ADC N4 on ULP_GPIO_1/GPIO_65 +#ifndef SL_ADC_N4_PORT +#define SL_ADC_N4_PORT 1 +#endif +#ifndef SL_ADC_N4_PIN +#define SL_ADC_N4_PIN 1 +#endif +#ifndef SL_ADC_N4_LOC +#define SL_ADC_N4_LOC 0 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_4_POS_INPUT_CHNL_SEL SL_ADC_P4_LOC +#define SL_ADC_CHANNEL_4_NEG_INPUT_CHNL_SEL SL_ADC_N4_LOC + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_4_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_5_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_5_config.h similarity index 77% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_5_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_5_config.h index 11c39aff6..3430f8b93 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_5_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_5_config.h @@ -1,66 +1,97 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL 5 -#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL 5 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_5_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_5_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_5_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_5_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_5_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P5 on ULP_GPIO_10/GPIO_74 +#ifndef SL_ADC_P5_PORT +#define SL_ADC_P5_PORT 1 +#endif +#ifndef SL_ADC_P5_PIN +#define SL_ADC_P5_PIN 10 +#endif +#ifndef SL_ADC_P5_LOC +#define SL_ADC_P5_LOC 5 +#endif + +// ADC N5 on ULP_GPIO_7/GPIO_71 +#ifndef SL_ADC_N5_PORT +#define SL_ADC_N5_PORT 1 +#endif +#ifndef SL_ADC_N5_PIN +#define SL_ADC_N5_PIN 7 +#endif +#ifndef SL_ADC_N5_LOC +#define SL_ADC_N5_LOC 5 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_5_POS_INPUT_CHNL_SEL SL_ADC_P5_LOC +#define SL_ADC_CHANNEL_5_NEG_INPUT_CHNL_SEL SL_ADC_N5_LOC + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_5_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_6_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_6_config.h similarity index 78% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_6_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_6_config.h index b74537dc1..1f19cbc6a 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_6_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_6_config.h @@ -1,66 +1,97 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL 6 -#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL 6 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_6_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_6_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_6_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_6_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_6_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P6 on GPIO_25 +#ifndef SL_ADC_P6_PORT +#define SL_ADC_P6_PORT 0 +#endif +#ifndef SL_ADC_P6_PIN +#define SL_ADC_P6_PIN 25 +#endif +#ifndef SL_ADC_P6_LOC +#define SL_ADC_P6_LOC 6 +#endif + +// ADC N6 on GPIO_26 +#ifndef SL_ADC_N6_PORT +#define SL_ADC_N6_PORT 0 +#endif +#ifndef SL_ADC_N6_PIN +#define SL_ADC_N6_PIN 26 +#endif +#ifndef SL_ADC_N6_LOC +#define SL_ADC_N6_LOC 6 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_6_POS_INPUT_CHNL_SEL SL_ADC_P6_LOC +#define SL_ADC_CHANNEL_6_NEG_INPUT_CHNL_SEL SL_ADC_N6_LOC + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_6_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_7_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_7_config.h similarity index 78% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_7_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_7_config.h index e6e82e917..39e3091d2 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_7_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_7_config.h @@ -1,66 +1,97 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/**************************** ADC Channel Configuration ***********************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL 7 -#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL 7 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_7_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_7_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/**************************** ADC Channel Configuration ***********************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_7_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_7_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_7_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P7 on GPIO_27 +#ifndef SL_ADC_P7_PORT +#define SL_ADC_P7_PORT 0 +#endif +#ifndef SL_ADC_P7_PIN +#define SL_ADC_P7_PIN 27 +#endif +#ifndef SL_ADC_P7_LOC +#define SL_ADC_P7_LOC 7 +#endif + +// ADC N7 on GPIO_28 +#ifndef SL_ADC_N7_PORT +#define SL_ADC_N7_PORT 0 +#endif +#ifndef SL_ADC_N7_PIN +#define SL_ADC_N7_PIN 28 +#endif +#ifndef SL_ADC_N7_LOC +#define SL_ADC_N7_LOC 7 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_7_POS_INPUT_CHNL_SEL SL_ADC_P7_LOC +#define SL_ADC_CHANNEL_7_NEG_INPUT_CHNL_SEL SL_ADC_N7_LOC + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_7_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_8_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_8_config.h similarity index 78% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_8_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_8_config.h index 2a138f651..91db50f04 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_8_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_8_config.h @@ -1,66 +1,97 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_8_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_8_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/******************************* ADC Channel Configuration **************************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_8_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_8_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_8_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P8 on GPIO_29 +#ifndef SL_ADC_P8_PORT +#define SL_ADC_P8_PORT 0 +#endif +#ifndef SL_ADC_P8_PIN +#define SL_ADC_P8_PIN 29 +#endif +#ifndef SL_ADC_P8_LOC +#define SL_ADC_P8_LOC 8 +#endif + +// ADC N8 on GPIO_30 +#ifndef SL_ADC_N8_PORT +#define SL_ADC_N8_PORT 0 +#endif +#ifndef SL_ADC_N8_PIN +#define SL_ADC_N8_PIN 30 +#endif +#ifndef SL_ADC_N8_LOC +#define SL_ADC_N8_LOC 8 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_8_POS_INPUT_CHNL_SEL SL_ADC_P8_LOC +#define SL_ADC_CHANNEL_8_NEG_INPUT_CHNL_SEL SL_ADC_N8_LOC + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_8_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_9_config.h b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_9_config.h similarity index 85% rename from components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_9_config.h rename to components/board/silabs/config/common_config/sl_si91x_adc_init_channel_9_config.h index 604d639b0..1de31b99b 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_adc_init_channel_9_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_adc_init_channel_9_config.h @@ -1,66 +1,86 @@ -/***************************************************************************/ /** - * @file sl_si91x_adc_init_inst_config.h - * @brief ADC configuration file. - ******************************************************************************* - * # License - * Copyright 2023 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licensor of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ - -#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H -#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif -/******************************************************************************/ -/******************************* ADC Channel Configuration **************************/ - -// <<< Use Configuration Wizard in Context Menu >>> -// ADC Channel Configuration - -// Input Type -// Single ended -// Differential -// Selection of the ADC input type. -#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED - -// Sampling Rate <1-2500000> -// Default: 100000 -#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 - -// Sample Length <1-1023> -// Default: 1023 -#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 - -// -// <<< end of configuration section >>> - -#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL 8 -#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 - -#ifdef __cplusplus -} -#endif // SL_ADC +/***************************************************************************/ /** + * @file sl_si91x_adc_init_inst_config.h + * @brief ADC configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_ADC_CHANNEL_9_CONFIG_H +#define SL_SI91X_ADC_CHANNEL_9_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif +/******************************************************************************/ +/******************************* ADC Channel Configuration **************************/ + +// <<< Use Configuration Wizard in Context Menu >>> +// ADC Channel Configuration + +// Input Type +// Single ended +// Differential +// Selection of the ADC input type. +#define SL_ADC_CHANNEL_9_INPUT_TYPE SL_ADC_SINGLE_ENDED + +// Sampling Rate <1-2500000> +// Default: 100000 +#define SL_ADC_CHANNEL_9_SAMPLING_RATE 100000 + +// Sample Length <1-1023> +// Default: 1023 +#define SL_ADC_CHANNEL_9_SAMPLE_LENGTH 1023 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_ADC +// $[ADC_SL_ADC] +#ifndef SL_ADC_PERIPHERAL +#define SL_ADC_PERIPHERAL ADC +#endif + +// ADC P9 on GPIO_29 +#ifndef SL_ADC_P9_PORT +#define SL_ADC_P9_PORT 0 +#endif +#ifndef SL_ADC_P9_PIN +#define SL_ADC_P9_PIN 29 +#endif +#ifndef SL_ADC_P9_LOC +#define SL_ADC_P9_LOC 8 +#endif +// [ADC_SL_ADC]$ +// <<< sl:end pin_tool >>> + +#define SL_ADC_CHANNEL_9_POS_INPUT_CHNL_SEL SL_ADC_P9_LOC +#define SL_ADC_CHANNEL_9_NEG_INPUT_CHNL_SEL 8 + +#ifdef __cplusplus +} +#endif // SL_ADC #endif /* SL_SI91X_ADC_CHANNEL_9_CONFIG_H */ \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_analog_comparator_comparator1_config.h b/components/board/silabs/config/common_config/sl_si91x_analog_comparator_comparator1_config.h similarity index 81% rename from components/board/silabs/config/brd4338a/sl_si91x_analog_comparator_comparator1_config.h rename to components/board/silabs/config/common_config/sl_si91x_analog_comparator_comparator1_config.h index 727d33397..44238dfa8 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_analog_comparator_comparator1_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_analog_comparator_comparator1_config.h @@ -70,11 +70,42 @@ // // <<< end of configuration section >>> +// <<< sl:start pin_tool >>> +// SL_COMP1 +// $[COMP_SL_COMP1] +#ifndef SL_COMP1_PERIPHERAL +#define SL_COMP1_PERIPHERAL COMP1 +#endif + +// COMP1 P1 on GPIO_27 +#ifndef SL_COMP1_COMP_P1_PORT +#define SL_COMP1_COMP_P1_PORT 0 +#endif +#ifndef SL_COMP1_COMP_P1_PIN +#define SL_COMP1_COMP_P1_PIN 5 +#endif +#ifndef SL_COMP1_P1_LOC +#define SL_COMP1_P1_LOC 1 +#endif + +// COMP1 N1 on GPIO_28 +#ifndef SL_COMP1_COMP_N1_PORT +#define SL_COMP1_COMP_N1_PORT 0 +#endif +#ifndef SL_COMP1_COMP_N1_PIN +#define SL_COMP1_COMP_N1_PIN 4 +#endif +#ifndef SL_COMP1_N1_LOC +#define SL_COMP1_N1_LOC 1 +#endif +// [COMP_SL_COMP1]$ +// <<< sl:end pin_tool >>> + #if (SL_ANALOG_COMPARATOR_NON_INVERTING_INPUT == SL_COMPARATOR_GPIO_INPUT_1) -#define SL_ANALOG_COMPARATOR_NON_INVERTING_PIN_INPUT 1 +#define SL_ANALOG_COMPARATOR_NON_INVERTING_PIN_INPUT SL_COMP1_P1_LOC #endif #if (SL_ANALOG_COMPARATOR_INVERTING_INPUT == SL_COMPARATOR_GPIO_INPUT_1) -#define SL_ANALOG_COMPARATOR_INVERTING_PIN_INPUT 1 +#define SL_ANALOG_COMPARATOR_INVERTING_PIN_INPUT SL_COMP1_N1_LOC #endif -#endif // SL_ANALOG_COMPARATOR_COMPARATOR1_CONFIG_H +#endif // SL_ANALOG_COMPARATOR_COMPARATOR1_CONFIG_H \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_analog_comparator_comparator2_config.h b/components/board/silabs/config/common_config/sl_si91x_analog_comparator_comparator2_config.h similarity index 81% rename from components/board/silabs/config/brd4338a/sl_si91x_analog_comparator_comparator2_config.h rename to components/board/silabs/config/common_config/sl_si91x_analog_comparator_comparator2_config.h index 1f899741b..07a627993 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_analog_comparator_comparator2_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_analog_comparator_comparator2_config.h @@ -70,11 +70,42 @@ // // <<< end of configuration section >>> +// <<< sl:start pin_tool >>> +// SL_COMP2 +// $[COMP_SL_COMP2] +#ifndef SL_COMP2_PERIPHERAL +#define SL_COMP2_PERIPHERAL COMP2 +#endif + +// COMP2 P1 on GPIO_27 +#ifndef SL_COMP2_COMP_P1_PORT +#define SL_COMP2_COMP_P1_PORT 0 +#endif +#ifndef SL_COMP2_COMP_P1_PIN +#define SL_COMP2_COMP_P1_PIN 27 +#endif +#ifndef SL_COMP2_P1_LOC +#define SL_COMP2_P1_LOC 1 +#endif + +// COMP2 N1 on GPIO_28 +#ifndef SL_COMP2_COMP_N1_PORT +#define SL_COMP2_COMP_N1_PORT 0 +#endif +#ifndef SL_COMP2_COMP_N1_PIN +#define SL_COMP2_COMP_N1_PIN 28 +#endif +#ifndef SL_COMP2_N1_LOC +#define SL_COMP2_N1_LOC 1 +#endif +// [COMP_SL_COMP2]$ +// <<< sl:end pin_tool >>> + #if (SL_ANALOG_COMPARATOR_NON_INVERTING_INPUT == SL_COMPARATOR_GPIO_INPUT_1) -#define SL_ANALOG_COMPARATOR_NON_INVERTING_PIN_INPUT 1 +#define SL_ANALOG_COMPARATOR_NON_INVERTING_PIN_INPUT SL_COMP2_P1_LOC #endif #if (SL_ANALOG_COMPARATOR_INVERTING_INPUT == SL_COMPARATOR_GPIO_INPUT_1) -#define SL_ANALOG_COMPARATOR_INVERTING_PIN_INPUT 1 +#define SL_ANALOG_COMPARATOR_INVERTING_PIN_INPUT SL_COMP2_N1_LOC #endif -#endif // SL_ANALOG_COMPARATOR_COMPARATOR2_CONFIG_H +#endif // SL_ANALOG_COMPARATOR_COMPARATOR2_CONFIG_H \ No newline at end of file diff --git a/components/board/silabs/config/brd4338a/sl_si91x_i2c_init_i2c0_config.h b/components/board/silabs/config/common_config/sl_si91x_i2c_init_i2c0_config.h similarity index 78% rename from components/board/silabs/config/brd4338a/sl_si91x_i2c_init_i2c0_config.h rename to components/board/silabs/config/common_config/sl_si91x_i2c_init_i2c0_config.h index 7e294fca5..45d9b821f 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_i2c_init_i2c0_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_i2c_init_i2c0_config.h @@ -65,14 +65,48 @@ extern "C" { /******************************************************************************/ // <<< end of configuration section >>> -#define SL_I2C_I2C0_SCL_PORT SL_SI91X_I2C0_SCL_PORT -#define SL_I2C_I2C0_SCL_PIN SL_SI91X_I2C0_SCL_PIN +// <<< sl:start pin_tool >>> +// SL_I2C0 +// $[I2C_SL_I2C0] +#ifndef SL_I2C0_PERIPHERAL +#define SL_I2C0_PERIPHERAL I2C0 +#endif +#ifndef SL_I2C0_PERIPHERAL_NO +#define SL_I2C0_PERIPHERAL_NO 0 +#endif + +// I2C0 SCL on GPIO_7 +#ifndef SL_I2C0_SCL_PORT +#define SL_I2C0_SCL_PORT 0 +#endif +#ifndef SL_I2C0_SCL_PIN +#define SL_I2C0_SCL_PIN 7 +#endif +#ifndef SL_I2C0_SCL_LOC +#define SL_I2C0_SCL_LOC 0 +#endif + +// I2C0 SDA on GPIO_6 +#ifndef SL_I2C0_SDA_PORT +#define SL_I2C0_SDA_PORT 0 +#endif +#ifndef SL_I2C0_SDA_PIN +#define SL_I2C0_SDA_PIN 6 +#endif +#ifndef SL_I2C0_SDA_LOC +#define SL_I2C0_SDA_LOC 0 +#endif +// [I2C_SL_I2C0]$ +// <<< sl:end pin_tool >>> + +#define SL_I2C_I2C0_SCL_PORT SL_I2C0_SCL_PORT +#define SL_I2C_I2C0_SCL_PIN SL_I2C0_SCL_PIN #define SL_I2C_I2C0_SCL_MUX SL_SI91X_I2C0_SCL_MUX #define SL_I2C_I2C0_SCL_PAD SL_SI91X_I2C0_SCL_PAD #define SL_I2C_I2C0_SCL_REN SL_SI91X_I2C0_SCL_REN -#define SL_I2C_I2C0_SDA_PORT SL_SI91X_I2C0_SDA_PORT -#define SL_I2C_I2C0_SDA_PIN SL_SI91X_I2C0_SDA_PIN +#define SL_I2C_I2C0_SDA_PORT SL_I2C0_SDA_PORT +#define SL_I2C_I2C0_SDA_PIN SL_I2C0_SDA_PIN #define SL_I2C_I2C0_SDA_MUX SL_SI91X_I2C0_SDA_MUX #define SL_I2C_I2C0_SDA_PAD SL_SI91X_I2C0_SDA_PAD #define SL_I2C_I2C0_SDA_REN SL_SI91X_I2C0_SDA_REN diff --git a/components/board/silabs/config/brd4338a/sl_si91x_i2c_init_i2c1_config.h b/components/board/silabs/config/common_config/sl_si91x_i2c_init_i2c1_config.h similarity index 78% rename from components/board/silabs/config/brd4338a/sl_si91x_i2c_init_i2c1_config.h rename to components/board/silabs/config/common_config/sl_si91x_i2c_init_i2c1_config.h index 3249bd62d..9a5e90fb0 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_i2c_init_i2c1_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_i2c_init_i2c1_config.h @@ -65,14 +65,48 @@ extern "C" { /******************************************************************************/ // <<< end of configuration section >>> -#define SL_I2C_I2C1_SCL_PORT SL_SI91X_I2C1_SCL_PORT -#define SL_I2C_I2C1_SCL_PIN SL_SI91X_I2C1_SCL_PIN +// <<< sl:start pin_tool >>> +// SL_I2C1 +// $[I2C_SL_I2C1] +#ifndef SL_I2C1_PERIPHERAL +#define SL_I2C1_PERIPHERAL I2C1 +#endif +#ifndef SL_I2C1_PERIPHERAL_NO +#define SL_I2C1_PERIPHERAL_NO 1 +#endif + +// I2C1 SCL on GPIO_54 +#ifndef SL_I2C1_SCL_PORT +#define SL_I2C1_SCL_PORT 0 +#endif +#ifndef SL_I2C1_SCL_PIN +#define SL_I2C1_SCL_PIN 54 +#endif +#ifndef SL_I2C1_SCL_LOC +#define SL_I2C1_SCL_LOC 3 +#endif + +// I2C1 SDA on GPIO_55 +#ifndef SL_I2C1_SDA_PORT +#define SL_I2C1_SDA_PORT 0 +#endif +#ifndef SL_I2C1_SDA_PIN +#define SL_I2C1_SDA_PIN 55 +#endif +#ifndef SL_I2C1_SDA_LOC +#define SL_I2C1_SDA_LOC 3 +#endif +// [I2C_SL_I2C1]$ +// <<< sl:end pin_tool >>> + +#define SL_I2C_I2C1_SCL_PORT SL_I2C1_SCL_PORT +#define SL_I2C_I2C1_SCL_PIN SL_I2C1_SCL_PIN #define SL_I2C_I2C1_SCL_MUX SL_SI91X_I2C1_SCL_MUX #define SL_I2C_I2C1_SCL_PAD SL_SI91X_I2C1_SCL_PAD #define SL_I2C_I2C1_SCL_REN SL_SI91X_I2C1_SCL_REN -#define SL_I2C_I2C1_SDA_PORT SL_SI91X_I2C1_SDA_PORT -#define SL_I2C_I2C1_SDA_PIN SL_SI91X_I2C1_SDA_PIN +#define SL_I2C_I2C1_SDA_PORT SL_I2C1_SDA_PORT +#define SL_I2C_I2C1_SDA_PIN SL_I2C1_SDA_PIN #define SL_I2C_I2C1_SDA_MUX SL_SI91X_I2C1_SDA_MUX #define SL_I2C_I2C1_SDA_PAD SL_SI91X_I2C1_SDA_PAD #define SL_I2C_I2C1_SDA_REN SL_SI91X_I2C1_SDA_REN diff --git a/components/board/silabs/config/brd4338a/sl_si91x_i2c_init_i2c2_config.h b/components/board/silabs/config/common_config/sl_si91x_i2c_init_i2c2_config.h similarity index 78% rename from components/board/silabs/config/brd4338a/sl_si91x_i2c_init_i2c2_config.h rename to components/board/silabs/config/common_config/sl_si91x_i2c_init_i2c2_config.h index f0f8e46e5..cda734762 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_i2c_init_i2c2_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_i2c_init_i2c2_config.h @@ -65,14 +65,48 @@ extern "C" { /******************************************************************************/ // <<< end of configuration section >>> -#define SL_I2C_I2C2_SCL_PORT SL_SI91X_I2C2_SCL_PORT -#define SL_I2C_I2C2_SCL_PIN SL_SI91X_I2C2_SCL_PIN +// <<< sl:start pin_tool >>> +// SL_I2C2 +// $[I2C_SL_I2C2] +#ifndef SL_I2C2_PERIPHERAL +#define SL_I2C2_PERIPHERAL I2C2 +#endif +#ifndef SL_I2C2_PERIPHERAL_NO +#define SL_I2C2_PERIPHERAL_NO 2 +#endif + +// I2C2 SCL on ULP_GPIO_7/GPIO_71 +#ifndef SL_I2C2_SCL_PORT +#define SL_I2C2_SCL_PORT 0 +#endif +#ifndef SL_I2C2_SCL_PIN +#define SL_I2C2_SCL_PIN 7 +#endif +#ifndef SL_I2C2_SCL_LOC +#define SL_I2C2_SCL_LOC 0 +#endif + +// I2C2 SDA on ULP_GPIO_6/GPIO_70 +#ifndef SL_I2C2_SDA_PORT +#define SL_I2C2_SDA_PORT 0 +#endif +#ifndef SL_I2C2_SDA_PIN +#define SL_I2C2_SDA_PIN 6 +#endif +#ifndef SL_I2C2_SDA_LOC +#define SL_I2C2_SDA_LOC 0 +#endif +// [I2C_SL_I2C2]$ +// <<< sl:end pin_tool >>> + +#define SL_I2C_I2C2_SCL_PORT SL_I2C2_SCL_PORT +#define SL_I2C_I2C2_SCL_PIN SL_I2C2_SCL_PIN #define SL_I2C_I2C2_SCL_MUX SL_SI91X_I2C2_SCL_MUX #define SL_I2C_I2C2_SCL_PAD SL_SI91X_I2C2_SCL_PAD #define SL_I2C_I2C2_SCL_REN SL_SI91X_I2C2_SCL_REN -#define SL_I2C_I2C2_SDA_PORT SL_SI91X_I2C2_SDA_PORT -#define SL_I2C_I2C2_SDA_PIN SL_SI91X_I2C2_SDA_PIN +#define SL_I2C_I2C2_SDA_PORT SL_I2C2_SDA_PORT +#define SL_I2C_I2C2_SDA_PIN SL_I2C2_SDA_PIN #define SL_I2C_I2C2_SDA_MUX SL_SI91X_I2C2_SDA_MUX #define SL_I2C_I2C2_SDA_PAD SL_SI91X_I2C2_SDA_PAD #define SL_I2C_I2C2_SDA_REN SL_SI91X_I2C2_SDA_REN diff --git a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_0_config.h b/components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_0_config.h similarity index 54% rename from components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_0_config.h rename to components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_0_config.h index aeeb266b8..02b18ce1e 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_0_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_0_config.h @@ -58,10 +58,10 @@ extern "C" { // PWM Mode // Independent // Complementary -// Default: SL_INDEPENDENT +// Default: SL_MODE_INDEPENDENT #define SL_PWM_CHANNEL_0_MODE SL_MODE_INDEPENDENT -// Timer Counter <0-655365> +// Timer Counter <0-65535> // Default: 0 #define SL_PWM_CHANNEL_0_TIMER_COUNTER 0 @@ -78,12 +78,6 @@ extern "C" { // Default: SL_FREE_RUN_MODE #define SL_PWM_CHANNEL_0_TIMER_MODE SL_FREE_RUN_MODE -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_0_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - // Ext Trigger // <0=> None // <1=> Fault A @@ -97,15 +91,90 @@ extern "C" { /******************************************************************************/ // <<< end of configuration section >>> +// <<< sl:start pin_tool >>> +// SL_PWM_CHANNEL0 +// $[PWM_SL_PWM_CHANNEL0] +#ifndef SL_PWM_CHANNEL0_PERIPHERAL +#define SL_PWM_CHANNEL0_PERIPHERAL PWM +#endif + +// PWM H1 on GPIO_7 +#ifndef SL_PWM_CHANNEL0_H1_PORT +#define SL_PWM_CHANNEL0_H1_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL0_H1_PIN +#define SL_PWM_CHANNEL0_H1_PIN 7 +#endif +#ifndef SL_PWM_CHANNEL0_H1_LOC +#define SL_PWM_CHANNEL0_H1_LOC 0 +#endif + +// PWM L1 on GPIO_6 +#ifndef SL_PWM_CHANNEL0_L1_PORT +#define SL_PWM_CHANNEL0_L1_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL0_L1_PIN +#define SL_PWM_CHANNEL0_L1_PIN 6 +#endif +#ifndef SL_PWM_CHANNEL0_L1_LOC +#define SL_PWM_CHANNEL0_L1_LOC 0 +#endif + +// PWM FAULTA on GPIO_25 +#ifndef SL_PWM_CHANNEL0_FAULTA_PORT +#define SL_PWM_CHANNEL0_FAULTA_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL0_FAULTA_PIN +#define SL_PWM_CHANNEL0_FAULTA_PIN 25 +#endif +#ifndef SL_PWM_CHANNEL0_FAULTA_LOC +#define SL_PWM_CHANNEL0_FAULTA_LOC 0 +#endif + +// PWM FAULTB on GPIO_26 +#ifndef SL_PWM_CHANNEL0_FAULTB_PORT +#define SL_PWM_CHANNEL0_FAULTB_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL0_FAULTB_PIN +#define SL_PWM_CHANNEL0_FAULTB_PIN 26 +#endif +#ifndef SL_PWM_CHANNEL0_FAULTB_LOC +#define SL_PWM_CHANNEL0_FAULTB_LOC 0 +#endif + +// PWM TMR_EXT_TRIG_1 on GPIO_27 +#ifndef SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_PORT +#define SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_PIN +#define SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_PIN 27 +#endif +#ifndef SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_LOC +#define SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_LOC 0 +#endif + +// PWM TMR_EXT_TRIG_2 on GPIO_28 +#ifndef SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_PORT +#define SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_PIN +#define SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_PIN 28 +#endif +#ifndef SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_LOC +#define SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_LOC 0 +#endif +// [PWM_SL_PWM_CHANNEL0]$ +// <<< sl:end pin_tool >>> + // PWM channel number for CHANNEL_0 instance #define SL_PWM_CHANNEL_0_OUTPUT_CHANNEL 0 // Pin set for CHANNEL_0 PWM channel -#define SL_PWM_CHANNEL_0_PIN_L SL_SI91X_PWM_1L_PIN -#define SL_PWM_CHANNEL_0_PIN_H SL_SI91X_PWM_1H_PIN +#define SL_PWM_CHANNEL_0_PIN_L SL_PWM_CHANNEL0_L1_PIN +#define SL_PWM_CHANNEL_0_PIN_H SL_PWM_CHANNEL0_H1_PIN -#define SL_PWM_CHANNEL_0_PORT_L SL_SI91X_PWM_1L_PORT -#define SL_PWM_CHANNEL_0_PORT_H SL_SI91X_PWM_1H_PORT +#define SL_PWM_CHANNEL_0_PORT_L SL_PWM_CHANNEL0_L1_PORT +#define SL_PWM_CHANNEL_0_PORT_H SL_PWM_CHANNEL0_H1_PORT #define SL_PWM_CHANNEL_0_MUX_L SL_SI91X_PWM_1L_MUX #define SL_PWM_CHANNEL_0_MUX_H SL_SI91X_PWM_1H_MUX @@ -115,38 +184,50 @@ extern "C" { #define SL_PWM_CHANNEL_0_PAD_HL SL_SI91X_PWM_1H_PAD // PWM Fault Pin set resolution #if (SL_PWM_CHANNEL_0_EVENT == 0) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN +#define SL_PWM_CHANNEL_0_PORT SL_PWM_CHANNEL0_FAULTA_PORT +#define SL_PWM_CHANNEL_0_PIN SL_PWM_CHANNEL0_FAULTA_PIN #define SL_PWM_CHANNEL_0_MUX 0 #define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD #endif #if (SL_PWM_CHANNEL_0_EVENT == 1) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTA_PIN +#define SL_PWM_CHANNEL_0_PORT SL_PWM_CHANNEL0_FAULTA_PORT +#define SL_PWM_CHANNEL_0_PIN SL_PWM_CHANNEL0_FAULTA_PIN #define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTA_MUX #define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTA_PAD #endif #if (SL_PWM_CHANNEL_0_EVENT == 2) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD +#define SL_PWM_CHANNEL_0_PORT SL_PWM_CHANNEL0_FAULTB_PORT +#if (SL_PWM_CHANNEL0_FAULTB_LOC == 0) +#define SL_PWM_CHANNEL_0_PIN SL_PWM_CHANNEL0_FAULTB_PIN +#else +#define SL_PWM_CHANNEL_0_PIN (SL_PWM_CHANNEL0_FAULTB_PIN + 64) +#endif +#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_FAULTB_MUX +#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_FAULTB_PAD #endif #if (SL_PWM_CHANNEL_0_EVENT == 3) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD +#define SL_PWM_CHANNEL_0_PORT SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_PORT +#if ((SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_LOC == 2) || (SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_LOC == 3)) +#define SL_PWM_CHANNEL_0_PIN (SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_PIN + 64) +#else +#define SL_PWM_CHANNEL_0_PIN SL_PWM_CHANNEL0_TMR_EXT_TRIG_1_PIN +#endif +#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX +#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD #endif #if (SL_PWM_CHANNEL_0_EVENT == 4) -#define SL_PWM_CHANNEL_0_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_0_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD +#define SL_PWM_CHANNEL_0_PORT SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_PORT +#if (SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_LOC == 2) +#define SL_PWM_CHANNEL_0_PIN (SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_PIN + 64) +#else +#define SL_PWM_CHANNEL_0_PIN SL_PWM_CHANNEL0_TMR_EXT_TRIG_2_PIN +#endif +#define SL_PWM_CHANNEL_0_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX +#define SL_PWM_CHANNEL_0_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD #endif #ifdef __cplusplus diff --git a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_1_config.h b/components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_1_config.h similarity index 52% rename from components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_1_config.h rename to components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_1_config.h index 7fc6269f9..1420890f3 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_1_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_1_config.h @@ -58,10 +58,10 @@ extern "C" { // PWM Mode // Independent // Complementary -// Default: SL_INDEPENDENT +// Default: SL_MODE_INDEPENDENT #define SL_PWM_CHANNEL_1_MODE SL_MODE_INDEPENDENT -// Timer Counter <0-655365> +// Timer Counter <0-65535> // Default: 0 #define SL_PWM_CHANNEL_1_TIMER_COUNTER 0 @@ -78,12 +78,6 @@ extern "C" { // Default: SL_FREE_RUN_MODE #define SL_PWM_CHANNEL_1_TIMER_MODE SL_FREE_RUN_MODE -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_1_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - // Ext Trigger // <0=> None // <1=> Fault A @@ -97,15 +91,98 @@ extern "C" { /******************************************************************************/ // <<< end of configuration section >>> +// <<< sl:start pin_tool >>> +// SL_PWM_CHANNEL1 +// $[PWM_SL_PWM_CHANNEL1] +#ifndef SL_PWM_CHANNEL1_PERIPHERAL +#define SL_PWM_CHANNEL1_PERIPHERAL PWM +#endif + +// PWM H2 on GPIO_9 +#ifndef SL_PWM_CHANNEL1_H2_PORT +#define SL_PWM_CHANNEL1_H2_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL1_H2_PIN +#define SL_PWM_CHANNEL1_H2_PIN 9 +#endif +#ifndef SL_PWM_CHANNEL1_H2_LOC +#define SL_PWM_CHANNEL1_H2_LOC 0 +#endif + +// PWM L2 on GPIO_8 +#ifndef SL_PWM_CHANNEL1_L2_PORT +#define SL_PWM_CHANNEL1_L2_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL1_L2_PIN +#define SL_PWM_CHANNEL1_L2_PIN 8 +#endif +#ifndef SL_PWM_CHANNEL1_L2_LOC +#define SL_PWM_CHANNEL1_L2_LOC 0 +#endif + +// PWM FAULTA on GPIO_25 +#ifndef SL_PWM_CHANNEL1_FAULTA_PORT +#define SL_PWM_CHANNEL1_FAULTA_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL1_FAULTA_PIN +#define SL_PWM_CHANNEL1_FAULTA_PIN 25 +#endif +#ifndef SL_PWM_CHANNEL1_FAULTA_LOC +#define SL_PWM_CHANNEL1_FAULTA_LOC 0 +#endif + +// PWM FAULTB on GPIO_26 +#ifndef SL_PWM_CHANNEL1_FAULTB_PORT +#define SL_PWM_CHANNEL1_FAULTB_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL1_FAULTB_PIN +#define SL_PWM_CHANNEL1_FAULTB_PIN 26 +#endif +#ifndef SL_PWM_CHANNEL1_FAULTB_LOC +#define SL_PWM_CHANNEL1_FAULTB_LOC 0 +#endif + +// PWM TMR_EXT_TRIG_1 on GPIO_27 +#ifndef SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_PORT +#define SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_PIN +#define SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_PIN 27 +#endif +#ifndef SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_LOC +#define SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_LOC 0 +#endif + +// PWM TMR_EXT_TRIG_2 on GPIO_28 +#ifndef SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_PORT +#define SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_PIN +#define SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_PIN 28 +#endif +#ifndef SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_LOC +#define SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_LOC 0 +#endif +// [PWM_SL_PWM_CHANNEL1]$ +// <<< sl:end pin_tool >>> + // PWM channel number for CHANNEL_1 instance #define SL_PWM_CHANNEL_1_OUTPUT_CHANNEL 1 // Pin set for CHANNEL_1 PWM channel -#define SL_PWM_CHANNEL_1_PIN_L SL_SI91X_PWM_2L_PIN -#define SL_PWM_CHANNEL_1_PIN_H SL_SI91X_PWM_2H_PIN +#if (SL_PWM_CHANNEL1_L2_LOC == 1) +#define SL_PWM_CHANNEL_1_PIN_L (SL_PWM_CHANNEL1_L2_PIN + 64) +#else +#define SL_PWM_CHANNEL_1_PIN_L SL_PWM_CHANNEL1_L2_PIN +#endif +#if (SL_PWM_CHANNEL1_H2_LOC == 1) +#define SL_PWM_CHANNEL_1_PIN_H (SL_PWM_CHANNEL1_H2_PIN + 64) +#else +#define SL_PWM_CHANNEL_1_PIN_H SL_PWM_CHANNEL1_H2_PIN +#endif -#define SL_PWM_CHANNEL_1_PORT_L SL_SI91X_PWM_2L_PORT -#define SL_PWM_CHANNEL_1_PORT_H SL_SI91X_PWM_2H_PORT +#define SL_PWM_CHANNEL_1_PORT_L SL_PWM_CHANNEL1_L2_PORT +#define SL_PWM_CHANNEL_1_PORT_H SL_PWM_CHANNEL1_H2_PORT #define SL_PWM_CHANNEL_1_MUX_L SL_SI91X_PWM_2L_MUX #define SL_PWM_CHANNEL_1_MUX_H SL_SI91X_PWM_2H_MUX @@ -115,38 +192,50 @@ extern "C" { // PWM Fault Pin set resolution #if (SL_PWM_CHANNEL_1_EVENT == 0) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN +#define SL_PWM_CHANNEL_1_PORT SL_PWM_CHANNEL1_FAULTA_PORT +#define SL_PWM_CHANNEL_1_PIN SL_PWM_CHANNEL1_FAULTA_PIN #define SL_PWM_CHANNEL_1_MUX 0 #define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD #endif #if (SL_PWM_CHANNEL_1_EVENT == 1) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTA_PIN +#define SL_PWM_CHANNEL_1_PORT SL_PWM_CHANNEL1_FAULTA_PORT +#define SL_PWM_CHANNEL_1_PIN SL_PWM_CHANNEL1_FAULTA_PIN #define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTA_MUX #define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTA_PAD #endif #if (SL_PWM_CHANNEL_1_EVENT == 2) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD +#define SL_PWM_CHANNEL_1_PORT SL_PWM_CHANNEL1_FAULTB_PORT +#if (SL_PWM_CHANNEL1_FAULTB_LOC == 0) +#define SL_PWM_CHANNEL_1_PIN SL_PWM_CHANNEL1_FAULTB_PIN +#else +#define SL_PWM_CHANNEL_1_PIN (SL_PWM_CHANNEL1_FAULTB_PIN + 64) +#endif +#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_FAULTB_MUX +#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_FAULTB_PAD #endif #if (SL_PWM_CHANNEL_1_EVENT == 3) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD +#define SL_PWM_CHANNEL_1_PORT SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_PORT +#if ((SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_LOC == 2) || (SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_LOC == 3)) +#define SL_PWM_CHANNEL_1_PIN (SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_PIN + 64) +#else +#define SL_PWM_CHANNEL_1_PIN SL_PWM_CHANNEL1_TMR_EXT_TRIG_1_PIN +#endif +#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX +#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD #endif #if (SL_PWM_CHANNEL_1_EVENT == 4) -#define SL_PWM_CHANNEL_1_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_1_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD +#define SL_PWM_CHANNEL_1_PORT SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_PORT +#if (SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_LOC == 2) +#define SL_PWM_CHANNEL_1_PIN (SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_PIN + 64) +#else +#define SL_PWM_CHANNEL_1_PIN SL_PWM_CHANNEL1_TMR_EXT_TRIG_2_PIN +#endif +#define SL_PWM_CHANNEL_1_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX +#define SL_PWM_CHANNEL_1_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD #endif #ifdef __cplusplus diff --git a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_2_config.h b/components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_2_config.h similarity index 54% rename from components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_2_config.h rename to components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_2_config.h index efca38a37..183aff7c3 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_2_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_2_config.h @@ -58,10 +58,10 @@ extern "C" { // PWM Mode // Independent // Complementary -// Default: SL_INDEPENDENT +// Default: SL_MODE_INDEPENDENT #define SL_PWM_CHANNEL_2_MODE SL_MODE_INDEPENDENT -// Timer Counter <0-655365> +// Timer Counter <0-65535> // Default: 0 #define SL_PWM_CHANNEL_2_TIMER_COUNTER 0 @@ -78,12 +78,6 @@ extern "C" { // Default: SL_FREE_RUN_MODE #define SL_PWM_CHANNEL_2_TIMER_MODE SL_FREE_RUN_MODE -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_2_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - // Ext Trigger // <0=> None // <1=> Fault A @@ -97,15 +91,90 @@ extern "C" { /******************************************************************************/ // <<< end of configuration section >>> +// <<< sl:start pin_tool >>> +// SL_PWM_CHANNEL2 +// $[PWM_SL_PWM_CHANNEL2] +#ifndef SL_PWM_CHANNEL2_PERIPHERAL +#define SL_PWM_CHANNEL2_PERIPHERAL PWM +#endif + +// PWM H3 on GPIO_11 +#ifndef SL_PWM_CHANNEL2_H3_PORT +#define SL_PWM_CHANNEL2_H3_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL2_H3_PIN +#define SL_PWM_CHANNEL2_H3_PIN 11 +#endif +#ifndef SL_PWM_CHANNEL2_H3_LOC +#define SL_PWM_CHANNEL2_H3_LOC 0 +#endif + +// PWM L3 on GPIO_10 +#ifndef SL_PWM_CHANNEL2_L3_PORT +#define SL_PWM_CHANNEL2_L3_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL2_L3_PIN +#define SL_PWM_CHANNEL2_L3_PIN 10 +#endif +#ifndef SL_PWM_CHANNEL2_L3_LOC +#define SL_PWM_CHANNEL2_L3_LOC 0 +#endif + +// PWM FAULTA on GPIO_25 +#ifndef SL_PWM_CHANNEL2_FAULTA_PORT +#define SL_PWM_CHANNEL2_FAULTA_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL2_FAULTA_PIN +#define SL_PWM_CHANNEL2_FAULTA_PIN 25 +#endif +#ifndef SL_PWM_CHANNEL2_FAULTA_LOC +#define SL_PWM_CHANNEL2_FAULTA_LOC 0 +#endif + +// PWM FAULTB on GPIO_26 +#ifndef SL_PWM_CHANNEL2_FAULTB_PORT +#define SL_PWM_CHANNEL2_FAULTB_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL2_FAULTB_PIN +#define SL_PWM_CHANNEL2_FAULTB_PIN 26 +#endif +#ifndef SL_PWM_CHANNEL2_FAULTB_LOC +#define SL_PWM_CHANNEL2_FAULTB_LOC 0 +#endif + +// PWM TMR_EXT_TRIG_1 on GPIO_27 +#ifndef SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_PORT +#define SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_PIN +#define SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_PIN 27 +#endif +#ifndef SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_LOC +#define SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_LOC 0 +#endif + +// PWM TMR_EXT_TRIG_2 on GPIO_28 +#ifndef SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_PORT +#define SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_PIN +#define SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_PIN 28 +#endif +#ifndef SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_LOC +#define SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_LOC 0 +#endif +// [PWM_SL_PWM_CHANNEL2]$ +// <<< sl:end pin_tool >>> + // PWM channel number for CHANNEL_2 instance #define SL_PWM_CHANNEL_2_OUTPUT_CHANNEL 2 // Pin set for CHANNEL_2 PWM channel -#define SL_PWM_CHANNEL_2_PIN_L SL_SI91X_PWM_3L_PIN -#define SL_PWM_CHANNEL_2_PIN_H SL_SI91X_PWM_3H_PIN +#define SL_PWM_CHANNEL_2_PIN_L SL_PWM_CHANNEL2_L3_PIN +#define SL_PWM_CHANNEL_2_PIN_H SL_PWM_CHANNEL2_H3_PIN -#define SL_PWM_CHANNEL_2_PORT_L SL_SI91X_PWM_3L_PORT -#define SL_PWM_CHANNEL_2_PORT_H SL_SI91X_PWM_3H_PORT +#define SL_PWM_CHANNEL_2_PORT_L SL_PWM_CHANNEL2_L3_PORT +#define SL_PWM_CHANNEL_2_PORT_H SL_PWM_CHANNEL2_H3_PORT #define SL_PWM_CHANNEL_2_MUX_L SL_SI91X_PWM_3L_MUX #define SL_PWM_CHANNEL_2_MUX_H SL_SI91X_PWM_3H_MUX @@ -115,38 +184,50 @@ extern "C" { // PWM Fault Pin set resolution #if (SL_PWM_CHANNEL_2_EVENT == 0) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN +#define SL_PWM_CHANNEL_2_PORT SL_PWM_CHANNEL2_FAULTA_PORT +#define SL_PWM_CHANNEL_2_PIN SL_PWM_CHANNEL2_FAULTA_PIN #define SL_PWM_CHANNEL_2_MUX 0 #define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD #endif #if (SL_PWM_CHANNEL_2_EVENT == 1) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTA_PIN +#define SL_PWM_CHANNEL_2_PORT SL_PWM_CHANNEL2_FAULTA_PORT +#define SL_PWM_CHANNEL_2_PIN SL_PWM_CHANNEL2_FAULTA_PIN #define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTA_MUX #define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTA_PAD #endif #if (SL_PWM_CHANNEL_2_EVENT == 2) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD +#define SL_PWM_CHANNEL_2_PORT SL_PWM_CHANNEL2_FAULTB_PORT +#if (SL_PWM_CHANNEL2_FAULTB_LOC == 0) +#define SL_PWM_CHANNEL_2_PIN SL_PWM_CHANNEL2_FAULTB_PIN +#else +#define SL_PWM_CHANNEL_2_PIN (SL_PWM_CHANNEL2_FAULTB_PIN + 64) +#endif +#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_FAULTB_MUX +#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_FAULTB_PAD #endif #if (SL_PWM_CHANNEL_2_EVENT == 3) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD +#define SL_PWM_CHANNEL_2_PORT SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_PORT +#if ((SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_LOC == 2) || (SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_LOC == 3)) +#define SL_PWM_CHANNEL_2_PIN (SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_PIN + 64) +#else +#define SL_PWM_CHANNEL_2_PIN SL_PWM_CHANNEL2_TMR_EXT_TRIG_1_PIN +#endif +#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX +#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD #endif #if (SL_PWM_CHANNEL_2_EVENT == 4) -#define SL_PWM_CHANNEL_2_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_2_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD +#define SL_PWM_CHANNEL_2_PORT SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_PORT +#if (SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_LOC == 2) +#define SL_PWM_CHANNEL_2_PIN (SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_PIN + 64) +#else +#define SL_PWM_CHANNEL_2_PIN SL_PWM_CHANNEL2_TMR_EXT_TRIG_2_PIN +#endif +#define SL_PWM_CHANNEL_2_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX +#define SL_PWM_CHANNEL_2_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD #endif #ifdef __cplusplus diff --git a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_3_config.h b/components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_3_config.h similarity index 52% rename from components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_3_config.h rename to components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_3_config.h index d9d107c47..fd5630396 100644 --- a/components/board/silabs/config/brd4338a/sl_si91x_pwm_init_channel_3_config.h +++ b/components/board/silabs/config/common_config/sl_si91x_pwm_init_channel_3_config.h @@ -58,10 +58,10 @@ extern "C" { // PWM Mode // Independent // Complementary -// Default: SL_INDEPENDENT +// Default: SL_MODE_INDEPENDENT #define SL_PWM_CHANNEL_3_MODE SL_MODE_INDEPENDENT -// Timer Counter <0-655365> +// Timer Counter <0-65535> // Default: 0 #define SL_PWM_CHANNEL_3_TIMER_COUNTER 0 @@ -78,12 +78,6 @@ extern "C" { // Default: SL_FREE_RUN_MODE #define SL_PWM_CHANNEL_3_TIMER_MODE SL_FREE_RUN_MODE -// Base Timer Selection -// Timer(Each Channel) -// Timer(All Channels) -// Default: SL_BASE_TIMER_EACH_CHANNEL -#define SL_PWM_CHANNEL_3_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL - // Ext Trigger // <0=> None // <1=> Fault A @@ -97,15 +91,98 @@ extern "C" { /******************************************************************************/ // <<< end of configuration section >>> +// <<< sl:start pin_tool >>> +// SL_PWM_CHANNEL3 +// $[PWM_SL_PWM_CHANNEL3] +#ifndef SL_PWM_CHANNEL3_PERIPHERAL +#define SL_PWM_CHANNEL3_PERIPHERAL PWM +#endif + +// PWM H4 on ULP_GPIO_7/GPIO_71 +#ifndef SL_PWM_CHANNEL3_H4_PORT +#define SL_PWM_CHANNEL3_H4_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL3_H4_PIN +#define SL_PWM_CHANNEL3_H4_PIN 7 +#endif +#ifndef SL_PWM_CHANNEL3_H4_LOC +#define SL_PWM_CHANNEL3_H4_LOC 1 +#endif + +// PWM L4 on ULP_GPIO_6/GPIO_70 +#ifndef SL_PWM_CHANNEL3_L4_PORT +#define SL_PWM_CHANNEL3_L4_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL3_L4_PIN +#define SL_PWM_CHANNEL3_L4_PIN 6 +#endif +#ifndef SL_PWM_CHANNEL3_L4_LOC +#define SL_PWM_CHANNEL3_L4_LOC 1 +#endif + +// PWM FAULTA on GPIO_25 +#ifndef SL_PWM_CHANNEL3_FAULTA_PORT +#define SL_PWM_CHANNEL3_FAULTA_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL3_FAULTA_PIN +#define SL_PWM_CHANNEL3_FAULTA_PIN 25 +#endif +#ifndef SL_PWM_CHANNEL3_FAULTA_LOC +#define SL_PWM_CHANNEL3_FAULTA_LOC 0 +#endif + +// PWM FAULTB on GPIO_26 +#ifndef SL_PWM_CHANNEL3_FAULTB_PORT +#define SL_PWM_CHANNEL3_FAULTB_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL3_FAULTB_PIN +#define SL_PWM_CHANNEL3_FAULTB_PIN 26 +#endif +#ifndef SL_PWM_CHANNEL3_FAULTB_LOC +#define SL_PWM_CHANNEL3_FAULTB_LOC 0 +#endif + +// PWM TMR_EXT_TRIG_1 on GPIO_27 +#ifndef SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_PORT +#define SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_PIN +#define SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_PIN 27 +#endif +#ifndef SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_LOC +#define SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_LOC 0 +#endif + +// PWM TMR_EXT_TRIG_2 on GPIO_28 +#ifndef SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_PORT +#define SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_PORT 0 +#endif +#ifndef SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_PIN +#define SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_PIN 28 +#endif +#ifndef SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_LOC +#define SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_LOC 0 +#endif +// [PWM_SL_PWM_CHANNEL3]$ +// <<< sl:end pin_tool >>> + // PWM channel number for CHANNEL_3 instance #define SL_PWM_CHANNEL_3_OUTPUT_CHANNEL 3 // Pin set for CHANNEL_3 PWM channel -#define SL_PWM_CHANNEL_3_PIN_L SL_SI91X_PWM_4L_PIN -#define SL_PWM_CHANNEL_3_PIN_H SL_SI91X_PWM_4H_PIN +#if (SL_PWM_CHANNEL3_L4_LOC == 1) +#define SL_PWM_CHANNEL_3_PIN_L (SL_PWM_CHANNEL3_L4_PIN + 64) +#else +#define SL_PWM_CHANNEL_3_PIN_L SL_PWM_CHANNEL3_L4_PIN +#endif +#if (SL_PWM_CHANNEL3_H4_LOC == 1) +#define SL_PWM_CHANNEL_3_PIN_H (SL_PWM_CHANNEL3_H4_PIN + 64) +#else +#define SL_PWM_CHANNEL_3_PIN_H SL_PWM_CHANNEL3_H4_PIN +#endif -#define SL_PWM_CHANNEL_3_PORT_L SL_SI91X_PWM_4L_PORT -#define SL_PWM_CHANNEL_3_PORT_H SL_SI91X_PWM_4H_PORT +#define SL_PWM_CHANNEL_3_PORT_L SL_PWM_CHANNEL3_L4_PORT +#define SL_PWM_CHANNEL_3_PORT_H SL_PWM_CHANNEL3_H4_PORT #define SL_PWM_CHANNEL_3_MUX_L SL_SI91X_PWM_4L_MUX #define SL_PWM_CHANNEL_3_MUX_H SL_SI91X_PWM_4H_MUX @@ -115,38 +192,50 @@ extern "C" { // PWM Fault Pin set resolution #if (SL_PWM_CHANNEL_3_EVENT == 0) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN +#define SL_PWM_CHANNEL_3_PORT SL_PWM_CHANNEL3_FAULTA_PORT +#define SL_PWM_CHANNEL_3_PIN SL_PWM_CHANNEL3_FAULTA_PIN #define SL_PWM_CHANNEL_3_MUX 0 #define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD #endif #if (SL_PWM_CHANNEL_3_EVENT == 1) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTA_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTA_PIN +#define SL_PWM_CHANNEL_3_PORT SL_PWM_CHANNEL3_FAULTA_PORT +#define SL_PWM_CHANNEL_3_PIN SL_PWM_CHANNEL3_FAULTA_PIN #define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTA_MUX #define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTA_PAD #endif #if (SL_PWM_CHANNEL_3_EVENT == 2) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_FAULTB_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_FAULTB_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD +#define SL_PWM_CHANNEL_3_PORT SL_PWM_CHANNEL3_FAULTB_PORT +#if (SL_PWM_CHANNEL3_FAULTB_LOC == 0) +#define SL_PWM_CHANNEL_3_PIN SL_PWM_CHANNEL3_FAULTB_PIN +#else +#define SL_PWM_CHANNEL_3_PIN (SL_PWM_CHANNEL3_FAULTB_PIN + 64) +#endif +#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_FAULTB_MUX +#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_FAULTB_PAD #endif #if (SL_PWM_CHANNEL_3_EVENT == 3) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_1_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_1_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD +#define SL_PWM_CHANNEL_3_PORT SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_PORT +#if ((SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_LOC == 2) || (SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_LOC == 3)) +#define SL_PWM_CHANNEL_3_PIN (SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_PIN + 64) +#else +#define SL_PWM_CHANNEL_3_PIN SL_PWM_CHANNEL3_TMR_EXT_TRIG_1_PIN +#endif +#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_1_MUX +#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_1_PAD #endif #if (SL_PWM_CHANNEL_3_EVENT == 4) -#define SL_PWM_CHANNEL_3_PORT SL_SI91X_PWM_TMR_EXT_TRIG_2_PORT -#define SL_PWM_CHANNEL_3_PIN SL_SI91X_PWM_TMR_EXT_TRIG_2_PIN -#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX -#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD +#define SL_PWM_CHANNEL_3_PORT SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_PORT +#if (SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_LOC == 2) +#define SL_PWM_CHANNEL_3_PIN (SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_PIN + 64) +#else +#define SL_PWM_CHANNEL_3_PIN SL_PWM_CHANNEL3_TMR_EXT_TRIG_2_PIN +#endif +#define SL_PWM_CHANNEL_3_MUX SL_SI91X_PWM_TMR_EXT_TRIG_2_MUX +#define SL_PWM_CHANNEL_3_PAD SL_SI91X_PWM_TMR_EXT_TRIG_2_PAD #endif #ifdef __cplusplus diff --git a/components/common/doxygen-ip-addresses.cfg b/components/common/doxygen-ip-addresses.cfg new file mode 100644 index 000000000..ef21b0c12 --- /dev/null +++ b/components/common/doxygen-ip-addresses.cfg @@ -0,0 +1,40 @@ +/******************************************************************************* +* @file doxygen-ip-addresses.cfg +* @brief +******************************************************************************* +* # License +* Copyright 2024 Silicon Laboratories Inc. www.silabs.com +******************************************************************************* +* +* The licensor of this software is Silicon Laboratories Inc. Your use of this +* software is governed by the terms of Silicon Labs Master Software License +* Agreement (MSLA) available at +* www.silabs.com/about-us/legal/master-software-license-agreement. This +* software is distributed to you in Source Code format and is governed by the +* sections of the MSLA applicable to Source Code. +* +******************************************************************************/ + + +PROJECT_NAME = "Common" +OUTPUT_DIRECTORY = ./components/common/doxygen-output-ip-addresses +HTML_OUTPUT = html +XML_OUTPUT = xml +RTF_OUTPUT = rtf +GENERATE_LATEX = NO +GENERATE_MAN = NO +GENERATE_RTF = NO +GENERATE_XML = YES +CASE_SENSE_NAMES = YES +ENABLE_PREPROCESSING = YES +INPUT = ./components/common/inc/sl_ip_types.h \ + ./components/common/docs/doxygen_indexfile_ip_addresses.md \ + ./components/common/docs/doxygen_template_ip_addresses.h \ + +IMAGE_PATH = ./components/common/ +STRIP_CODE_COMMENTS = NO +FILE_PATTERNS = *.h +QUIET = YES +JAVADOC_AUTOBRIEF = YES +SEARCHENGINE = NO +COMPACT_LATEX = NO diff --git a/components/common/inc/sl_additional_status.h b/components/common/inc/sl_additional_status.h index 536360c60..80aacc4d6 100644 --- a/components/common/inc/sl_additional_status.h +++ b/components/common/inc/sl_additional_status.h @@ -100,6 +100,14 @@ // Si91X Crypto errors #define SL_STATUS_TRNG_DUPLICATE_ENTROPY ((sl_status_t)0x0B62) ///< TRNG duplicate elements error. +// Si91X Wi-Fi transceiver error codes +#define SL_STATUS_TRANSCEIVER_INVALID_MAC_ADDRESS ((sl_status_t)0x0B63) ///< Invalid MAC address provided +#define SL_STATUS_TRANSCEIVER_INVALID_QOS_PRIORITY ((sl_status_t)0x0B64) ///< Invalid QOS priority provided +#define SL_STATUS_TRANSCEIVER_INVALID_CHANNEL ((sl_status_t)0x0B65) ///< Invalid channel provided +#define SL_STATUS_TRANSCEIVER_INVALID_DATA_RATE ((sl_status_t)0x0B66) ///< Invalid data rate provided +#define SL_STATUS_TRANSCEIVER_INVALID_CONFIG \ + ((sl_status_t)0x0B67) ///< Invalid transceiver configuration parameters provided + // Si91X Crypto Firmware Errors #define SL_STATUS_CRYPTO_INVALID_PARAMETER \ ((sl_status_t)0x1CCFE) ///< Return when parameter passed to Crypto SAPI is invalid. @@ -282,6 +290,12 @@ ((sl_status_t)0x10084) ///< The data in the user name or password is malformed. #define SL_STATUS_SI91X_MQTT_ERROR_NOT_AUTHORIZED ((sl_status_t)0x10085) ///< The Client is not authorized to connect. #define SL_STATUS_SI91X_SA_QUERY_TIMEOUT ((sl_status_t)0x10086) ///< Disconnection due to SA Query Timeout. +#define SL_STATUS_SI91X_TRANSCEIVER_PEER_DS_FEAT_DISABLED \ + ((sl_status_t)0x10096) ///< Feature to add peers in MAC layer is disabled +#define SL_STATUS_SI91X_TRANSCEIVER_PEER_ALREADY_EXISTS ((sl_status_t)0x10097) ///< Peer already exists in MAC layer +#define SL_STATUS_SI91X_TRANSCEIVER_MAX_PEER_LIMIT_REACHED \ + ((sl_status_t)0x10098) ///< Max peer limit reached in MAC layer +#define SL_STATUS_SI91X_TRANSCEIVER_PEER_NOT_FOUND ((sl_status_t)0x10099) ///< Peer not found in MAC layer #define SL_STATUS_SI91X_DUPLICATE_ENTRY_EXISTS_IN_DNS_SERVER_TABLE \ ((sl_status_t)0x100AF) ///< Duplicate entry exists in DNS server table. #define SL_STATUS_SI91X_NO_MEM_AVAILABLE ((sl_status_t)0x100B1) ///< Memory error: No memory available. @@ -353,10 +367,12 @@ ((sl_status_t)0x1BB38) ///< Trying to connect non-existing TCP server socket. #define SL_STATUS_SI91X_ERROR_IN_LEN_OF_THE_COMMAND \ ((sl_status_t)0x1BB3E) ///< Error in length of the command ('Exceeds number of characters' is mentioned in the PRM). -#define SL_STATUS_SI91X_WRONG_PACKET_INFO ((sl_status_t)0x1BB40) ///< Wrong packet info. -#define SL_STATUS_SI91X_SOCKET_STILL_BOUND ((sl_status_t)0x1BB42) ///< Socket is still bound. -#define SL_STATUS_SI91X_NO_FREE_PORT ((sl_status_t)0x1BB45) ///< No free port. -#define SL_STATUS_SI91X_INVALID_PORT ((sl_status_t)0x1BB46) ///< Invalid port. +#define SL_STATUS_SI91X_WRONG_PACKET_INFO ((sl_status_t)0x1BB40) ///< Wrong packet info. +#define SL_STATUS_SI91X_SOCKET_STILL_BOUND ((sl_status_t)0x1BB42) ///< Socket is still bound. +#define SL_STATUS_SI91X_NO_FREE_PORT ((sl_status_t)0x1BB45) ///< No free port. +#define SL_STATUS_SI91X_INVALID_PORT ((sl_status_t)0x1BB46) ///< Invalid port. +#define SL_STATUS_SI91X_CORRUPTED_RPS_HEADER \ + ((sl_status_t)0x1BB49) ///< Corrupted RPS header encountered during firmware update. #define SL_STATUS_SI91X_FEATURE_UNSUPPORTED ((sl_status_t)0x1BB4B) ///< Feature not supported. #define SL_STATUS_SI91X_SOCKET_IN_UNCONNECTED_STATE \ ((sl_status_t)0x1BB50) ///< Socket is not in connected state. Disconnected from server. In case of FTP, user need to give destroy command after receiving this error. diff --git a/components/common/inc/sl_constants.h b/components/common/inc/sl_constants.h index d803a9e24..0b7f07ac1 100644 --- a/components/common/inc/sl_constants.h +++ b/components/common/inc/sl_constants.h @@ -63,7 +63,7 @@ #define PRINT_ERROR_LOGS 0 #define PRINT_DEBUG_LOG 0 -#define PRINT_STATUS(tag, status) printf("\r\n%s %s:%d: 0x%lx \r\n", tag, __FILE__, __LINE__, status); +#define PRINT_STATUS(tag, status) printf("\r\n%s %s:%d: 0x%lu \r\n", tag, __FILE__, __LINE__, status); #define SL_CHECK_STATUS(x) \ do { \ diff --git a/components/common/inc/sl_ip_types.h b/components/common/inc/sl_ip_types.h index f6b72526e..493b53af2 100644 --- a/components/common/inc/sl_ip_types.h +++ b/components/common/inc/sl_ip_types.h @@ -30,6 +30,11 @@ #pragma once #include "stdint.h" +/** + * @addtogroup IP_ADDRESSES + * @{ + */ + /// Enumeration of IP version typedef enum { SL_IPV4_VERSION = 4, SL_IPV6_VERSION = 6 } sl_ip_version_t; @@ -63,14 +68,19 @@ typedef union { } sl_ipv6_address_t; /// Generic IP Address Structure. Supports both IPv4 and IPv6 addresses -typedef struct PACK { +#pragma pack(1) +typedef struct { + /// IP address object union { - sl_ipv4_address_t v4; - sl_ipv6_address_t v6; + sl_ipv4_address_t v4; ///< IPv4 address + sl_ipv6_address_t v6; ///< IPv6 address } ip; sl_ip_address_type_t type; ///< IP address type } sl_ip_address_t; +#pragma pack() + +/** @} */ /// Macro to assist initializing an IPv4 address #define SL_IPV4_ADDRESS(a, b, c, d) \ diff --git a/components/common/inc/sl_utility.h b/components/common/inc/sl_utility.h index a39ac80ef..912135a1c 100644 --- a/components/common/inc/sl_utility.h +++ b/components/common/inc/sl_utility.h @@ -81,4 +81,12 @@ void little_to_big_endian(unsigned int *source, unsigned char *result, unsigned int sl_inet_pton6(const char *src, const char *src_endp, unsigned char *dst, unsigned int *ptr_result); void reverse_digits(unsigned char *xx, int no_digits); void print_firmware_version(sl_wifi_firmware_version_t *firmware_version); -void dump_80211_pkt(uint8_t *pkt, uint32_t pkt_len, uint16_t req_dump_bytes); + +/***************************************************************************/ /** + * @brief Print 802.11 packet + * + * @param[in] packet - pointer to start of MAC header + * @param[in] packet_length - total packet length (MAC header + payload) + * @param[in] max_payload_length - maximum number of payload bytes to print + ******************************************************************************/ +void print_80211_packet(uint8_t *packet, uint32_t packet_length, uint16_t max_payload_length); diff --git a/components/common/src/sl_utility.c b/components/common/src/sl_utility.c index 7c457df9f..b83786acf 100644 --- a/components/common/src/sl_utility.c +++ b/components/common/src/sl_utility.c @@ -102,7 +102,8 @@ void print_mac_address(sl_mac_address_t *mac_address) char *sl_inet_ntop6(const unsigned char *input, char *dst, uint32_t size) { - char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp; + char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"]; + char *tp; struct { int base, len; } best, cur; diff --git a/components/console/variables/console_variables.c b/components/console/variables/console_variables.c index c8cd90031..599c27de4 100644 --- a/components/console/variables/console_variables.c +++ b/components/console/variables/console_variables.c @@ -15,6 +15,7 @@ * ******************************************************************************/ +#define _DEFAULT_SOURCE //#include "console_variable_commands.h" #include "console.h" //#include "console_variables.h" @@ -75,7 +76,8 @@ extern const uint32_t console_variable_table_size; static sl_status_t find_variable_node(char **key, const console_variable_node_t **node) { - const char *token = strtok(*key, KEY_SEPARATOR); + char *token_ptr = NULL; + const char *token = strtok_r(*key, KEY_SEPARATOR, &token_ptr); uint32_t iter = 0; const console_variable_node_t *table = console_variable_table; uint32_t table_size = console_variable_table_size; @@ -91,7 +93,7 @@ static sl_status_t find_variable_node(char **key, const console_variable_node_t break; default: - *key = strtok(NULL, KEY_SEPARATOR); + *key = strtok_r(NULL, KEY_SEPARATOR, &token_ptr); *node = &table[iter]; return SL_STATUS_OK; @@ -113,7 +115,7 @@ static sl_status_t find_variable_node(char **key, const console_variable_node_t continue; } - token = strtok(NULL, KEY_SEPARATOR); + token = strtok_r(NULL, KEY_SEPARATOR, &token_ptr); } return SL_STATUS_ABORT; diff --git a/components/device/silabs/si91x/mcu/core/chip/component/si917-sb00.slcc b/components/device/silabs/si91x/mcu/core/chip/component/si917-sb00.slcc index ca38e75e0..0ec9ba5d6 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/si917-sb00.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/si917-sb00.slcc @@ -69,10 +69,41 @@ - name: nvm3_size value: 65536 + # Default Memory configuration - name: device_flash_addr - value: 136060928 # 0x81C2000 + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_1 - name: device_flash_size - value: 4194304 # 0x400000 + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_1 + # Medium Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_2 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_2 + # Advanced Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_3 + + - name: device_flash_page_size value: 256 diff --git a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m100mgtba.slcc b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m100mgtba.slcc index ba57a531f..3f20eb542 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m100mgtba.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m100mgtba.slcc @@ -24,6 +24,8 @@ unless: [rsilib_board] - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER unless: [rsilib_board] + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + unless: [rsilib_board] - source: - path: components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c - path: components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c @@ -79,10 +81,40 @@ - name: flash_present value: 1 + # Default Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_1 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_1 + # Medium Memory configuration - name: device_flash_addr - value: 136060928 + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_2 - name: device_flash_size - value: 8388608 + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_2 + # Advanced Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_page_size value: 256 diff --git a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m100xntba.slcc b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m100xntba.slcc index d376bbb5e..27d01c6fd 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m100xntba.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m100xntba.slcc @@ -24,6 +24,8 @@ unless: [rsilib_board] - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER unless: [rsilib_board] + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + unless: [rsilib_board] - source: - path: components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c - path: components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c @@ -75,6 +77,41 @@ - name: nvm3_size value: 65536 + # Default Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_1 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_1 + # Medium Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_2 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_2 + # Advanced Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_3 + + - name: device_ram_addr value: 12 - tag: diff --git a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m110lgtba.slcc b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m110lgtba.slcc index e96bb9cb6..0b7557719 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m110lgtba.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m110lgtba.slcc @@ -24,6 +24,8 @@ unless: [rsilib_board] - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER unless: [rsilib_board] + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + unless: [rsilib_board] - source: - path: components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c - path: components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c @@ -80,10 +82,40 @@ - name: flash_present value: 1 + # Default Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_1 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_1 + # Medium Memory configuration - name: device_flash_addr - value: 136060928 + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_2 - name: device_flash_size - value: 4194304 + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_2 + # Advanced Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_page_size value: 256 diff --git a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m111mgtba.slcc b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m111mgtba.slcc index b17f20c2b..10ffb4704 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m111mgtba.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m111mgtba.slcc @@ -24,6 +24,8 @@ unless: [rsilib_board] - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER unless: [rsilib_board] + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + unless: [rsilib_board] - source: - path: components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c - path: components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c @@ -47,7 +49,6 @@ - name: sl_si91x_mcu - name: board_configuration_headers - name: wiseconnect_toolchain_plugin - - name: rsilib_chip - name: freertos_config condition: [freertos] - recommends: @@ -75,13 +76,41 @@ - name: flash_present value: 1 + # Default Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_1 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_1 + # Medium Memory configuration - name: device_flash_addr - value: 136060928 + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_2 - name: device_flash_size - value: 8388608 + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_2 + # Advanced Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_3 - name: device_flash_page_size value: 256 - - name: device_ram_addr value: 12 - tag: diff --git a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m111xgtba.slcc b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m111xgtba.slcc index 82c5708b2..fca4bbded 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m111xgtba.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m111xgtba.slcc @@ -24,6 +24,8 @@ unless: [rsilib_board] - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER unless: [rsilib_board] + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + unless: [rsilib_board] - source: - path: components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c - path: components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c @@ -89,18 +91,41 @@ - name: device_ram_addr value: 12 - # Default Memory configuration - - name: device_ram_size - value: 196608 # 0x0003 0000 - condition: si917_mem_config_1 + + # Default Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_1 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_1 # Medium Memory configuration - - name: device_ram_size - value: 262144 # 0x0004 0000 - condition: si917_mem_config_2 + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_2 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_2 # Advanced Memory configuration - - name: device_ram_size - value: 327680 # 0x0005 0000 - condition: si917_mem_config_3 + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_3 + - tag: - device:opn:siwg917m111xgtba - toolchain_settings: diff --git a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m121xgtba.slcc b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m121xgtba.slcc index 75b4fd730..da0ff58af 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m121xgtba.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m121xgtba.slcc @@ -24,6 +24,8 @@ unless: [rsilib_board] - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER unless: [rsilib_board] + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + unless: [rsilib_board] - source: - path: components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c - path: components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c @@ -78,7 +80,6 @@ value: 7168 - name: nvm3_size value: 65536 - - name: psram_present value: 1 - name: device_psram_addr diff --git a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m141xgtba.slcc b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m141xgtba.slcc index 5a6c57d12..63825a000 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/siwg917m141xgtba.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/siwg917m141xgtba.slcc @@ -24,6 +24,8 @@ unless: [rsilib_board] - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER unless: [rsilib_board] + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + unless: [rsilib_board] - source: - path: components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c - path: components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c diff --git a/components/device/silabs/si91x/mcu/core/chip/component/siwg917y111mgab.slcc b/components/device/silabs/si91x/mcu/core/chip/component/siwg917y111mgab.slcc index f8f1ade0b..4ed6f99fe 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/siwg917y111mgab.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/siwg917y111mgab.slcc @@ -24,6 +24,8 @@ unless: [rsilib_board] - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER unless: [rsilib_board] + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + unless: [rsilib_board] - source: - path: components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c - path: components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c @@ -49,7 +51,6 @@ - name: sl_si91x_mcu - name: board_configuration_headers - name: wiseconnect_toolchain_plugin - - name: rsilib_chip - name: freertos_config condition: [freertos] - template_contribution: @@ -72,10 +73,41 @@ - name: nvm3_size value: 65536 + # Default Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_1 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_1 + # Medium Memory configuration - name: device_flash_addr - value: 136060928 + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_2 - name: device_flash_size - value: 8388608 + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_2 + # Advanced Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_3 + + - name: device_flash_page_size value: 256 diff --git a/components/device/silabs/si91x/mcu/core/chip/component/siwg917y111mgnb.slcc b/components/device/silabs/si91x/mcu/core/chip/component/siwg917y111mgnb.slcc index efa50a9ad..8418382d0 100644 --- a/components/device/silabs/si91x/mcu/core/chip/component/siwg917y111mgnb.slcc +++ b/components/device/silabs/si91x/mcu/core/chip/component/siwg917y111mgnb.slcc @@ -24,6 +24,8 @@ unless: [rsilib_board] - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_BASE_VER unless: [rsilib_board] + - name: SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2 + unless: [rsilib_board] - source: - path: components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c - path: components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c @@ -74,10 +76,41 @@ - name: flash_present value: 1 + # Default Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_1 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_1 + # Medium Memory configuration - name: device_flash_addr - value: 136060928 + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_2 - name: device_flash_size - value: 8388608 + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_2 + # Advanced Memory configuration + - name: device_flash_addr + value: 136323072 # 0x0820 2000 + priority: -1 + condition: + - si917_mem_config_3 + - name: device_flash_size + value: 2088960 # 0x001F E000 + priority: -1 + condition: + - si917_mem_config_3 + + - name: device_flash_page_size value: 256 diff --git a/components/device/silabs/si91x/mcu/core/chip/component/sl_si91x_common_flash.slcc b/components/device/silabs/si91x/mcu/core/chip/component/sl_si91x_common_flash.slcc new file mode 100644 index 000000000..b3eb4ac4d --- /dev/null +++ b/components/device/silabs/si91x/mcu/core/chip/component/sl_si91x_common_flash.slcc @@ -0,0 +1,10 @@ +id: si91x_common_flash +label: Common Flash Component +package: platform +description: > + Common Flash Component Provides common flash capabilities for the board, If the board supports common flashes install this component. +category: Board|Flash +quality: production +provides: + - name: si91x_common_flash + - name: sl_si91x_common_flash \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/core/chip/component/sl_si91x_dual_flash.slcc b/components/device/silabs/si91x/mcu/core/chip/component/sl_si91x_dual_flash.slcc new file mode 100644 index 000000000..443b818b4 --- /dev/null +++ b/components/device/silabs/si91x/mcu/core/chip/component/sl_si91x_dual_flash.slcc @@ -0,0 +1,10 @@ +id: si91x_dual_flash +label: Dual Flash Component +package: platform +description: > + Dual Flash Component Provides Dual flash capabilities for the board, If the board Supports Dual flash install this component. +category: Board|Flash +quality: production +provides: + - name: si91x_dual_flash + - name: sl_si91x_dual_flash \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/core/chip/config/RTE_Device_917.h b/components/device/silabs/si91x/mcu/core/chip/config/RTE_Device_917.h index 127dd4607..491656e8e 100644 --- a/components/device/silabs/si91x/mcu/core/chip/config/RTE_Device_917.h +++ b/components/device/silabs/si91x/mcu/core/chip/config/RTE_Device_917.h @@ -71,7 +71,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -536,7 +536,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -828,7 +828,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 @@ -973,8 +973,8 @@ #else //Pintool data #define RTE_SSI_MASTER_MISO 1 -#define RTE_SSI_MASTER_MISO_PORT SSI_MASTER_MISO_PT_PORT -#define RTE_SSI_MASTER_MISO_PIN SSI_MASTER_MISO_PT_PIN +#define RTE_SSI_MASTER_MISO_PORT SSI_MASTER_MISO__PORT +#define RTE_SSI_MASTER_MISO_PIN SSI_MASTER_MISO__PIN #define RTE_SSI_MASTER_MISO_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_MISO_LOC == 0) #define RTE_SSI_MASTER_MISO_PADSEL 7 @@ -1016,8 +1016,8 @@ #else //Pintool data #define RTE_SSI_MASTER_MOSI 1 -#define RTE_SSI_MASTER_MOSI_PORT SSI_MASTER_MOSI_PT_PORT -#define RTE_SSI_MASTER_MOSI_PIN SSI_MASTER_MOSI_PT_PIN +#define RTE_SSI_MASTER_MOSI_PORT SSI_MASTER_MOSI__PORT +#define RTE_SSI_MASTER_MOSI_PIN SSI_MASTER_MOSI__PIN #define RTE_SSI_MASTER_MOSI_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_MOSI_LOC == 0) #define RTE_SSI_MASTER_MOSI_PADSEL 6 @@ -1059,8 +1059,8 @@ #else //Pintool data #define RTE_SSI_MASTER_SCK 1 -#define RTE_SSI_MASTER_SCK_PORT SSI_MASTER_SCK_PT_PORT -#define RTE_SSI_MASTER_SCK_PIN SSI_MASTER_SCK_PT_PIN +#define RTE_SSI_MASTER_SCK_PORT SSI_MASTER_SCK__PORT +#define RTE_SSI_MASTER_SCK_PIN SSI_MASTER_SCK__PIN #define RTE_SSI_MASTER_SCK_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_SCK_LOC == 0) #define RTE_SSI_MASTER_SCK_PADSEL 3 @@ -1107,8 +1107,8 @@ #else //Pintool data #define RTE_SSI_MASTER_CS0 M4_SSI_CS0 -#define RTE_SSI_MASTER_CS0_PORT SSI_MASTER_CS0_PT_PORT -#define RTE_SSI_MASTER_CS0_PIN SSI_MASTER_CS0_PT_PIN +#define RTE_SSI_MASTER_CS0_PORT SSI_MASTER_CS0__PORT +#define RTE_SSI_MASTER_CS0_PIN SSI_MASTER_CS0__PIN #define RTE_SSI_MASTER_CS0_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_CS0_LOC == 0) #define RTE_SSI_MASTER_CS0_PADSEL 4 @@ -1132,8 +1132,8 @@ #error "Invalid SSI_MASTER_CS1 Pin Configuration!" #endif #else -#define RTE_SSI_MASTER_CS1_PORT SSI_MASTER_CS1_PT_PORT -#define RTE_SSI_MASTER_CS1_PIN SSI_MASTER_CS1_PT_PIN +#define RTE_SSI_MASTER_CS1_PORT SSI_MASTER_CS1__PORT +#define RTE_SSI_MASTER_CS1_PIN SSI_MASTER_CS1__PIN #endif #define RTE_SSI_MASTER_CS1 M4_SSI_CS1 #define RTE_SSI_MASTER_CS1_MODE EGPIO_PIN_MUX_MODE3 @@ -1160,8 +1160,8 @@ #else //Pintool data #define RTE_SSI_MASTER_CS2 M4_SSI_CS2 -#define RTE_SSI_MASTER_CS2_PORT SSI_MASTER_CS2_PT_PORT -#define RTE_SSI_MASTER_CS2_PIN SSI_MASTER_CS2_PT_PIN +#define RTE_SSI_MASTER_CS2_PORT SSI_MASTER_CS2__PORT +#define RTE_SSI_MASTER_CS2_PIN SSI_MASTER_CS2__PIN #define RTE_SSI_MASTER_CS2_MODE EGPIO_PIN_MUX_MODE3 #if (SSI_MASTER_CS2_LOC == 0) #define RTE_SSI_MASTER_CS2_PADSEL 8 @@ -1182,8 +1182,8 @@ #error "Invalid SSI_MASTER_CS3 Pin Configuration!" #endif #else -#define RTE_SSI_MASTER_CS3_PORT SSI_MASTER_CS3_PT_PORT -#define RTE_SSI_MASTER_CS3_PIN SSI_MASTER_CS3_PT_PIN +#define RTE_SSI_MASTER_CS3_PORT SSI_MASTER_CS3__PORT +#define RTE_SSI_MASTER_CS3_PIN SSI_MASTER_CS3__PIN #endif #define RTE_SSI_MASTER_CS3 M4_SSI_CS3 #define RTE_SSI_MASTER_CS3_MODE EGPIO_PIN_MUX_MODE3 @@ -1244,8 +1244,8 @@ #else //Pintool data #define RTE_SSI_SLAVE_MISO 1 -#define RTE_SSI_SLAVE_MISO_PORT SSI_SLAVE_MISO_PT_PORT -#define RTE_SSI_SLAVE_MISO_PIN SSI_SLAVE_MISO_PT_PIN +#define RTE_SSI_SLAVE_MISO_PORT SSI_SLAVE_MISO__PORT +#define RTE_SSI_SLAVE_MISO_PIN SSI_SLAVE_MISO__PIN #define RTE_SSI_SLAVE_MISO_MODE EGPIO_PIN_MUX_MODE8 #if (SSI_SLAVE_MISO_LOC == 1) #define RTE_SSI_SLAVE_MISO_PADSEL 6 @@ -1302,8 +1302,8 @@ #else //Pintool data #define RTE_SSI_SLAVE_MOSI 1 -#define RTE_SSI_SLAVE_MOSI_PORT SSI_SLAVE_MOSI_PT_PORT -#define RTE_SSI_SLAVE_MOSI_PIN SSI_SLAVE_MOSI_PT_PIN +#define RTE_SSI_SLAVE_MOSI_PORT SSI_SLAVE_MOSI__PORT +#define RTE_SSI_SLAVE_MOSI_PIN SSI_SLAVE_MOSI__PIN #define RTE_SSI_SLAVE_MOSI_MODE EGPIO_PIN_MUX_MODE8 #if (SSI_SLAVE_MOSI_LOC == 1) #define RTE_SSI_SLAVE_MOSI_PADSEL 5 @@ -1356,8 +1356,8 @@ #else //Pintool data #define RTE_SSI_SLAVE_SCK 1 -#define RTE_SSI_SLAVE_SCK_PORT SSI_SLAVE_SCK_PT_PORT -#define RTE_SSI_SLAVE_SCK_PIN SSI_SLAVE_SCK_PT_PIN +#define RTE_SSI_SLAVE_SCK_PORT SSI_SLAVE_SCK__PORT +#define RTE_SSI_SLAVE_SCK_PIN SSI_SLAVE_SCK__PIN #define RTE_SSI_SLAVE_SCK_MODE EGPIO_PIN_MUX_MODE8 #if (SSI_SLAVE_SCK_LOC == 1) #define RTE_SSI_SLAVE_SCK_PADSEL 3 @@ -1375,7 +1375,7 @@ #endif // SSI_SLAVE_CS Pin <0=>Not Used <1=>GPIO_9 <2=>GPIO_25 <3=>GPIO_46 <4=>GPIO_53 -#ifndef SSI_SLAVE_CS_LOC +#ifndef SSI_SLAVE_CS0_LOC #define RTE_SSI_SLAVE_CS_PORT_ID 1 #if (RTE_SSI_SLAVE_CS_PORT_ID == 0) @@ -1410,19 +1410,19 @@ #else //Pintool data #define RTE_SSI_SLAVE_CS 1 -#define RTE_SSI_SLAVE_CS_PORT SSI_SLAVE_CS_PT_PORT -#define RTE_SSI_SLAVE_CS_PIN SSI_SLAVE_CS_PT_PIN +#define RTE_SSI_SLAVE_CS_PORT SSI_SLAVE_CS0__PORT +#define RTE_SSI_SLAVE_CS_PIN SSI_SLAVE_CS0__PIN #define RTE_SSI_SLAVE_CS_MODE EGPIO_PIN_MUX_MODE8 -#if (SSI_SLAVE_CS_LOC == 1) +#if (SSI_SLAVE_CS0_LOC == 1) #define RTE_SSI_SLAVE_CS_PADSEL 4 #endif -#if (SSI_SLAVE_CS_LOC == 2) +#if (SSI_SLAVE_CS0_LOC == 2) #define RTE_SSI_SLAVE_CS_PADSEL 0 //no pad #endif -#if (SSI_SLAVE_CS_LOC == 3) +#if (SSI_SLAVE_CS0_LOC == 3) #define RTE_SSI_SLAVE_CS_PADSEL 10 #endif -#if (SSI_SLAVE_CS_LOC == 4) +#if (SSI_SLAVE_CS0_LOC == 4) #define RTE_SSI_SLAVE_CS_PADSEL 17 #endif //Pintool data @@ -1474,8 +1474,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_MISO 1 -#define RTE_SSI_ULP_MASTER_MISO_PORT SSI_ULP_MASTER_MISO_PT_PORT -#define RTE_SSI_ULP_MASTER_MISO_PIN SSI_ULP_MASTER_MISO_PT_PIN +#define RTE_SSI_ULP_MASTER_MISO_PORT SSI_ULP_MASTER_MISO__PORT +#define RTE_SSI_ULP_MASTER_MISO_PIN SSI_ULP_MASTER_MISO__PIN #define RTE_SSI_ULP_MASTER_MISO_MODE 1 //Pintool data #endif @@ -1499,8 +1499,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_MOSI 1 -#define RTE_SSI_ULP_MASTER_MOSI_PORT SSI_ULP_MASTER_MOSI_PT_PORT -#define RTE_SSI_ULP_MASTER_MOSI_PIN SSI_ULP_MASTER_MOSI_PT_PIN +#define RTE_SSI_ULP_MASTER_MOSI_PORT SSI_ULP_MASTER_MOSI__PORT +#define RTE_SSI_ULP_MASTER_MOSI_PIN SSI_ULP_MASTER_MOSI__PIN #define RTE_SSI_ULP_MASTER_MOSI_MODE 1 //Pintool data #endif @@ -1530,8 +1530,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_SCK 1 -#define RTE_SSI_ULP_MASTER_SCK_PORT SSI_ULP_MASTER_SCK_PT_PORT -#define RTE_SSI_ULP_MASTER_SCK_PIN SSI_ULP_MASTER_SCK_PT_PIN +#define RTE_SSI_ULP_MASTER_SCK_PORT SSI_ULP_MASTER_SCK__PORT +#define RTE_SSI_ULP_MASTER_SCK_PIN SSI_ULP_MASTER_SCK__PIN #define RTE_SSI_ULP_MASTER_SCK_MODE 1 //Pintool data #endif @@ -1555,8 +1555,8 @@ #else //Pintool data #define RTE_SSI_ULP_MASTER_CS0 ULP_SSI_CS0 -#define RTE_SSI_ULP_MASTER_CS0_PORT SSI_ULP_MASTER_CS0_PT_PORT -#define RTE_SSI_ULP_MASTER_CS0_PIN SSI_ULP_MASTER_CS0_PT_PIN +#define RTE_SSI_ULP_MASTER_CS0_PORT SSI_ULP_MASTER_CS0__PORT +#define RTE_SSI_ULP_MASTER_CS0_PIN SSI_ULP_MASTER_CS0__PIN #define RTE_SSI_ULP_MASTER_CS0_MODE 1 //Pintool data #endif @@ -1566,8 +1566,8 @@ #define RTE_SSI_ULP_MASTER_CS1_PORT 0 #define RTE_SSI_ULP_MASTER_CS1_PIN 4 #else -#define RTE_SSI_ULP_MASTER_CS1_PORT SSI_ULP_MASTER_CS1_PT_PORT -#define RTE_SSI_ULP_MASTER_CS1_PIN SSI_ULP_MASTER_CS1_PT_PIN +#define RTE_SSI_ULP_MASTER_CS1_PORT SSI_ULP_MASTER_CS1__PORT +#define RTE_SSI_ULP_MASTER_CS1_PIN SSI_ULP_MASTER_CS1__PIN #endif #define RTE_SSI_ULP_MASTER_CS1 ULP_SSI_CS1 #define RTE_SSI_ULP_MASTER_CS1_MODE 1 @@ -1577,8 +1577,8 @@ #define RTE_SSI_ULP_MASTER_CS2_PORT 0 #define RTE_SSI_ULP_MASTER_CS2_PIN 6 #else -#define RTE_SSI_ULP_MASTER_CS2_PORT SSI_ULP_MASTER_CS2_PT_PORT -#define RTE_SSI_ULP_MASTER_CS2_PIN SSI_ULP_MASTER_CS2_PT_PIN +#define RTE_SSI_ULP_MASTER_CS2_PORT SSI_ULP_MASTER_CS2__PORT +#define RTE_SSI_ULP_MASTER_CS2_PIN SSI_ULP_MASTER_CS2__PIN #endif #define RTE_SSI_ULP_MASTER_CS2 ULP_SSI_CS2 #define RTE_SSI_ULP_MASTER_CS2_MODE 1 @@ -2593,7 +2593,7 @@ // GSPI_MASTER_CLK <0=>P0_8 <1=>P0_25 <2=>P0_46 <3=>P0_52 // CLK of GSPI0 -#ifndef GSPI_MASTER_CLK_LOC +#ifndef GSPI_MASTER_SCK_LOC #define RTE_GSPI_MASTER_CLK_PORT_ID 1 #if (RTE_GSPI_MASTER_CLK_PORT_ID == 0) @@ -2621,19 +2621,19 @@ #endif #else //Pintool data -#define RTE_GSPI_MASTER_CLK_PORT GSPI_MASTER_CLK_PORT -#define RTE_GSPI_MASTER_CLK_PIN GSPI_MASTER_CLK_PIN +#define RTE_GSPI_MASTER_CLK_PORT GSPI_MASTER_SCK__PORT +#define RTE_GSPI_MASTER_CLK_PIN GSPI_MASTER_SCK__PIN #define RTE_GSPI_MASTER_CLK_MUX 4 -#if (GSPI_MASTER_CLK_LOC == 0) +#if (GSPI_MASTER_SCK_LOC == 0) #define RTE_GSPI_MASTER_CLK_PAD 3 #endif -#if (GSPI_MASTER_CLK_LOC == 1) +#if (GSPI_MASTER_SCK_LOC == 1) #define RTE_GSPI_MASTER_CLK_PAD 0 #endif -#if (GSPI_MASTER_CLK_LOC == 2) +#if (GSPI_MASTER_SCK_LOC == 2) #define RTE_GSPI_MASTER_CLK_PAD 10 #endif -#if (GSPI_MASTER_CLK_LOC == 3) +#if (GSPI_MASTER_SCK_LOC == 3) #define RTE_GSPI_MASTER_CLK_PAD 16 #endif //Pintool data @@ -2644,7 +2644,7 @@ // CS0 of GSPI0 // #ifndef GSPI_MASTER_CS0_LOC -#define RTE_GSPI_MASTER_CS0_PORT_ID 1 +#define RTE_GSPI_MASTER_CS0_PORT_ID 2 #if (RTE_GSPI_MASTER_CS0_PORT_ID == 0) #define RTE_GSPI_MASTER_CS0 1 @@ -2676,8 +2676,8 @@ #else //Pintool data #define RTE_GSPI_MASTER_CS0 1 -#define RTE_GSPI_MASTER_CS0_PORT GSPI_MASTER_CS0_PORT -#define RTE_GSPI_MASTER_CS0_PIN GSPI_MASTER_CS0_PIN +#define RTE_GSPI_MASTER_CS0_PORT GSPI_MASTER_CS0__PORT +#define RTE_GSPI_MASTER_CS0_PIN GSPI_MASTER_CS0__PIN #define RTE_GSPI_MASTER_CS0_MUX 4 #if (GSPI_MASTER_CS0_LOC == 0) #define RTE_GSPI_MASTER_CS0_PAD 4 @@ -2699,7 +2699,7 @@ // CS1 of GSPI0 // #ifndef GSPI_MASTER_CS1_LOC -#define RTE_GSPI_MASTER_CS1_PORT_ID 1 +#define RTE_GSPI_MASTER_CS1_PORT_ID 2 #if (RTE_GSPI_MASTER_CS1_PORT_ID == 0) #define RTE_GSPI_MASTER_CS1 1 #define RTE_GSPI_MASTER_CS1_PORT 0 @@ -2730,8 +2730,8 @@ #else //Pintool data #define RTE_GSPI_MASTER_CS1 1 -#define RTE_GSPI_MASTER_CS1_PORT GSPI_MASTER_CS1_PORT -#define RTE_GSPI_MASTER_CS1_PIN GSPI_MASTER_CS1_PIN +#define RTE_GSPI_MASTER_CS1_PORT GSPI_MASTER_CS1__PORT +#define RTE_GSPI_MASTER_CS1_PIN GSPI_MASTER_CS1__PIN #define RTE_GSPI_MASTER_CS1_MUX 4 #if (GSPI_MASTER_CS1_LOC == 0) #define RTE_GSPI_MASTER_CS1_PAD 5 @@ -2784,8 +2784,8 @@ #else //Pintool data #define RTE_GSPI_MASTER_CS2 1 -#define RTE_GSPI_MASTER_CS2_PORT GSPI_MASTER_CS2_PORT -#define RTE_GSPI_MASTER_CS2_PIN GSPI_MASTER_CS2_PIN +#define RTE_GSPI_MASTER_CS2_PORT GSPI_MASTER_CS2__PORT +#define RTE_GSPI_MASTER_CS2_PIN GSPI_MASTER_CS2__PIN #define RTE_GSPI_MASTER_CS2_MUX 4 #if (GSPI_MASTER_CS2_LOC == 0) #define RTE_GSPI_MASTER_CS2_PAD 8 @@ -2840,8 +2840,8 @@ #endif #else //Pintool data -#define RTE_GSPI_MASTER_MOSI_PORT GSPI_MASTER_MOSI_PORT -#define RTE_GSPI_MASTER_MOSI_PIN GSPI_MASTER_MOSI_PIN +#define RTE_GSPI_MASTER_MOSI_PORT GSPI_MASTER_MOSI__PORT +#define RTE_GSPI_MASTER_MOSI_PIN GSPI_MASTER_MOSI__PIN #define RTE_GSPI_MASTER_MOSI_MUX 4 #if (GSPI_MASTER_MOSI_LOC == 0) #define RTE_GSPI_MASTER_MOSI_PAD 1 @@ -2888,8 +2888,8 @@ #endif #else //Pintool data -#define RTE_GSPI_MASTER_MISO_PORT GSPI_MASTER_MISO_PORT -#define RTE_GSPI_MASTER_MISO_PIN GSPI_MASTER_MISO_PIN +#define RTE_GSPI_MASTER_MISO_PORT GSPI_MASTER_MISO__PORT +#define RTE_GSPI_MASTER_MISO_PIN GSPI_MASTER_MISO__PIN #define RTE_GSPI_MASTER_MISO_MUX 4 #if (GSPI_MASTER_MISO_LOC == 0) #define RTE_GSPI_MASTER_MISO_PAD 6 @@ -3125,154 +3125,6 @@ #define RTE_SCT_OUT_1_MUX 9 #define RTE_SCT_OUT_1_PAD 0 //no pad -/// SCT_OUT_2 <0=>GPIO_70 <1=>GPIO_8 -#ifndef SCT_OUT2_LOC -#define RTE_SCT_OUT_2_PORT_ID 0 -#if ((RTE_SCT_OUT_2_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_2_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_2_PORT_ID == 0) -#define RTE_SCT_OUT_2_PORT 0 -#define RTE_SCT_OUT_2_PIN 70 -#elif (RTE_SCT_OUT_2_PORT_ID == 1) -#define RTE_SCT_OUT_2_PORT 0 -#define RTE_SCT_OUT_2_PIN 8 -#define RTE_SCT_OUT_2_MUX 12 -#define RTE_SCT_OUT_2_PAD 3 -#else -#error "Invalid RTE_SCT_OUT_2_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_2_PORT SCT_OUT2_PORT -#define RTE_SCT_OUT_2_PIN (SCT_OUT2_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_2_MUX 7 -#define RTE_SCT_OUT_2_PAD 28 - -/**/ -//SCT_OUT_3 <0=>GPIO_71 <1=>GPIO_9 -#ifndef SCT_OUT3_LOC -#define RTE_SCT_OUT_3_PORT_ID 0 -#if ((RTE_SCT_OUT_3_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_3_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_3_PORT_ID == 0) -#define RTE_SCT_OUT_3_PORT 0 -#define RTE_SCT_OUT_3_PIN 71 -#elif (RTE_SCT_OUT_3_PORT_ID == 1) -#define RTE_SCT_OUT_3_PORT 0 -#define RTE_SCT_OUT_3_PIN 9 -#define RTE_SCT_OUT_3_MUX 12 -#define RTE_SCT_OUT_3_PAD 4 -#else -#error "Invalid RTE_SCT_OUT_3_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_3_PORT SCT_OUT3_PORT -#define RTE_SCT_OUT_3_PIN (SCT_OUT3_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_3_MUX 7 -#define RTE_SCT_OUT_3_PAD 29 - -//SCT_OUT_4 <0=>GPIO_72 <1=>GPIO_68 -#ifndef SCT_OUT4_LOC -#define RTE_SCT_OUT_4_PORT_ID 0 -#if ((RTE_SCT_OUT_4_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_4_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_4_PORT_ID == 0) -/**/ -#define RTE_SCT_OUT_4_PORT 0 -#define RTE_SCT_OUT_4_PIN 72 -#else -#error "Invalid RTE_SCT_OUT_4_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_4_PORT SCT_OUT4_PORT -#define RTE_SCT_OUT_4_PIN (SCT_OUT4_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_4_MUX 7 -#define RTE_SCT_OUT_4_PAD 30 - -//SCT_OUT_5 <0=>GPIO_73 <1=>GPIO_69 -#ifndef SCT_OUT5_LOC -#define RTE_SCT_OUT_5_PORT_ID 0 -#if ((RTE_SCT_OUT_5_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_5_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_5_PORT_ID == 0) -#define RTE_SCT_OUT_5_PORT 2 -#define RTE_SCT_OUT_5_PIN 73 -#else -#error "Invalid RTE_SCT_OUT_5_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_5_PORT SCT_OUT5_PORT -#define RTE_SCT_OUT_5_PIN (SCT_OUT5_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_5_MUX 7 -#define RTE_SCT_OUT_5_PAD 31 - -//SCT_OUT_6 <0=>GPIO_74 <1=>GPIO_70 -#ifndef SCT_OUT6_LOC -#define RTE_SCT_OUT_6_PORT_ID 0 -#if ((RTE_SCT_OUT_6_PORT_ID == 1)) -#error "Invalid RTE_SCT_OUT_6_PIN pin Configuration!" -#endif - -#if (RTE_SCT_OUT_6_PORT_ID == 0) -#define RTE_SCT_OUT_6_PORT 0 -#define RTE_SCT_OUT_6_PIN 74 -#define RTE_SCT_OUT_6_MUX 7 -#define RTE_SCT_OUT_6_PAD 32 -#elif (RTE_SCT_OUT_6_PORT_ID == 1) -#define RTE_SCT_OUT_6_PORT 0 -#define RTE_SCT_OUT_6_PIN 70 -#define RTE_SCT_OUT_6_MUX 13 -#define RTE_SCT_OUT_6_PAD 28 -#else -#error "Invalid RTE_SCT_OUT_6_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_6_PORT SCT_OUT6_PORT -#define RTE_SCT_OUT_6_PIN (SCT_OUT6_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_6_MUX 7 -#define RTE_SCT_OUT_6_PAD 32 - -// SCT_OUT_7 <0=>GPIO_75 <1=>GPIO_71 -#ifndef SCT_OUT7_LOC -#define RTE_SCT_OUT_7_PORT_ID 0 - -#if (RTE_SCT_OUT_7_PORT_ID == 0) -#define RTE_SCT_OUT_7_PORT 0 -#define RTE_SCT_OUT_7_PIN 75 -#else -#error "Invalid RTE_SCT_OUT_7_PIN Pin Configuration!" -#endif -#else -//Pintool data -#define RTE_SCT_OUT_7_PORT SCT_OUT7_PORT -#define RTE_SCT_OUT_7_PIN (SCT_OUT7_PIN + GPIO_MAX_PIN) -//Pintool data -#endif -#define RTE_SCT_OUT_7_MUX 7 -#define RTE_SCT_OUT_7_PAD 33 - // SIO // //<> Serial Input Output //SIO_0 <0=>GPIO_6 <1=>GPIO_25 <2=>GPIO_64 <3=>GPIO_72 @@ -4870,6 +4722,6 @@ #define RTE_UULP_GPIO_5_PIN 5 #define RTE_UULP_GPIO_5_MODE 0 -#endif // 0 +#endif //0 #endif \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/core/chip/inc/si91x_device.h b/components/device/silabs/si91x/mcu/core/chip/inc/si91x_device.h index dcf5afa71..b451ee286 100644 --- a/components/device/silabs/si91x/mcu/core/chip/inc/si91x_device.h +++ b/components/device/silabs/si91x/mcu/core/chip/inc/si91x_device.h @@ -2598,7 +2598,7 @@ typedef struct { /*!< (@ 0x47070000) MCPWM Structure */ union { __IOM uint32_t PWM_TIME_PRD_CNTR_WR_REG_CH2; /*!< (@ 0x0000011C) Base time counter initial value - register for channal2 */ + register for channel2 */ struct { __IOM uint32_t PWM_TIME_PRD_CNTR_WR_REG_CH2 : 16; /*!< [15..0] To update the base diff --git a/components/device/silabs/si91x/mcu/core/chip/src/iPMU_prog/iPMU_dotc/ipmu_apis.c b/components/device/silabs/si91x/mcu/core/chip/src/iPMU_prog/iPMU_dotc/ipmu_apis.c index b5be8d886..e15a96f8b 100644 --- a/components/device/silabs/si91x/mcu/core/chip/src/iPMU_prog/iPMU_dotc/ipmu_apis.c +++ b/components/device/silabs/si91x/mcu/core/chip/src/iPMU_prog/iPMU_dotc/ipmu_apis.c @@ -23,10 +23,10 @@ //#endif #define IPMU_DOTC_PROG #define IPMU_CALIB_DATA -#define uint16 uint16_t -#define uint32 uint32_t -#define int32 int32_t -#define uint8 uint8_t +typedef uint16_t uint16; +typedef uint32_t uint32; +typedef int32_t int32; +typedef uint8_t uint8; #define cmemcpy memcpy #endif #ifndef SLI_SI91X_MCU_INTERFACE diff --git a/components/device/silabs/si91x/mcu/core/common/freertos_config/FreeRTOSConfig.h b/components/device/silabs/si91x/mcu/core/common/freertos_config/FreeRTOSConfig.h index 542d021ca..62023cc6c 100644 --- a/components/device/silabs/si91x/mcu/core/common/freertos_config/FreeRTOSConfig.h +++ b/components/device/silabs/si91x/mcu/core/common/freertos_config/FreeRTOSConfig.h @@ -309,4 +309,4 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ /* The platform FreeRTOS is running on. */ #define configPLATFORM_NAME "Si917_SoC" -#endif // FREERTOS_CONFIG_H \ No newline at end of file +#endif /* FREERTOS_CONFIG_H */ \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/CAN.h b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/CAN.h index 0d13dd78f..a735619c5 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/CAN.h +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/CAN.h @@ -43,7 +43,7 @@ #include "Driver_CAN.h" #include "rsi_chip.h" #include "RTE_Device.h" -#include "RTE_Components.h" + #define ARM_CAN_ARBITRATION_LOST (5U) ///< Unit entered arbitration lost error FIXME: added by me diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/GSPI.h b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/GSPI.h index dcd2c209d..0b7c46c44 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/GSPI.h +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/GSPI.h @@ -26,7 +26,7 @@ extern "C" { #include "rsi_pll.h" #include "Driver_SPI.h" #include "rsi_ccp_common.h" -#include "RTE_Components.h" + #include "UDMA.h" diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/I2C.h b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/I2C.h index 64117fb1e..be54d5ac9 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/I2C.h +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/I2C.h @@ -31,7 +31,7 @@ #include "rsi_ulpss_clk.h" #include "Driver_I2C.h" #include "rsi_ccp_common.h" -#include "RTE_Components.h" + /* I2C Interrupt Events */ #define RSI_I2C_EVENT_RECEIVE_UNDER (1UL << 0) /*!< read the receive buffer when it is empty inerrupt */ diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/MCI.h b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/MCI.h index 97c0af446..700cc5956 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/MCI.h +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/MCI.h @@ -33,7 +33,7 @@ #include "Driver_MCI.h" #include "rsi_chip.h" #include "RTE_Device.h" -#include "RTE_Components.h" + typedef void (*ARM_MCI_SignalEvent_t) (uint32_t event); ///< Pointer to \ref ARM_MCI_SignalEvent : Signal MCI Event. diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SAI.h b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SAI.h index 3d899c223..831457350 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SAI.h +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SAI.h @@ -36,7 +36,7 @@ #include "rsi_ulpss_clk.h" #include "Driver_SAI.h" #include "rsi_ccp_common.h" -#include "RTE_Components.h" + #include "UDMA.h" diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SPI.c b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SPI.c index dcd89e7ad..8dcc29cc7 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SPI.c +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SPI.c @@ -123,7 +123,7 @@ static SPI_PIN SSI_MASTER_cs3 = {SSI_MASTER_CS3_PORT, SSI_MASTER_CS3_PIN, SSI #endif #endif #if defined(SSI_MASTER_TX_DMA_Instance) && (SSI_MASTER_TX_DMA_Instance == 1) -void SSI_MASTER_UDMA_Tx_Event (uint32_t event ,uint8_t dmaCh); +void SSI_MASTER_UDMA_Tx_Event (uint32_t event ,uint32_t dmaCh); static SPI_DMA SSI_MASTER_UDMA_TX_CHNL = { { 0, @@ -139,7 +139,7 @@ static SPI_DMA SSI_MASTER_UDMA_TX_CHNL = { }; #endif #if defined(SSI_MASTER_RX_DMA_Instance) && (SSI_MASTER_RX_DMA_Instance == 1) -void SSI_MASTER_UDMA_Rx_Event (uint32_t event ,uint8_t dmaCh); +void SSI_MASTER_UDMA_Rx_Event (uint32_t event ,uint32_t dmaCh); static SPI_DMA SSI_MASTER_UDMA_RX_CHNL = { { 0, @@ -243,7 +243,7 @@ static SPI_PIN SSI_SLAVE_cs = {SSI_SLAVE_CS0_PORT, SSI_SLAVE_CS0_PIN, SSI_SLAV #endif #if defined(SSI_SLAVE_TX_DMA_Instance) && (SSI_SLAVE_TX_DMA_Instance == 1) -void SSI_SLAVE_UDMA_Tx_Event (uint32_t event ,uint8_t dmaCh); +void SSI_SLAVE_UDMA_Tx_Event (uint32_t event ,uint32_t dmaCh); static SPI_DMA SSI_SLAVE_UDMA_TX_CHNL = { { 0, @@ -259,7 +259,7 @@ static SPI_DMA SSI_SLAVE_UDMA_TX_CHNL = { }; #endif #if defined(SSI_SLAVE_RX_DMA_Instance) && (SSI_SLAVE_RX_DMA_Instance == 1) -void SSI_SLAVE_UDMA_Rx_Event (uint32_t event ,uint8_t dmaCh); +void SSI_SLAVE_UDMA_Rx_Event (uint32_t event ,uint32_t dmaCh); static SPI_DMA SSI_SLAVE_UDMA_RX_CHNL = { { 0, @@ -643,22 +643,22 @@ SPI_IRQHandler (&SSI_MASTER_Resources); #endif } #if defined(SSI_MASTER_TX_DMA_Instance) && (SSI_MASTER_TX_DMA_Instance == 1) -void SSI_MASTER_UDMA_Tx_Event (uint32_t event, uint8_t dmaCh) +void SSI_MASTER_UDMA_Tx_Event (uint32_t event, uint32_t dmaCh) { #if ( (defined(A11_ROM)) && (defined(ROMDRIVER_PRESENT)) && (defined(SLI_SI917)) ) - ROMAPI_SSI_API->SPI_UDMA_Tx_Event(event,dmaCh, &SSI_MASTER_Resources); + ROMAPI_SSI_API->SPI_UDMA_Tx_Event(event,(uint8_t)dmaCh, &SSI_MASTER_Resources); #else -SPI_UDMA_Tx_Event (event,dmaCh, &SSI_MASTER_Resources); +SPI_UDMA_Tx_Event (event,(uint8_t)dmaCh, &SSI_MASTER_Resources); #endif } #endif #if defined(SSI_MASTER_RX_DMA_Instance) && (SSI_MASTER_RX_DMA_Instance == 1) -void SSI_MASTER_UDMA_Rx_Event (uint32_t event, uint8_t dmaCh) +void SSI_MASTER_UDMA_Rx_Event (uint32_t event, uint32_t dmaCh) { #if ( (defined(A11_ROM)) && (defined(ROMDRIVER_PRESENT)) && (defined(SLI_SI917)) ) - ROMAPI_SSI_API->SPI_UDMA_Rx_Event(event,dmaCh, &SSI_MASTER_Resources); + ROMAPI_SSI_API->SPI_UDMA_Rx_Event(event,(uint8_t)dmaCh, &SSI_MASTER_Resources); #else -SPI_UDMA_Rx_Event (event,dmaCh, &SSI_MASTER_Resources); +SPI_UDMA_Rx_Event (event,(uint8_t)dmaCh, &SSI_MASTER_Resources); #endif } #endif @@ -802,23 +802,23 @@ SPI_IRQHandler (&SSI_SLAVE_Resources); #endif } #if defined(SSI_SLAVE_TX_DMA_Instance) && (SSI_SLAVE_TX_DMA_Instance == 1) -void SSI_SLAVE_UDMA_Tx_Event (uint32_t event, uint8_t dmaCh) +void SSI_SLAVE_UDMA_Tx_Event (uint32_t event, uint32_t dmaCh) { #if ( (defined(A11_ROM)) && (defined(ROMDRIVER_PRESENT)) && (defined(SLI_SI917)) ) - ROMAPI_SSI_API->SPI_UDMA_Tx_Event (event,dmaCh, &SSI_SLAVE_Resources); + ROMAPI_SSI_API->SPI_UDMA_Tx_Event (event,(uint8_t)dmaCh, &SSI_SLAVE_Resources); #else -SPI_UDMA_Tx_Event (event,dmaCh, &SSI_SLAVE_Resources); +SPI_UDMA_Tx_Event (event,(uint8_t)dmaCh, &SSI_SLAVE_Resources); #endif } #endif #if defined(SSI_SLAVE_RX_DMA_Instance) && (SSI_SLAVE_RX_DMA_Instance == 1) -void SSI_SLAVE_UDMA_Rx_Event (uint32_t event, uint8_t dmaCh) +void SSI_SLAVE_UDMA_Rx_Event (uint32_t event, uint32_t dmaCh) { #if ( (defined(A11_ROM)) && (defined(ROMDRIVER_PRESENT)) && (defined(SLI_SI917)) ) - ROMAPI_SSI_API->SPI_UDMA_Rx_Event (event,dmaCh, &SSI_SLAVE_Resources); + ROMAPI_SSI_API->SPI_UDMA_Rx_Event (event,(uint8_t)dmaCh, &SSI_SLAVE_Resources); #else -SPI_UDMA_Rx_Event (event,dmaCh, &SSI_SLAVE_Resources); +SPI_UDMA_Rx_Event (event,(uint8_t)dmaCh, &SSI_SLAVE_Resources); #endif } #endif @@ -960,7 +960,7 @@ SPI_IRQHandler (&SSI_ULP_MASTER_Resources); void SSI_ULP_MASTER_UDMA_Tx_Event (uint32_t event, uint32_t dmaCh) { #if ( (defined(A11_ROM)) && (defined(ROMDRIVER_PRESENT)) && (defined(SLI_SI917)) ) - ROMAPI_SSI_API->SPI_UDMA_Tx_Event (event,dmaCh, &SSI_ULP_MASTER_Resources); + ROMAPI_SSI_API->SPI_UDMA_Tx_Event (event,(uint8_t)dmaCh, &SSI_ULP_MASTER_Resources); #else SPI_UDMA_Tx_Event (event,(uint8_t)dmaCh, &SSI_ULP_MASTER_Resources); #endif @@ -971,7 +971,7 @@ SPI_UDMA_Tx_Event (event,(uint8_t)dmaCh, &SSI_ULP_MASTER_Resources); void SSI_ULP_MASTER_UDMA_Rx_Event (uint32_t event, uint32_t dmaCh) { #if ( (defined(A11_ROM)) && (defined(ROMDRIVER_PRESENT)) && (defined(SLI_SI917)) ) - ROMAPI_SSI_API->SPI_UDMA_Rx_Event (event,dmaCh, &SSI_ULP_MASTER_Resources); + ROMAPI_SSI_API->SPI_UDMA_Rx_Event (event,(uint8_t)dmaCh, &SSI_ULP_MASTER_Resources); #else SPI_UDMA_Rx_Event (event,(uint8_t)dmaCh, &SSI_ULP_MASTER_Resources); #endif @@ -1193,3 +1193,75 @@ uint32_t SSI_GetTxCount(uint8_t ssi_instance) } while (false); return count; } + +#ifdef SL_SI91X_SSI_DMA +/******************************************************************************* + * Transfer complete callback function which is registered by SL_DMA driver + * for GSPI peripheral-memory and memory-peripheral transfers. This function calls + * GSPI Rx and Tx transfer complete event for respective channels. + * *****************************************************************************/ +void ssi_transfer_complete_callback(uint32_t channel, void *data) +{ + (void)(&data); +#if defined(SSI_MASTER_TX_DMA_Instance) && (SSI_MASTER_TX_DMA_Instance == 1) + if (channel == SSI_MASTER_TX_DMA_Channel) { + SSI_MASTER_UDMA_Tx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } + if (channel == SSI_MASTER_RX_DMA_Channel) { + SSI_MASTER_UDMA_Rx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } +#endif +#if defined(SSI_SLAVE_TX_DMA_Instance) && (SSI_SLAVE_TX_DMA_Instance == 1) + if (channel == SSI_SLAVE_TX_DMA_Channel) { + SSI_SLAVE_UDMA_Tx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } + if (channel == SSI_SLAVE_RX_DMA_Channel) { + SSI_SLAVE_UDMA_Rx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } +#endif +#if defined(SSI_ULP_MASTER_RX_DMA_Instance) && (SSI_ULP_MASTER_RX_DMA_Instance == 1) + if (channel == SSI_ULP_MASTER_TX_DMA_Channel) { + SSI_ULP_MASTER_UDMA_Tx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } + if (channel == SSI_ULP_MASTER_RX_DMA_Channel) { + SSI_ULP_MASTER_UDMA_Rx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } +#endif + (void)(&channel); +} + +/******************************************************************************* + * Error callback function which is registered by SL_DMA driver for GSPI + * peripheral-memory and memory-peripheral transfers. This function calls + * GSPI Rx and Tx error event for respective channels. + * *****************************************************************************/ +void ssi_error_callback(uint32_t channel, void *data) +{ + (void)(&data); +#if defined(SSI_MASTER_TX_DMA_Instance) && (SSI_MASTER_TX_DMA_Instance == 1) + if (channel == SSI_MASTER_TX_DMA_Channel) { + SSI_MASTER_UDMA_Tx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } + if (channel == SSI_MASTER_RX_DMA_Channel) { + SSI_MASTER_UDMA_Rx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } +#endif +#if defined(SSI_SLAVE_TX_DMA_Instance) && (SSI_SLAVE_TX_DMA_Instance == 1) + if (channel == SSI_SLAVE_TX_DMA_Channel) { + SSI_SLAVE_UDMA_Tx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } + if (channel == SSI_SLAVE_RX_DMA_Channel) { + SSI_SLAVE_UDMA_Rx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } +#endif +#if defined(SSI_ULP_MASTER_RX_DMA_Instance) && (SSI_ULP_MASTER_RX_DMA_Instance == 1) + if (channel == SSI_ULP_MASTER_TX_DMA_Channel) { + SSI_ULP_MASTER_UDMA_Tx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } + if (channel == SSI_ULP_MASTER_RX_DMA_Channel) { + SSI_ULP_MASTER_UDMA_Rx_Event(UDMA_EVENT_XFER_DONE, (uint8_t)channel); + } +#endif +(void)(&channel); +} +#endif /* SL_SI91X_GSPI_DMA */ diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SPI.h b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SPI.h index 423caa50a..c511ba8d9 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SPI.h +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/SPI.h @@ -27,7 +27,7 @@ #include "rsi_pll.h" #include "Driver_SPI.h" #include "rsi_ccp_common.h" -#include "RTE_Components.h" + #include "UDMA.h" #include "rsi_ulpss_clk.h" #ifdef SSI_CONFIG diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USART.c b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USART.c index 3ce8618fe..45b82bec7 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USART.c +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USART.c @@ -201,7 +201,7 @@ static USART_RESOURCES USART0_Resources = { RTE_USART0_CLK_SRC, ULP_UART_REF_CLK, RTE_USART0_CLK_DIV_FACT, - RTE_USART0_FRAC_DIV_EN , + RTE_USART0_FRAC_DIV_SEL , } , //clocks end { //sync mode RTE_USART_MODE, @@ -315,7 +315,7 @@ static USART_RESOURCES UART1_Resources = { RTE_UART1_CLK_SRC, ULP_UART_REF_CLK, RTE_UART1_CLK_DIV_FACT, - RTE_UART1_FRAC_DIV_EN , + RTE_UART1_FRAC_DIV_SEL , } , { //sync mode diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USART.h b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USART.h index 0219e9ac8..9bf733afa 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USART.h +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USART.h @@ -40,7 +40,7 @@ extern "C" { #include "rsi_ulpss_clk.h" #include "Driver_USART.h" #include "rsi_ccp_common.h" -#include "RTE_Components.h" + #include "UDMA.h" #define USART_INSTANCE_BIT 30 // USART Instance bit postion stored in event variable diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USB.c b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USB.c index deefff18d..aad5fb267 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USB.c +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USB.c @@ -34,7 +34,7 @@ #include "Driver_USB.h" #include "USB.h" #include "RTE_Device.h" -#include "RTE_Components.h" + volatile uint8_t USB_role = ARM_USB_ROLE_NONE; volatile uint8_t USB_state = 0U; diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USBD.c b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USBD.c index 1df9edfce..a2dbda9b1 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USBD.c +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USBD.c @@ -56,7 +56,7 @@ #include "rsi_chip.h" #include "USB.h" #include "RTE_Device.h" -#include "RTE_Components.h" + #ifndef USBD_MAX_ENDPOINT_NUM #define USBD_MAX_ENDPOINT_NUM 5U diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USBH.c b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USBH.c index 22b286e64..91c674452 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USBH.c +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USBH.c @@ -42,7 +42,7 @@ #include "rsi_chip.h" #include "USB.h" #include "RTE_Device.h" -#include "RTE_Components.h" + extern uint8_t USB_role; extern uint8_t USB_state; diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/RTE_Components.h b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/RTE_Components.h deleted file mode 100644 index 739f3698e..000000000 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/RTE_Components.h +++ /dev/null @@ -1,5 +0,0 @@ - -#ifndef __RTE_COMPONENTS_H -#define __RTE_COMPONENTS_H - -#endif /* __RTE_COMPONENTS_H */ diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/RTE_Device_917.h b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/RTE_Device_917.h index ffd0a6c29..78516d782 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/RTE_Device_917.h +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/RTE_Device_917.h @@ -37,7 +37,7 @@ #define RTE_USART0_CLK_SRC USART_ULPREFCLK #define RTE_USART0_CLK_DIV_FACT 1 -#define RTE_USART0_FRAC_DIV_EN 0 +#define RTE_USART0_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_USART_MODE 0 //!Usart mode macros #define RTE_CONTINUOUS_CLOCK_MODE 0 @@ -407,7 +407,7 @@ #define RTE_UART1_CLK_SRC USART_ULPREFCLK #define RTE_UART1_CLK_DIV_FACT 1 -#define RTE_UART1_FRAC_DIV_EN 0 +#define RTE_UART1_FRAC_DIV_SEL USART_FRACTIONAL_DIVIDER #define RTE_UART1_LOOPBACK 0 #define RTE_UART1_DMA_MODE1_EN 0 @@ -659,7 +659,7 @@ #define RTE_ULP_UART_CLK_SRC ULP_UART_REF_CLK #define RTE_ULP_UART_CLK_DIV_FACT 0 -#define RTE_ULP_UART_FRAC_SEL 0 +#define RTE_ULP_UART_FRAC_SEL USART_FRACTIONAL_DIVIDER #define RTE_ULP_UART_LOOPBACK 0 #define RTE_ULP_UART_DMA_MODE1_EN 0 diff --git a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/component/cmsis_device_config_917.slcc b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/component/cmsis_device_config_917.slcc index 2c2479a52..97cdaac8d 100644 --- a/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/component/cmsis_device_config_917.slcc +++ b/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config/component/cmsis_device_config_917.slcc @@ -11,7 +11,6 @@ component_root_path: "components/device/silabs/si91x/mcu/drivers/cmsis_driver" include: - path: "config" file_list: - - path: "RTE_Components.h" - path: "RTE_Device_917.h" provides: - name: cmsis_device_config_917 \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/button/inc/sl_si91x_button.h b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/button/inc/sl_si91x_button.h index 0103a9cc5..fd7f6bf2a 100644 --- a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/button/inc/sl_si91x_button.h +++ b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/button/inc/sl_si91x_button.h @@ -32,9 +32,8 @@ extern "C" { *@{ */ -/** @name Button State Definitions - * A set of numerical definitions for use with the button APIs indicating the - * state of a button. +/** @name Macros + * A set of numerical macros for use with the button APIs. *@{ */ @@ -63,7 +62,7 @@ extern "C" { #define BUTTON_STATE_INVALID -1 ///< Button state is invalid -/**@} END Button State Definitions */ +/**@} END Macros */ typedef struct { uint8_t pin; @@ -74,7 +73,7 @@ typedef struct { } sl_button_t; /***************************************************************************/ /** -* Initializes the buttons. This function is automatically called when a button instance is created. +* Initializes the button, a process automatically triggered upon the creation of a button instance, sets the mode of operation, and configures interrupts based on the selected mode. * * @param[in] handle The pointer to button structure that has the specific button information. * @@ -180,14 +179,57 @@ void sl_si91x_button_state_set(uint8_t pin, int8_t state); * as defined. * * @param[in] state The new state of the button referenced by the button parameter, -* either ::BUTTON_PRESSED if the button has been pressed or ::BUTTON_RELEASED if -* the button has been released. +* either ::BUTTON_PRESSED if the button is pressed or ::BUTTON_RELEASED if +* the button is released. * * @return none * ******************************************************************************/ void sl_si91x_button_isr(uint8_t pin, int8_t state); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup BUTTON Button +/// @{ +/// +/// @details +/// +/// @n @section buttondrv_intro Introduction +/// +/// The SI91x button driver is a platform-level software module responsible for managing the initialization and reading buttons. +/// It offers a comprehensive set of functions for button operations, including initialization, state monitoring, +/// and callback handling for state changes. The driver supports flexible interrupt configurations, +/// enabling detection based on button state, edge transitions, or both. All button functions are called through the generic driver, +/// which internally triggers specific functions to the respective button. +/// +/// @n @section buttondrv_config Configuration +/// +/// All button instances are configured with an @ref sl_button_t struct. This struct is automatically generated after a button is set up +/// using Simplicity Studio's wizard. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document and +/// refer here https://docs.silabs.com/wiseconnect/latest/wiseconnect-api-reference-guide-si91x-peripherals/disable-uc-config. +/// +/// +/// @n @section buttondrv_usage Usage +/// +/// Once the button structures are defined, the button functions can be invoked by passing an instance of sl_button_t, +/// which will be redirected to call the type-specific version of that function. The common functions include the following: +/// +/// @li @ref sl_si91x_button_init +/// @li @ref sl_si91x_button_pin_state +/// @li @ref sl_si91x_button_state_toggle +/// @li @ref sl_si91x_button_isr +/// +/// @ref sl_button_init is called automatically when the application is run. +/// +/// The button driver can be used with interrupt mode, with or without debounce. @ref sl_si91x_button_pin_state can be implemented by the application if required. This function is used +/// to determine the current state of the button. @ref sl_si91x_button_state_toggle can be implemented by the application. +/// This function toggles the "soft" state so that it gives the interrupts and their callbacks. @ref sl_si91x_button_isr is a callback function +/// that is called when the button state changes. This function can be implemented in the application to specify what the user wants to do +/// when the button state changes. +/// +/// @} end group button ********************************************************/ + /** @} END addtogroup */ diff --git a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/inc/sl_si91x_led.h b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/inc/sl_si91x_led.h index a01fc1d1c..27f273756 100644 --- a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/inc/sl_si91x_led.h +++ b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/inc/sl_si91x_led.h @@ -35,10 +35,10 @@ typedef struct { } sl_led_t; /***************************************************************************/ /** - * Configures GPIOs pertaining to the control of LEDs. + * Configures GPIOs pertaining to the control of LEDs. Initializes the selected LED GPIO and mode. * * @param[in] handle The pointer to led structure that has the specific - * led information. + * LED information. * * @return none * @@ -46,8 +46,8 @@ typedef struct { void sl_si91x_led_init(const sl_led_t *handle); /***************************************************************************/ /** - * Atomically wraps an XOR or similar operation for a single GPIO pin - * attached to an LED. + * Atomically wraps an XOR or a similar operation for a + * single GPIO pin connected to an LED to toggle the LED. * * @param[in] pin LED pin for the LED to be toggled. * @@ -57,7 +57,7 @@ void sl_si91x_led_init(const sl_led_t *handle); void sl_si91x_led_toggle(uint8_t pin); /***************************************************************************/ /** - * Turns on (sets) a GPIO pin connected to an LED so that the LED turns on. + * Sets a GPIO pin connected to an LED to turn the LED on. * * @param[in] pin LED pin for the LED to turn on. * @@ -67,8 +67,7 @@ void sl_si91x_led_toggle(uint8_t pin); void sl_si91x_led_set(uint8_t pin); /***************************************************************************/ /** - * Turns off (clears) a GPIO pin connected to an LED, which turns - * off the LED. + * Clears a GPIO pin connected to an LED to turn the LED off. * * @param[in] pin LED pin for the LED to turn off. * @@ -85,13 +84,52 @@ void sl_si91x_led_clear(uint8_t pin); * Typically does something interesting, such as change the state of * an LED. * - * @param turnOn See Usage. + * @param[in] turnOn See Usage. * * @return none * ******************************************************************************/ void sl_si91x_led_StackIndicateActivity(bool turnOn); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup LED LED +/// @{ +/// +/// @details +/// +/// @n @section led_intro Introduction +/// +/// The SI91x LED driver is a platform-level software module responsible for managing the control of LEDs. +/// All LED functions are called through the generic driver, which then which internally calls functions specific to the LED. +/// +/// @n @section led_config Configuration +/// +/// All LED instances are configured with an @ref sl_led_t struct. This struct is automatically generated after a LED is set up +/// using Simplicity Studio's wizard. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document and +/// refer here https://docs.silabs.com/wiseconnect/latest/wiseconnect-api-reference-guide-si91x-peripherals/disable-uc-config. +/// +/// +/// @n @section led_usage Usage +/// +/// Once the LED structs are defined, the LED functions can be called being +/// passed an instance of sl_led_t, which will be redirected to calling the type specific +/// version of that function. The common functions include the following: +/// +/// @li @ref sl_si91x_led_init +/// @li @ref sl_si91x_led_toggle +/// @li @ref sl_si91x_led_set +/// @li @ref sl_si91x_led_clear +/// +/// @ref sl_led_init initialises the specific LED. This function is called automatically when the application is run. +/// +/// @ref sl_si91x_led_toggle can be implemented by the application if required. This function is used +/// to toggle the state of the LED. @ref sl_si91x_led_set and @ref sl_si91x_led_clear both can be implemented by the application. +/// These functions are used to turn the LED on and off resectively. +/// +/// @} end group LED ********************************************************/ + /** @} END addtogroup */ diff --git a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h index 775ad3621..c0be8be0c 100644 --- a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h +++ b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/memlcd/inc/sl_memlcd.h @@ -32,21 +32,18 @@ extern "C" { #define SL_MEMLCD_COLOR_MODE_MONOCHROME 1 #define SL_MEMLCD_COLOR_MODE_RGB_3BIT 2 -/***************************************************************************/ /** - * @addtogroup memlcd MEMLCD - Memory LCD - * @brief The memory liquid crystal display (LCD) driver provides the ability to render characters - * or monochrome pictures onto the display of the LCD peripheral on the SiWx91x™ device. +/** @addtogroup MEMLCD + * @ingroup SI91X_HARDWARE_DRIVER_APIS + * @brief Sample APIs for using the memory LCD * * The memory LCD interface is built to use SPI communication either with usart * or eusart. Configurations for three standard display are already supported * (lpm013m126a, ls013b7dh03 and ls013b7dh06), but the @ref sl_memlcd_t * structure can also be configured with a custom LCD's specifications. - * To implement a fully custom memory LCD interface, see @ref memlcd_custom. - * - * Refer [MEMLCD API's](https://docs.silabs.com/gecko-platform/3.1/hardware-driver/api/group-memlcd) for more information. + * To implement a fully custom memory LCD interface, see @ref Custom-Memory-LCD. * * @{ - ******************************************************************************/ + */ /** * General memory LCD data structure. @@ -62,172 +59,144 @@ typedef struct sl_memlcd_t { uint8_t hold_us; ///< SPI CS hold time void *custom_data; ///< Custom LCD's data } sl_memlcd_t; - /// @brief Enumeration to represent ulp-timer instances -/// -/**************************************************************************/ /** - * @brief - * Configure the memory LCD device. - * - * @details - * This function must be called to configure the memory LCD device - * before starting to use the memory LCD. +/***************************************************************************/ /** + * Configure the memory LCD device. + * + * This API must be called to configure the memory LCD device + * before starting to use the memory LCD. * * @param[in] device - * Display device pointer. + * Display device pointer. * * @return - * status code of the operation. - *****************************************************************************/ + * status code of the operation. +******************************************************************************/ sl_status_t sl_memlcd_configure(struct sl_memlcd_t *device); -/**************************************************************************/ /** - * @brief - * Enable the memory LCD display. +/***************************************************************************/ /** + * Enable the memory LCD display. * * @details - * This function must be called to enable MEMLCD display. + * This API must be called to enable MEMLCD display. * - * @param[in] none. + * @param none. * * @return none. - *****************************************************************************/ +******************************************************************************/ void sl_memlcd_display_enable(void); -/**************************************************************************/ /** - * @brief - * Enable or disable the display. +/***************************************************************************/ /** + * Enable or disable the display. * - * @details - * This function enables or disables the display. Disabling the display does - * not make it lose its data. Note that this function will not control the - * DISP pin on the display. This pin is usually controlled by board specific - * code. + * This API enables or disables the display. Disabling the display + * does not result in data loss. Note that this API does not control the + * DISP pin on the display. This pin is managed by board-specific code. * - * @param[in] device - * Display device pointer. + * @param[in] device Display device pointer. * - * @param[in] on - * Set this parameter to 'true' to enable the display. Set to 'false' in - * order to disable the display. + * @param[in] on Set this parameter to 'true' to enable the display. Set to 'false' in + * order to disable the display. * - * @return - * status code of the operation. - *****************************************************************************/ + * @return status code of the operation. +******************************************************************************/ sl_status_t sl_memlcd_power_on(const struct sl_memlcd_t *device, bool on); -/**************************************************************************/ /** - * @brief - * API to handle MEMLCD initialization after wakeup. +/***************************************************************************/ /** + * PI to handle MEMLCD initialization after wakeup. * - * @details - * This function handles the MEMLCD initialization after wakeup. + * This API handles the MEMLCD initialization after wakeup. * - * @param[in] none + * @param none * - * @return - * status code of the operation. - *****************************************************************************/ + * @return status code of the operation. +******************************************************************************/ sl_status_t sl_memlcd_post_wakeup_init(void); -/**************************************************************************/ /** - * @brief - * Clear the display. +/***************************************************************************/ /** + * Clear the display. * - * @param[in] device - * Memory LCD display device. + * @param[in] device Memory LCD display device. * - * @return - * SL_STATUS_OK if there are no errors. - *****************************************************************************/ + * @return SL_STATUS_OK if there are no errors. +******************************************************************************/ sl_status_t sl_memlcd_clear(const struct sl_memlcd_t *device); -/**************************************************************************/ /** - * @brief - * Draw a number of rows to the memory LCD display. +/***************************************************************************/ /** + * Draw a number of rows to the memory LCD display. * - * @param[in] device - * Memory LCD display device. + * @param[in] device Memory LCD display device. * - * @param[in] data - * Pointer to the pixel matrix buffer to draw. The format of the buffer - * depends on the color mode of the memory LCD display. + * @param[in] data Pointer to the pixel matrix buffer to draw. The format of the buffer + * depends on the color mode of the memory LCD display. * - * @param[in] row_start - * Start row on the display where to start drawing. First row is 0. + * @param[in] row_start Start row on the display where to start drawing. First row is 0. * - * @param[in] row_count - * Number of rows to draw. + * @param[in] row_count Number of rows to draw. * - * @return - * SL_STATUS_OK if there are no errors. - *****************************************************************************/ + * @return SL_STATUS_OK if there are no errors. +******************************************************************************/ sl_status_t sl_memlcd_draw(const struct sl_memlcd_t *device, const void *data, unsigned int row_start, unsigned int row_count); -/**************************************************************************/ /** - * @brief - * Refresh the display device. +/***************************************************************************/ /** + * Refresh the display device. * - * @details - * This function can be used when, for instance, the clock configuration was - * changed to re-initialize the SPI clock rate. + * This API can be used when, for instance, the clock configuration was + * changed to re-initialize the SPI clock rate. * - * @param[in] device - * Display device pointer. + * @param[in] device Display device pointer. * - * @return - * status code of the operation. - *****************************************************************************/ + * @return status code of the operation. +******************************************************************************/ sl_status_t sl_memlcd_refresh(const struct sl_memlcd_t *device); -/**************************************************************************/ /** - * @brief - * Get a handle to the memory LCD. +/***************************************************************************/ /** + * Get a handle to the memory LCD. * - * @return - * Pointer to a memory LCD structure or NULL if no memory LCD is initialized - * yet. - *****************************************************************************/ + * @return Pointer to a memory LCD structure or NULL if no memory LCD is initialized + * yet. +******************************************************************************/ const sl_memlcd_t *sl_memlcd_get(void); -/** @} (end group memlcd) */ - -/***************************************************************************/ /** - * @addtogroup memlcd MEMLCD - Memory LCD - * @{ - * - * @n @section memlcd_custom Custom Memory LCD - * - * The custom memory LCD is a module allowing the implementation of a LCD - * driver that can't use the already designed interface. To achieve this, - * conditions must be met. - * - * The LCD driver and the communication need to be implemented manually. - * However, some functions must be implemented and the @ref sl_memlcd_t - * structure must be initialized for the GLIB library to work properly. - * The functions to implement are @ref sl_memlcd_init, @ref sl_memlcd_power_on, - * @ref sl_memlcd_draw and @ref sl_memlcd_get and they must follow the same - * declaration as shown in the documentation. - * - * In the @ref sl_memlcd_init function, it is important to initialize a - * @ref sl_memlcd_t type variable and fill in the "height" and "width" fields - * with the real specifications of the LCD display. This same variable must be - * accessible from the @ref sl_memlcd_get function as the GLIB library will - * fetch the height and width of the display. - * - * The @ref sl_memlcd_t structure contains a "custom_data" field to store any - * custom structure needed for the implementation of the driver. - * - ******************************************************************************/ +// ***************************************************************************/ /** +/// @addtogroup MEMLCD +/// @{ +/// +/// @details +/// +/// @n @section MEMLCD_Custom Custom-Memory-LCD +/// +/// The custom memory LCD is a module allowing the implementation of an LCD +/// driver that can't use the already designed interface. To achieve this, +/// the following conditions must be met. +/// +/// The LCD driver and the communication needs to be implemented manually. +/// However, some APIs must be implemented and the @ref sl_memlcd_t +/// structure must be initialized for the GLIB library to work properly. +/// The APIs to implement are @ref sl_memlcd_init, @ref sl_memlcd_power_on, +/// @ref sl_memlcd_draw and @ref sl_memlcd_get and they must follow the same +/// declaration as shown in the documentation. +/// +/// In the @ref sl_memlcd_init API, it is important to initialize a +/// @ref sl_memlcd_t type variable and fill in the "height" and "width" fields +/// with the real specifications of the LCD display. This same variable must be +/// accessible from the @ref sl_memlcd_get API as the GLIB library will +/// fetch the height and width of the display. +/// +/// The @ref sl_memlcd_t structure contains a "custom_data" field to store any +/// custom structure needed for the implementation of the driver. +/// +/// @} end group MEMLCD ********************************************************/ #ifdef __cplusplus } #endif -/** @} (end group memlcd) */ +/** @} END addtogroup +*/ -#endif \ No newline at end of file +#endif diff --git a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h index e7133463f..de885da2e 100644 --- a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h +++ b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h @@ -100,219 +100,224 @@ typedef enum sl_si70xx_registers { // ----------------------------------------------------------------------------- // Prototypes -/**************************************************************************/ /** - * @brief Initialize the Si70xx sensor. - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() -* - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[in] eid : electronic ID of type \ref sl_si70xx_eid_type_t. - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INITIALIZATION (0x0010) - no Si70xx device present -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +/***************************************************************************/ /** +* Initialize the Si70xx sensor. +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[in] eid : electronic ID of type \ref sl_si70xx_eid_type_t. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INITIALIZATION (0x0010) - no Si70xx device present +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument * - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_init(sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_eid_type_t eid); -/**************************************************************************/ /** - * @brief Check whether an Si7006/13/20/21 is present on the I2C bus (or) not. - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() -* - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[in] eid : electronic ID of type \ref sl_si70xx_eid_type_t. If SL_EID_FIRST_BYTE is selected, - * then EID 1st byte is considered. If SL_EID_SECOND_BYTE is selected, then - * EID 2nd byte is considered. For EID 1st byte, EID 2nd byte commands please - * look into datasheet. - * Write device ID from SNB_3 if device responds. Pass in NULL to discard. - * Should be 0x0D for Si7013, 0x14 for Si7020 or 0x15 for Si7021 - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +/***************************************************************************/ /** +* Check whether an Si7006/13/20/21 is present on the I2C bus (or) not. +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[in] eid : electronic ID of type \ref sl_si70xx_eid_type_t. If SL_EID_FIRST_BYTE is selected, +* then EID 1st byte is considered. If SL_EID_SECOND_BYTE is selected, then +* EID 2nd byte is considered. For EID 1st byte, EID 2nd byte commands please +* look into datasheet. +* Write device ID from SNB_3 if device responds. Pass in NULL to discard. +* Should be 0x0D for Si7013, 0x14 for Si7020 or 0x15 for Si7021 +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument * - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_is_present(sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_eid_type_t eid); -/**************************************************************************/ /** - * @brief Measure relative humidity and temperature from Si7006/13/20/21 sensor. - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() -* - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[out] humid_data : The relative humidity in percentage obtained after doing conversion as per formula - * mentioned in datasheet. - * @param[out] temp_data : The temperature in milliCelsius. - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument -*- - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer +/***************************************************************************/ /** +* Measure relative humidity and temperature from Si7006/13/20/21 sensor. +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[out] humid_data : The relative humidity in percentage obtained after doing conversion as per formula +* mentioned in datasheet. +* @param[out] temp_data : The temperature in milliCelsius. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +* - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer * - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_measure_rh_and_temp(sl_i2c_instance_t i2c_instance, uint8_t addr, uint32_t *humid_data, int32_t *temp_data); -/**************************************************************************/ /** - * @brief Read Firmware Revision from Si7006/13/20/21 sensor. - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() -* - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[out] firmware_revision : Internal firmware revision. - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument -*- - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer +/***************************************************************************/ /** +* Read Firmware Revision from Si7006/13/20/21 sensor. +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[out] firmware_revision : Internal firmware revision. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +* - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer * - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_get_firmware_revision(sl_i2c_instance_t i2c_instance, uint8_t addr, uint8_t *firmware_revision); -/**************************************************************************/ /** - * @brief Reads temperature value from previous relative humidity measurement from Si7006/13/20/21 sensor. - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() -* - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[out] humid_data : The relative humidity in percent (multiplied by 1000). - * @param[out] temp_data : The temperature in milliCelsius. - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument -*- - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer +/***************************************************************************/ /** +* Reads temperature value from previous relative humidity measurement from Si7006/13/20/21 sensor. +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[out] humid_data : The relative humidity in percent (multiplied by 1000). +* @param[out] temp_data : The temperature in milliCelsius. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +* - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer * - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_read_temp_from_rh(sl_i2c_instance_t i2c_instance, uint8_t addr, uint32_t *humid_data, int32_t *temp_data); -/**************************************************************************/ /** - * @brief Start a no hold measurement of relative humidity (or) temperature from Si7006/13/20/21 sensor. - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() -* - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[in] type : measurement value of type \ref sl_si70xx_measurement_type_t. - * @param[out] data : The data read from the sensor. - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +/***************************************************************************/ /** +* Start a no hold measurement of relative humidity (or) temperature from Si7006/13/20/21 sensor. +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[in] type : measurement value of type \ref sl_si70xx_measurement_type_t. +* @param[out] data : The data read from the sensor. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument * - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_start_no_hold_measure_rh_or_temp(sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_measurement_type_t type, uint32_t *data); -/**************************************************************************/ /** - * @brief Measure relative humidity from Si7006/13/20/21 sensor. - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() -* - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[out] humid_data : The relative humidity measurement. - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument -*- - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer +/***************************************************************************/ /** +* Measure relative humidity from Si7006/13/20/21 sensor. +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[out] humid_data : The relative humidity measurement. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +* - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer * - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_measure_humidity(sl_i2c_instance_t i2c_instance, uint8_t addr, uint32_t *humid_data); -/**************************************************************************/ /** - * @brief Measure temperature from Si7006/13/20/21 sensor. - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() -* - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[out] temp_data : The temperature measurement. - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument -*- - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer +/***************************************************************************/ /** +* Measure temperature from Si7006/13/20/21 sensor. +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[out] temp_data : The temperature measurement. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +* - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer * - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_measure_temperature(sl_i2c_instance_t i2c_instance, uint8_t addr, int32_t *temp_data); -/**************************************************************************/ /** - * @brief Initiates a si70xx software reset by the appropriate command. - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +/***************************************************************************/ /** +* Initiates a si70xx software reset by the appropriate command. +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument * - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_reset(sl_i2c_instance_t i2c_instance, uint8_t addr); -/**************************************************************************/ /** - * @brief Reads the user register 1 and heater control register data - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() -* - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[in] reg : Register of type \ref sl_si70xx_registers_t. - * @param[out] data : The data read from the sensor. - * @return The following values are returned: - * - \ref SL_STATUS_OK on success -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument -*- - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer -* - *****************************************************************************/ +/***************************************************************************/ /** +* Reads the user register 1 and heater control register data +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[in] reg : Register of type \ref sl_si70xx_registers_t. +* @param[out] data : The data read from the sensor. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument +* - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer +******************************************************************************/ sl_status_t sl_si91x_si70xx_read_control_register(sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_registers_t reg, uint8_t *data); -/**************************************************************************/ /** - * @brief Writes data to user register 1 and heater control register - * @pre Pre-conditions: - * - \ref sl_si91x_si70xx_reset() +/***************************************************************************/ /** +* Writes data to user register 1 and heater control register +* @pre Pre-conditions: +* - \ref sl_si91x_si70xx_reset() +* @param[in] i2c_instance : I2C peripheral to use. +* @param[in] addr : I2C address to probe. +* @param[in] reg : Register of type \ref sl_si70xx_registers_t. +* @param[out] value : The value written into the register. +* @return The following values are returned: +* - \ref SL_STATUS_OK on success +* - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument * - * @param[in] i2c_instance : I2C peripheral to use. - * @param[in] addr : I2C address to probe. - * @param[in] reg : Register of type \ref sl_si70xx_registers_t. - * @param[out] value : The value written into the register. - * @return The following values are returned: - *- \ref SL_STATUS_OK on success -*- \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument -* - *****************************************************************************/ +******************************************************************************/ sl_status_t sl_si91x_si70xx_write_control_register(sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_registers_t reg, uint8_t value); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup SI70XX - RHT sensor +/// @{ +/// +/// @details +/// +/// @n @section si70xx Introduction. +/// +/// The Si70xx sensor driver provides a set of functions to interact with the Si70xx sensor series over the I2C bus. It allows +/// for easy integration of the sensor, providing access to features such as temperature and humidity measurements, +/// firmware revision retrieval, and device presence detection. All Si70xx functions are called through the generic driver. +/// +/// @n @section si70xx Usage +/// +/// Once I2C peripheral is initialised and configured, Si70xx sensor will be ready to be use. The common functions include the following: +/// +/// @li @ref sl_si91x_si70xx_init +/// @li @ref sl_si91x_si70xx_is_present +/// @li @ref sl_si91x_si70xx_measure_rh_and_temp +/// @li @ref sl_si91x_si70xx_get_firmware_revision +/// @li @ref sl_si91x_si70xx_reset +/// +/// @ref sl_si91x_si70xx_init initialises the Si70xx sensor. This function is called before using the other functions. +/// +/// @ref sl_si91x_si70xx_is_present can be implemented by the application if required. This function will check if an Si70xx sensor +/// is present on the I2C bus. @ref sl_si91x_si70xx_measure_rh_and_temp will measure relative humidity and temperature from the sensor. +/// @ref sl_si91x_si70xx_get_firmware_revision will read the firmware revision from the sensor. @ref sl_si91x_si70xx_reset will +/// initiate a software reset of the sensor. +/// +/// Kindly refer to the Function Documentation to see the usage of all the APIs in detail. +/// +/// @} end group SI70XX - RHT sensor ********************************************************/ + /** @} (end addtogroup SI70XX - RHT sensor) */ #ifdef __cplusplus diff --git a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h index a5a03e4df..eb59e2ae2 100644 --- a/components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h +++ b/components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h @@ -74,69 +74,101 @@ typedef enum { // Prototypes /***************************************************************************/ /** - * Initialize the Joystick. ADC will configure here to read the different - * voltage based on different Joystick position. - * - * @param[in] None. - * @return status 0 if successful, - * \ref SL_STATUS_OK (0x0000) - Success +* Initialize the Joystick. ADC will configure here to read the different +* voltage based on different Joystick position. * - ******************************************************************************/ +* @param None. +* @return If successful +* - \ref SL_STATUS_OK (0x0000) - Success +* +******************************************************************************/ sl_status_t sl_si91x_joystick_init(void); /***************************************************************************/ /** - * Getting the direction/position of the Joystick. - * - * @pre Pre-conditions: - * - \ref sl_si91x_joystick_init -*- - * \ref sl_si91x_joystick_start +* Getting the direction/position of Joystick. * - * - * @param[in] state : Joystick enable/disable - * ( \ref sl_joystick_state_t ) - * @param[in] pos : position of joystick. - * ( \ref sl_joystick_position_t) - * @return status 0 if successful, else error code as follow: - * - \ref SL_STATUS_OK (0x0000) - Success -*- - * \ref SL_STATUS_NOT_READY (0x0003) - Module is not ready for requested operation. - ******************************************************************************/ +* @pre Pre-conditions: +* - \ref sl_si91x_joystick_init +* - \ref sl_si91x_joystick_start +* @param[in] state : Joystick enable/disable +* ( \ref sl_joystick_state_t ) +* @param[out] pos : position of joystick. +* ( \ref sl_joystick_position_t) +* +* @return Error code as follow: +* - \ref SL_STATUS_OK (0x0000) - Success +* - \ref SL_STATUS_NOT_READY (0x0003) - Module is not ready for requested operation. +******************************************************************************/ sl_status_t sl_si91x_joystick_get_position(sl_joystick_state_t state, sl_joystick_position_t *pos); /***************************************************************************/ /** - * Start/Enable the Joystick. - * - * @pre Pre-conditions: - * - \ref sl_si91x_joystick_init +* Start/Enable the Joystick. * - * - * @param[in] state : Joystick enable/disable. - * ( \ref sl_joystick_state_t ) - * @return status 0 if successful, else error code - * \ref SL_STATUS_OK (0x0000) - Success \n - * \ref SL_STATUS_ABORT (0x0006) - Operation aborted. - ******************************************************************************/ +* @pre Pre-conditions: +* - \ref sl_si91x_joystick_init +* @param[in] state : Joystick enable/disable. +* ( \ref sl_joystick_state_t ) +* +* @return Error code as follow: +* - \ref SL_STATUS_OK (0x0000) - Success \n +* - \ref SL_STATUS_ABORT (0x0006) - Operation aborted. +******************************************************************************/ sl_status_t sl_si91x_joystick_start(sl_joystick_state_t state); /***************************************************************************/ /** - * Stop/Disable the Joystick. - * - * @pre Pre-conditions: - * - \ref sl_si91x_joystick_init -*- - * \ref sl_si91x_joystick_start +* Stop/Disable the Joystick. * - * - * @param[in] state : Joystick enable/disable. - * ( \ref sl_joystick_state_t ) - * @return status 0 if successful, else error code - * \ref SL_STATUS_OK (0x0000) - Success -*- - * \ref SL_STATUS_BUSY (0x0004) - Module is busy. - ******************************************************************************/ +* @pre Pre-conditions: +* - \ref sl_si91x_joystick_init +* - \ref sl_si91x_joystick_start +* @param[in] state : Joystick enable/disable. +* ( \ref sl_joystick_state_t ) +* +* @return Error code as follow: +* - \ref SL_STATUS_OK (0x0000) - Success +* - \ref SL_STATUS_BUSY (0x0004) - Module is busy. +******************************************************************************/ sl_status_t sl_si91x_joystick_stop(sl_joystick_state_t state); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup JOYSTICK Joystick +/// @{ +/// +/// @details +/// +/// @n @section joystick_intro Introduction +/// +/// The SI91x joystick driver is a platform-level software module responsible for managing the control of joystick. +/// All joystick functions are called through the generic driver. +/// +/// @n @section joystick_config Configuration +/// +/// The @ref sl_joystick_state_t enumeration defines the states of the joystick data acquisition, either disabled or enabled. This allows for controlling when +/// joystick input is actively monitored. The @ref sl_joystick_position_t This enumeration defines the possible positions +/// of the joystick, including not pressed, center, north, east, south, and west. These positions correspond to the physical orientation +/// of the joystick and can be used to determine the direction or action indicated by the joystick's current position. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document and +/// refer here https://docs.silabs.com/wiseconnect/latest/wiseconnect-api-reference-guide-si91x-peripherals/disable-uc-config. +/// +/// +/// @n @section led_usage Usage +/// +/// The common functions include the following: +/// +/// @li @ref sl_si91x_joystick_init +/// @li @ref sl_si91x_joystick_start +/// @li @ref sl_si91x_joystick_get_position +/// @li @ref sl_si91x_joystick_stop +/// +/// @ref sl_si91x_joystick_init initialises the joystick. Sets the operation mode and initialises the ADC channel. +/// +/// @ref sl_si91x_joystick_get_position can be implemented by the application if required. This function returns the position +/// corresponding to the physical orientation of the joystick. @ref sl_si91x_joystick_start and @ref sl_si91x_joystick_stop both can be implemented by the application. +/// These functions are used to start and stop the data acquisition from the joystick respectively. +/// +/// @} end group JOYSTICK ********************************************************/ + /** @} (end addtogroup JOYSTICK) */ #ifdef __cplusplus diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/component/rsilib_usart.slcc b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/component/rsilib_usart.slcc index f8619e27f..46cac26db 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/component/rsilib_usart.slcc +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/component/rsilib_usart.slcc @@ -13,6 +13,6 @@ source: include: - path: "inc" file_list: - - path: "rsi_usart.h" + - path: "rsi_usart.h" provides: - name: rsilib_usart diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/component/sllib_wireless_shutdown.slcc b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/component/sllib_wireless_shutdown.slcc new file mode 100644 index 000000000..5633f19d2 --- /dev/null +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/component/sllib_wireless_shutdown.slcc @@ -0,0 +1,18 @@ +id: sllib_wireless_shutdown +label: Si91x Wireless Shutdown +package: platform +description: > + Provides API to wireless shutdown, disabling the clocks and change the reference clock. +category: Device|Si91x|MCU|Internal|RSI Peripheral Drivers +quality: production +component_root_path: "components/device/silabs/si91x/mcu/drivers/peripheral_drivers" +source: + - path: "src/sl_si91x_wireless_shutdown.c" +ui_hints: + visibility: never +include: + - path: "inc" + file_list: + - path: "sl_si91x_wireless_shutdown.h" +provides: + - name: sllib_wireless_shutdown \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_pwm.h b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_pwm.h index 1d5e766f1..1dfbbdbec 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_pwm.h +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_pwm.h @@ -846,6 +846,68 @@ STATIC INLINE void RSI_MCPWM_ExternalTriggerControl(RSI_MCPWM_T *pMCPWM, boolean pMCPWM->PWM_TIME_PRD_COMMON_REG_b.USE_EXT_TIMER_TRIG_FRM_REG = (unsigned int)(enable & 0x01); } +/*==============================================*/ +/** + * @fn rsi_error_t RSI_PWM_Channel_Reset_Disable(RSI_MCPWM_T *pMCPWM, uint8_t chnlNum) + * @brief This API is used to disable the reset for required channel of MCPWM. + * @param[in] pMCPWM : Pointer to the MCPWM instance register area + * @param[in] chnlNum : Channel number(0 to 3) + * @return \ref ERROR_PWM_INVALID_CHNLNUM : If channel is invalid + * \n \ref RSI_OK : If process is done successfully. + */ +STATIC INLINE rsi_error_t RSI_PWM_Channel_Reset_Disable(RSI_MCPWM_T *pMCPWM, uint8_t chnlNum) +{ + // Resets operation of MCPWM channel + switch (chnlNum) { + case PWM_CHNL_0: + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH0_b.PWM_SFT_RST = DISABLE; + break; + case PWM_CHNL_1: + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH1_b.PWM_SFT_RST = DISABLE; + break; + case PWM_CHNL_2: + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH2_b.PWM_SFT_RST = DISABLE; + break; + case PWM_CHNL_3: + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH3_b.PWM_SFT_RST = DISABLE; + break; + default: + return ERROR_PWM_INVALID_CHNLNUM; + } + return RSI_OK; +} + +/*==============================================*/ +/** + * @fn rsi_error_t RSI_PWM_Counter_Reset_Disable(RSI_MCPWM_T *pMCPWM, uint8_t chnlNum) + * @brief This API is used to disable the counter reset for required channel of MCPWM + * @param[in] pMCPWM : Pointer to the MCPWM instance register area + * @param[in] chnlNum : Channel number(0 to 3) + * @return \ref ERROR_PWM_INVALID_CHNLNUM : If channel number is invalid + * \n \ref RSI_OK : If process is done successfully + */ +STATIC INLINE rsi_error_t RSI_PWM_Counter_Reset_Disable(RSI_MCPWM_T *pMCPWM, uint8_t chnlNum) +{ + // resets counter operations + switch (chnlNum) { + case PWM_CHNL_0: + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH0_b.PWM_TIME_PRD_CNTR_RST_FRM_REG = DISABLE; + break; + case PWM_CHNL_1: + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH1_b.PWM_TIME_PRD_CNTR_RST_FRM_REG = DISABLE; + break; + case PWM_CHNL_2: + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH2_b.PWM_TIME_PRD_CNTR_RST_FRM_REG = DISABLE; + break; + case PWM_CHNL_3: + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH3_b.PWM_TIME_PRD_CNTR_RST_FRM_REG = DISABLE; + break; + default: + return ERROR_PWM_INVALID_CHNLNUM; + } + return RSI_OK; +} + /*===================================================*/ /** * @fn void RSI_MCPWM_BaseTimerSelect(RSI_MCPWM_T *pMCPWM,uint8_t baseTime) diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_qspi.h b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_qspi.h index b63377e14..5609811b5 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_qspi.h +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_qspi.h @@ -619,6 +619,8 @@ struct qspi_reg_s { #define HSIZE_IN_BITS ((hsize + 1) * 8) // QSPI AES Decryption Defines +#define KEY_LEN_128 16 +#define KEY_LEN_256 32 #ifdef SLI_SI917 #define CTR_MODE 0x04 #define XTS_MODE 0x80 diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_qspi_proto.h b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_qspi_proto.h index 6810e8a01..c1fbf39bf 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_qspi_proto.h +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_qspi_proto.h @@ -60,6 +60,18 @@ extern "C" { typedef enum qspi_mode_e { NONE = 0, READ_MODE, WRITE_MODE } qspi_mode_t; +// Structure to qspi standalone encrypt/decrypt configs +typedef struct qspi_standalone_config_s { + uint8_t aes_mode; // AES mode + bool encrypt; // 0 = Encrypt, 1 = Decrypt + bool kh_enable; // 1 = Pick the key from keyholder, 0 = pass the key + uint32_t *iv; // flash offset where data stored + uint32_t *key1; // Pass key1 if kh_enable = 0 + uint32_t *key2; // Pass key1 if kh_enable = 0 and 32 byte key + uint32_t key_len; // Key len i.e 16 or 32 bytes + uint32_t flip_data; // writing 1 to this Flips the 32-bit endian for data in standalone mode +} qspi_standalone_config_t; + extern qspi_mode_t qspi_mode_g; typedef struct qspi_reg_s qspi_reg_t; @@ -566,6 +578,12 @@ void qspi_spi_read(qspi_reg_t *qspi_reg, void *udmaHandle, void *rpdmaHandle); +uint32_t RSI_QSPI_Aes_Encrypt_Decrypt_Standalone(qspi_reg_t *qspi_reg, + qspi_standalone_config_t *configs, + uint32_t *in_data, + uint32_t *out_data, + uint32_t data_length); + // ROM API Fuctions void qspi_write_block_protect(qspi_reg_t *qspi_reg, diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_spi.h b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_spi.h index b5f9bb669..3594f0f69 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_spi.h +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/rsi_spi.h @@ -82,6 +82,10 @@ uint32_t SSI_GetRxFifoThreshold(uint8_t ssi_instance); uint8_t RSI_SPI_GetSlaveSelectNumber(void); void SPI_Clear_SSI_Enable_State(const SPI_RESOURCES *spi); void SPI_Slave_Set_CS_Init_State(const SPI_RESOURCES *spi); +#ifdef SL_SI91X_SSI_DMA +void ssi_transfer_complete_callback(uint32_t channel, void *data); +void ssi_error_callback(uint32_t channel, void *data); +#endif // Static Inline function to set the spi memory map pll static inline void SSI_SetMemoryMapPll(uint16_t value) diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/sl_si91x_wireless_shutdown.h b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/sl_si91x_wireless_shutdown.h new file mode 100644 index 000000000..d0e5df7a4 --- /dev/null +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/inc/sl_si91x_wireless_shutdown.h @@ -0,0 +1,35 @@ +/***************************************************************************/ +/** + * @file sl_si91x_wireless_shutdown.h + * @brief wireless shutdown + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licenser of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ + +#ifndef SL_SI91X_WIRELESS_SHUTDOWN_H_ +#define SL_SI91X_WIRELESS_SHUTDOWN_H_ + +// ----------------------------------------------------------------------------- +// Prototypes +/** + * @fn sl_si91x_wireless_shutdown + * @brief Configure power management settings for SI91X device + * @param[in] none + * @return none. + * @section description + * This API disables the ULP reference clocks, changes the TASS + * Reference, and shuts down the power supply. + */ +void sl_si91x_wireless_shutdown(void); + +#endif /* SL_SI91X_WIRELESS_SHUTDOWN_H_ */ \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_pwm.c b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_pwm.c index 4ae2676e7..e4f275c4e 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_pwm.c +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_pwm.c @@ -77,16 +77,16 @@ rsi_error_t mcpwm_start(RSI_MCPWM_T *pMCPWM, uint8_t chnlNum) // starts base timer operation switch (chnlNum) { case PWM_CHNL_0: - pMCPWM->PWM_TIME_PRD_CTRL_REG_CH0_b.PWM_TIME_BASE_EN_FRM_REG_CH0 = 0x1; + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH0_b.PWM_TIME_BASE_EN_FRM_REG_CH0 = ENABLE; break; case PWM_CHNL_1: - pMCPWM->PWM_TIME_PRD_CTRL_REG_CH1_b.PWM_TIME_BASE_EN_FRM_REG_CH1 = 0x1; + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH1_b.PWM_TIME_BASE_EN_FRM_REG_CH1 = ENABLE; break; case PWM_CHNL_2: - pMCPWM->PWM_TIME_PRD_CTRL_REG_CH2_b.PWM_TIME_BASE_EN_FRM_REG_CH2 = 0x1; + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH2_b.PWM_TIME_BASE_EN_FRM_REG_CH2 = ENABLE; break; case PWM_CHNL_3: - pMCPWM->PWM_TIME_PRD_CTRL_REG_CH3_b.PWM_TIME_BASE_EN_FRM_REG_CH3 = 0x1; + pMCPWM->PWM_TIME_PRD_CTRL_REG_CH3_b.PWM_TIME_BASE_EN_FRM_REG_CH3 = ENABLE; break; default: return ERROR_PWM_INVALID_CHNLNUM; diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_qspi.c b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_qspi.c index a7d8b8ea2..1899cf2a0 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_qspi.c +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_qspi.c @@ -18,12 +18,24 @@ // Include Files #include "rsi_ccp_user_config.h" - -#ifndef ROMDRIVER_PRESENT #include "rsi_chip.h" #include "rsi_rom_table_si91x.h" #include "rsi_qspi.h" +// static function prototype +static void qspi_aes_encrypt_decrypt_standalone(qspi_reg_t *qspi_reg, + uint8_t aes_mode, + bool encrypt, + uint32_t *in_data, + uint32_t *out_data, + uint32_t *key1, + uint32_t *key2, + uint32_t key_len, + uint32_t *iv, + bool kh_enable, + uint32_t data_length, + uint32_t flip_data); +#ifndef ROMDRIVER_PRESENT /*==============================================*/ /** * @fn void initialise_m4_efuse_in_io_mode() @@ -1097,7 +1109,7 @@ void qspi_manual_read(qspi_reg_t *qspi_reg, addr &= 0x3FFFFFF; } } else { - addr &= (uint16_t)((1 << (spi_config->spi_config_2.addr_width * 8)) - 1); + addr &= (uint32_t)((1 << (spi_config->spi_config_2.addr_width * 8)) - 1); } hsize &= ~BIT(31); @@ -2332,7 +2344,7 @@ uint32_t qspi_spi_write(qspi_reg_t *qspi_reg, addr &= 0x3FFFFFF; } } else { - addr &= (uint16_t)((1 << (spi_config->spi_config_2.addr_width * 8)) - 1); + addr &= (uint32_t)((1 << (spi_config->spi_config_2.addr_width * 8)) - 1); } dis_hw_ctrl &= ~BIT(31); @@ -3032,3 +3044,177 @@ const ROM_QSPI_API_T qspi_api = #else typedef int dummy; // To remove empty translation unit warning. #endif // ROMDRIVER_PRESENT + +static void qspi_aes_encrypt_decrypt_standalone(qspi_reg_t *qspi_reg, + uint8_t aes_mode, + bool encrypt, + uint32_t *in_data, + uint32_t *out_data, + uint32_t *key1, + uint32_t *key2, + uint32_t key_len, + uint32_t *iv, + bool kh_enable, + uint32_t data_length, + uint32_t flip_data) +{ + // Read the QSPI aes config data + uint32_t aes_config_data = qspi_reg->QSPI_AES_CONFIG; + //! Configuring mode, key flipping and enabling standalone aes with mode of encryption or decryption. + qspi_reg->QSPI_AES_CONFIG = aes_mode | KEY_FLIP_FOR_REG_INTF | KEY_FLIP_FOR_KH_INTF; + qspi_reg->QSPI_AES_CONFIG |= ((encrypt << 14) | EN_STANDALONE_AES | (flip_data ? FLIP_IN_LB : 0)); + ; + if (key_len == KEY_LEN_256) { + qspi_reg->QSPI_AES_CONFIG |= QSPI_KEY_SIZE_256; + } + //! If XTS mode is enabled with decryptiong, setting DECREYPT KEY CAL bit. + if ((aes_mode == XTS_MODE) && encrypt) + qspi_reg->QSPI_AES_CONFIG |= DECRYPT_KEY_CAL; + + //! If Key is present in keyholder, then configure qspi to fetch from keyholder. + if (kh_enable) { + qspi_reg->QSPI_AES_SEC_KEY_FRM_KH |= LOAD_SEC_KEY_FRM_KH; + while (qspi_reg->QSPI_AES_SEC_KEY_FRM_KH & LOAD_SEC_KEY_FRM_KH) + ; + qspi_reg->OCTA_SPI_BUS_CONTROLLER2 |= EN_KH_KEY; // enabling security ; + } else { + qspi_reg->QSPI_AES_KEY1_10_13 = key1[3]; + qspi_reg->QSPI_AES_KEY1_14_17 = key1[2]; + qspi_reg->QSPI_AES_KEY1_18_1B = key1[1]; + qspi_reg->QSPI_AES_KEY1_1C_1F = key1[0]; + if (key_len == KEY_LEN_256) { + qspi_reg->QSPI_AES_KEY1_0_3 = key1[7]; + qspi_reg->QSPI_AES_KEY1_4_7 = key1[6]; + qspi_reg->QSPI_AES_KEY1_8_B = key1[5]; + qspi_reg->QSPI_AES_KEY1_C_F = key1[4]; + } + if (aes_mode == XTS_MODE) { + qspi_reg->QSPI_AES_KEY2_10_13 = key2[3]; + qspi_reg->QSPI_AES_KEY2_14_17 = key2[2]; + qspi_reg->QSPI_AES_KEY2_18_1B = key2[1]; + qspi_reg->QSPI_AES_KEY2_1C_1F = key2[0]; + if (key_len == KEY_LEN_256) { + qspi_reg->QSPI_AES_KEY2_0_3 = key2[7]; + qspi_reg->QSPI_AES_KEY2_4_7 = key2[6]; + qspi_reg->QSPI_AES_KEY2_8_B = key2[5]; + qspi_reg->QSPI_AES_KEY2_C_F = key2[4]; + } + } + } + //! Loading Key valids to AES. + if (key_len == KEY_LEN_256) { + qspi_reg->QSPI_AES_KEY_IV_VALID = (LB_IV_VALID | KEY1_VALID_256); + } else { + qspi_reg->QSPI_AES_KEY_IV_VALID = (LB_IV_VALID | KEY1_VALID_128); + } + if (key_len == KEY_LEN_256) { + qspi_reg->QSPI_AES_KEY_IV_VALID = (LB_IV_VALID | KEY1_VALID_256); + } + if (aes_mode == XTS_MODE) { + if (key_len == KEY_LEN_256) { + qspi_reg->QSPI_AES_KEY_IV_VALID |= (KEY2_VALID_256); + } else { + qspi_reg->QSPI_AES_KEY_IV_VALID |= (KEY2_VALID_128); + } + if (encrypt) { + //! Resetting KEY valids to QSPI in XTS mode sothat pre key calculation doesn't happen for every block. + qspi_reg->QSPI_AES_KEY_IV_VALID = LB_IV_VALID; + } + } + + if (data_length % 16 != 0) + return; + + while (data_length != 0) { + //! Feeding IV(address of flash ) for every block as we do decryption with address of flash + qspi_reg->QSPI_AES_IV1_0_3 = iv[0]; + //! Feeding data to AES after DIN ready is high + while (!(qspi_reg->QSPI_LB_STATUS & QSPI_AES_DIN_READY)) + ; + qspi_reg->QSPI_AES_LB_DATA_C_F = in_data[0]; + qspi_reg->QSPI_AES_LB_DATA_8_B = in_data[1]; + qspi_reg->QSPI_AES_LB_DATA_4_7 = in_data[2]; + qspi_reg->QSPI_AES_LB_DATA_0_3 = in_data[3]; + + //! RESETTING DECRYPT KEY CAL to avoid pre key calculation for every block. + qspi_reg->QSPI_AES_CONFIG &= ~DECRYPT_KEY_CAL; + //! SETTING this bit to indicate QSPI that FW is ready to take data from QSPI AES. + qspi_reg->QSPI_LB_STATUS |= BIT(0); + //! Fetching data from AES after checking for DATA VALID. + while (!(qspi_reg->QSPI_LB_STATUS & QSPI_AES_DOUT_VALID)) + ; + out_data[0] = qspi_reg->QSPI_AES_LB_DATA_C_F; + out_data[1] = qspi_reg->QSPI_AES_LB_DATA_8_B; + out_data[2] = qspi_reg->QSPI_AES_LB_DATA_4_7; + out_data[3] = qspi_reg->QSPI_AES_LB_DATA_0_3; + //! Incrementing the IV by 16 for every read of 128bit from AES as IV is used as address for QSPI INLINE DECRYPTION. + iv[0] += 16; + in_data += 4; + out_data += 4; + data_length -= 16; + } + // Program the QSPI AES default config data back to read data back in auto mode + qspi_reg->QSPI_AES_CONFIG = aes_config_data; +} + +/*==============================================*/ +/** + * @fn void RSI_QSPI_Aes_Encrypt_Decrypt_Standalone() + * @brief This api is used to encrypt or decrypt the input data with QSPI standalone AES + * @param[in] qspi_reg pointer for QSPI controller reg address space + * @param[in] configs pointer for QSPI standalone encrypt/decrypt configs + * @param[in] in_data is a pointer contains the address of input data + * @param[out] out_data is a pointer updated after encryption or decryption + * @param[in] data_length is size of the image to be encrypted/decrypted, it should be multiple of 16 byptes, + * if not have to pad the data with 0's and send + * @return error code if invalid parameter else RSI_OK + * + * @section description + * This api is used to encrypt or decrypt the input data with QSPI standalone AES + */ +uint32_t RSI_QSPI_Aes_Encrypt_Decrypt_Standalone(qspi_reg_t *qspi_reg, + qspi_standalone_config_t *configs, + uint32_t *in_data, + uint32_t *out_data, + uint32_t data_length) +{ + uint32_t status = RSI_OK; + // Check for valid aes mode + if ((configs->aes_mode != CTR_MODE) && (configs->aes_mode != XTS_MODE)) { + return INVALID_PARAMETERS; + } + // Check in_data and out_data buffers are valids + if ((in_data == NULL) || (out_data == NULL)) { + return INVALID_PARAMETERS; + } + // if kh_enable i.e key from keyholder then key1, key2 and key lenth are not required else validate those are proper + if (!configs->kh_enable) { + // Check key1 is valid + if (configs->key1 == NULL) + return INVALID_PARAMETERS; + // Check key2 is valid only when key size is 32 bit + if ((configs->key_len == KEY_LEN_256) && (configs->key2 == NULL)) + return INVALID_PARAMETERS; + // Check for key length is proper or not + if ((configs->key_len != KEY_LEN_128) && (configs->key_len != KEY_LEN_256)) + return INVALID_PARAMETERS; + } + + if ((data_length % 16) != 0) + return INVALID_PARAMETERS; + + // QSPI standalone aes encryption/decryption api + qspi_aes_encrypt_decrypt_standalone(qspi_reg, + configs->aes_mode, + configs->encrypt, + in_data, + out_data, + configs->key1, + configs->key2, + configs->key_len, + configs->iv, + configs->kh_enable, + data_length, + configs->flip_data); + return status; +} diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_spi.c b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_spi.c index 998588b15..fb676add1 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_spi.c +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_spi.c @@ -25,7 +25,18 @@ #include "rsi_ccp_user_config.h" #include "SPI.h" #include "rsi_rom_egpio.h" +#include "rsi_rom_ulpss_clk.h" +#ifdef SL_SI91X_SSI_DMA +#include "sl_si91x_dma.h" +#include "rsi_spi.h" +#if (defined(SSI_ULP_MASTER_RX_DMA_Instance) && (SSI_ULP_MASTER_RX_DMA_Instance == 1)) +#define DMA_INSTANCE 1 +#else +#define DMA_INSTANCE 0 +#endif +#else #include "rsi_rom_udma_wrapper.h" +#endif #define BYTES_FOR_8_DATA_WIDTH 1 // Number of bytes for 8 bit data frame #define BYTES_FOR_16_DATA_WIDTH 2 // Number of bytes for 16 bit data frame @@ -65,6 +76,13 @@ int32_t SPI_Initialize(ARM_SPI_SignalEvent_t cb_event, RSI_UDMA_HANDLE_T *udmaHandle, uint32_t *mem) { +#ifdef SL_SI91X_SSI_DMA + //Added to suppress unused variable warning + (void)udma; + (void)udmaHandle; + (void)UDMA_Table; + (void)mem; +#endif if (spi->info->state & SPI_INITIALIZED) { return ARM_DRIVER_OK; } @@ -207,9 +225,17 @@ int32_t SPI_Initialize(ARM_SPI_SignalEvent_t cb_event, RSI_EGPIO_SetPinMux(EGPIO1, spi->io.miso->port, spi->io.miso->pin, spi->io.miso->mode); } if ((spi->rx_dma != NULL) || (spi->tx_dma != NULL)) { - // Enable DMA instance - // DMA0 used for SSI_MASTER and SSI_SLAVE +// Enable DMA instance +// DMA0 used for SSI_MASTER and SSI_SLAVE +#ifdef SL_SI91X_SSI_DMA + sl_dma_init_t dma_init; + dma_init.dma_number = DMA_INSTANCE; + if (sl_si91x_dma_init(&dma_init)) { + return ARM_DRIVER_ERROR; + } +#else *udmaHandle = UDMAx_Initialize(udma, UDMA_Table, udmaHandle, mem); +#endif } spi->info->state = SPI_INITIALIZED; @@ -225,13 +251,23 @@ int32_t SPI_Initialize(ARM_SPI_SignalEvent_t cb_event, */ int32_t SPI_Uninitialize(const SPI_RESOURCES *spi, UDMA_RESOURCES *udma) { +#ifdef SL_SI91X_SSI_DMA + //Added to suppress unused variable warning + (void)udma; +#endif spi->reg->SSIENR = SSI_DISABLE; // Clear SPI state spi->info->state = 0U; if ((spi->rx_dma != NULL) || (spi->tx_dma != NULL)) { - // Diasable DMA instance +// Diasable DMA instance +#ifdef SL_SI91X_SSI_DMA + if (sl_si91x_dma_deinit(DMA_INSTANCE)) { + return ARM_DRIVER_ERROR; + } +#else UDMAx_Uninitialize(udma); +#endif } return ARM_DRIVER_OK; @@ -329,9 +365,17 @@ int32_t SPI_Transfer(const void *data_out, UDMA_Channel_Info *chnl_info, RSI_UDMA_HANDLE_T udmaHandle) { +#ifdef SL_SI91X_SSI_DMA + //Added to suppress unused variable warning + (void)udma; + (void)udmaHandle; + (void)chnl_info; + sl_status_t status; +#else + volatile int32_t stat; +#endif RSI_UDMA_CHA_CONFIG_DATA_T control = { 0 }; uint16_t data_width; - volatile int32_t stat; if ((data_out == NULL) || (data_in == NULL) || (num == 0U)) { return ARM_DRIVER_ERROR_PARAMETER; @@ -399,6 +443,40 @@ int32_t SPI_Transfer(const void *data_out, } spi->reg->DMACR_b.RDMAE = 1; spi->reg->DMARDLR_b.DMARDL = 0; +#if SL_SI91X_SSI_DMA + sl_dma_xfer_t dma_transfer_rx = { 0 }; + uint32_t channel = spi->rx_dma->channel + 1; + uint32_t channel_priority = spi->rx_dma->chnl_cfg.channelPrioHigh; + sl_dma_callback_t spi_rx_callback; + //Initialize sl_dma callback structure + spi_rx_callback.transfer_complete_cb = ssi_transfer_complete_callback; + spi_rx_callback.error_cb = ssi_error_callback; + //Initialize sl_dma transfer structure + dma_transfer_rx.src_addr = (uint32_t *)((uint32_t) & (spi->reg->DR)); + dma_transfer_rx.dest_addr = (uint32_t *)((uint32_t)(spi->xfer->rx_buf)); + dma_transfer_rx.src_inc = control.srcInc; + dma_transfer_rx.dst_inc = control.dstInc; + dma_transfer_rx.xfer_size = control.dstSize; + dma_transfer_rx.transfer_count = num; + dma_transfer_rx.transfer_type = SL_DMA_PERIPHERAL_TO_MEMORY; + dma_transfer_rx.dma_mode = control.transferType; + dma_transfer_rx.signal = (uint8_t)spi->rx_dma->chnl_cfg.periAck; + + //Allocate DMA channel for Tx + status = sl_si91x_dma_allocate_channel(DMA_INSTANCE, &channel, channel_priority); + if (status && (status != SL_STATUS_DMA_CHANNEL_ALLOCATED)) { + return ARM_DRIVER_ERROR; + } + //Register transfer complete and error callback + if (sl_si91x_dma_register_callbacks(DMA_INSTANCE, channel, &spi_rx_callback)) { + return ARM_DRIVER_ERROR; + } + //Configure the channel for DMA transfer + if (sl_si91x_dma_transfer(DMA_INSTANCE, channel, &dma_transfer_rx)) { + return ARM_DRIVER_ERROR; + } + sl_si91x_dma_channel_enable(DMA_INSTANCE, spi->rx_dma->channel + 1); +#else // Initialize and start SPI TX DMA Stream stat = UDMAx_ChannelConfigure(udma, spi->rx_dma->channel, @@ -413,6 +491,8 @@ int32_t SPI_Transfer(const void *data_out, if (stat == -1) { return ARM_DRIVER_ERROR; } + UDMAx_ChannelEnable(spi->rx_dma->channel, udma, udmaHandle); +#endif } if (spi->tx_dma != NULL) { @@ -447,7 +527,41 @@ int32_t SPI_Transfer(const void *data_out, } spi->reg->DMACR_b.TDMAE = 1; spi->reg->DMATDLR_b.DMATDL = 1; - // Initialize and start SPI TX DMA Stream +// Initialize and start SPI TX DMA Stream +#if SL_SI91X_SSI_DMA + sl_dma_xfer_t dma_transfer_tx = { 0 }; + uint32_t channel = spi->tx_dma->channel + 1; + uint32_t channel_priority = spi->tx_dma->chnl_cfg.channelPrioHigh; + sl_dma_callback_t spi_tx_callback; + //Initialize sl_dma callback structure + spi_tx_callback.transfer_complete_cb = ssi_transfer_complete_callback; + spi_tx_callback.error_cb = ssi_error_callback; + //Initialize sl_dma transfer structure + dma_transfer_tx.src_addr = (uint32_t *)((uint32_t)(spi->xfer->tx_buf)); + dma_transfer_tx.dest_addr = (uint32_t *)((uint32_t) & (spi->reg->DR)); + dma_transfer_tx.src_inc = control.srcInc; + dma_transfer_tx.dst_inc = control.dstInc; + dma_transfer_tx.xfer_size = control.dstSize; + dma_transfer_tx.transfer_count = num; + dma_transfer_tx.transfer_type = SL_DMA_MEMORY_TO_PERIPHERAL; + dma_transfer_tx.dma_mode = control.transferType; + dma_transfer_tx.signal = (uint8_t)spi->tx_dma->chnl_cfg.periAck; + + //Allocate DMA channel for Tx + status = sl_si91x_dma_allocate_channel(DMA_INSTANCE, &channel, channel_priority); + if (status && (status != SL_STATUS_DMA_CHANNEL_ALLOCATED)) { + return ARM_DRIVER_ERROR; + } + //Register transfer complete and error callback + if (sl_si91x_dma_register_callbacks(DMA_INSTANCE, channel, &spi_tx_callback)) { + return ARM_DRIVER_ERROR; + } + //Configure the channel for DMA transfer + if (sl_si91x_dma_transfer(DMA_INSTANCE, channel, &dma_transfer_tx)) { + return ARM_DRIVER_ERROR; + } + sl_si91x_dma_channel_enable(DMA_INSTANCE, spi->tx_dma->channel + 1); +#else stat = UDMAx_ChannelConfigure(udma, spi->tx_dma->channel, (uint32_t)(spi->xfer->tx_buf), @@ -462,9 +576,13 @@ int32_t SPI_Transfer(const void *data_out, return ARM_DRIVER_ERROR; } UDMAx_ChannelEnable(spi->tx_dma->channel, udma, udmaHandle); - UDMAx_ChannelEnable(spi->rx_dma->channel, udma, udmaHandle); - UDMAx_DMAEnable(udma, udmaHandle); +#endif } +#if SL_SI91X_SSI_DMA + sl_si91x_dma_enable(DMA_INSTANCE); +#else + UDMAx_DMAEnable(udma, udmaHandle); +#endif } else { // Interrupt mode /* spi->reg->IMR |= TXEIM | RXFIM; */ @@ -957,10 +1075,18 @@ int32_t SPI_Send(const void *data, UDMA_Channel_Info *chnl_info, RSI_UDMA_HANDLE_T udmaHandle) { +#ifdef SL_SI91X_SSI_DMA + //Added to suppress unused variable warning + (void)udma; + (void)udmaHandle; + (void)chnl_info; + sl_status_t status; +#else + volatile int32_t stat; +#endif uint16_t data_width; RSI_UDMA_CHA_CONFIG_DATA_T control = { 0 }; - volatile int32_t stat; - dummy_data = 0; + dummy_data = 0; spi->info->status.busy = 0U; @@ -998,6 +1124,7 @@ int32_t SPI_Send(const void *data, spi->xfer->num = num * data_width_in_bytes; if ((spi->rx_dma != NULL) || (spi->tx_dma != NULL)) { +#ifndef SL_SI91X_SSI_DMA if (spi->rx_dma != NULL) { control.transferType = UDMA_MODE_BASIC; control.nextBurst = 0; @@ -1031,6 +1158,7 @@ int32_t SPI_Send(const void *data, spi->reg->DMACR_b.RDMAE = 1; spi->reg->DMARDLR_b.DMARDL = 0; // Initialize and start SPI RX DMA Stream + stat = UDMAx_ChannelConfigure(udma, spi->rx_dma->channel, (uint32_t) & (spi->reg->DR), @@ -1045,6 +1173,7 @@ int32_t SPI_Send(const void *data, return ARM_DRIVER_ERROR; } } +#endif if (spi->tx_dma != NULL) { control.transferType = UDMA_MODE_BASIC; control.nextBurst = 0; @@ -1077,6 +1206,41 @@ int32_t SPI_Send(const void *data, } spi->reg->DMACR_b.TDMAE = 1; spi->reg->DMATDLR_b.DMATDL = 1; +#if SL_SI91X_SSI_DMA + sl_dma_xfer_t dma_transfer_tx = { 0 }; + uint32_t channel = spi->tx_dma->channel + 1; + uint32_t channel_priority = spi->tx_dma->chnl_cfg.channelPrioHigh; + sl_dma_callback_t spi_tx_callback; + //Initialize sl_dma callback structure + spi_tx_callback.transfer_complete_cb = ssi_transfer_complete_callback; + spi_tx_callback.error_cb = ssi_error_callback; + //Initialize sl_dma transfer structure + dma_transfer_tx.src_addr = (uint32_t *)((uint32_t)(spi->xfer->tx_buf)); + dma_transfer_tx.dest_addr = (uint32_t *)((uint32_t) & (spi->reg->DR)); + dma_transfer_tx.src_inc = control.srcInc; + dma_transfer_tx.dst_inc = control.dstInc; + dma_transfer_tx.xfer_size = control.dstSize; + dma_transfer_tx.transfer_count = num; + dma_transfer_tx.transfer_type = SL_DMA_MEMORY_TO_PERIPHERAL; + dma_transfer_tx.dma_mode = control.transferType; + dma_transfer_tx.signal = (uint8_t)spi->tx_dma->chnl_cfg.periAck; + + //Allocate DMA channel for Tx + status = sl_si91x_dma_allocate_channel(DMA_INSTANCE, &channel, channel_priority); + if (status && (status != SL_STATUS_DMA_CHANNEL_ALLOCATED)) { + return ARM_DRIVER_ERROR; + } + //Register transfer complete and error callback + if (sl_si91x_dma_register_callbacks(DMA_INSTANCE, channel, &spi_tx_callback)) { + return ARM_DRIVER_ERROR; + } + //Configure the channel for DMA transfer + if (sl_si91x_dma_transfer(DMA_INSTANCE, channel, &dma_transfer_tx)) { + return ARM_DRIVER_ERROR; + } + sl_si91x_dma_channel_enable(DMA_INSTANCE, spi->tx_dma->channel + 1); + sl_si91x_dma_enable(DMA_INSTANCE); +#else // Initialize and start SPI TX DMA Stream stat = UDMAx_ChannelConfigure(udma, spi->tx_dma->channel, @@ -1094,6 +1258,7 @@ int32_t SPI_Send(const void *data, UDMAx_ChannelEnable(spi->tx_dma->channel, udma, udmaHandle); UDMAx_ChannelEnable(spi->rx_dma->channel, udma, udmaHandle); UDMAx_DMAEnable(udma, udmaHandle); +#endif } } else { /* spi->reg->IMR |= (TXEIM | RXFIM); */ @@ -1127,9 +1292,17 @@ int32_t SPI_Receive(void *data, UDMA_Channel_Info *chnl_info, RSI_UDMA_HANDLE_T udmaHandle) { +#ifdef SL_SI91X_SSI_DMA + //Added to suppress unused variable warning + (void)udma; + (void)udmaHandle; + (void)chnl_info; + sl_status_t status; +#else + volatile int32_t stat; +#endif RSI_UDMA_CHA_CONFIG_DATA_T control = { 0 }; uint16_t data_width; - volatile int32_t stat; dummy_data = 0; if ((data == NULL) || (num == 0U)) { @@ -1145,15 +1318,15 @@ int32_t SPI_Receive(void *data, spi->info->status.data_lost = 0U; spi->info->status.mode_fault = 0U; - spi->xfer->tx_buf = NULL; - spi->xfer->rx_buf = (uint8_t *)data; - spi->xfer->rx_cnt = 0U; - spi->xfer->tx_cnt = 0U; - spi->reg->CTRLR0_b.TMOD = RECEIVE_ONLY; + spi->xfer->tx_buf = NULL; + spi->xfer->rx_buf = (uint8_t *)data; + spi->xfer->rx_cnt = 0U; + spi->xfer->tx_cnt = 0U; -#if (defined(SSI_MASTER_RX_DMA_Instance) && (SSI_MASTER_RX_DMA_Instance == 1)) \ - || (defined(SSI_ULP_MASTER_RX_DMA_Instance) && (SSI_ULP_MASTER_RX_DMA_Instance == 1)) - spi->reg->CTRLR1_b.NDF = (num - 1); +#if (SL_SSI_MASTER_DMA_CONFIG_ENABLE) || (SL_SSI_SLAVE_DMA_CONFIG_ENABLE) || (SL_SSI_ULP_MASTER_DMA_CONFIG_ENABLE) + spi->reg->CTRLR0_b.TMOD = TRANSMIT_AND_RECEIVE; +#else + spi->reg->CTRLR0_b.TMOD = RECEIVE_ONLY; #endif spi->reg->SSIENR = SSI_ENABLE; @@ -1202,6 +1375,39 @@ int32_t SPI_Receive(void *data, } spi->reg->DMACR_b.RDMAE = 1; spi->reg->DMARDLR_b.DMARDL = 0; +#if SL_SI91X_SSI_DMA + sl_dma_xfer_t dma_transfer_rx = { 0 }; + uint32_t channel = spi->rx_dma->channel + 1; + uint32_t channel_priority = spi->rx_dma->chnl_cfg.channelPrioHigh; + sl_dma_callback_t spi_rx_callback; + //Initialize sl_dma callback structure + spi_rx_callback.transfer_complete_cb = ssi_transfer_complete_callback; + spi_rx_callback.error_cb = ssi_error_callback; + //Initialize sl_dma transfer structure + dma_transfer_rx.src_addr = (uint32_t *)((uint32_t) & (spi->reg->DR)); + dma_transfer_rx.dest_addr = (uint32_t *)((uint32_t)(spi->xfer->rx_buf)); + dma_transfer_rx.src_inc = control.srcInc; + dma_transfer_rx.dst_inc = control.dstInc; + dma_transfer_rx.xfer_size = control.dstSize; + dma_transfer_rx.transfer_count = num; + dma_transfer_rx.transfer_type = SL_DMA_PERIPHERAL_TO_MEMORY; + dma_transfer_rx.dma_mode = control.transferType; + dma_transfer_rx.signal = (uint8_t)spi->rx_dma->chnl_cfg.periAck; + + //Allocate DMA channel for Tx + status = sl_si91x_dma_allocate_channel(DMA_INSTANCE, &channel, channel_priority); + if (status && (status != SL_STATUS_DMA_CHANNEL_ALLOCATED)) { + return ARM_DRIVER_ERROR; + } + //Register transfer complete and error callback + if (sl_si91x_dma_register_callbacks(DMA_INSTANCE, channel, &spi_rx_callback)) { + return ARM_DRIVER_ERROR; + } + if (sl_si91x_dma_transfer(DMA_INSTANCE, channel, &dma_transfer_rx)) { + return ARM_DRIVER_ERROR; + } + sl_si91x_dma_channel_enable(DMA_INSTANCE, spi->rx_dma->channel + 1); +#else // Initialize and start SPI RX DMA Stream stat = UDMAx_ChannelConfigure(udma, spi->rx_dma->channel, @@ -1216,61 +1422,103 @@ int32_t SPI_Receive(void *data, if (stat == -1) { return ARM_DRIVER_ERROR; } + UDMAx_ChannelEnable(spi->rx_dma->channel, udma, udmaHandle); +#endif } - if (spi->tx_dma != NULL) { - control.transferType = UDMA_MODE_BASIC; - control.nextBurst = 0; - if (num < 1024) { - control.totalNumOfDMATrans = (unsigned int)((num - 1) & 0x03FF); - } else { - control.totalNumOfDMATrans = 0x3FF; - } - control.rPower = ARBSIZE_1; - control.srcProtCtrl = 0x0; - control.dstProtCtrl = 0x0; - if (data_width <= (8U - 1U)) { - // 8-bit data frame - control.srcSize = SRC_SIZE_8; - control.srcInc = SRC_INC_NONE; - control.dstSize = DST_SIZE_8; - control.dstInc = DST_INC_NONE; - } else if (data_width <= (16U - 1U)) { - // 16-bit data frame - control.srcSize = SRC_SIZE_16; - control.srcInc = SRC_INC_NONE; - control.dstSize = DST_SIZE_16; - control.dstInc = DST_INC_NONE; - } else { - // 32-bit data frame - control.srcSize = SRC_SIZE_32; - control.srcInc = SRC_INC_NONE; - control.dstSize = DST_SIZE_32; - control.dstInc = DST_INC_NONE; - } - spi->reg->DMACR_b.TDMAE = 1; - spi->reg->DMATDLR_b.DMATDL = 1; - // Initialize and start SPI TX DMA Stream - stat = UDMAx_ChannelConfigure(udma, - spi->tx_dma->channel, + if ((spi->instance_mode == SPI_MASTER_MODE) || (spi->instance_mode == SPI_ULP_MASTER_MODE)) { + if (spi->tx_dma != NULL) { + control.transferType = UDMA_MODE_BASIC; + control.nextBurst = 0; + if (num < 1024) { + control.totalNumOfDMATrans = (unsigned int)((num - 1) & 0x03FF); + } else { + control.totalNumOfDMATrans = 0x3FF; + } + control.rPower = ARBSIZE_1; + control.srcProtCtrl = 0x0; + control.dstProtCtrl = 0x0; + if (data_width <= (8U - 1U)) { + // 8-bit data frame + control.srcSize = SRC_SIZE_8; + control.srcInc = SRC_INC_NONE; + control.dstSize = DST_SIZE_8; + control.dstInc = DST_INC_NONE; + } else if (data_width <= (16U - 1U)) { + // 16-bit data frame + control.srcSize = SRC_SIZE_16; + control.srcInc = SRC_INC_NONE; + control.dstSize = DST_SIZE_16; + control.dstInc = DST_INC_NONE; + } else { + // 32-bit data frame + control.srcSize = SRC_SIZE_32; + control.srcInc = SRC_INC_NONE; + control.dstSize = DST_SIZE_32; + control.dstInc = DST_INC_NONE; + } + spi->reg->DMACR_b.TDMAE = 1; + spi->reg->DMATDLR_b.DMATDL = 1; + // Initialize and start SPI TX DMA Stream +#if SL_SI91X_SSI_DMA + sl_dma_xfer_t dma_transfer_tx = { 0 }; + uint32_t channel = spi->tx_dma->channel + 1; + uint32_t channel_priority = spi->tx_dma->chnl_cfg.channelPrioHigh; + sl_dma_callback_t spi_tx_callback; + //Initialize sl_dma callback structure + spi_tx_callback.transfer_complete_cb = ssi_transfer_complete_callback; + spi_tx_callback.error_cb = ssi_error_callback; + //Initialize sl_dma transfer structure + dma_transfer_tx.src_addr = (uint32_t *)((uint32_t) & (dummy_data)); + dma_transfer_tx.dest_addr = (uint32_t *)((uint32_t) & (spi->reg->DR)); + dma_transfer_tx.src_inc = control.srcInc; + dma_transfer_tx.dst_inc = control.dstInc; + dma_transfer_tx.xfer_size = control.dstSize; + dma_transfer_tx.transfer_count = num; + dma_transfer_tx.transfer_type = SL_DMA_MEMORY_TO_PERIPHERAL; + dma_transfer_tx.dma_mode = control.transferType; + dma_transfer_tx.signal = (uint8_t)spi->tx_dma->chnl_cfg.periAck; + + //Allocate DMA channel for Tx + status = sl_si91x_dma_allocate_channel(DMA_INSTANCE, &channel, channel_priority); + if (status && (status != SL_STATUS_DMA_CHANNEL_ALLOCATED)) { + return ARM_DRIVER_ERROR; + } + //Register transfer complete and error callback + if (sl_si91x_dma_register_callbacks(DMA_INSTANCE, channel, &spi_tx_callback)) { + return ARM_DRIVER_ERROR; + } + //Configure the channel for DMA transfer + if (sl_si91x_dma_transfer(DMA_INSTANCE, channel, &dma_transfer_tx)) { + return ARM_DRIVER_ERROR; + } + sl_si91x_dma_channel_enable(DMA_INSTANCE, spi->tx_dma->channel + 1); +#else + stat = UDMAx_ChannelConfigure(udma, + spi->tx_dma->channel, #if (defined(SSI_ULP_MASTER_RX_DMA_Instance) && (SSI_ULP_MASTER_RX_DMA_Instance == 1)) - (uint32_t)(ULP_SSI_MASTER_BUF_MEMORY), + (uint32_t)(ULP_SSI_MASTER_BUF_MEMORY), #else - (uint32_t) & (dummy_data), + (uint32_t) & (dummy_data), #endif - (uint32_t) & (spi->reg->DR), - num, - control, - &spi->tx_dma->chnl_cfg, - spi->tx_dma->cb_event, - chnl_info, - udmaHandle); - if (stat == -1) { - return ARM_DRIVER_ERROR; + (uint32_t) & (spi->reg->DR), + num, + control, + &spi->tx_dma->chnl_cfg, + spi->tx_dma->cb_event, + chnl_info, + udmaHandle); + if (stat == -1) { + return ARM_DRIVER_ERROR; + } + UDMAx_ChannelEnable(spi->tx_dma->channel, udma, udmaHandle); +#endif // SL_SI91X_SSI_DMA } - UDMAx_ChannelEnable(spi->tx_dma->channel, udma, udmaHandle); - UDMAx_ChannelEnable(spi->rx_dma->channel, udma, udmaHandle); - UDMAx_DMAEnable(udma, udmaHandle); } +#if SL_SI91X_SSI_DMA + sl_si91x_dma_enable(DMA_INSTANCE); +#else + UDMAx_DMAEnable(udma, udmaHandle); +#endif } else { // Interrupt mode // RX Buffer not empty interrupt enable @@ -1307,11 +1555,14 @@ void SPI_UDMA_Tx_Event(uint32_t event, uint8_t dmaCh, SPI_RESOURCES *spi) case UDMA_EVENT_XFER_DONE: // Update TX buffer info spi->xfer->tx_cnt = spi->xfer->num; + // Waiting till the busy flag is cleared + while (spi->reg->SR & BIT(0)) + ; // Clear error status by reading the register status_reg = spi->reg->SR; spi->info->status.busy = 0U; (void)status_reg; - if (spi->info->cb_event != NULL) { + if ((spi->info->cb_event != NULL) && (spi->xfer->rx_buf == NULL)) { spi->info->cb_event(ARM_SPI_EVENT_TRANSFER_COMPLETE); } break; diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_udma_wrapper.c b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_udma_wrapper.c index 9bfe7761d..1be638bd4 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_udma_wrapper.c +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_udma_wrapper.c @@ -160,25 +160,17 @@ int32_t uDMAx_ChannelConfigure(UDMA_RESOURCES *udma, UDMA_Channel_Info *chnl_info, RSI_UDMA_HANDLE_T udmaHandle) { - uint32_t len0 = 0, len1 = 0; - if ((udma->reg == UDMA0) || (udma->reg == UDMA1)) { - chnl_info[ch].cb_event = cb_event; - } -// Added below macro to avoid ULP memory validations when using SL_DMA with I2C in ULP mode, -// as I2C data register does not belong to ULP memory section -#if !(defined SL_SI91X_I2C_DMA) +// Added below macro to avoid ULP memory validations when using SL_DMA with I2C and SSI in ULP mode, +// as I2C and SSI data register does not belong to ULP memory section +#if !(defined SL_SI91X_I2C_DMA) && !(defined SL_SI91X_SSI_DMA) && !(defined DAC_FIFO_MODE_EN) if (M4_ULP_SLP_STATUS_REG & ULP_MODE_SWITCHED_NPSS) { //PS2 state - if (control.dstInc == UDMA_DST_INC_NONE) { - if ((src_addr >= ULP_SRAM_START_ADDR) && (src_addr <= ULP_SRAM_END_ADDR)) { - chnl_info[ch].SrcAddr = (src_addr); - } else { + if (control.srcInc == UDMA_DST_INC_NONE) { + if (!((src_addr >= ULP_SRAM_START_ADDR) && (src_addr <= ULP_SRAM_END_ADDR))) { return ERROR_UDMA_SRC_ADDR; } } - if (control.srcInc == UDMA_SRC_INC_NONE) { - if ((dest_addr >= ULP_SRAM_START_ADDR) && (dest_addr <= ULP_SRAM_END_ADDR)) { - chnl_info[ch].DestAddr = (dest_addr); - } else { + if (control.dstInc == UDMA_SRC_INC_NONE) { + if (!((dest_addr >= ULP_SRAM_START_ADDR) && (dest_addr <= ULP_SRAM_END_ADDR))) { return ERROR_UDMA_DST_ADDR; } } @@ -195,22 +187,15 @@ int32_t uDMAx_ChannelConfigure(UDMA_RESOURCES *udma, control, (void *)src_addr, (void *)dest_addr); - } - // Save channel information - if (udma->reg == UDMA0) { - len0 = control.totalNumOfDMATrans; - chnl_info[ch].SrcAddr = (src_addr); - chnl_info[ch].DestAddr = (dest_addr); - chnl_info[ch].Size = size; - chnl_info[ch].Cnt = (++len0); - } - if (udma->reg == UDMA1) { - len1 = control.totalNumOfDMATrans; + + // Save channel information + chnl_info[ch].cb_event = cb_event; chnl_info[ch].SrcAddr = (src_addr); chnl_info[ch].DestAddr = (dest_addr); chnl_info[ch].Size = size; - chnl_info[ch].Cnt = (++len1); + chnl_info[ch].Cnt = control.totalNumOfDMATrans + 1; } + return RSI_OK; } diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c index acbc24a10..f09223ebc 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c @@ -120,15 +120,11 @@ void IRQ021_Handler(void) #ifdef SL_SI91X_MCU_WIRELESS_BASED_WAKEUP void IRQ026_Handler() { - //volatile uint32_t wakeUpSrc = 0; - - /*Get the wake up source */ - //wakeUpSrc = RSI_PS_GetWkpUpStatus(); - RSI_PS_GetWkpUpStatus(); + /*This is a dummy IRQ Handler which will not be triggered by default. Umask the interrupt to trigger this IRQ Handler upon receiving an interrupt*/ /*Clear interrupt */ RSI_PS_ClrWkpUpStatus(NPSS_TO_MCU_WIRELESS_INTR); - //LOG_PRINT("\r\n received packet from sleep \r\n"); + return; } #endif /* SL_SI91X_MCU_WIRELESS_BASED_WAKEUP */ diff --git a/examples/si91x_soc/peripheral/sl_si91x_ulp_dma/ulp_dma_example.h b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_wireless_shutdown.c similarity index 51% rename from examples/si91x_soc/peripheral/sl_si91x_ulp_dma/ulp_dma_example.h rename to components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_wireless_shutdown.c index fc91c7fdc..c0f8bc684 100644 --- a/examples/si91x_soc/peripheral/sl_si91x_ulp_dma/ulp_dma_example.h +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_wireless_shutdown.c @@ -1,6 +1,6 @@ /***************************************************************************/ /** -* @file ulp_dma_example.h -* @brief Ulp DMA Example +* @file sl_si91x_wireless_shutdown.c +* @brief wireless shutdown ******************************************************************************* * # License * Copyright 2023 Silicon Laboratories Inc. www.silabs.com @@ -14,29 +14,26 @@ * sections of the MSLA applicable to Source Code. * ******************************************************************************/ - -#ifndef ULP_DMA_EXAMPLE_H_ -#define ULP_DMA_EXAMPLE_H_ +#include "sl_si91x_wireless_shutdown.h" +#include "rsi_power_save.h" +#include "rsi_rom_clks.h" // ----------------------------------------------------------------------------- // Prototypes -/***************************************************************************/ /** -* DMA example initialization function. This function does following, -* DMA peripheral initialization -* DMA channel allocation and DMA descriptor update -* Trigger DMA transfer -* -* @param none -* @return none -******************************************************************************/ -void dma_example_init(void); - -/***************************************************************************/ /** -* Function will run continuously and will wait for interrupt -* -* @param none -* @return none -******************************************************************************/ -void dma_example_process_action(void); - -#endif /* SL_SI91X_DMA_EXAMPLE_H_ */ +/** + * @fn sl_si91x_wireless_shutdown + * @brief Configure power management settings for SI91X device + * @param[in] none + * @return none. + * @section description + * This API disables the ULP reference clocks, changes the TASS + * Reference, and shuts down the power supply. + */ +void sl_si91x_wireless_shutdown(void) +{ + RSI_ULPSS_DisableRefClks(MCU_ULP_40MHZ_CLK_EN); /* Disabling 40MHz Clocks */ + // This API is used to change the TASS reference clock to 32MHz + RSI_ChangeTassRefClock(); + // This API is used to shutdown the power supply to wireless functionalities + ps_wireless_shutdown(); +} \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/rom_driver/inc/rsi_packing.h b/components/device/silabs/si91x/mcu/drivers/rom_driver/inc/rsi_packing.h index 71eacb6b6..71f37181f 100644 --- a/components/device/silabs/si91x/mcu/drivers/rom_driver/inc/rsi_packing.h +++ b/components/device/silabs/si91x/mcu/drivers/rom_driver/inc/rsi_packing.h @@ -18,8 +18,10 @@ #ifndef __PACKING_H_ #define __PACKING_H_ -#define PRE_PACK /* Nothing */ -#define POST_PACK /* Nothing */ +#define PRE_PACK /* Nothing */ +#define POST_PACK /* Nothing */ +#ifndef ALIGNED #define ALIGNED(n) /* Nothing */ +#endif #endif /* __PACKING_H_ */ diff --git a/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_common_flash_nvm3.slcc b/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_common_flash_nvm3.slcc index 78e0ec3b2..4596b7822 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_common_flash_nvm3.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_common_flash_nvm3.slcc @@ -10,6 +10,8 @@ define: - name: FLASH_PAGE_SIZE - name: __STATIC_INLINE value: "static inline" +ui_hints: + visibility: never source: - path: "src/sl_si91x_common_flash_intf.c" - path: "src/sl_si91x_nvm3_hal_flash.c" diff --git a/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_dual_flash_nvm3.slcc b/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_dual_flash_nvm3.slcc index 191f30801..14dbb6a07 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_dual_flash_nvm3.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_dual_flash_nvm3.slcc @@ -15,6 +15,8 @@ define: value: 1 - name: SL_NVM3_PRESENT value: 1 +ui_hints: + visibility: never source: - path: "src/sl_si91x_dual_flash_intf.c" - path: "src/sl_si91x_nvm3_hal_flash.c" diff --git a/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_nvm3.slcc b/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_nvm3.slcc index 2596474fe..430e5ed50 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_nvm3.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/nvm3/component/sl_si91x_nvm3.slcc @@ -2,7 +2,19 @@ id: sl_si91x_nvm3 label: NVM3 for Si91x package: platform description: > - Provides NVM3 common functionalities for the Si91x. + The NVM3 driver provides a means to write and read data objects + (key/value pairs) stored in flash. Wear-leveling is applied to reduce erase + and write cycles and maximize flash lifetime. The driver is resilient to + power loss and reset events, ensuring that objects retrieved from the driver + are always in a valid state. A single NVM3 instance can be shared among + several wireless stacks and application code, making it well-suited for + multiprotocol applications. + This component includes only the NVM3 driver core. To configure and create + the default instance of this driver, the NVM3 Default Instance component + should be included in the project. + + When you install this component, it will also be installing the NVM3 dependency component, + which is the NVM3 driver's implementation. category: Device|Si91x|MCU|Service quality: production component_root_path: "components/device/silabs/si91x/mcu/drivers/service/nvm3" diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/adc_ulp_component.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/adc_ulp_component.slcc index 24e46e437..23c702d9c 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/adc_ulp_component.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/adc_ulp_component.slcc @@ -36,3 +36,5 @@ template_contribution: - name: adc_ps2 value: cmpdf2.o + + diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/debug_ulp_component.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/debug_ulp_component.slcc index c4eeb5ea6..5db33e005 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/debug_ulp_component.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/debug_ulp_component.slcc @@ -43,5 +43,13 @@ template_contribution: value: syscalls.o - name: debug_ps2 value: USART.o - - + - name: debug_ps2 + value: libm_a-s_ceil.o + - name: debug_ps2 + value: '_arm_*.o' + - name: debug_ps2 + value: 'libc_a*.o' + - name: debug_ps2 + value: 'libm_a*.o' + - name: debug_ps2 + value: 'sbrk.o*' diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/dma_ulp_component.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/dma_ulp_component.slcc index 84d868011..ce34f4710 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/dma_ulp_component.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/dma_ulp_component.slcc @@ -25,4 +25,4 @@ template_contribution: - name: dma_ps2 value: rsi_udma_wrapper.o - name: dma_ps2 - value: UDMA.o + value: UDMA.o \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/gpio_ulp_component.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/gpio_ulp_component.slcc index 7c6620882..5562b4f88 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/gpio_ulp_component.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/gpio_ulp_component.slcc @@ -19,8 +19,6 @@ template_contribution: value: 1 - name: gpio_ps2 value: sl_si91x_peripheral_gpio.o - - name: gpio_ps2 - value: sl_si91x_driver_gpio.o - name: wakeup value: event: wakeup_init @@ -29,4 +27,7 @@ template_contribution: return: sl_status_t include: name: sl_si91x_driver_gpio.h - + - name: gpio_ps2 + value: rsi_egpio.o + - name: gpio_ps2 + value: sl_si91x_driver_gpio.o diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/i2c_ulp_component.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/i2c_ulp_component.slcc index 5e7012d5e..f665c5ae8 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/i2c_ulp_component.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/i2c_ulp_component.slcc @@ -19,4 +19,17 @@ template_contribution: value: 1 - name: i2c_ps2 value: sl_si91x_peripheral_i2c.o - + - name: i2c_ps2 + value: sl_si91x_i2c.o + - name: i2c_ps2 + value: memcpy*.o + - name: i2c_ps2 + value: UDMA.o + - name: i2c_ps2 + value: rsi_udma.o + - name: i2c_ps2 + value: rsi_udma_wrapper.o + - name: i2c_ps2 + value: sl_si91x_dma.o + - name: i2c_ps2 + value: rsi_i2c.o \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/i2s_ulp_component.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/i2s_ulp_component.slcc index 606900235..b6d8583e1 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/i2s_ulp_component.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/i2s_ulp_component.slcc @@ -31,4 +31,3 @@ template_contribution: value: rsi_udma.o - name: i2s_ps2 value: rsi_udma_wrapper.o - diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/power_manager_advance_config.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/power_manager_advance_config.slcc new file mode 100644 index 000000000..4756e2db4 --- /dev/null +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/power_manager_advance_config.slcc @@ -0,0 +1,61 @@ +id: power_manager_advance_config +label: Power Manager Advance Configuration +package: platform +description: > + Provides optimized configuration for the peripheral enable/disable as well as the RAM retention. + The default configuration provides the best current measurement, if needed user can modify the + configuration which may impact the current numbers. + RAM configuration is provided either by size or by Bank number, the user can opt for anyone. + Priority is given to the RAM Bank number. +category: Device|Si91x|MCU|Service|Power Manager +quality: production +component_root_path: "components/device/silabs/si91x/mcu/drivers/service/power_manager" +conflicts: + - name: power_manager_config +config_file: + - path: config/sl_si91x_power_manager_advance_config_1.h + condition: + - si917_mem_config_1 + - path: config/sl_si91x_power_manager_advance_config_2.h + condition: + - si917_mem_config_2 + - path: config/sl_si91x_power_manager_advance_config_3.h + condition: + - si917_mem_config_3 +template_file: + - path: init/sl_si91x_power_manager_init.h.jinja +define: + - name: SL_ADVANCE_POWERSAVE_CONFIG + value : "1" + - name: SL_SI91X_ENABLE_LOWPWR_RET_LDO + value: "1" +template_contribution: + - name: event_handler + value: + event: service_init + include: sl_si91x_power_manager_init.h + handler: sli_si91x_power_manager_configure_ram_and_peripheral + priority: -9990 + - name: power_manager_config + value: + include: + name: sl_si91x_power_manager_advance_config_1.h + priority: -5000 + condition: + - si917_mem_config_1 + - name: power_manager_config + value: + include: + name: sl_si91x_power_manager_advance_config_2.h + priority: -5000 + condition: + - si917_mem_config_2 + - name: power_manager_config + value: + include: + name: sl_si91x_power_manager_advance_config_3.h + priority: -5000 + condition: + - si917_mem_config_3 +provides: + - name: power_manager_advance_config diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/power_manager_config.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/power_manager_config.slcc new file mode 100644 index 000000000..dfc392abc --- /dev/null +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/power_manager_config.slcc @@ -0,0 +1,56 @@ +id: power_manager_config +label: Power Manager Configuration +package: platform +description: > + Provides configuration for the peripheral enable/disable as well as the RAM retention. + Supports the configuration of HP, ULP, and UULP peripherals. + RAM configuration is provided either by size or by Bank number, the user can opt for anyone. + Priority is given to the RAM Bank number. +category: Device|Si91x|MCU|Service|Power Manager +quality: production +component_root_path: "components/device/silabs/si91x/mcu/drivers/service/power_manager" +conflicts: + - name: power_manager_advance_config + +config_file: + - path: config/sl_si91x_power_manager_config_1.h + condition: + - si917_mem_config_1 + - path: config/sl_si91x_power_manager_config_2.h + condition: + - si917_mem_config_2 + - path: config/sl_si91x_power_manager_config_3.h + condition: + - si917_mem_config_3 +template_file: + - path: init/sl_si91x_power_manager_init.h.jinja +template_contribution: + - name: event_handler + value: + event: service_init + include: sl_si91x_power_manager_init.h + handler: sli_si91x_power_manager_configure_ram_and_peripheral + priority: -9990 + - name: power_manager_config + value: + include: + name: sl_si91x_power_manager_config_1.h + priority: -5000 + condition: + - si917_mem_config_1 + - name: power_manager_config + value: + include: + name: sl_si91x_power_manager_config_2.h + priority: -5000 + condition: + - si917_mem_config_2 + - name: power_manager_config + value: + include: + name: sl_si91x_power_manager_config_3.h + priority: -5000 + condition: + - si917_mem_config_3 +provides: + - name: power_manager_config diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/sl_power_manager.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/sl_power_manager.slcc index a36680bb8..3af9cd399 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/sl_power_manager.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/sl_power_manager.slcc @@ -2,9 +2,13 @@ id: sl_power_manager label: Power Manager package: platform description: > - Power Manager (PM) will be managing the power consumption of the MCU. - The PM will shut down the high-frequency clock and put the system in - lower Energy Modes (EM) as per user request. + Initiates the Power Manager (PM) component to manage the MCU's power usage. + As per the user's request, the PM will turn off the high-frequency clock and + place the system in a reduced Power State (PS). The PM also allows the user to + specify callbacks that will be executed when entering or exiting specific Power States. + This enables the user to perform any accounting after PS transition occurrences. + It also exposes a set of events that other components may utilize to register + handlers for the power manager hooks function. category: Device|Si91x|MCU|Service|Power Manager quality: production component_root_path: "components/device/silabs/si91x/mcu/drivers/service/power_manager" diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/timer_ulp_component.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/timer_ulp_component.slcc index 1192ad72c..00ff43af7 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/timer_ulp_component.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/timer_ulp_component.slcc @@ -22,3 +22,14 @@ template_contribution: value: sl_si91x_ulp_timer.o - name: ulp_timer_ps2 value: rsi_timers.o + - name: ulp_timer_ps2 + value: memcpy*.o + - name: ulp_timer_ps2 + value: UDMA.o + - name: ulp_timer_ps2 + value: rsi_udma.o + - name: ulp_timer_ps2 + value: rsi_udma_wrapper.o + - name: ulp_timer_ps2 + value: sl_si91x_led.o + diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/usart_ulp_component.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/usart_ulp_component.slcc index 2b2119a9f..5cc231736 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/usart_ulp_component.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/usart_ulp_component.slcc @@ -20,7 +20,7 @@ template_contribution: - name: usart_ps2 value: sl_si91x_usart.o - name: usart_ps2 - value: USART.o + value: rsi_udma.o - name: usart_ps2 - value: rsi_usart.o + value: rsi_udma_wrapper.o diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/wakeup_source_config.slcc b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/wakeup_source_config.slcc new file mode 100644 index 000000000..ddeefc40c --- /dev/null +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/component/wakeup_source_config.slcc @@ -0,0 +1,27 @@ +id: wakeup_source_config +label: Wakeup Source Configuration +package: platform +description: > + Wakeup Source Configuration component will enable the NPSS peripherals as wakeup source. + This also initializes the peripheral and configure as a wakeup source as per the selection in User Configuration. +category: Device|Si91x|MCU|Service|Power Manager +quality: production +component_root_path: "components/device/silabs/si91x/mcu/drivers/service/power_manager" +source: + - path: src/sli_si91x_power_manager_wakeup_initialization.c +config_file: + - path: config/sl_si91x_power_manager_wakeup_source_config.h +requires: + - name: sl_power_manager +template_file: + - path: init/sl_si91x_power_manager_wakeup_handler.h.jinja + - path: init/sl_si91x_power_manager_wakeup_handler.c.jinja +template_contribution: + - name: wakeup_config + value: + include: + name: sl_si91x_power_manager_wakeup_source_config.h +define: + - name: SL_SI91X_POWER_MANAGER_UC_AVAILABLE +provides: + - name: wakeup_source_config diff --git a/components/device/silabs/si91x/mcu/drivers/service/power_manager/inc/sl_si91x_power_manager.h b/components/device/silabs/si91x/mcu/drivers/service/power_manager/inc/sl_si91x_power_manager.h index ee779bb0d..255c3f435 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/power_manager/inc/sl_si91x_power_manager.h +++ b/components/device/silabs/si91x/mcu/drivers/service/power_manager/inc/sl_si91x_power_manager.h @@ -211,6 +211,7 @@ typedef struct { sl_power_manager_ps_transition_event_info_t *info; ///< Handle event info. } sl_power_manager_ps_transition_event_handle_t; +/** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */ // ----------------------------------------------------------------------------- // Internal API Prototypes /******************************************************************************* @@ -235,6 +236,7 @@ typedef struct { * ******************************************************************************/ sl_status_t sli_si91x_power_manager_update_ps_requirement(sl_power_state_t state, boolean_t add); +/** @endcond */ // To make sure that we are able to optimize out the string argument when the // debug feature is disable, we use a pre-processor macro resulting in a no-op. @@ -744,6 +746,187 @@ void sl_si91x_power_manager_deinit(void); /** @} (end addtogroup POWER-MANAGER) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup POWER-MANAGER Power Manager +/// @{ +/// +/// @details +/// +/// +/// @n @section POWER-MANAGER_Intro Introduction +/// The power manager is a platform-level software module that manages the system's power states. The power state requirements are set by the different software modules (drivers, stacks, application code, etc...). +/// Power manager also offers a notification mechanism through which any piece of software module can be notified of power state transitions through callbacks. +/// +/// ***Initialization*** +/// +/// Power manager must be initialized before any call to power manager API. +/// If sl_system is used, only sl_system_init() must be called, otherwise +/// @ref sl_si91x_power_manager_init() must be called manually. +/// +/// ***Add and remove requirements*** +/// +/// The driver/application can add and remove power state requirements, at runtime. Add requirement will change the power state, remove requirement function call will not have any effect for state transition. +/// @ref sl_si91x_power_manager_add_peripheral_requirement() +/// +/// @ref sl_si91x_power_manager_remove_peripheral_requirement() +/// +/// ***Subscribe to events*** +/// +/// It is possible to get notified when the system transitions from a power state to +/// another power state. This can allow to do some operations depending on which level +/// the system goes, such as saving/restoring context. +/// @ref sl_si91x_power_manager_subscribe_ps_transition_event() +/// +/// @ref sl_si91x_power_manager_unsubscribe_ps_transition_event() +/// +/// ***Sleep*** +/// +/// When the software has no more operation and only needs to wait for an event, the +/// software must call @ref sl_si91x_power_manager_sleep(). +/// +/// Query callback functions +/// +/// Is OK to sleep +/// +/// Between the time @ref sl_si91x_power_manager_sleep() is called and the MCU goes to sleep, an ISR may occur and require the system to resume at that time instead of sleeping. So a callback is called in a critical section to validate that the MCU can go to sleep. +/// +/// The function sl_si91x_power_manager_is_ok_to_sleep() will be generated automatically by Simplicity Studio's wizard. +/// The function will look at multiple software modules from the SDK to make a decision. +/// The application can contribute to the decision by defining the function `app_is_ok_to_sleep(). +/// If any of the software modules (including the application via app_is_ok_to_sleep()) return false, +/// the process of entering in sleep will be aborted. +/// +/// ***Sleep on ISR exit*** +/// +/// When the system enters sleep, the only way to wake it up is via an interrupt or +/// exception. By default, power manager will assume that when an interrupt +/// occurs and the corresponding ISR has been executed, the system must not go back +/// to sleep. However, in the case where all the processing related to this interrupt +/// is performed in the ISR, it is possible to go back to sleep by using this hook. +/// +/// The function sl_si91x_power_manager_sleep_on_isr_exit() will be generated +/// automatically by Simplicity Studio's wizard. The function will look at multiple software modules from the SDK +/// to make a decision. The application can contribute to the decision by defining the +/// function app_sleep_on_isr_exit(). +/// The generated function will make a decision based on the value returned by the different software modules +/// (including the application via app_sleep_on_isr_exit()): +/// +/// SL_SI91X_POWER_MANAGER_ISR_IGNORE: if the software module did not cause the system wakeup and/or doesn't want to contribute to the decision. +/// +/// SL_SI91X_POWER_MANAGER_ISR_SLEEP: if the software module did cause the system wakeup, but the system should go back to sleep. +/// +/// SL_SI91X_POWER_MANAGER_ISR_WAKEUP: if the software module did cause the system wakeup, and the system should not go back to sleep. +/// +/// If any software module returned SL_SI91X_POWER_MANAGER_ISR_SLEEP and none returned SL_SI91X_POWER_MANAGER_ISR_WAKEUP, +/// the system will go back to sleep. Any other combination will cause the system not to go back to sleep. +/// +/// ***Debugging feature*** +/// +/// By installing power manager debug component and setting the configuration define SL_SI91X_POWER_MANAGER_DEBUG to 1, it is possible +/// to record the requirements currently set and their owner. It is possible to print +/// at any time a table that lists all the added requirements and their owner. This +/// table can be printed by calling the function: +/// @ref sl_power_manager_debug_print_em_requirements(). +/// +/// Make sure to add the following define +/// +/// ```C +/// #define CURRENT_MODULE_NAME // Module printable name here +/// ``` +/// to any application code source file that adds and removes requirements. +/// +/// +/// @n @section POWER-MANAGER_Config Configuration +/// +/// Power manager allows configuration of RAM retention, peripheral states, wakeup sources, and clock scaling. +/// +/// - Clock Scaling: +/// - Clock can be configured as power-save or performance based on the user requirement. By default after the state change, the clock is configured as powersave. The below API is used to set the clock scaling. +/// @ref sl_si91x_power_manager_set_clock_scaling(); where mode can be either power-save or performance. +/// - Peripheral States: +/// - High power, ULPSS, and NPSS peripherals can be configured using the below APIs. It can be powered on or off based on user requirements. +/// @ref sl_si91x_power_manager_add_peripheral_requirement() +/// @ref sl_si91x_power_manager_remove_peripheral_requirement(); +/// - RAM retention: +/// - Retains the RAM in low power state either by using size or RAM bank as input parameter. +/// @ref sl_si91x_power_manager_configure_ram_retention(); +/// - Wakeup source: +/// - The wakeup sources can be configured using the below API. +/// @ref sl_si91x_power_manager_set_wakeup_sources(); +/// +/// @n @section POWER-MANAGER_Usage Usage +/// +/// - Initialization: +/// - @ref sl_si91x_power_manager_init(): Initializes the power manager service and sets the initial power state. +/// - Peripheral requirements: +/// - @ref sl_si91x_power_manager_add_peripheral_requirement(): It turns on/off the peripheral power +/// - @ref sl_si91x_power_manager_remove_peripheral_requirement(): Removes the peripheral requirement. +/// - Power State Transitions: +/// - @ref sl_si91x_power_manager_subscribe_ps_transition_event(): Registers a callback for a specific power state transition. +/// - @ref sl_si91x_power_manager_sleep(): Puts the device into sleep mode. +/// - @ref sl_si91x_power_manager_unsubscribe_ps_transition_event(): Unregisters the callback for the power state transition. +/// - De-initialization: +/// - @ref sl_si91x_power_manager_deinit(): De-initializes the power manager service. +/// +/// ***Usage Example*** +/// +/// ```C +/// #define EM_EVENT_MASK_ALL (SL_SI91X_POWER_MANAGER_EVENT_TRANSITION_ENTERING_PS4 +/// | SL_SI91X_POWER_MANAGER_EVENT_TRANSITION_LEAVING_PS4 +/// | SL_SI91X_POWER_MANAGER_EVENT_TRANSITION_ENTERING_PS3 +/// | SL_SI91X_POWER_MANAGER_EVENT_TRANSITION_LEAVING_PS3 +/// | SL_SI91X_POWER_MANAGER_EVENT_TRANSITION_ENTERING_PS2 +/// | SL_SI91X_POWER_MANAGER_EVENT_TRANSITION_LEAVING_PS2 +/// | SL_SI91X_POWER_MANAGER_EVENT_TRANSITION_LEAVING_SLEEP) +/// +/// static void power_manager_app(void) +/// { +/// sl_status_t status; +/// sl_power_manager_ps_transition_event_handle_t handle; +/// sl_power_manager_ps_transition_event_info_t info = { .event_mask = PS_EVENT_MASK, .on_event = transition_callback }; +/// +/// +/// // Subscribe the state transition callback events, the ored value of flag and function pointer is passed in this API. +/// status = sl_si91x_power_manager_subscribe_ps_transition_event(&handle, &info); +/// if (status != SL_STATUS_OK) { +/// // If status is not OK, return with the error code. +/// return; +/// } +/// // Configuring the RAM retention used for sleep-wakeup. +/// sl_power_ram_retention_config_t config; +/// config.configure_ram_banks = true; +/// config.m4ss_ram_banks = SL_SI91X_POWER_MANAGER_M4SS_RAM_BANK_8 | SL_SI91X_POWER_MANAGER_M4SS_RAM_BANK_9 | SL_SI91X_POWER_MANAGER_M4SS_RAM_BANK_10; +/// config.ulpss_ram_banks = SL_SI91X_POWER_MANAGER_ULPSS_RAM_BANK_2 | SL_SI91X_POWER_MANAGER_ULPSS_RAM_BANK_3; +/// // RAM retention modes are configured and passed into this API. +/// status = sl_si91x_power_manager_configure_ram_retention(&config); +/// if (status != SL_STATUS_OK) { +/// // If status is not OK, return with the error code. +/// return; +/// } +/// +/// // Change state to PS2 +/// sl_si91x_power_manager_add_ps_requirement(SL_SI91X_POWER_MANAGER_PS2); +/// +/// // CODE BLOCK // +/// +/// // Change state to PS4 +/// // Removed PS2 requirement as it is no longer required. +/// sl_si91x_power_manager_remove_ps_requirement(SL_SI91X_POWER_MANAGER_PS2); +/// sl_si91x_power_manager_add_ps_requirement(SL_SI91X_POWER_MANAGER_PS2); +/// +/// // SLEEP_WAKEUP +/// +/// // Initialize wakeup source +/// // Replace the wakeup source peripheral macro defined in sl_si91x_power_manager.h file +/// // It sets the below peripheral as wakeup source +/// sl_si91x_power_manager_set_wakeup_source(WAKEUP_SOURCE, true); +/// sl_si91x_power_manager_sleep(); +/// } +/// +/// ``` +/// +/// @} end group POWER-MANAGER ********************************************************/ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h b/components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h index be830b616..837e62533 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h +++ b/components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h @@ -871,4 +871,154 @@ sl_status_t sli_si91x_sdc_init(void); void sli_config_sdc_params(sl_drv_sdc_config_t *sdc_config_st_p); #endif -/** @} (end addtogroup SENSOR-HUB) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup SENSOR-HUB Sensor Hub +/// @{ +/// +/// @details +/// +/// +/// @n @section SENSOR-HUB_Intro Introduction +/// +/// * Sensor Hub products are primarily intended to address consumer, industrial, and medical applications that require wireless connectivity, extremely low power, and high performance for sensor fusion algorithms. The MCU core, wireless connectivity, and peripherals are identical to the SI917 CCP Radio board. +/// * Sensor Hub functions as a sensor management system, facilitating hardware abstraction layer, peripheral drivers, and sensor driver layer integration to collect and distribute desired sensor data. +/// * It enables users to collect sensor data based on time interval or number of samples or when a specific data requirement are met. +/// * Sensor Hub serves as a framework that can be seamlessly integrated into any application requiring sensor management. +/// * The Sensor HUB works with sensors as per configurations provided by the application and notifies the necessary events throughout the application. +/// * The configuration for the sensors must be provided through the sensor hub config file on which the sensor hub should act. +/// * Sensor Hub relies on FreeRTOS using CMSIS RTOS version 2 wrapper. +/// +/// +/// @n @section SENSOR-HUB_Config Configuration +/// +/// * Sensor Hub has 2 Sensor Mode: +/// * **SL_SH_POLLING_MODE**: This mode is Timer based. +/// * **SL_SH_INTERRUPT_MODE**: This mode is NPSS Button 0 GPIO Interrupt based. +/// * There are 3 types of data_deliver.mode in Polling Sensor Mode and they are **SL_SH_THRESHOLD**, **SL_SH_TIMEOUT** and **SL_SH_NUM_OF_SAMPLES**. +/// * **SL_SH_NO_DATA** data_deliver.mode is used when Interrupt Sensor Mode is selected. +/// * If the user wants a value that sets a limit or boundary, above which the sensor data should be shown then SL_SH_THRESHOLD mode should be chosen +/// * SL_SH_TIMEOUT mode is used when user wants to get the data at some intervals of time for some sampling time +/// * SL_SH_NUM_OF_SAMPLES mode is used when user wants to get the particular number of sensor data  +/// * SL_SH_NO_DATA mode is used when . +/// * Here data_deliver.timeout is the time for which the sensor should keep collecting the data for. +/// * sampling_interval is the the amount of time between two sensor data read is sampled or collected. +/// * sampling_intr_req_pin is the GPIO pin for sampling the sensor data +/// +/// * Configure the number of sensors info in the **\sensors\inc\sensors_config.h** file +/// ```C +/// #define SL_MAX_NUM_SENSORS 5 // Maximum sensors present in the system +/// ``` +/// * Modes: Using the configuration structure, one can configure the following parameters in the ***sensorhub_config.c*** file: +/// +/// * For **POLLING Sensor Mode** configure the below parameters: +/// ```C +/// .sensor_mode = SL_SH_POLLING_MODE, +/// .sampling_interval = 100, +/// ``` +/// * If sensor_mode is selected as ***SL_SH_POLLING_MODE***, then data_deliver.mode should be configured as **one** of the following for a sensor configuration structure: +/// * For **TIMEOUT Data Mode** configure the below parameters: +/// ```C +/// .data_deliver.mode = SL_SH_TIMEOUT, +/// .data_deliver.timeout = 1000, +/// ``` +/// * For **THRESHOLD Data Mode** configure the below parameters: +/// ```C +/// .data_deliver.mode = SL_SH_THRESHOLD, +/// .data_deliver.threshold = 1000, +/// ``` +/// * For **SAMPLING Data Mode** configure the below parameters: +/// ```C +/// .data_deliver.mode = SL_SH_NUM_OF_SAMPLES, +/// .data_deliver.numOfSamples = 5, +/// ``` +/// * For **INTERRUPT Sensor Mode** configure the below parameters: +/// ```C +/// .sensor_mode = SL_SH_INTERRUPT_MODE, +/// .sampling_intr_req_pin = BUTTON_0_GPIO_PIN, +/// .sensor_intr_type = SL_SH_FALL_EDGE, +/// .data_deliver.data_mode = SL_SH_NO_DATA_MODE, +/// ``` +/// * To configure the PS2, please update the below macro in the preprocessor settings: +/// ```C +/// SL_SENSORHUB_POWERSAVE=1 +/// Enabling this macro will move the application from PS4 state to PS2 state. In PS2 state the sensor data will be sampled and collected. +/// ``` +/// +/// * To configure the power states to PS4 sleep or PS2 Sleep, please update the defines in ***\gecko_sdk_4.3.2\util\third_party\freertos\kernel\include\FreeRTOS.h** file as below: +/// ```C +/// #ifndef configUSE_TICKLESS_IDLE +/// #define configUSE_TICKLESS_IDLE 1 // 1 is to Enable the tickless Idle mode +/// #endif +/// +/// #ifndef configPRE_SLEEP_PROCESSING +/// #define configPRE_SLEEP_PROCESSING(x) sli_si91x_sleep_wakeup(x) // Here x is idle time, +/// #endif +/// +/// // Configure the sleep time by using the below macro. +/// // If the number of Ideal task ticks exceeds this value, the system is allowed to sleep. +/// #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP +/// #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 70 +/// #endif +/// ``` +/// ***Note***: +/// * By using above sleep configuration, sensor hub is going to sleep by using the idle task and idle time. +/// * If the Ideal time exceeds the expected sleep time value, the system is allowed to sleep. +/// * The above idle time is fed to the Alarm timer, which we are using as a wake-up source. +/// +/// +/// **ADC Configurations**: +/// Configure only below parameters for ADC to change its mode from FIFO to STATIC and vice versa +/// +/// * For ADC FIFO mode, configure as shown below: +/// ```C +/// .adc_config.adc_cfg.operation_mode = SL_ADC_FIFO_MODE, +/// .adc_config.adc_ch_cfg.sampling_rate[0] = SL_SH_ADC_SAMPLING_RATE, // Use 100 for FIFO Mode +/// ``` +/// * For ADC Static mode, configure as shown below: +/// ```C +/// .adc_config.adc_cfg.operation_mode = SL_ADC_STATIC_MODE, +/// .adc_config.adc_ch_cfg.sampling_rate[0] = SL_SH_ADC_SAMPLING_RATE, // Use 1000 for Static Mode +/// ``` +/// * To configure the PS1 power state from PS2 State, please update the below macro in the preprocessor settings: +/// ```C +/// SL_SH_ADC_PS1=1 +/// Enabling this macro will move the core from PS2 Active state to PS1 state +/// ``` +/// * Please update the defines in ***\gecko_sdk_4.3.2\util\third_party\freertos\kernel\include\FreeRTOS.h** file as below: +/// ```C +/// #ifndef configUSE_TICKLESS_IDLE +/// #define configUSE_TICKLESS_IDLE 1 // 1 is to Enable the tickless Idle mode +/// #endif +/// +/// #ifndef configPRE_SLEEP_PROCESSING +/// #define configPRE_SLEEP_PROCESSING(x) sli_si91x_sleep_wakeup(x) // Here x is idle time, +/// #endif +/// ``` +/// ***Note***: +/// * The PS1 state transition only applies to ADC FIFO Mode. Before entering this mode, kindly turn off any other sensors. +/// +/// +/// +/// @n @section SENSOR-HUB_Usage Usage +/// +/// Sensorhub provides two apis which user can use for intergrating into any application +/// - @ref sl_si91x_sensorhub_app_task(void); +/// - @ref sl_si91x_sensor_event_handler(uint8_t sensor_id, uint8_t event); +/// +/// @ref sl_si91x_sensorhub_app_task(void): initialises and starts sensor data collection. it achieves this by calling the following apis +/// +/// @ref sl_si91x_sensorhub_notify_cb_register(sl_sensor_signalEvent_t cb_event, sl_sensor_id_t *cb_ack): links the event handler provided by the user as a callback function in the event task +/// +/// @ref sl_si91x_sensorhub_init(): initializes the peripherals I2C, SPI, ADC, SDC +/// +/// @ref sl_si91x_sensorhub_detect_sensors(sl_sensor_id_t *sensor_id_info, uint8_t num_of_sensors): scans the i2c sensors provided in the sensorhub_config.c and returns the number of these sensors that are currently connected +/// +/// @ref sl_si91x_sensorhub_create_sensor(sl_sensor_id_t sensor_id): Initializes the sensor by calling the init function of the sensor provided by the user in the respective HAL, Assigs memory to it based on the data delivery mode, Creates a timer for this sensor if required +/// +/// @ref sl_si91x_sensor_hub_start(): initializes the sensor task, event task and power task +/// +/// @ref sl_si91x_sensorhub_start_sensor(sl_sensor_id_t sensor_id): starts the timers of the sensors created in create sensor api +/// +/// @ref sl_si91x_sensor_event_handler(uint8_t sensor_id, uint8_t event) is called by the event task after sensor data is collected ,in the sensorhub appilcation it prints the data based on the sensor id and uploads it to the cloud +/// +/// @} end group SENSOR-HUB ********************************************************/ \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/service/sensorhub/src/sensor_hub.c b/components/device/silabs/si91x/mcu/drivers/service/sensorhub/src/sensor_hub.c index 5f7e57853..541d78da5 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/sensorhub/src/sensor_hub.c +++ b/components/device/silabs/si91x/mcu/drivers/service/sensorhub/src/sensor_hub.c @@ -47,7 +47,7 @@ #include "adc_sensor_driver.h" #include "sensorhub_error_codes.h" #include "rsi_ps_ram_func.h" - +#include "rsi_m4.h" #pragma GCC diagnostic ignored "-Waddress-of-packed-member" #pragma GCC diagnostic ignored "-Wint-to-pointer-cast" #pragma GCC diagnostic ignored "-Wunused-variable" @@ -476,7 +476,9 @@ void sli_si91x_sensorhub_ps4tops2_state(void) Ex: 32Khz clock = 31.25us ==> 31.25*2^17 = 4096000 = 0x3E8000*/ /* Time Period Programming */ RSI_TIMEPERIOD_TimerClkSel(TIME_PERIOD, 0x003E7FFF); - + /* tass_ref_clk_mux_ctr in TA Control */ + RSI_Set_Cntrls_To_TA(); + __disable_irq(); /* Switching from PS4 to PS2 state */ RSI_PS_PowerStateChangePs4toPs2(ULP_MCU_MODE, PWR_MUX_SEL_ULPSSRAM_SCDC_0_9, @@ -490,15 +492,41 @@ void sli_si91x_sensorhub_ps4tops2_state(void) DISABLE_STANDBYDC, DISABLE_TA192K_RAM_RET, ENABLE_M464K_RAM_RET); + __enable_irq(); } void sli_si91x_sensorhub_ps2tops4_state(void) { - RSI_PS_PowerStateChangePs2toPs4(SL_SH_PMUBUCKTURNONWAITTIME, SL_SH_SOCLDOTURNONWAITTIME); __disable_irq(); + /* change the power state from PS2 to PS4 */ + RSI_PS_PowerStateChangePs2toPs4(SL_SH_PMUBUCKTURNONWAITTIME, SL_SH_SOCLDOTURNONWAITTIME); + /* power_On the M4SS Flash and peripherals*/ + RSI_PS_M4ssPeriPowerUp(M4SS_PWRGATE_ULP_QSPI_ICACHE | M4SS_PWRGATE_ULP_EFUSE_PERI); + /* enable the power to the QSPI-DLL module */ + RSI_PS_QspiDllDomainEnable(); /* Initialize the QSPI after moving to PS4 state because it was powered down in PS2 mode. */ RSI_PS_FlashLdoEnable(); + if (!(P2P_STATUS_REG & TA_is_active)) { + //!wakeup TA + P2P_STATUS_REG |= M4_wakeup_TA; + //!wait for TA active + while (!(P2P_STATUS_REG & TA_is_active)) + ; + } + //! Request TA to program flash + //! raise an interrupt to TA register + M4SS_P2P_INTR_SET_REG = BIT(4); + P2P_STATUS_REG = BIT(0); + + while (!(P2P_STATUS_REG & BIT(3))) + ; + /* Initialize the QSPI */ RSI_FLASH_Initialize(); __enable_irq(); + // Initialize TA interrupt and submit RX packets + sli_m4_ta_interrupt_init(); + M4SS_P2P_INTR_SET_REG = RX_BUFFER_VALID; + /* AON domain power supply controls form TA to M4 */ + RSI_Set_Cntrls_To_M4(); } /**************************************************************************/ /** diff --git a/components/device/silabs/si91x/mcu/drivers/service/sleeptimer/component/sleeptimer_si91x.slcc b/components/device/silabs/si91x/mcu/drivers/service/sleeptimer/component/sleeptimer_si91x.slcc index e753e412b..c2e9925c3 100644 --- a/components/device/silabs/si91x/mcu/drivers/service/sleeptimer/component/sleeptimer_si91x.slcc +++ b/components/device/silabs/si91x/mcu/drivers/service/sleeptimer/component/sleeptimer_si91x.slcc @@ -2,7 +2,11 @@ id: sleeptimer_si91x label: Sleep Timer for Si91x package: platform description: > - Si91x Sleeptimer APIs + The Si91x Sleeptimer driver provides software timers and delays using a low-frequency + real-time clock peripheral. Sleep Timer uses one Hardware Timer and creates multiple software timer instances. + Sleep Timer can be used for creating timers. + When you install this component, it will also be installing the Sleep timer dependency component, + which is the Sleep timer driver's implementation. category: Device|Si91x|MCU|Service quality: production component_root_path: "components/device/silabs/si91x/mcu/drivers/service/sleeptimer" diff --git a/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_ipmu.h b/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_ipmu.h index 15cc6b9d1..eae258379 100644 --- a/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_ipmu.h +++ b/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_ipmu.h @@ -32,6 +32,8 @@ extern "C" { /****************************************************** * * Macros * ******************************************************/ +#define RET_LDO_VOL_DECREASE 1 +#define RET_LDO_TRIM_VALUE_CHECK 2 #define REG_GSPI_BASE 0x24050000 #define NPSS_BASE_ADDR 0x24048000 @@ -229,20 +231,21 @@ extern "C" { #define POWERGATE_REG_READ_OFFSET 0x342 //! PMU SPI (0x24058000) -#define PMU_1P3_CTRL_REG_OFFSET 0x1D0 -#define PMU_PFM_REG_OFFSET 0x1D1 -#define PMU_ADC_REG_OFFSET 0x1D2 -#define PMU_PID_REG1_OFFSET 0x1D3 -#define PMU_PTAT_REG_OFFSET 0x1D5 -#define PMU_LDO_REG_OFFSET 0x1D6 -#define PMU_PWRTRAIN_REG_OFFSET 0x1D8 -#define PMU_TESTMUX_REG1_OFFSET 0x1D9 -#define PMU_TEST_MODES_OFFSET 0x1DA -#define SPARE_REG_1_OFFSET 0x1DC -#define SPARE_REG_2_OFFSET 0x1DD -#define BYPASS_CURR_CTRL_REG_OFFSET 0x1DE -#define SPARE_REG_3_OFFSET 0x1DF - +#define PMU_1P3_CTRL_REG_OFFSET 0x1D0 +#define PMU_PFM_REG_OFFSET 0x1D1 +#define PMU_ADC_REG_OFFSET 0x1D2 +#define PMU_PID_REG1_OFFSET 0x1D3 +#define PMU_PTAT_REG_OFFSET 0x1D5 +#define PMU_LDO_REG_OFFSET 0x1D6 +#define PMU_PWRTRAIN_REG_OFFSET 0x1D8 +#define PMU_TESTMUX_REG1_OFFSET 0x1D9 +#define PMU_TEST_MODES_OFFSET 0x1DA +#define SPARE_REG_1_OFFSET 0x1DC +#define SPARE_REG_2_OFFSET 0x1DD +#define BYPASS_CURR_CTRL_REG_OFFSET 0x1DE +#define SPARE_REG_3_OFFSET 0x1DF +#define PMU_FREQ_MODE_REG 0x1CE +#define LOW_FREQ_PWM BIT(2) #define MCU_FSM_CLK_ENS_AND_FIRST_BOOTUP_OFFSET 0x20 #define MCU_FSM_PMU_STATUS_REG_OFFSET 0x40 @@ -773,6 +776,9 @@ rsi_error_t RSI_IPMU_RetnHP_Volttrim_Efuse(void); rsi_error_t RSI_IPMU_PocbiasCurrent(void); void RSI_IPMU_RetnLdoHpmode(void); void RSI_IPMU_RetnLdoLpmode(void); +void RSI_IPMU_Retn_Voltage_Reduction(void); +void RSI_IPMU_Retn_Voltage_To_Default(void); +void RSI_IPMU_Set_Higher_Pwm_Ro_Frequency_Mode_to_PMU(void); rsi_error_t RSI_IPMU_RetnLdo0p75(void); rsi_error_t RSI_IPMU_RetnLdoVoltsel(void); void RSI_IPMU_64KHZ_RCClktrim(void); diff --git a/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_pll.h b/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_pll.h index e0de0c909..39a82ddf3 100644 --- a/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_pll.h +++ b/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_pll.h @@ -508,6 +508,15 @@ typedef enum USART_CLK_SRC_SEL { USART_INTFPLLCLK = 3, /*!< USART_INTFPLLCLK selection*/ M4_SOCCLKFOROTHERCLOCKS = 4, /*!< M4_SOCCLKFOROTHERCLOCKS selection*/ } USART_CLK_SRC_SEL_T; + +/** + *@brief USART Fractional clock selection + **/ +typedef enum USART_SCLK_FRAC_SEL { + USART_FRACTIONAL_DIVIDER, /*!< Fractional Divider selected i.e clk_out = clk_in/ (sclk_div_fac+0.5)*/ + USART_CLOCK_SWALLOW, /*!< Clock Swallow selected i.e clk_out = clk_in/ sclk_div_fac*/ +} USART_SCLK_FRAC_SEL_T; + /** *@brief SSI Input clock source selection **/ diff --git a/components/device/silabs/si91x/mcu/drivers/systemlevel/src/rsi_ipmu.c b/components/device/silabs/si91x/mcu/drivers/systemlevel/src/rsi_ipmu.c index 98f14318f..9699cf11a 100644 --- a/components/device/silabs/si91x/mcu/drivers/systemlevel/src/rsi_ipmu.c +++ b/components/device/silabs/si91x/mcu/drivers/systemlevel/src/rsi_ipmu.c @@ -220,18 +220,14 @@ void RSI_IPMU_UpdateIpmuCalibData_efuse(efuse_ipmu_t *ipmu_calib_data) vbg_tsbjt_efuse[2] = value; #endif -#ifdef SL_SI91X_ENABLE_LOWPWR_RET_LDO /* retn_ldo_lptrim */ - data = (ipmu_calib_data->retn_ldo_lptrim); - if (data < 2) { - data = data + 1; - } + data = (ipmu_calib_data->retn_ldo_lptrim); mask = MASK_BITS(22, 0); value = retnLP_volt_trim_efuse[2]; value &= ~mask; value |= data; retnLP_volt_trim_efuse[2] = value; -#endif + /* auxadc_off_diff_efuse */ data = (ipmu_calib_data->auxadc_offset_diff); mask = MASK_BITS(22, 0); @@ -813,6 +809,49 @@ void RSI_IPMU_RetnLdoLpmode(void) RSI_IPMU_ProgramConfigData(retnLP_volt_trim_efuse); } +/*==============================================*/ +/** + * @fn void RSI_IPMU_Retn_Voltage_Reduction(void) + * @brief This API is used to reduce the RETN_LDO voltage by 0.05V. + * @return none + */ + +void RSI_IPMU_Retn_Voltage_Reduction(void) +{ + uint32_t value, mask; + value = retnLP_volt_trim_efuse[2]; + mask = MASK_BITS(3, 0); + value &= mask; + if (value < RET_LDO_TRIM_VALUE_CHECK) { + retnLP_volt_trim_efuse[2] += RET_LDO_VOL_DECREASE; + } +} + +/*==============================================*/ +/** + * @fn void RSI_IPMU_Retn_Voltage_To_Default(void) + * @brief This API is used to change the RETN_LDO voltage to 0.8V. + * @return none + */ + +void RSI_IPMU_Retn_Voltage_To_Default(void) +{ + uint32_t mask; + mask = MASK_BITS(22, 0); + retnLP_volt_trim_efuse[2] &= ~mask; +} + +/*==============================================*/ +/** + * @fn void RSI_IPMU_Set_Higher_Pwm_Ro_Frequency_Mode_to_PMU(void) + * @brief This API is used to enable Higher Pwm Ro Frequency Mode for PMU. + * @return none + */ + +void RSI_IPMU_Set_Higher_Pwm_Ro_Frequency_Mode_to_PMU(void) +{ + PMU_SPI_MEM_MAP(PMU_FREQ_MODE_REG) &= ~(LOW_FREQ_PWM); +} /*==============================================*/ /** * @fn void RSI_IPMU_RetnLdoHpmode(void) diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/adc_instance.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/adc_instance.slcc index de5ee765c..2ef2ede51 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/adc_instance.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/adc_instance.slcc @@ -1,8 +1,20 @@ id: adc_instance -label: ADC Instance +label: ADC package: platform description: > - Adds an ADC instance + ADC stands for Analog-to-Digital Converter. + An ADC is a peripheral or component of a controller that converts analog signals (continuous voltage levels) + into digital data (discrete binary values) that the controller can handle. + Note: + For Configuring, Configurable Parameters of ADC, Open the configuration wizard and configure, Below are the Configurable Parameters of ADC: + - Resolution + - Sampling Rate + - Input Voltage Range + - Reference Voltage + - Triggering and Conversion Modes + - Channel Selection + - Interrupts and DMA + ADC Supports instances. category: Device|Si91x|MCU|Peripheral quality: production instantiable: @@ -29,4 +41,7 @@ template_contribution: value: include: "sl_adc_instances.h" requires: - - name: sl_adc \ No newline at end of file + - name: sl_adc +documentation: + docset: wiseconnect + document: wiseconnect-api-reference-guide-si91x-peripherals/adc \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/i2c_instance.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/i2c_instance.slcc index 06d4dea7e..bbdb3c702 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/i2c_instance.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/i2c_instance.slcc @@ -1,8 +1,22 @@ id: i2c_instance -label: I2C Instance +label: I2C package: platform description: > - Add a I2C instance. + I2C (Inter-Integrated Circuit) is another serial communication protocol. + It facilitates communication between multiple devices over just two lines: a data line (SDA - Serial Data) + and a clock line (SCL - Serial Clock). + The I2C will be configured in leader mode. The SCL and SDA lines of leader controller are + connected to Follower's SCL and SDA pins. + There are three configurable I2C Master/Slave controllers in M4 - two in the MCU HP peripherals (I2C0, I2C1) + and I2C2 in the MCU ULP subsystem (ULP_I2C). + + Note: + For Configuring, Configurable Parameters of I2C, open the configuration wizard and configure, Below are the Configurable Parameters of I2C: + - Instance Mode + - Instance Operating Mode + - Instance Transfer Type + + I2C Supports instances. Instances created must be named as I2C0, I2C1, I2C2. category: Device|Si91x|MCU|Peripheral quality: production @@ -32,4 +46,7 @@ template_contribution: include: "sl_i2c_instances.h" handler: sl_i2c_init_instances requires: - - name: sl_i2c \ No newline at end of file + - name: sl_i2c +documentation: + docset: wiseconnect + document: wiseconnect-api-reference-guide-si91x-peripherals/i2-c \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/pwm_instance.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/pwm_instance.slcc index f1372c063..69920120f 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/pwm_instance.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/pwm_instance.slcc @@ -1,14 +1,30 @@ id: pwm_instance -label: PWM Instance +label: PWM package: platform description: > - Adds a PWM instance. + The Motor Control Pulse Width Modulation (MCPWM) controller is used to generate a periodic pulse waveform, which is useful in + motor control and power control applications. + The MCPWM controller acts as a timer to count up to a period count value. + The time period and the duty cycle of the pulses are both programmable. + + Note: + For Configuring, Configurable Parameters of PWM, Open the configuration wizard and configure, Below are the Configurable Parameters of PWM: + - Frequency + - Output Polarity + - PWM Mode + - Timer counter + - Duty cycle + - Base Timer Mode and Selection + - External Trigger + + PWM Supports instances. category: Device|Si91x|MCU|Peripheral quality: production instantiable: prefix: inst root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" config_file: + - path: config/sl_si91x_pwm_common_config.h - path: config/sl_si91x_pwm_init_{{instance}}_config.h file_id: pwm_config provides: @@ -31,4 +47,7 @@ template_contribution: include: "sl_pwm_instances.h" handler: sl_pwm_init_instances requires: - - name: sl_pwm \ No newline at end of file + - name: sl_pwm +documentation: + docset: wiseconnect + document: wiseconnect-api-reference-guide-si91x-peripherals/pwm \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_adc.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_adc.slcc index 79fe29a73..83267923c 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_adc.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_adc.slcc @@ -2,20 +2,20 @@ id: sl_adc label: ADC package: platform description: > - ADC stands for Analog-to-Digital Converter. - An ADC is a peripheral or component of a controller that transforms analog signals (continuous voltage levels) - into digital data (discrete binary values) that the controller can handle. - Here are some common parameters one can configure: - - Resolution - - Sampling Rate - - Input Voltage Range - - Reference Voltage - - Triggering and Conversion Modes - - Channel Selection - - Interrupts and DMA + The ADC Drivers can read at up to 2.5 Msps with a 12-Bit resolution. + It supports 16 channel instances. + There are two types of data sampling functions: blocking and non-blocking. + Non-blocking read data functions use DMA (FIFO mode) to read data + and notify completion via callback functions. + When Default creates an instance, it installs channel 1. + It is also feasible to run all instances in ULP mode. + + When you install this component, it will also be installing the ADC dependency component, which is the ADC driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production component_root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" +ui_hints: + visibility: never config_file: - path: config/sl_si91x_adc_common_config.h source: diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_analog_comparator.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_analog_comparator.slcc index a9b1feeed..b4b179db7 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_analog_comparator.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_analog_comparator.slcc @@ -3,15 +3,14 @@ label: Analog Comparator package: platform description: > An analog comparator in a microcontroller is a peripheral that compares two analog input voltages - and generates a digital output based on the comparison result. It typically has two input pins - for comparing analog voltages and an output pin for displaying the result of the comparison. - Configurable parameters in Analog comparator: - - Selecting Comparator Input Pins - - Setting Comparator Mode - - Setting Comparator Reference Voltage - - Configuring Hysteresis - - Enabling Interrupts - - Enabling Power and Comparator + and generates interrupt if non-inverting input is higher then inverting input. + It typically has two input pins for comparing analog voltages. There are 9 possible inputs for + each pin of comparator, and 2 of the 9 are external pin inputs (GPIOs). + It can compare external pin inputs, external pin input to internal voltages and internal voltages. + It supports 2 instances. + When create an instance by default, comparator-2 will get installed. + When you install this component, it will also be installing the analog comparator dependency component, + which is the analog comparator driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production component_root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_calendar.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_calendar.slcc index 174c12659..46628f484 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_calendar.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_calendar.slcc @@ -2,17 +2,12 @@ id: sl_calendar label: Calendar package: platform description: > - Calendar will configure the date and time for the RTC. when configured it can also be configured to trigger interrupts - on seconds and milliseconds timeouts Once the date and time is configured then the RTC will retain the date-time till the power cycle. - Configurable parameters for calendar: - - Choose a Real-Time Clock (RTC) Module - - Connect RTC to Microcontroller - - Configure RTC Clock Source - - Set Initial Date and Time - - Enable RTC Interrupts - - Configure Calendar Settings - - Test RTC Functionality - - Implement Calendar Features + The calendar driver will set the day and time for the RTC. + When activated, it can also generate triggers for second and millisecond timeouts. + Once the date and time have been set, the RTC will maintain them until the next power cycle. + It also supports ULP and UULP power domain. + When you install this component, it will also be installing the Calendar dependency component, + which is the calendar driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production component_root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_config_timer.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_config_timer.slcc index 0f689e24a..0696d1072 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_config_timer.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_config_timer.slcc @@ -2,18 +2,14 @@ id: sl_config_timer label: Config Timer package: platform description: > - Configurable timers can be used for modulated signal output, event capture on + Configurable timers driver can be used for modulated signal output, event capture on the GPIOs in input mode, and clock and event counting. - They can be configured to operate in the Pulse Width Modulation (PWM) mode, - which drives a pulse width modulated wave on the outputs in accordance with - the ON and OFF periods that are programmed. - Configurable Parameters in Configurable Timers: - - timer mode - - counter direction - - counter buffer - - soft reset trigger - - counter trigger - - counter sync trigger + They can be configured to generate Pulse Width Modulation (PWM) output, + In accordance with the ON and OFF periods that are programmed. + Config timer will trigger interrupt on occurance of an event or reaching + match count value and notifies via callback functions. + When you install this component, it will also be installing the Config timer dependency component, + which is the Config timer driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_dac.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_dac.slcc index fb6e12a8b..7c7d99bea 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_dac.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_dac.slcc @@ -2,15 +2,13 @@ id: sl_dac label: DAC package: platform description: > - DAC stands for Digital-to-Analog Converter. - A DAC's objective is to generate a continuous, accurate analog output signal that matches - the digital data entered. The number of unique analog output levels that - a DAC can generate is known as its resolution, and it is based on the number of bits in the digital input. - Configurable parameters in DAC: - - Sampling Rate - - Operation mode - - Reference Voltage - - Interrupts and DMA + The DAC Drivers can write at up to 5 Msps with a 10-Bit resolution. + There are two types of data sampling functions: blocking and non-blocking. + Non-blocking write data functions use DMA (FIFO mode) to write data + and notify completion via callback functions. + DAC peripheral can also be run in ULP mode. + + When you install this component, it will also be installing the DAC Core dependency, which is the DAC driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_dma.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_dma.slcc index 5d800d10e..930118b21 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_dma.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_dma.slcc @@ -2,17 +2,15 @@ id: sl_dma label: DMA package: platform description: > - Direct Memory Access (DMA) is a process of transferring data from memory to memory, - peripehral to memory, memory to peripheral to another without the direct involvement - of the processor (CPU). The main benefit of using DMA is more efficient data movement - in the embedded system. - Configurable parameters in DAC: - - Initialization of DMA Controller - - Selection of DMA Channels - - Configuration of DMA Channel - - Peripheral Configuration - - Start Data Transfer - - Handle Completion and Errors + Direct Memory Access (DMA) is a process of transferring data from memory to memory, + peripehral to memory, memory to peripheral to another without the direct involvement + of the processor (CPU). The main benefit of using DMA is more efficient data movement + in the embedded system. + + Offering simple memory to memory transfer, peripheral to memory and memory to peripheral transfer functions. + + When you install this component, it will also be installing the DMA dependency component, + which is the DMA driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_efuse.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_efuse.slcc index af4ff5911..ff84f8012 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_efuse.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_efuse.slcc @@ -2,13 +2,11 @@ id: sl_efuse label: Efuse package: platform description: > - Electrically programmable fuses, or eFUSEs contains one-time programmable memory - that are used to store configuration or data in integrated circuits (ICs). - These efuse use 32-bit addressing with each address containing 8 bits. - The eFuse controller is used to program and read these bits. - Features - - Supports eFuse programming and read operations - - Supports memory mapped and FSM based read operation + The EFUSE (Electrically programmable fuses) driver has one-time programmable memory, which is used to store configuration or data in integrated circuits. + These efuses employ 32-bit addressing, with each address being eight bits. + To program and read these bits, utilize the eFuse controller. + + When you install this component, it will also be installing the eFuse dependency component, which is the eFuse driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production component_root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_gspi.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_gspi.slcc index a0ae6564a..860825c24 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_gspi.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_gspi.slcc @@ -2,15 +2,14 @@ id: sl_gspi label: GSPI package: platform description: > - The Generic SPI Master is available in MCU HP peripherals. - It provides an I/O interface for a large range of SPI-compatible peripheral devices. - SPI is a synchronous four-wire interface made up of two data pins (MOSI and MISO), - a device select pin (CSN), and a gated clock pin (SCLK). With two data pins, - it supports full-duplex operation with other SPI-compatible devices. - Configurable parameters in GSPI: - - Set the different Modes type - - configuring the Bit Rate - - Data width + The GSPI Master driver supports sending, receiving, and transferring data at 116 MHz. + It enables full duplex and half duplex communication modes. + Offering both blocking and non-blocking data transfer functions. + The non-blocking functions utilize DMA to transfer data asynchronously, + signaling transfer completion via callback functions. + + When you install this component, it will also be installing the GSPI dependency component, + which is the GSPI driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_i2c.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_i2c.slcc index abd3e4e8f..f04350f89 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_i2c.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_i2c.slcc @@ -2,17 +2,18 @@ id: sl_i2c label: I2C package: platform description: > - I2C (Inter-Integrated Circuit) is another serial communication protocol. - It facilitates communication between multiple devices over just two wires: a data line (SDA - Serial Data) - and a clock line (SCL - Serial Clock). - The I2C will be configured in leader mode. The SCL and SDA lines of leader controller are - connected to Follower's SCL and SDA pins. - There are three configurable I2C Master/Slave controllers in M4 - two in the MCU HP peripherals (I2C0, I2C1) - and I2C2 in the MCU ULP subsystem (ULP_I2C). - Configurable Parameters of I2C: - - Instance Mode - - Instance Operating Mode - - Instance Transfer Type + The I2C driver supports read, write, and transferring data in various speed modes. + Offering both blocking and non-blocking data transfer functions. + The non-blocking functions utilize DMA to transfer data asynchronously, + signaling transfer completion via callback functions. + This driver facilitates communication between multiple devices over just two wires: a data line (SDA - Serial Data) + and a clock line (SCL - Serial Clock). The I2C will be configured as leader mode and Follower mode. + There are three configurable I2C Master/Slave peripherals in M4 - two in the MCU HP peripherals (I2C0, I2C1) + and I2C2 in the MCU ULP subsystem (ULP_I2C). Upon installing this componenet I2c2 will be installed by default + When you install this component, it will also be installing the I2C dependency component, + which is the I2C driver's implementation. +ui_hints: + visibility: never category: Device|Si91x|MCU|Peripheral quality: production component_root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_i2s.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_i2s.slcc index 9e5d81ed1..ee7da59d0 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_i2s.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_i2s.slcc @@ -6,8 +6,13 @@ description: > serial bus interface standard used for connecting digital audio devices. Unlike I2C or SPI, I2S is specifically designed for transferring audio data between integrated circuits (ICs). + The pins like CLK, FRAME, DIN, DOUT are used for transmitting and receiving the data - in full duplex communication from master to target . + in full duplex communication from master to target. + Offering non-blocking send and receive functions. + + When you install this component, it will also be installing the I2S dependency component, + which is the I2S driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_pwm.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_pwm.slcc index 6f62bbea0..f83ece46a 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_pwm.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_pwm.slcc @@ -2,19 +2,16 @@ id: sl_pwm label: PWM package: platform description: > - The Motor Control Pulse Width Modulation (MCPWM) controller is used to generate a periodic pulse waveform, which is useful in - motor control and power control applications. - The MCPWM controller acts as a timer to count up to a period count value. - The time period and the duty cycle of the pulses are both programmable. - Configurable parameters in PWM: - - Frequency - - Output Polarity - - PWM Mode - - Timer counter - - Duty cycle - - Base Timer Mode and Selection - - External Trigger + The Motor Control Pulse Width Modulation (MCPWM) controller driver is used to generate a periodic pulse waveform, which is useful in + motor control and power control applications. It supports 4 channel instances. + The MCPWM controller acts as a timer to count up to a period count value. + The time period and the duty cycle of the pulses are both programmable. + This driver suports 4 channels and by default it installs channel_0. + + When you install this component, it will also be installing the PWM dependency component, which is the PWM driver's implementation. category: Device|Si91x|MCU|Peripheral +ui_hints: + visibility: never quality: production root_path: "components/device/silabs/si91x/mcu/drivers" source: diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_ssi.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_ssi.slcc index 1b67b199a..102e33aad 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_ssi.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_ssi.slcc @@ -2,13 +2,16 @@ id: sl_ssi label: SSI package: platform description: > - This application demonstrates the use of SSI for data transfer in full duplex in master mode. - SSI (Synchronous Serial Interface) is a synchronous, point-to-point, - serial communication channel for digital data transmission. - Configurable parameters in SSI: - - Set the different Modes types - - configuring the Bit Rate - - Data width + The SSI driver supports sending, receiving, and transferring data at 40 MHz. + It enables full duplex and half duplex communication modes. + Offering both blocking and non-blocking data transfer functions. + The non-blocking functions utilize DMA to transfer data asynchronously, + signaling transfer completion via callback functions. + This diriver can be configured as ULP-SSI using UC. + SSI can be configured in master, slave and ULP master modes. + + When you install this component, it will also be installing the SSI dependency component, + which is the SSI driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" @@ -27,10 +30,13 @@ define: - name: SLI_SI91X_MCU_MOV_ROM_API_TO_FLASH - name: SPI_MULTI_SLAVE - name: SSI_CONFIG + - name: SL_SI91X_DMA + - name: SL_SI91X_SSI_DMA requires: - name: udma_linker_config - name: cmsis_spi - name: rsilib_spi + - name: sl_dma documentation: docset: wiseconnect document: wiseconnect-api-reference-guide-si91x-peripherals/ssi \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_sysrtc.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_sysrtc.slcc index c4e7fd491..3b945af92 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_sysrtc.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_sysrtc.slcc @@ -2,15 +2,14 @@ id: sl_sysrtc label: SysRTC package: platform description: > - The System Real-Time Clock (SYSRTC) offers precise timekeeping and timer - functionality essential for various applications. It serves as a cornerstone for tasks requiring accurate time measurement, - event scheduling, and power management. This SYSRTC driver provides a robust set of - functions to configure and use this peripheral effectively, ensuring optimal performance and reliability in time critical applications. - Configurable parameters in SYSRTC: - - Enable SYSRTC run during debug - - Select SYSRTC group - - Enable group compare channel - - Enable group capture channel + The System Real-Time Clock (SYSRTC) driver provides precise timekeeping and timer capabilities required by a variety of applications. + It is required for activities such as accurate time measurement and scheduling an event. + The SYSRTC driver provides complete features for setting and running the peripheral, + ensuring high performance and reliability in time-critical applications. + It supports two groups and each group have two compare channels and one capture channel. + It saves power by letting all groups share a single counter. And this also supports ULP and UULP power domain. + When you select this component, it will also be installing the SYSRTC dependency component, + which is the SYSRTC driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_ulp_timer.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_ulp_timer.slcc index 5bc8a0ac5..876ccb4dd 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_ulp_timer.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_ulp_timer.slcc @@ -3,16 +3,16 @@ label: ULP Timer package: platform description: > ULP Timer will works in ultra low power mode and is designed to consume very little power in comparison - to regular timers. It allows a microcontroller to wake up periodically, perform a task, and then return - to a low-power state to conserve energy. - Configurable parameters in ULP Timer: - - Timer Instance - - Timer Type - - Timer Mode - - Timer Direction + to regular timers. It allows a microcontroller to generate interrupt periodically or one time depending + on timer mode and can be configured either as a microsecond timer or as a counter depending on timer type. + This driver has total 4 instances and by default it installs ULP-Timer-0. + When you install this component, it will also be installing the ULP-timer dependency component, + which is the ULP-timer driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" +ui_hints: + visibility: never config_file: - path: config/sl_si91x_ulp_timer_inst_config.h source: diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_watchdog_timer.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_watchdog_timer.slcc index 42d3515a2..5d98091f8 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_watchdog_timer.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/sl_watchdog_timer.slcc @@ -2,18 +2,11 @@ id: sl_watchdog_timer label: WDT package: platform description: > - WDT stands for Watchdog Timer/Window Watchdog Timer. WDT is used to enhance system reliability by monitoring the operation of a program and - resetting the system in case of malfunctions or failures. - And it will works on open mode and closed mode. - As well as it will restarts and resets the system/device depending on the interrupts. - Features or configurations supported by watchdog timer - - Independent window watchdog timer. - - Interrupt is generated before the system reset which can be used as a wakeup source. - - Individually controllable power domain for low-power applications. - - APB Interface for accesses from CPU. - - Able to operate when CPU is in SLEEP state during power-save applications - - Configurable timeout period. - - Option to clocked using a low power internal RC (32 KHz) or external 32KHz XTAL. + WDT represents Watchdog Timer/Window Watchdog Timer. The WDT driver improves system dependability by monitoring a program's performance and resetting the system in the event of a malfunction or failure. + Operates in both open and closed modes. + In addition, it will restart and reset the system/device in response to interruptions and it also supports UULP power domain. + When you install this component, it will also be installing the watchdog tiemr dependency component, + which is the watchdog tiemr driver's implementation. category: Device|Si91x|MCU|Peripheral quality: production root_path: "components/device/silabs/si91x/mcu/drivers/unified_api" diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/component/ulp_timers_instance.slcc b/components/device/silabs/si91x/mcu/drivers/unified_api/component/ulp_timers_instance.slcc index 5d30c1591..a8cb08776 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/component/ulp_timers_instance.slcc +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/component/ulp_timers_instance.slcc @@ -1,8 +1,19 @@ id: ulp_timers_instance -label: ULP Timer Instance +label: ULP Timer package: platform description: > - Add a ULP Timer instance. + ULP Timer will works in ultra low power mode and is designed to consume very little power in comparison + to regular timers. It allows a microcontroller to wake up periodically, perform a task, and then return + to a low-power state to conserve energy. + + Note: + For Configuring, Configurable Parameters of ULP Timer, Open the configuration wizard and configure, Below are the Configurable Parameters of ULP Timer: + - Timer Instance + - Timer Type + - Timer Mode + - Timer Direction + + ULP Timer Supports instances. category: Device|Si91x|MCU|Peripheral quality: production instantiable: @@ -25,4 +36,7 @@ template_contribution: - name: component_catalog value: "temp_ulp_timer_{{instance}}" requires: - - name: sl_ulp_timer \ No newline at end of file + - name: sl_ulp_timer +documentation: + docset: wiseconnect + document: wiseconnect-api-reference-guide-si91x-peripherals/ulp-timer \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_dac_config.h b/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_dac_config.h index 0e1ba4b5c..b20edb910 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_dac_config.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_dac_config.h @@ -78,16 +78,36 @@ extern "C" { // // <<< end of configuration section >>> -#define SL_DAC_IN1_PORT 0 -#define SL_DAC_IN1_PIN 30 +// <<< sl:start pin_tool >>> +// SL_DAC0 +// $[DAC_SL_DAC0] +#ifndef SL_DAC0_PERIPHERAL +#define SL_DAC0_PERIPHERAL DAC0 +#endif +#ifndef SL_DAC0_PERIPHERAL_NO +#define SL_DAC0_PERIPHERAL_NO 0 +#endif + +// DAC0 IN1 on GPIO_30 +#ifndef SL_DAC0_IN1_PORT +#define SL_DAC0_IN1_PORT 0 +#endif +#ifndef SL_DAC0_IN1_PIN +#define SL_DAC0_IN1_PIN 30 +#endif +#ifndef SL_DAC0_IN1_LOC +#define SL_DAC0_IN1_LOC 0 +#endif +// [DAC_SL_DAC0]$ +// <<< sl:end pin_tool >>> sl_dac_config_t sl_dac_config = { .operating_mode = SL_DAC_OPERATION_MODE, .dac_fifo_threshold = SL_DAC_FIFO_THRESHOLD, .dac_sample_rate = SL_DAC_SAMPLE_RATE, .adc_channel = SL_DAC_ADC_CHANNEL, - .dac_pin = SL_DAC_IN1_PIN, - .dac_port = SL_DAC_IN1_PORT }; + .dac_pin = SL_DAC0_IN1_PIN, + .dac_port = SL_DAC0_IN1_PORT }; #ifdef __cplusplus } diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_pwm_common_config.h b/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_pwm_common_config.h new file mode 100644 index 000000000..56d905dc9 --- /dev/null +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_pwm_common_config.h @@ -0,0 +1,45 @@ +/***************************************************************************/ /** + * @file + * @brief SL SI91X Common Config. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SI91X_PWM_COMMON_CONFIG_H +#define SL_SI91X_PWM_COMMON_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> +// PWM Common Configuration + +// Base Timer Selection +// Timer (Each Channel) +// Timer (All Channels) +// Default: SL_BASE_TIMER_ALL_CHANNEL +#define SL_PWM_COMMON_TIMER_SELECTION SL_BASE_TIMER_ALL_CHANNEL + +// +// <<< end of configuration section >>> +#endif // SL_SI91X_PWM_COMMON_CONFIG_H diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_sio_config.h b/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_sio_config.h index d54764bdc..948e3d9d6 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_sio_config.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/config/sl_si91x_sio_config.h @@ -181,6 +181,103 @@ extern "C" { #endif // <<< end of configuration section >>> +// <<< sl:start pin_tool >>> +// SL_SIO +// $[SIO_SL_SIO] +#ifndef SL_SIO_PERIPHERAL +#define SL_SIO_PERIPHERAL SIO +#endif + +// SIO SIO0 on GPIO_6 +#ifndef SL_SIO_SIO0_PORT +#define SL_SIO_SIO0_PORT 0 +#endif +#ifndef SL_SIO_SIO0_PIN +#define SL_SIO_SIO0_PIN 6 +#endif +#ifndef SL_SIO_0_LOC +#define SL_SIO_0_LOC 0 +#endif + +// SIO SIO1 on GPIO_26 +#ifndef SL_SIO_SIO1_PORT +#define SL_SIO_SIO1_PORT 0 +#endif +#ifndef SL_SIO_SIO1_PIN +#define SL_SIO_SIO1_PIN 26 +#endif +#ifndef SL_SIO_1_LOC +#define SL_SIO_1_LOC 1 +#endif + +// SIO SIO2 on GPIO_27 +#ifndef SL_SIO_SIO2_PORT +#define SL_SIO_SIO2_PORT 0 +#endif +#ifndef SL_SIO_SIO2_PIN +#define SL_SIO_SIO2_PIN 27 +#endif +#ifndef SL_SIO_2_LOC +#define SL_SIO_2_LOC 1 +#endif + +// SIO SIO3 on GPIO_28 +#ifndef SL_SIO_SIO3_PORT +#define SL_SIO_SIO3_PORT 0 +#endif +#ifndef SL_SIO_SIO3_PIN +#define SL_SIO_SIO3_PIN 28 +#endif +#ifndef SL_SIO_3_LOC +#define SL_SIO_3_LOC 1 +#endif + +// SIO SIO4 on GPIO_29 +#ifndef SL_SIO_SIO4_PORT +#define SL_SIO_SIO4_PORT 0 +#endif +#ifndef SL_SIO_SIO4_PIN +#define SL_SIO_SIO4_PIN 29 +#endif +#ifndef SL_SIO_4_LOC +#define SL_SIO_4_LOC 1 +#endif + +// SIO SIO5 on GPIO_11 +#ifndef SL_SIO_SIO5_PORT +#define SL_SIO_SIO5_PORT 0 +#endif +#ifndef SL_SIO_SIO5_PIN +#define SL_SIO_SIO5_PIN 11 +#endif +#ifndef SL_SIO_5_LOC +#define SL_SIO_5_LOC 0 +#endif + +// SIO SIO6 on ULP_GPIO_6/GPIO_70 +#ifndef SL_SIO_SIO6_PORT +#define SL_SIO_SIO6_PORT 0 +#endif +#ifndef SL_SIO_SIO6_PIN +#define SL_SIO_SIO6_PIN 6 +#endif +#ifndef SL_SIO_6_LOC +#define SL_SIO_6_LOC 0 +#endif + +// SIO SIO7 on ULP_GPIO_7/GPIO_71 +#ifndef SL_SIO_SIO7_PORT +#define SL_SIO_SIO7_PORT 0 +#endif +#ifndef SL_SIO_SIO7_PIN +#define SL_SIO_SIO7_PIN 7 +#endif +#ifndef SL_SIO_7_LOC +#define SL_SIO_7_LOC 1 +#endif +// [SIO_SL_SIO]$ +// <<< sl:end pin_tool >>> + #if defined(SL_SIO_SPI_CLK_FREQUENCY) stc_sio_spi_cfg_t pstcSpiConfigUc = { .u32SpiClockFrq = SL_SIO_SPI_CLK_FREQUENCY, @@ -193,198 +290,219 @@ stc_sio_spi_cfg_t pstcSpiConfigUc = { .u8Mode = SL_SIO_SPI_MODE, }; +#if (SL_SIO_0_LOC == 2) +#define SL_SI91X_SIO0_PIN (SL_SIO_SIO0_PIN + 64) +#else +#define SL_SI91X_SIO0_PIN SL_SIO_SIO0_PIN +#endif +#if (SL_SIO_1_LOC == 2) +#define SL_SI91X_SIO1_PIN (SL_SIO_SIO1_PIN + 64) +#else +#define SL_SI91X_SIO1_PIN SL_SIO_SIO1_PIN +#endif +#if ((SL_SIO_2_LOC == 2) || (SL_SIO_2_LOC == 3)) +#define SL_SI91X_SIO2_PIN (SL_SIO_SIO2_PIN + 64) +#else +#define SL_SI91X_SIO2_PIN SL_SIO_SIO2_PIN +#endif +#define SL_SI91X_SIO3_PIN SL_SIO_SIO3_PIN +#define SL_SI91X_SIO4_PIN SL_SIO_SIO4_PIN +#define SL_SI91X_SIO5_PIN SL_SIO_SIO5_PIN +#define SL_SI91X_SIO6_PIN (SL_SIO_SIO6_PIN + 64) +#define SL_SI91X_SIO7_PIN (SL_SIO_SIO7_PIN + 64) + #if (SL_SIO_SPI_CLK_CH == SL_SIO_CH_0) -#define SL_SI91X_SIO_SPI_CLK_PORT SL_SI91X_SIO_0_PORT -#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO_0_PIN +#define SL_SI91X_SIO_SPI_CLK_PORT SL_SIO_SIO0_PORT +#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO0_PIN #define SL_SI91X_SIO_SPI_CLK_MUX SL_SI91X_SIO_0_MUX #define SL_SI91X_SIO_SPI_CLK_PAD SL_SI91X_SIO_0_PAD #elif (SL_SIO_SPI_CLK_CH == SL_SIO_CH_1) -#define SL_SI91X_SIO_SPI_CLK_PORT SL_SI91X_SIO_1_PORT -#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO_1_PIN +#define SL_SI91X_SIO_SPI_CLK_PORT SL_SIO_SIO1_PORT +#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO1_PIN #define SL_SI91X_SIO_SPI_CLK_MUX SL_SI91X_SIO_1_MUX #define SL_SI91X_SIO_SPI_CLK_PAD SL_SI91X_SIO_1_PAD #elif (SL_SIO_SPI_CLK_CH == SL_SIO_CH_2) -#define SL_SI91X_SIO_SPI_CLK_PORT SL_SI91X_SIO_2_PORT -#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO_2_PIN +#define SL_SI91X_SIO_SPI_CLK_PORT SL_SIO_SIO2_PORT +#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO2_PIN #define SL_SI91X_SIO_SPI_CLK_MUX SL_SI91X_SIO_2_MUX #define SL_SI91X_SIO_SPI_CLK_PAD SL_SI91X_SIO_2_PAD #elif (SL_SIO_SPI_CLK_CH == SL_SIO_CH_3) -#define SL_SI91X_SIO_SPI_CLK_PORT SL_SI91X_SIO_3_PORT -#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO_3_PIN +#define SL_SI91X_SIO_SPI_CLK_PORT SL_SIO_SIO3_PORT +#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO3_PIN #define SL_SI91X_SIO_SPI_CLK_MUX SL_SI91X_SIO_3_MUX #define SL_SI91X_SIO_SPI_CLK_PAD SL_SI91X_SIO_3_PAD #elif (SL_SIO_SPI_CLK_CH == SL_SIO_CH_4) -#define SL_SI91X_SIO_SPI_CLK_PORT SL_SI91X_SIO_4_PORT -#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO_4_PIN +#define SL_SI91X_SIO_SPI_CLK_PORT SL_SIO_SIO4_PORT +#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO4_PIN #define SL_SI91X_SIO_SPI_CLK_MUX SL_SI91X_SIO_4_MUX #define SL_SI91X_SIO_SPI_CLK_PAD SL_SI91X_SIO_4_PAD #elif (SL_SIO_SPI_CLK_CH == SL_SIO_CH_5) -#define SL_SI91X_SIO_SPI_CLK_PORT SL_SI91X_SIO_5_PORT -#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO_5_PIN +#define SL_SI91X_SIO_SPI_CLK_PORT SL_SIO_SIO5_PORT +#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO5_PIN #define SL_SI91X_SIO_SPI_CLK_MUX SL_SI91X_SIO_5_MUX #define SL_SI91X_SIO_SPI_CLK_PAD SL_SI91X_SIO_5_PAD #elif (SL_SIO_SPI_CLK_CH == SL_SIO_CH_6) -#define SL_SI91X_SIO_SPI_CLK_PORT SL_SI91X_SIO_6_PORT -#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO_6_PIN +#define SL_SI91X_SIO_SPI_CLK_PORT SL_SIO_SIO6_PORT +#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO6_PIN #define SL_SI91X_SIO_SPI_CLK_MUX SL_SI91X_SIO_6_MUX #define SL_SI91X_SIO_SPI_CLK_PAD SL_SI91X_SIO_6_PAD #elif (SL_SIO_SPI_CLK_CH == SL_SIO_CH_7) -#define SL_SI91X_SIO_SPI_CLK_PORT SL_SI91X_SIO_7_PORT -#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO_7_PIN +#define SL_SI91X_SIO_SPI_CLK_PORT SL_SIO_SIO7_PORT +#define SL_SI91X_SIO_SPI_CLK_PIN SL_SI91X_SIO7_PIN #define SL_SI91X_SIO_SPI_CLK_MUX SL_SI91X_SIO_7_MUX #define SL_SI91X_SIO_SPI_CLK_PAD SL_SI91X_SIO_7_PAD #endif #if (SL_SIO_SPI_CS_CH == SL_SIO_CH_0) -#define SL_SI91X_SIO_SPI_CS_PORT SL_SI91X_SIO_0_PORT -#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO_0_PIN +#define SL_SI91X_SIO_SPI_CS_PORT SL_SIO_SIO0_PORT +#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO0_PIN #define SL_SI91X_SIO_SPI_CS_MUX SL_SI91X_SIO_0_MUX #define SL_SI91X_SIO_SPI_CS_PAD SL_SI91X_SIO_0_PAD #elif (SL_SIO_SPI_CS_CH == SL_SIO_CH_1) -#define SL_SI91X_SIO_SPI_CS_PORT SL_SI91X_SIO_1_PORT -#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO_1_PIN +#define SL_SI91X_SIO_SPI_CS_PORT SL_SIO_SIO1_PORT +#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO1_PIN #define SL_SI91X_SIO_SPI_CS_MUX SL_SI91X_SIO_1_MUX #define SL_SI91X_SIO_SPI_CS_PAD SL_SI91X_SIO_1_PAD #elif (SL_SIO_SPI_CS_CH == SL_SIO_CH_2) -#define SL_SI91X_SIO_SPI_CS_PORT SL_SI91X_SIO_2_PORT -#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO_2_PIN +#define SL_SI91X_SIO_SPI_CS_PORT SL_SIO_SIO2_PORT +#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO2_PIN #define SL_SI91X_SIO_SPI_CS_MUX SL_SI91X_SIO_2_MUX #define SL_SI91X_SIO_SPI_CS_PAD SL_SI91X_SIO_2_PAD #elif (SL_SIO_SPI_CS_CH == SL_SIO_CH_3) -#define SL_SI91X_SIO_SPI_CS_PORT SL_SI91X_SIO_3_PORT -#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO_3_PIN +#define SL_SI91X_SIO_SPI_CS_PORT SL_SIO_SIO3_PORT +#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO3_PIN #define SL_SI91X_SIO_SPI_CS_MUX SL_SI91X_SIO_3_MUX #define SL_SI91X_SIO_SPI_CS_PAD SL_SI91X_SIO_3_PAD #elif (SL_SIO_SPI_CS_CH == SL_SIO_CH_4) -#define SL_SI91X_SIO_SPI_CS_PORT SL_SI91X_SIO_4_PORT -#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO_4_PIN +#define SL_SI91X_SIO_SPI_CS_PORT SL_SIO_SIO4_PORT +#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO4_PIN #define SL_SI91X_SIO_SPI_CS_MUX SL_SI91X_SIO_4_MUX #define SL_SI91X_SIO_SPI_CS_PAD SL_SI91X_SIO_4_PAD #elif (SL_SIO_SPI_CS_CH == SL_SIO_CH_5) -#define SL_SI91X_SIO_SPI_CS_PORT SL_SI91X_SIO_5_PORT -#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO_5_PIN +#define SL_SI91X_SIO_SPI_CS_PORT SL_SIO_SIO5_PORT +#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO5_PIN #define SL_SI91X_SIO_SPI_CS_MUX SL_SI91X_SIO_5_MUX #define SL_SI91X_SIO_SPI_CS_PAD SL_SI91X_SIO_5_PAD #elif (SL_SIO_SPI_CS_CH == SL_SIO_CH_6) -#define SL_SI91X_SIO_SPI_CS_PORT SL_SI91X_SIO_6_PORT -#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO_6_PIN +#define SL_SI91X_SIO_SPI_CS_PORT SL_SIO_SIO6_PORT +#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO6_PIN #define SL_SI91X_SIO_SPI_CS_MUX SL_SI91X_SIO_6_MUX #define SL_SI91X_SIO_SPI_CS_PAD SL_SI91X_SIO_6_PAD #elif (SL_SIO_SPI_CS_CH == SL_SIO_CH_7) -#define SL_SI91X_SIO_SPI_CS_PORT SL_SI91X_SIO_7_PORT -#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO_7_PIN +#define SL_SI91X_SIO_SPI_CS_PORT SL_SIO_SIO7_PORT +#define SL_SI91X_SIO_SPI_CS_PIN SL_SI91X_SIO7_PIN #define SL_SI91X_SIO_SPI_CS_MUX SL_SI91X_SIO_7_MUX #define SL_SI91X_SIO_SPI_CS_PAD SL_SI91X_SIO_7_PAD #endif #if (SL_SIO_SPI_MOSI_CH == SL_SIO_CH_0) -#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SI91X_SIO_0_PORT -#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO_0_PIN +#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SIO_SIO0_PORT +#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO0_PIN #define SL_SI91X_SIO_SPI_MOSI_MUX SL_SI91X_SIO_0_MUX #define SL_SI91X_SIO_SPI_MOSI_PAD SL_SI91X_SIO_0_PAD #elif (SL_SIO_SPI_MOSI_CH == SL_SIO_CH_1) -#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SI91X_SIO_1_PORT -#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO_1_PIN +#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SIO_SIO1_PORT +#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO1_PIN #define SL_SI91X_SIO_SPI_MOSI_MUX SL_SI91X_SIO_1_MUX #define SL_SI91X_SIO_SPI_MOSI_PAD SL_SI91X_SIO_1_PAD #elif (SL_SIO_SPI_MOSI_CH == SL_SIO_CH_2) -#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SI91X_SIO_2_PORT -#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO_2_PIN +#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SIO_SIO2_PORT +#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO2_PIN #define SL_SI91X_SIO_SPI_MOSI_MUX SL_SI91X_SIO_2_MUX #define SL_SI91X_SIO_SPI_MOSI_PAD SL_SI91X_SIO_2_PAD #elif (SL_SIO_SPI_MOSI_CH == SL_SIO_CH_3) -#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SI91X_SIO_3_PORT -#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO_3_PIN +#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SIO_SIO3_PORT +#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO3_PIN #define SL_SI91X_SIO_SPI_MOSI_MUX SL_SI91X_SIO_3_MUX #define SL_SI91X_SIO_SPI_MOSI_PAD SL_SI91X_SIO_3_PAD #elif (SL_SIO_SPI_MOSI_CH == SL_SIO_CH_4) -#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SI91X_SIO_4_PORT -#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO_4_PIN +#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SIO_SIO4_PORT +#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO4_PIN #define SL_SI91X_SIO_SPI_MOSI_MUX SL_SI91X_SIO_4_MUX #define SL_SI91X_SIO_SPI_MOSI_PAD SL_SI91X_SIO_4_PAD #elif (SL_SIO_SPI_MOSI_CH == SL_SIO_CH_5) -#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SI91X_SIO_5_PORT -#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO_5_PIN +#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SIO_SIO5_PORT +#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO5_PIN #define SL_SI91X_SIO_SPI_MOSI_MUX SL_SI91X_SIO_5_MUX #define SL_SI91X_SIO_SPI_MOSI_PAD SL_SI91X_SIO_5_PAD #elif (SL_SIO_SPI_MOSI_CH == SL_SIO_CH_6) -#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SI91X_SIO_6_PORT -#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO_6_PIN +#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SIO_SIO6_PORT +#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO6_PIN #define SL_SI91X_SIO_SPI_MOSI_MUX SL_SI91X_SIO_6_MUX #define SL_SI91X_SIO_SPI_MOSI_PAD SL_SI91X_SIO_6_PAD #elif (SL_SIO_SPI_MOSI_CH == SL_SIO_CH_7) -#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SI91X_SIO_7_PORT -#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO_7_PIN +#define SL_SI91X_SIO_SPI_MOSI_PORT SL_SIO_SIO7_PORT +#define SL_SI91X_SIO_SPI_MOSI_PIN SL_SI91X_SIO7_PIN #define SL_SI91X_SIO_SPI_MOSI_MUX SL_SI91X_SIO_7_MUX #define SL_SI91X_SIO_SPI_MOSI_PAD SL_SI91X_SIO_7_PAD #endif #if (SL_SIO_SPI_MISO_CH == SL_SIO_CH_0) -#define SL_SI91X_SIO_SPI_MISO_PORT SL_SI91X_SIO_0_PORT -#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO_0_PIN +#define SL_SI91X_SIO_SPI_MISO_PORT SL_SIO_SIO0_PORT +#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO0_PIN #define SL_SI91X_SIO_SPI_MISO_MUX SL_SI91X_SIO_0_MUX #define SL_SI91X_SIO_SPI_MISO_PAD SL_SI91X_SIO_0_PAD #elif (SL_SIO_SPI_MISO_CH == SL_SIO_CH_1) -#define SL_SI91X_SIO_SPI_MISO_PORT SL_SI91X_SIO_1_PORT -#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO_1_PIN +#define SL_SI91X_SIO_SPI_MISO_PORT SL_SIO_SIO1_PORT +#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO1_PIN #define SL_SI91X_SIO_SPI_MISO_MUX SL_SI91X_SIO_1_MUX #define SL_SI91X_SIO_SPI_MISO_PAD SL_SI91X_SIO_1_PAD #elif (SL_SIO_SPI_MISO_CH == SL_SIO_CH_2) -#define SL_SI91X_SIO_SPI_MISO_PORT SL_SI91X_SIO_2_PORT -#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO_2_PIN +#define SL_SI91X_SIO_SPI_MISO_PORT SL_SIO_SIO2_PORT +#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO2_PIN #define SL_SI91X_SIO_SPI_MISO_MUX SL_SI91X_SIO_2_MUX #define SL_SI91X_SIO_SPI_MISO_PAD SL_SI91X_SIO_2_PAD #elif (SL_SIO_SPI_MISO_CH == SL_SIO_CH_3) -#define SL_SI91X_SIO_SPI_MISO_PORT SL_SI91X_SIO_3_PORT -#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO_3_PIN +#define SL_SI91X_SIO_SPI_MISO_PORT SL_SIO_SIO3_PORT +#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO3_PIN #define SL_SI91X_SIO_SPI_MISO_MUX SL_SI91X_SIO_3_MUX #define SL_SI91X_SIO_SPI_MISO_PAD SL_SI91X_SIO_3_PAD #elif (SL_SIO_SPI_MISO_CH == SL_SIO_CH_4) -#define SL_SI91X_SIO_SPI_MISO_PORT SL_SI91X_SIO_4_PORT -#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO_4_PIN +#define SL_SI91X_SIO_SPI_MISO_PORT SL_SIO_SIO4_PORT +#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO4_PIN #define SL_SI91X_SIO_SPI_MISO_MUX SL_SI91X_SIO_4_MUX #define SL_SI91X_SIO_SPI_MISO_PAD SL_SI91X_SIO_4_PAD #elif (SL_SIO_SPI_MISO_CH == SL_SIO_CH_5) -#define SL_SI91X_SIO_SPI_MISO_PORT SL_SI91X_SIO_5_PORT -#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO_5_PIN +#define SL_SI91X_SIO_SPI_MISO_PORT SL_SIO_SIO5_PORT +#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO5_PIN #define SL_SI91X_SIO_SPI_MISO_MUX SL_SI91X_SIO_5_MUX #define SL_SI91X_SIO_SPI_MISO_PAD SL_SI91X_SIO_5_PAD #elif (SL_SIO_SPI_MISO_CH == SL_SIO_CH_6) -#define SL_SI91X_SIO_SPI_MISO_PORT SL_SI91X_SIO_6_PORT -#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO_6_PIN +#define SL_SI91X_SIO_SPI_MISO_PORT SL_SIO_SIO6_PORT +#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO6_PIN #define SL_SI91X_SIO_SPI_MISO_MUX SL_SI91X_SIO_6_MUX #define SL_SI91X_SIO_SPI_MISO_PAD SL_SI91X_SIO_6_PAD #elif (SL_SIO_SPI_MISO_CH == SL_SIO_CH_7) -#define SL_SI91X_SIO_SPI_MISO_PORT SL_SI91X_SIO_7_PORT -#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO_7_PIN +#define SL_SI91X_SIO_SPI_MISO_PORT SL_SIO_SIO7_PORT +#define SL_SI91X_SIO_SPI_MISO_PIN SL_SI91X_SIO7_PIN #define SL_SI91X_SIO_SPI_MISO_MUX SL_SI91X_SIO_7_MUX #define SL_SI91X_SIO_SPI_MISO_PAD SL_SI91X_SIO_7_PAD #endif @@ -420,99 +538,99 @@ stc_sio_uart_config_t UartInitstcUc = { }; #if (SL_SIO_UART_TX_CH == SL_SIO_CH_0) -#define SL_SI91X_SIO_UART_TX_PORT SL_SI91X_SIO_0_PORT -#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO_0_PIN +#define SL_SI91X_SIO_UART_TX_PORT SL_SIO_SIO0_PORT +#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO0_PIN #define SL_SI91X_SIO_UART_TX_MUX SL_SI91X_SIO_0_MUX #define SL_SI91X_SIO_UART_TX_PAD SL_SI91X_SIO_0_PAD #elif (SL_SIO_UART_TX_CH == SL_SIO_CH_1) -#define SL_SI91X_SIO_UART_TX_PORT SL_SI91X_SIO_1_PORT -#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO_1_PIN +#define SL_SI91X_SIO_UART_TX_PORT SL_SIO_SIO1_PORT +#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO1_PIN #define SL_SI91X_SIO_UART_TX_MUX SL_SI91X_SIO_1_MUX #define SL_SI91X_SIO_UART_TX_PAD SL_SI91X_SIO_1_PAD #elif (SL_SIO_UART_TX_CH == SL_SIO_CH_2) -#define SL_SI91X_SIO_UART_TX_PORT SL_SI91X_SIO_2_PORT -#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO_2_PIN +#define SL_SI91X_SIO_UART_TX_PORT SL_SIO_SIO2_PORT +#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO2_PIN #define SL_SI91X_SIO_UART_TX_MUX SL_SI91X_SIO_2_MUX #define SL_SI91X_SIO_UART_TX_PAD SL_SI91X_SIO_2_PAD #elif (SL_SIO_UART_TX_CH == SL_SIO_CH_3) -#define SL_SI91X_SIO_UART_TX_PORT SL_SI91X_SIO_3_PORT -#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO_3_PIN +#define SL_SI91X_SIO_UART_TX_PORT SL_SIO_SIO3_PORT +#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO3_PIN #define SL_SI91X_SIO_UART_TX_MUX SL_SI91X_SIO_3_MUX #define SL_SI91X_SIO_UART_TX_PAD SL_SI91X_SIO_3_PAD #elif (SL_SIO_UART_TX_CH == SL_SIO_CH_4) -#define SL_SI91X_SIO_UART_TX_PORT SL_SI91X_SIO_4_PORT -#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO_4_PIN +#define SL_SI91X_SIO_UART_TX_PORT SL_SIO_SIO4_PORT +#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO4_PIN #define SL_SI91X_SIO_UART_TX_MUX SL_SI91X_SIO_4_MUX #define SL_SI91X_SIO_UART_TX_PAD SL_SI91X_SIO_4_PAD #elif (SL_SIO_UART_TX_CH == SL_SIO_CH_5) -#define SL_SI91X_SIO_UART_TX_PORT SL_SI91X_SIO_5_PORT -#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO_5_PIN +#define SL_SI91X_SIO_UART_TX_PORT SL_SIO_SIO5_PORT +#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO5_PIN #define SL_SI91X_SIO_UART_TX_MUX SL_SI91X_SIO_5_MUX #define SL_SI91X_SIO_UART_TX_PAD SL_SI91X_SIO_5_PAD #elif (SL_SIO_UART_TX_CH == SL_SIO_CH_6) -#define SL_SI91X_SIO_UART_TX_PORT SL_SI91X_SIO_6_PORT -#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO_6_PIN +#define SL_SI91X_SIO_UART_TX_PORT SL_SIO_SIO6_PORT +#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO6_PIN #define SL_SI91X_SIO_UART_TX_MUX SL_SI91X_SIO_6_MUX #define SL_SI91X_SIO_UART_TX_PAD SL_SI91X_SIO_6_PAD #elif (SL_SIO_UART_TX_CH == SL_SIO_CH_7) -#define SL_SI91X_SIO_UART_TX_PORT SL_SI91X_SIO_7_PORT -#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO_7_PIN +#define SL_SI91X_SIO_UART_TX_PORT SL_SIO_SIO7_PORT +#define SL_SI91X_SIO_UART_TX_PIN SL_SI91X_SIO7_PIN #define SL_SI91X_SIO_UART_TX_MUX SL_SI91X_SIO_7_MUX #define SL_SI91X_SIO_UART_TX_PAD SL_SI91X_SIO_7_PAD #endif #if (SL_SIO_UART_RX_CH == SL_SIO_CH_0) -#define SL_SI91X_SIO_UART_RX_PORT SL_SI91X_SIO_0_PORT -#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO_0_PIN +#define SL_SI91X_SIO_UART_RX_PORT SL_SIO_SIO0_PORT +#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO0_PIN #define SL_SI91X_SIO_UART_RX_MUX SL_SI91X_SIO_0_MUX #define SL_SI91X_SIO_UART_RX_PAD SL_SI91X_SIO_0_PAD #elif (SL_SIO_UART_RX_CH == SL_SIO_CH_1) -#define SL_SI91X_SIO_UART_RX_PORT SL_SI91X_SIO_1_PORT -#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO_1_PIN +#define SL_SI91X_SIO_UART_RX_PORT SL_SIO_SIO1_PORT +#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO1_PIN #define SL_SI91X_SIO_UART_RX_MUX SL_SI91X_SIO_1_MUX #define SL_SI91X_SIO_UART_RX_PAD SL_SI91X_SIO_1_PAD #elif (SL_SIO_UART_RX_CH == SL_SIO_CH_2) -#define SL_SI91X_SIO_UART_RX_PORT SL_SI91X_SIO_2_PORT -#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO_2_PIN +#define SL_SI91X_SIO_UART_RX_PORT SL_SIO_SIO2_PORT +#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO2_PIN #define SL_SI91X_SIO_UART_RX_MUX SL_SI91X_SIO_2_MUX #define SL_SI91X_SIO_UART_RX_PAD SL_SI91X_SIO_2_PAD #elif (SL_SIO_UART_RX_CH == SL_SIO_CH_3) -#define SL_SI91X_SIO_UART_RX_PORT SL_SI91X_SIO_3_PORT -#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO_3_PIN +#define SL_SI91X_SIO_UART_RX_PORT SL_SIO_SIO3_PORT +#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO3_PIN #define SL_SI91X_SIO_UART_RX_MUX SL_SI91X_SIO_3_MUX #define SL_SI91X_SIO_UART_RX_PAD SL_SI91X_SIO_3_PAD #elif (SL_SIO_UART_RX_CH == SL_SIO_CH_4) -#define SL_SI91X_SIO_UART_RX_PORT SL_SI91X_SIO_4_PORT -#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO_4_PIN +#define SL_SI91X_SIO_UART_RX_PORT SL_SIO_SIO4_PORT +#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO4_PIN #define SL_SI91X_SIO_UART_RX_MUX SL_SI91X_SIO_4_MUX #define SL_SI91X_SIO_UART_RX_PAD SL_SI91X_SIO_4_PAD #elif (SL_SIO_UART_RX_CH == SL_SIO_CH_5) -#define SL_SI91X_SIO_UART_RX_PORT SL_SI91X_SIO_5_PORT -#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO_5_PIN +#define SL_SI91X_SIO_UART_RX_PORT SL_SIO_SIO5_PORT +#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO5_PIN #define SL_SI91X_SIO_UART_RX_MUX SL_SI91X_SIO_5_MUX #define SL_SI91X_SIO_UART_RX_PAD SL_SI91X_SIO_5_PAD #elif (SL_SIO_UART_RX_CH == SL_SIO_CH_6) -#define SL_SI91X_SIO_UART_RX_PORT SL_SI91X_SIO_6_PORT -#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO_6_PIN +#define SL_SI91X_SIO_UART_RX_PORT SL_SIO_SIO6_PORT +#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO6_PIN #define SL_SI91X_SIO_UART_RX_MUX SL_SI91X_SIO_6_MUX #define SL_SI91X_SIO_UART_RX_PAD SL_SI91X_SIO_6_PAD #elif (SL_SIO_UART_RX_CH == SL_SIO_CH_7) -#define SL_SI91X_SIO_UART_RX_PORT SL_SI91X_SIO_7_PORT -#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO_7_PIN +#define SL_SI91X_SIO_UART_RX_PORT SL_SIO_SIO7_PORT +#define SL_SI91X_SIO_UART_RX_PIN SL_SI91X_SIO7_PIN #define SL_SI91X_SIO_UART_RX_MUX SL_SI91X_SIO_7_MUX #define SL_SI91X_SIO_UART_RX_PAD SL_SI91X_SIO_7_PAD #endif @@ -537,99 +655,99 @@ stc_sio_i2c_config_t i2cConfigUc = { }; #if (SL_SIO_I2C_SCL_CHANNEL == SL_SIO_CH_0) -#define SL_SI91X_SIO_I2C_SCL_PORT SL_SI91X_SIO_0_PORT -#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO_0_PIN +#define SL_SI91X_SIO_I2C_SCL_PORT SL_SIO_SIO0_PORT +#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO0_PIN #define SL_SI91X_SIO_I2C_SCL_MUX SL_SI91X_SIO_0_MUX #define SL_SI91X_SIO_I2C_SCL_PAD SL_SI91X_SIO_0_PAD #elif (SL_SIO_I2C_SCL_CHANNEL == SL_SIO_CH_1) -#define SL_SI91X_SIO_I2C_SCL_PORT SL_SI91X_SIO_1_PORT -#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO_1_PIN +#define SL_SI91X_SIO_I2C_SCL_PORT SL_SIO_SIO1_PORT +#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO1_PIN #define SL_SI91X_SIO_I2C_SCL_MUX SL_SI91X_SIO_1_MUX #define SL_SI91X_SIO_I2C_SCL_PAD SL_SI91X_SIO_1_PAD #elif (SL_SIO_I2C_SCL_CHANNEL == SL_SIO_CH_2) -#define SL_SI91X_SIO_I2C_SCL_PORT SL_SI91X_SIO_2_PORT -#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO_2_PIN +#define SL_SI91X_SIO_I2C_SCL_PORT SL_SIO_SIO2_PORT +#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO2_PIN #define SL_SI91X_SIO_I2C_SCL_MUX SL_SI91X_SIO_2_MUX #define SL_SI91X_SIO_I2C_SCL_PAD SL_SI91X_SIO_2_PAD #elif (SL_SIO_I2C_SCL_CHANNEL == SL_SIO_CH_3) -#define SL_SI91X_SIO_I2C_SCL_PORT SL_SI91X_SIO_3_PORT -#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO_3_PIN +#define SL_SI91X_SIO_I2C_SCL_PORT SL_SIO_SIO3_PORT +#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO3_PIN #define SL_SI91X_SIO_I2C_SCL_MUX SL_SI91X_SIO_3_MUX #define SL_SI91X_SIO_I2C_SCL_PAD SL_SI91X_SIO_3_PAD #elif (SL_SIO_I2C_SCL_CHANNEL == SL_SIO_CH_4) -#define SL_SI91X_SIO_I2C_SCL_PORT SL_SI91X_SIO_4_PORT -#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO_4_PIN +#define SL_SI91X_SIO_I2C_SCL_PORT SL_SIO_SIO4_PORT +#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO4_PIN #define SL_SI91X_SIO_I2C_SCL_MUX SL_SI91X_SIO_4_MUX #define SL_SI91X_SIO_I2C_SCL_PAD SL_SI91X_SIO_4_PAD #elif (SL_SIO_I2C_SCL_CHANNEL == SL_SIO_CH_5) -#define SL_SI91X_SIO_I2C_SCL_PORT SL_SI91X_SIO_5_PORT -#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO_5_PIN +#define SL_SI91X_SIO_I2C_SCL_PORT SL_SIO_SIO5_PORT +#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO5_PIN #define SL_SI91X_SIO_I2C_SCL_MUX SL_SI91X_SIO_5_MUX #define SL_SI91X_SIO_I2C_SCL_PAD SL_SI91X_SIO_5_PAD #elif (SL_SIO_I2C_SCL_CHANNEL == SL_SIO_CH_6) -#define SL_SI91X_SIO_I2C_SCL_PORT SL_SI91X_SIO_6_PORT -#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO_6_PIN +#define SL_SI91X_SIO_I2C_SCL_PORT SL_SIO_SIO6_PORT +#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO6_PIN #define SL_SI91X_SIO_I2C_SCL_MUX SL_SI91X_SIO_6_MUX #define SL_SI91X_SIO_I2C_SCL_PAD SL_SI91X_SIO_6_PAD #elif (SL_SIO_I2C_SCL_CHANNEL == SL_SIO_CH_7) -#define SL_SI91X_SIO_I2C_SCL_PORT SL_SI91X_SIO_7_PORT -#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO_7_PIN +#define SL_SI91X_SIO_I2C_SCL_PORT SL_SIO_SIO7_PORT +#define SL_SI91X_SIO_I2C_SCL_PIN SL_SI91X_SIO7_PIN #define SL_SI91X_SIO_I2C_SCL_MUX SL_SI91X_SIO_7_MUX #define SL_SI91X_SIO_I2C_SCL_PAD SL_SI91X_SIO_7_PAD #endif #if (SL_SIO_I2C_SDA_CHANNEL == SL_SIO_CH_0) -#define SL_SI91X_SIO_I2C_SDA_PORT SL_SI91X_SIO_0_PORT -#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO_0_PIN +#define SL_SI91X_SIO_I2C_SDA_PORT SL_SIO_SIO0_PORT +#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO0_PIN #define SL_SI91X_SIO_I2C_SDA_MUX SL_SI91X_SIO_0_MUX #define SL_SI91X_SIO_I2C_SDA_PAD SL_SI91X_SIO_0_PAD #elif (SL_SIO_I2C_SDA_CHANNEL == SL_SIO_CH_1) -#define SL_SI91X_SIO_I2C_SDA_PORT SL_SI91X_SIO_1_PORT -#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO_1_PIN +#define SL_SI91X_SIO_I2C_SDA_PORT SL_SIO_SIO1_PORT +#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO1_PIN #define SL_SI91X_SIO_I2C_SDA_MUX SL_SI91X_SIO_1_MUX #define SL_SI91X_SIO_I2C_SDA_PAD SL_SI91X_SIO_1_PAD #elif (SL_SIO_I2C_SDA_CHANNEL == SL_SIO_CH_2) -#define SL_SI91X_SIO_I2C_SDA_PORT SL_SI91X_SIO_2_PORT -#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO_2_PIN +#define SL_SI91X_SIO_I2C_SDA_PORT SL_SIO_SIO2_PORT +#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO2_PIN #define SL_SI91X_SIO_I2C_SDA_MUX SL_SI91X_SIO_2_MUX #define SL_SI91X_SIO_I2C_SDA_PAD SL_SI91X_SIO_2_PAD #elif (SL_SIO_I2C_SDA_CHANNEL == SL_SIO_CH_3) -#define SL_SI91X_SIO_I2C_SDA_PORT SL_SI91X_SIO_3_PORT -#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO_3_PIN +#define SL_SI91X_SIO_I2C_SDA_PORT SL_SIO_SIO3_PORT +#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO3_PIN #define SL_SI91X_SIO_I2C_SDA_MUX SL_SI91X_SIO_3_MUX #define SL_SI91X_SIO_I2C_SDA_PAD SL_SI91X_SIO_3_PAD #elif (SL_SIO_I2C_SDA_CHANNEL == SL_SIO_CH_4) -#define SL_SI91X_SIO_I2C_SDA_PORT SL_SI91X_SIO_4_PORT -#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO_4_PIN +#define SL_SI91X_SIO_I2C_SDA_PORT SL_SIO_SIO4_PORT +#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO4_PIN #define SL_SI91X_SIO_I2C_SDA_MUX SL_SI91X_SIO_4_MUX #define SL_SI91X_SIO_I2C_SDA_PAD SL_SI91X_SIO_4_PAD #elif (SL_SIO_I2C_SDA_CHANNEL == SL_SIO_CH_5) -#define SL_SI91X_SIO_I2C_SDA_PORT SL_SI91X_SIO_5_PORT -#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO_5_PIN +#define SL_SI91X_SIO_I2C_SDA_PORT SL_SIO_SIO5_PORT +#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO5_PIN #define SL_SI91X_SIO_I2C_SDA_MUX SL_SI91X_SIO_5_MUX #define SL_SI91X_SIO_I2C_SDA_PAD SL_SI91X_SIO_5_PAD #elif (SL_SIO_I2C_SDA_CHANNEL == SL_SIO_CH_6) -#define SL_SI91X_SIO_I2C_SDA_PORT SL_SI91X_SIO_6_PORT -#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO_6_PIN +#define SL_SI91X_SIO_I2C_SDA_PORT SL_SIO_SIO6_PORT +#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO6_PIN #define SL_SI91X_SIO_I2C_SDA_MUX SL_SI91X_SIO_6_MUX #define SL_SI91X_SIO_I2C_SDA_PAD SL_SI91X_SIO_6_PAD #elif (SL_SIO_I2C_SDA_CHANNEL == SL_SIO_CH_7) -#define SL_SI91X_SIO_I2C_SDA_PORT SL_SI91X_SIO_7_PORT -#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO_7_PIN +#define SL_SI91X_SIO_I2C_SDA_PORT SL_SIO_SIO7_PORT +#define SL_SI91X_SIO_I2C_SDA_PIN SL_SI91X_SIO7_PIN #define SL_SI91X_SIO_I2C_SDA_MUX SL_SI91X_SIO_7_MUX #define SL_SI91X_SIO_I2C_SDA_PAD SL_SI91X_SIO_7_PAD #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_driver_gpio.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_driver_gpio.h index a42be2e28..c4332f70d 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_driver_gpio.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_driver_gpio.h @@ -87,18 +87,14 @@ typedef void (*sl_gpio_irq_callback_t)(uint32_t flag); * @brief Clear one or more pending GPIO interrupts. * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] flags - Bitwise logic OR of GPIO interrupt sources to clear. * @return returns status 0 - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_clear_interrupts(uint32_t flags) @@ -111,13 +107,9 @@ STATIC __INLINE sl_status_t sl_gpio_driver_clear_interrupts(uint32_t flags) * @brief Configure the GPIO pin interrupt. * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: * - \ref sl_gpio_driver_set_pin_mode() - * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_set_pin_direction() * @param[in] gpio - Pointer to the structure of type \ref sl_gpio_t * @param[in] int_no - Specifies the interrupt number to trigger (0 to 7). @@ -126,14 +118,10 @@ STATIC __INLINE sl_status_t sl_gpio_driver_clear_interrupts(uint32_t flags) * @param[out] avl_intr_no - Pointer to the available interrupt number. SL_GPIO_INTERRUPT_UNAVAILABLE (0xFF) no available interrupt * @return The following values are returned: - * - - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success -*- -* \ref SL_STATUS_BUSY (0x0004) - Interrupt is busy and cannot carry out the requested operation + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - \ref SL_STATUS_OK (0X000) - Success + * - \ref SL_STATUS_BUSY (0x0004) - Interrupt is busy and cannot carry out the requested operation ******************************************************************************/ sl_status_t sl_gpio_driver_configure_interrupt(sl_gpio_t *gpio, uint32_t int_no, @@ -145,86 +133,66 @@ sl_status_t sl_gpio_driver_configure_interrupt(sl_gpio_t *gpio, * @brief Set the pin mode for a GPIO pin. * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for corresponding GPIO instance. - * @param[in] gpio - Pointer to the structure of type \ref sl_gpio_t + * @param[in] gpio - Pointer to the structure of type \ref sl_gpio_t. * @param[in] mode - The desired pin mode. * @param[in] output_value - A value to set for the pin in the GPIO register. * The GPIO setting is important for some input mode configurations. * @return The following values are returned: - * - - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success - * + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - \ref SL_STATUS_OK (0X000) - Success ******************************************************************************/ sl_status_t sl_gpio_driver_set_pin_mode(sl_gpio_t *gpio, sl_gpio_mode_t mode, uint32_t output_value); /***************************************************************************/ /** * @brief Get the pin mode (alternate function) of a GPIO for either HP instance (or) ULP instance as per the port number. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for the corresponding GPIO instance. - * \ref sl_gpio_driver_set_pin_mode(); + * \ref sl_gpio_driver_set_pin_mode(); * @param[in] gpio - Pointer to the structure of type \ref sl_gpio_t * @param[out] mode - The desired pin mode. * @return The following values are returned: - * - - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument - * - - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ sl_status_t sl_gpio_driver_get_pin_mode(sl_gpio_t *gpio, sl_gpio_mode_t *mode); /******************************************************************************* * @brief Initializes the GPIO driver by clearing all the interrupts (HP, ULP, and NPSS instance) and callback function pointers with NULL. - * @param[in] none + * @param none * @return returns status 0, - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ sl_status_t sl_gpio_driver_init(void); /******************************************************************************* * @brief De-Initializes the GPIO driver by disabling clocks (HP and ULP instance) and callback function pointers. - * @param[in] none + * @param none * @return returns status 0, - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ sl_status_t sl_gpio_driver_deinit(void); /*******************************************************************************/ /** * @brief Unregister GPIO driver. - * * @param[in] gpio_instance - Instances of type \ref sl_si91x_gpio_instances_t * @param[in] gpio_intr - GPIO interrupts of type \ref sl_si91x_gpio_intr_t - * @param[in] flag - GPIO interrupt flag + * @param[in] flag - GPIO interrupt flag Max range is 8. * @return The following values are returned: - * - - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ sl_status_t sl_gpio_driver_unregister(sl_si91x_gpio_instances_t gpio_instance, @@ -234,31 +202,19 @@ sl_status_t sl_gpio_driver_unregister(sl_si91x_gpio_instances_t gpio_instance, /***************************************************************************/ /** * @brief Set a single pin in GPIO configuration register to 1. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode(); - * - - * \ref sl_si91x_gpio_driver_set_pin_direction(); + * - \ref sl_gpio_driver_set_pin_mode(); + * - \ref sl_si91x_gpio_driver_set_pin_direction(); * * @param[in] gpio - Pointer to the structure of type \ref sl_gpio_t * @return The following values are returned: - * - - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_set_pin(sl_gpio_t *gpio) @@ -297,31 +253,20 @@ STATIC __INLINE sl_status_t sl_gpio_driver_set_pin(sl_gpio_t *gpio) /***************************************************************************/ /** * @brief Clear a single pin in the GPIO configuration register to 0. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(); for ULP instance * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode(); - * - - * \ref sl_si91x_gpio_driver_set_pin_direction(); + * - \ref sl_gpio_driver_set_pin_mode(); + * - \ref sl_si91x_gpio_driver_set_pin_direction(); * * @param[in] gpio - Pointer to the structure of type \ref sl_gpio_t * @return returns status 0 if successful, * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_clear_pin(sl_gpio_t *gpio) @@ -360,31 +305,20 @@ STATIC __INLINE sl_status_t sl_gpio_driver_clear_pin(sl_gpio_t *gpio) /***************************************************************************/ /** * @brief Toggle a single pin in GPIO port register. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] gpio - Pointer to the structure of type \ref sl_gpio_t * @return returns status 0 if successful, * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_toggle_pin(sl_gpio_t *gpio) @@ -423,32 +357,21 @@ STATIC __INLINE sl_status_t sl_gpio_driver_toggle_pin(sl_gpio_t *gpio) /***************************************************************************/ /** * @brief Read the pin value for a single pin in a GPIO port. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] gpio - Pointer to the structure of type \ref sl_gpio_t * @param[out] pin_value - Gets the gpio pin value * @return returns status 0 if successful, * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_get_pin(sl_gpio_t *gpio, uint8_t *pin_value) @@ -487,22 +410,13 @@ STATIC __INLINE sl_status_t sl_gpio_driver_get_pin(sl_gpio_t *gpio, uint8_t *pin /***************************************************************************/ /** * @brief Set bits GPIO data out register to 1. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode(); - * - - * \ref sl_si91x_gpio_driver_set_pin_direction(); + * - \ref sl_gpio_driver_set_pin_mode(); + * - \ref sl_si91x_gpio_driver_set_pin_direction(); * * @param[in] port - The port to associate with the pin. * HP instance - PORT 0,1,2,3 @@ -510,9 +424,8 @@ STATIC __INLINE sl_status_t sl_gpio_driver_get_pin(sl_gpio_t *gpio, uint8_t *pin * @param[in] pins - The GPIO pins in a Port that are set to 1 (1 to 65535). * @return returns status 0 if successful, * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_set_port(sl_gpio_port_t port, uint32_t pins) @@ -529,22 +442,13 @@ STATIC __INLINE sl_status_t sl_gpio_driver_set_port(sl_gpio_port_t port, uint32_ /***************************************************************************/ /** * @brief Set bits in configuration register for a port to 0. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] port - The port to associate with the pin. * HP instance - PORT 0,1,2,3 @@ -552,9 +456,8 @@ STATIC __INLINE sl_status_t sl_gpio_driver_set_port(sl_gpio_port_t port, uint32_ * @param[in] pins - The GPIO pins in a Port that are set to 0 (1 to 65535). * @return returns status 0 if successful, * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_clear_port(sl_gpio_port_t port, uint32_t pins) @@ -571,22 +474,13 @@ STATIC __INLINE sl_status_t sl_gpio_driver_clear_port(sl_gpio_port_t port, uint3 /***************************************************************************/ /** * @brief Get the current setting for a GPIO configuration register. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] port - The port to associate with the pin. * HP instance - PORT 0,1,2,3 @@ -594,9 +488,8 @@ STATIC __INLINE sl_status_t sl_gpio_driver_clear_port(sl_gpio_port_t port, uint3 * @param[out] port_value - Gets the gpio port value * @return returns status 0 if successful, * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_get_port_output(sl_gpio_port_t port, uint32_t *port_value) @@ -613,22 +506,13 @@ STATIC __INLINE sl_status_t sl_gpio_driver_get_port_output(sl_gpio_port_t port, /***************************************************************************/ /** * @brief Get the current setting for a pin in a GPIO configuration register. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] gpio - Pointer to the structure of type \ref sl_gpio_t * @return The GPIO pin value @@ -672,20 +556,14 @@ STATIC __INLINE uint8_t sl_gpio_driver_get_pin_output(sl_gpio_t *gpio) /*******************************************************************************/ /** * @brief Set the GPIO port configuration register. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * - * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode(); - * - - * \ref sl_si91x_gpio_driver_set_pin_direction(); + * - \ref sl_gpio_driver_set_pin_mode(); + * - \ref sl_si91x_gpio_driver_set_pin_direction(); * * @param[in] port - The port to associate with the pin. * HP instance - PORT 0,1,2,3 @@ -694,9 +572,8 @@ STATIC __INLINE uint8_t sl_gpio_driver_get_pin_output(sl_gpio_t *gpio) * @param[in] mask - Mask indicating which bits to modify. * @return returns status 0 if successful, * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_set_port_output_value(sl_gpio_port_t port, uint32_t val, uint32_t mask) @@ -713,21 +590,17 @@ STATIC __INLINE sl_status_t sl_gpio_driver_set_port_output_value(sl_gpio_port_t /******************************************************************************* * @brief Set slewrate for pins on an HP instance GPIO port. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance * * @param[in] port - The GPIO port to configure. * @param[in] slewrate - The slewrate to configure for the pins on this GPIO port. * @param[in] slewrate_alt - The slewrate to configure for the pins using alternate modes on this GPIO port. * @return returns status 0 if successful, * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_set_slew_rate(sl_gpio_port_t port, uint32_t slewrate, uint32_t slewrate_alt) @@ -744,20 +617,14 @@ STATIC __INLINE sl_status_t sl_gpio_driver_set_slew_rate(sl_gpio_port_t port, ui /*******************************************************************************/ /** * @brief Read the port value for GPIO. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * - * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] port - The port to associate with the pin. * HP instance - PORT 0,1,2,3 @@ -781,20 +648,13 @@ STATIC __INLINE uint32_t sl_gpio_driver_get_port_input(sl_gpio_port_t port) /******************************************************************************* * @brief Toggle the selected pin values in the GPIO port register. * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * - + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] port - The port to associate with the pin. * HP instance - PORT 0,1,2,3 @@ -802,9 +662,8 @@ STATIC __INLINE uint32_t sl_gpio_driver_get_port_input(sl_gpio_port_t port) * @param[in] pins - Port pins to toggle. * @return returns status 0 if successful, * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_toggle_port_output(sl_gpio_port_t port, uint32_t pins) @@ -821,20 +680,15 @@ STATIC __INLINE sl_status_t sl_gpio_driver_toggle_port_output(sl_gpio_port_t por /******************************************************************************* * @brief Enable the selected GPIO pin interrupt with the configured interrupt type (Level or Edge). * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] flags - GPIO interrupt sources to enable. * @return returns status 0 - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_enable_interrupts(uint32_t flags) @@ -846,20 +700,15 @@ STATIC __INLINE sl_status_t sl_gpio_driver_enable_interrupts(uint32_t flags) /******************************************************************************* * @brief Disable the selected GPIO pin interrupt with the configured interrupt type (Level or Edge). * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] flags - GPIO interrupt sources to disable. * @return returns status 0 - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_disable_interrupts(uint32_t flags) @@ -871,20 +720,15 @@ STATIC __INLINE sl_status_t sl_gpio_driver_disable_interrupts(uint32_t flags) /******************************************************************************* * @brief Set the selected GPIO pin interrupt with the configured interrupt type (Level or Edge). * @pre Pre-conditions: - * - Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() * * @param[in] flags - GPIO interrupt sources to set to pending. * @return returns status 0 - * \ref SL_STATUS _OK (0X000) - Success + * - \ref SL_STATUS_OK (0X000) - Success * ******************************************************************************/ STATIC __INLINE sl_status_t sl_gpio_driver_set_interrupts(uint32_t flags) @@ -897,16 +741,12 @@ STATIC __INLINE sl_status_t sl_gpio_driver_set_interrupts(uint32_t flags) * @brief Get the pending GPIO interrupts. * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() -* - * @param[in] None + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * + * @param none * @return Pending GPIO Pin interrupt numbers. ******************************************************************************/ STATIC __INLINE uint32_t sl_gpio_driver_get_pending_interrupts(void) @@ -920,16 +760,12 @@ STATIC __INLINE uint32_t sl_gpio_driver_get_pending_interrupts(void) * @brief Get the enabled GPIO interrupts. * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() -* - * @param[in] None + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * + * @param none * @return Enabled GPIO pin interrupt numbers. ******************************************************************************/ STATIC __INLINE uint32_t sl_gpio_driver_get_enabled_interrupts(void) @@ -943,15 +779,11 @@ STATIC __INLINE uint32_t sl_gpio_driver_get_enabled_interrupts(void) * @brief Get the enabled and pending GPIO interrupt flags. * @pre Pre-conditions: * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - - * \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - - * \ref sl_gpio_driver_set_pin_mode() - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() - * @param[in] None + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * @param none * @return Enabled GPIO pending interrupts. ******************************************************************************/ STATIC __INLINE uint32_t sl_gpio_driver_get_enabled_pending_interrupts(void) diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h index 404abc87e..34d5d1828 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h @@ -51,12 +51,11 @@ typedef adc_inter_config_t sl_adc_internal_config_t; ///< Renamed ADC internal c typedef adc_extr_config_t sl_adc_external_config_t; ///< Renamed ADC external trigger configuration structure /***************************************************************************/ /** - * Typedef for user supplied callback function, which is called when ADC sample completes - * - * @param[in] channel ADC channel number - * @param[in] event ADC event for different interrupt. +* Typedef for user supplied callback function, which is called when ADC sample completes +* @param[in] channel ADC channel number +* @param[in] event ADC event for different interrupt. - ******************************************************************************/ +******************************************************************************/ typedef void (*sl_adc_callback_t)(uint8_t channel, uint8_t event); // ----------------------------------------------------------------------------- @@ -182,9 +181,13 @@ typedef struct { // Prototypes /***************************************************************************/ /** - * Set the clock for the ADC peripheral, Configures the PLL clock with the - * value set by user in the clock configuration structure. - * + * @brief Set the clock for the ADC peripheral and configure the PLL + * clock to the value specified by the user in the clock configuration structure. + * @details This API will set the clock for ADC controller. + * - The ADC clock configurations are listed below: + * - soc_pll_clock (Frequency range from 1 MHZ to 180 MHz). + * - soc_pll_reference_clock (Frequency range from 15MHZ to 65 MHz). + * - division_factor (0 to 63). * @param[in] clock_configuration : clock structure variables ( \ref sl_adc_clock_config_t) * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -196,15 +199,14 @@ typedef struct { sl_status_t sl_si91x_adc_configure_clock(sl_adc_clock_config_t *clock_configuration); /***************************************************************************/ /** - * Initialize the ADC peripheral. Based on the sampling rate, the ADC clock source - * will set and Pass the Vref value to set the reference voltage to ADC. - * - * @pre Pre-conditions: + * @brief Initialize the ADC peripheral. + * @details The ADC clock source sets and passes the Vref value to set the reference voltage for the ADC, + * based on the sampling rate. Power on the ADC block and calibrate the ADC offset and gain. + * @pre Pre-condition: * - \ref sl_si91x_adc_configure_clock - Only for FIFO mode on M4 state - * * @param[in] adc_channel_config : ADC channels configuration structure variable * @param[in] adc_config : ADC operation configuration structure variable - * @param[in] vref_value : Reference voltage + * @param[in] vref_value : Reference voltage(reange from 1.8v to 3.6v) * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer @@ -216,17 +218,17 @@ sl_status_t sl_si91x_adc_configure_clock(sl_adc_clock_config_t *clock_configurat sl_status_t sl_si91x_adc_init(sl_adc_channel_config_t adc_channel_config, sl_adc_config_t adc_config, float vref_value); /***************************************************************************/ /** - * Configure ADC channel parameters. - * + * @brief Configures the ADC channel parameters. + * @details + * - The configurations are listed below: + * - Number of channel + * - ADC operation mode (Static mode/FIFO mode) + * - Sample Length + * - Input Type (Single ended/ differential type) + * - Sampling Rate (1 - 2.5 Ms/Sec). * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: - * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: - * - \ref sl_si91x_adc_init - * * @param[in] adc_channel_config : ADC channels configuration structure variable. * @param[in] adc_config : ADC operation configuration structure variable. * @return status 0 if successful, else error code as follow @@ -234,24 +236,20 @@ sl_status_t sl_si91x_adc_init(sl_adc_channel_config_t adc_channel_config, sl_adc * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid * - SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range + * @note if Static mode is configured, sample length should be '1'. ******************************************************************************/ sl_status_t sl_si91x_adc_set_channel_configuration(sl_adc_channel_config_t adc_channel_config, sl_adc_config_t adc_config); /***************************************************************************/ /** - * Register the user callback function. - * At the time of events, the function passed in the parameter is called with the respective - * event as the parameter. - * Before calling this function again, it is mandatory to call the \ref sl_si91x_adc_unregister_event_callback - * function to unregister the callback, otherwise it returns SL_STATUS_BUSY error code. - * + * @brief Register the user callback function. + * @details When an event occurs, the function with the specified parameter is invoked. + * To unregister the callback, use the \ref sl_si91x_adc_unregister_event_callback + * function before invoking this function again; otherwise, the error code \ref SL_STATUS_BUSY will be returned. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * * @param[in] callback_event Pointer to the function which needs to be called at the time of interrupt * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -261,35 +259,28 @@ sl_status_t sl_si91x_adc_set_channel_configuration(sl_adc_channel_config_t adc_c sl_status_t sl_si91x_adc_register_event_callback(sl_adc_callback_t callback_event); /***************************************************************************/ /** - * Un-register the user callback function. - * It is mandatory to call this function before registering the callback again. - * - * @pre Pre-conditions: + * @brief Un-register the user callback function. + * @details It is mandatory to call this function before registering the callback again. + * @pre Pre-condition: * - \ref sl_si91x_adc_register_event_callback - * - * @param[in] none + * @param none * @return none ******************************************************************************/ void sl_si91x_adc_unregister_event_callback(void); /***************************************************************************/ /** - * Configure the ADC external trigger. - * Triggers can be used in PS4 State to collect the sample from a pre-defined channel. - * ADC can give a sample for the selected trigger with a trigger match. - * There are 3 external triggers, which are enabled by - * - ULPSS Timer interrupts + * @brief Configure the ADC external trigger. + * @details Triggers can be used in PS4 State to collect samples from a predefined channel. + * ADC can provide a sample for the selected trigger if the trigger matches. + * There are three external triggers enabled by + * - ULPSS Timer Interrupts * - ULPSS GPIOs - * - M4SS Config_Timer. - * Trigger match can be checked by reading the \ref sl_si91x_adc_get_external_trigger_status + * - M4SS Configuration Timer. + * The trigger match can be verified by reading the \ref sl_si91x_adc_get_external_trigger_status. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * @pre Pre-conditions: - * - \ref sl_si91x_adc_start - * * @param[in] adc_external_trigger : ADC external trigger configuration structure variable. * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -299,16 +290,13 @@ void sl_si91x_adc_unregister_event_callback(void); sl_status_t sl_si91x_adc_configure_external_trigger(sl_adc_external_config_t adc_external_trigger); /***************************************************************************/ /** - * Configure the ADC sampling rate for the ADC channels. - * It will set the channel offset value and channel frequency for each channel to set the - * sampling rate. The minimum allowed value is 3 to satisfy the Nyquist criteria of sampling rates. - * Freq_value 1 and 2 are not allowed. - * + * @brief Configure the ADC sampling rate for the ADC channels. + * @details It adjusts the channel offset and frequency for each channel to determine the sample rate. + * To meet the Nyquist sampling rate criteria, the channel swallow factor must be not less than '3'. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * + * - \ref sl_si91x_adc_set_channel_configuration * @param[in] adc_internal_config : Channel offset and frequency for each channel to set sampling rate. * @param[in] channel_num : Channel number * @return sl_status_t : Returns 'SL_STATUS_OK' on successful execution. @@ -317,20 +305,15 @@ sl_status_t sl_si91x_adc_configure_channel_sampling_rate(sl_adc_internal_config_ uint8_t channel_num); /***************************************************************************/ /** - * ADC can give a sample for the selected trigger with a trigger match. - * Read the ADC external trigger match. - * + * @brief This API will provide the status of an external trigger. + * @details This will read the status of an external trigger and update in the ext_trigger. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * @pre Pre-conditions: - * - \ref sl_si91x_adc_start - * + * - \ref sl_si91x_adc_configure_external_trigger * @param[in] adc_external_trigger : ADC external trigger configuration structure variable. - * @param[in] ext_trigger : The status of external trigger will be store in this. + * @param[out] ext_trigger : The status of external trigger will be store in this. * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer @@ -340,19 +323,16 @@ sl_status_t sl_si91x_adc_get_external_trigger_status(sl_adc_external_config_t ad uint8_t *ext_trigger); /***************************************************************************/ /** - * Clear the ADC external trigger. - * After reading the trigger match can clear specific trigger using - * \ref sl_si91x_adc_clear_external_trigger API. - * + * @brief Clear the ADC external trigger. + * @details After reading the trigger match, use the \ref sl_si91x_adc_clear_external_trigger + * API to clear a specific trigger. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * @pre Pre-conditions: - * - \ref sl_si91x_adc_start - * + * - \ref sl_si91x_adc_configure_external_trigger + * - \ref sl_si91x_adc_register_event_callback + * - \ref sl_si91x_adc_star * @param[in] adc_external_trigger : ADC external trigger configuration structure variable. * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -361,20 +341,18 @@ sl_status_t sl_si91x_adc_get_external_trigger_status(sl_adc_external_config_t ad sl_status_t sl_si91x_adc_clear_external_trigger(sl_adc_external_config_t adc_external_trigger); /***************************************************************************/ /** - * Configure the ADC ping and pong memory location and length - * To configure the Ping and pong memory location along with length of - * ping memory and pong memory. It is an applicable only for FIFO mode of ADC operation. - * FIFO mode supports dual buffer cyclic mode to avoid loss of data when buffer is full. - * In dual buffer cyclic mode, if Ping buffer is full for particular channel, incoming - * sampled data is written into Pong buffer such that, samples from Ping buffer are read back - * by controller during this time. That’s why there are two start addresses, - * two buffer lengths and two valid signals for each channel. - * + * @brief Configure the ADC ping and pong memory location and length. + * @details Configure the ping and pong memory locations, + * as well as the ping and pong memory lengths. It is only applicable for the FIFO mode + * of ADC operation. FIFO mode has a dual-buffer cyclic mode that prevents data loss + * when the buffer is full. In dual buffer cyclic mode, if the Ping buffer for a given + * channel is full, incoming sampled data is written into the Pong buffer, allowing the + * controller to read back samples from the Ping buffer during this period. + * This explains why each channel has two start addresses, two buffer lengths, and two valid signals. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * + * - \ref sl_si91x_adc_set_channel_configuration * @param[in] adc_internal_config : ADC internal trigger configuration structure variable. * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow @@ -385,16 +363,13 @@ sl_status_t sl_si91x_adc_configure_ping_pong_memory_address(sl_adc_internal_conf uint8_t channel_num); /***************************************************************************/ /** - * Enable ping pong for the corresponding ADC channels - * It is an applicable only for FIFO mode of ADC operation. - * + * @brief Enable ping pong for the corresponding ADC channels. + * @note This will be applicable only for FIFO mode of ADC operation. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: + * - \ref sl_si91x_adc_set_channel_configuration * - \ref sl_si91x_adc_configure_ping_pong_memory_address - * * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -403,19 +378,14 @@ sl_status_t sl_si91x_adc_configure_ping_pong_memory_address(sl_adc_internal_conf sl_status_t sl_si91x_adc_enable_ping_pong(uint8_t channel_num); /***************************************************************************/ /** - * Disable ping pong for the corresponding ADC channels - * + * @brief Disable ping pong for the corresponding ADC channels * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: + * - \ref sl_si91x_adc_set_channel_configuration * - \ref sl_si91x_adc_configure_ping_pong_memory_address - * @pre Pre-conditions: * - \ref sl_si91x_adc_enable_ping_pong - * @pre Pre-conditions: * - \ref sl_si91x_adc_start - * * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -424,16 +394,12 @@ sl_status_t sl_si91x_adc_enable_ping_pong(uint8_t channel_num); sl_status_t sl_si91x_adc_disable_ping_pong(uint8_t channel_num); /***************************************************************************/ /** - * Enable DMA for the corresponding ADC channels. - * It is an applicable only for FIFO mode of ADC operation. - * + * @brief Enable DMA for the corresponding ADC channels. + * @note This will be applicable only for FIFO mode of ADC operation. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_channel_enable - * * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -442,19 +408,14 @@ sl_status_t sl_si91x_adc_disable_ping_pong(uint8_t channel_num); sl_status_t sl_si91x_adc_internal_per_channel_dma_enable(uint8_t channel_num); /***************************************************************************/ /** - * Disable DMA for the corresponding ADC channels. - * + * @brief Disable DMA for the corresponding ADC channels. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: + * - \ref sl_si91x_adc_set_channel_configuration * - \ref sl_si91x_adc_channel_enable - * @pre Pre-conditions: * - \ref sl_si91x_adc_internal_per_channel_dma_enable - * @pre Pre-conditions: * - \ref sl_si91x_adc_start - * * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -463,23 +424,15 @@ sl_status_t sl_si91x_adc_internal_per_channel_dma_enable(uint8_t channel_num); sl_status_t sl_si91x_adc_internal_per_channel_dma_disable(uint8_t channel_num); /***************************************************************************/ /** - * Configure the ADC in Static Mode - * it can be programmed for setting input type, positive and negative input channel selection. - * + * @brief This API will configure the ADC in Static Mode. + * @details It could be configured to choose positive and negative input channels, as well as input type. + * @note This will be applicable only for static mode of ADC operation. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: - * - \ref sl_si91x_adc_configure_ping_pong_memory_address - * @pre Pre-conditions: - * - \ref sl_si91x_adc_enable_ping_pong - * @pre Pre-conditions: - * - \ref sl_si91x_adc_channel_enable - * @pre Pre-conditions: - * - \ref sl_si91x_adc_internal_per_channel_dma_enable - * + * - \ref sl_si91x_adc_set_channel_configuration * @param[in] adc_channel_config : ADC channels configuration structure variable. + * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid @@ -488,21 +441,17 @@ sl_status_t sl_si91x_adc_internal_per_channel_dma_disable(uint8_t channel_num); sl_status_t sl_si91x_adc_configure_static_mode(sl_adc_channel_config_t adc_channel_config, uint8_t channel_num); /***************************************************************************/ /** - * Configure the ADC in FIFO Mode. - * + * @brief Configure the ADC in FIFO Mode. + * @details ADC data input will be sampled and written to the ADC FIFO in this mode. + * @note This will be applicable only for FIFO mode of ADC operation. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: + * - \ref sl_si91x_adc_set_channel_configuration * - \ref sl_si91x_adc_configure_ping_pong_memory_address - * @pre Pre-conditions: * - \ref sl_si91x_adc_enable_ping_pong - * @pre Pre-conditions: * - \ref sl_si91x_adc_channel_enable - * @pre Pre-conditions: * - \ref sl_si91x_adc_internal_per_channel_dma_enable - * * @param[in] adc_channel_config : ADC channels configuration structure variable. * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow @@ -513,13 +462,12 @@ sl_status_t sl_si91x_adc_configure_static_mode(sl_adc_channel_config_t adc_chann sl_status_t sl_si91x_adc_configure_fifo_mode(sl_adc_channel_config_t adc_channel_config, uint8_t channel_num); /***************************************************************************/ /** - * Enable the ADC channel - * + * @brief This API will enables the ADC channel. + * @details Data will be sampled from ADC only when corresponding channel is enabled. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * + * - \ref sl_si91x_adc_set_channel_configuration * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -528,17 +476,14 @@ sl_status_t sl_si91x_adc_configure_fifo_mode(sl_adc_channel_config_t adc_channel sl_status_t sl_si91x_adc_channel_enable(uint8_t channel_num); /***************************************************************************/ /** - * Disable the ADC channel. - * + * @brief Disable the ADC channel. + * @details Data sampling will be stoped when corresponding channel is disabled. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: + * - \ref sl_si91x_adc_set_channel_configuration * - \ref sl_si91x_adc_channel_enable - * @pre Pre-conditions: * - \ref sl_si91x_adc_start - * * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -547,13 +492,10 @@ sl_status_t sl_si91x_adc_channel_enable(uint8_t channel_num); sl_status_t sl_si91x_adc_channel_disable(uint8_t channel_num); /***************************************************************************/ /** - * Set the Power On and off for ADC. - * + * @brief This API will Power On and off for ADC. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * * @param[in] state : \b ADC_POWER_ON - To powerup adc powergates, * \b ADC_POWER_OFF - To powerdown adc powergates * ( \ref POWER_STATE ) @@ -563,45 +505,40 @@ sl_status_t sl_si91x_adc_channel_disable(uint8_t channel_num); sl_status_t sl_si91x_adc_set_power_mode(POWER_STATE state); /***************************************************************************/ /** - * Enable or Disable the Noise averaging mode to ADC. - * + * @brief Enable or Disable the Noise averaging mode to ADC. + * @details If bypass noise averaging is enabled, the sampled data will be more accurate. + * If bypass the noise averaging disable would cause '1' additional clock cycle Latency. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: - * - \ref sl_si91x_adc_set_power_mode - * - * @param[in] state : 1 - To enable noise averaging mode, - * 0 - To disable noise averaging mode + * - \ref sl_si91x_adc_set_channel_configuration + * @param[in] state : 1 - To enable bypass the noise averaging mode, + * 0 - To disable bypass the noise averaging mode * @return Returns 'SL_STATUS_OK' on successful execution. ******************************************************************************/ sl_status_t sl_si91x_adc_set_noise_average_mode(boolean_t state); /***************************************************************************/ /** - * Enable BJT based Temperature sensor as an input to ADC. - * Operation mode of ADC should be Static. - * + * @brief This API will enable the temperature sensor. + * @details Enable BJT based Temperature sensor as an input to ADC. + * @note - Operation mode of ADC should be Static for this input selection. + * - If the ADC input sample is obtained from a temperature sensor, the positive input selection value must be '23'. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * - * @param[in] None + * - \ref sl_si91x_adc_set_channel_configuration + * @param None * @return Returns 'SL_STATUS_OK' on successful execution. ******************************************************************************/ sl_status_t sl_si91x_adc_temperature_sensor_enable(void); /***************************************************************************/ /** - * Configuring ADC fifo threshold. Maximum FIFO depth is 16 can configure the threshold value. - * + * @brief Configuring ADC fifo threshold. + * @details The maximum FIFO depth is 16, and the threshold value may be configured. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * * @param[in] adc_config : ADC operation configuration structure variable. * @param[in] adc_fifo_threshold : ADC fifo structure variable like an empty fifo, a full fifo threshold level. * ( \ref sl_adc_fifo_thrld_config_t ) @@ -614,37 +551,27 @@ sl_status_t sl_si91x_adc_fifo_threshold_configuration(sl_adc_config_t adc_config sl_adc_fifo_thrld_config_t adc_fifo_threshold); /***************************************************************************/ /** - * Configure the ADC threshold to compare threshold value with ADC data. - * This is valid in ADC Static mode only. - * + * @brief Configure the ADC threshold to compare threshold value with ADC data. + * @note This API applies when the ADC mode of operation is static. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * @pre Pre-conditions: - * - \ref sl_si91x_adc_start - * * @param[in] adc_threshold : ADC threshold configuration structure variables. * @return Returns 'SL_STATUS_OK' on successful execution. ******************************************************************************/ sl_status_t sl_si91x_adc_threshold_configuration(sl_adc_threshold_config_t adc_threshold); /***************************************************************************/ /** - * Read the ADC samples when FIFO mode is enabled. - * + * @brief Read the ADC samples data for FIFO mode of operation. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * @pre Pre-conditions: + * - \ref sl_si91x_adc_register_event_callback * - \ref sl_si91x_adc_start - * * @param[in] adc_channel_config : ADC channels configuration structure variable. - * @param[in] uint8_t channel_num : Channel number + * @param[in] channel_num : Channel number * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid @@ -653,20 +580,16 @@ sl_status_t sl_si91x_adc_threshold_configuration(sl_adc_threshold_config_t adc_t sl_status_t sl_si91x_adc_read_data(sl_adc_channel_config_t adcchconfig, uint8_t channel_num); /***************************************************************************/ /** - * Read the ADC samples when static mode is enabled. - * + * @brief This API will read the ADC sampled data for static mode of operation. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * @pre Pre-conditions: + * - \ref sl_si91x_adc_register_event_callback * - \ref sl_si91x_adc_start - * * @param[in] adc_channel_config : ADC channels configuration structure variable. * @param[in] adc_config : ADC operation configuration structure variable. - * @param[in] adc_value : Store the reading data on adc_value. + * @param[out] adc_value : Store the reading data on adc_value. * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid @@ -677,31 +600,25 @@ sl_status_t sl_si91x_adc_read_data_static(sl_adc_channel_config_t adc_channel_co uint16_t *adc_value); /***************************************************************************/ /** - * To get the channel sampling rate value which is configured to ADC. - * + * @brief To get the channel sampling rate value which is configured to ADC. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * @pre Pre-conditions: * - \ref sl_si91x_adc_start - * * @param[in] channel_num : Channel number * @return Returns sampling rate what it get from register ******************************************************************************/ uint32_t sl_si91x_adc_get_sampling_rate(uint8_t channel_num); /***************************************************************************/ /** - * Uninitialize the ADC. If the DMA is enabled, it also uninitializes the - * DMA. - * + * @brief Uninitialize the ADC. + * @details If the DMA (Direct Memory Access) is enabled, it also uninitializes the + * DMA. It will power down to ADC block and disable the dynamic mode + * if FIFO mode of ADC operation. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * * @param[in] adc_config : ADC operation configuration structure variable. * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -710,15 +627,13 @@ uint32_t sl_si91x_adc_get_sampling_rate(uint8_t channel_num); sl_status_t sl_si91x_adc_deinit(sl_adc_config_t adc_config); /***************************************************************************/ /** - * Start the ADC operation. - * + * @brief Enable the signal to ADC controller and enable the dynamic mode + * for FIFO mode of ADC operation. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * + * - \ref sl_si91x_adc_register_event_callback * @param[in] adc_config : ADC operation configuration structure variable. * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -727,17 +642,14 @@ sl_status_t sl_si91x_adc_deinit(sl_adc_config_t adc_config); sl_status_t sl_si91x_adc_start(sl_adc_config_t adc_config); /***************************************************************************/ /** - * Stop the ADC operation. - * + * @brief Stop the signal for ADC controller and disable the dynamic mode + * if FIFO mode of ADC operation. * @pre Pre-conditions: * - \ref sl_si91x_adc_configure_clock - * @pre Pre-conditions: * - \ref sl_si91x_adc_init - * @pre Pre-conditions: * - \ref sl_si91x_adc_set_channel_configuration - * @pre Pre-conditions: + * - \ref sl_si91x_adc_register_event_callback * - \ref sl_si91x_adc_start - * * @param[in] adc_config : ADC operation configuration structure variable. * @return status 0 if successful, else error code as follow * - SL_STATUS_OK (0x0000) - Success @@ -746,18 +658,76 @@ sl_status_t sl_si91x_adc_start(sl_adc_config_t adc_config); sl_status_t sl_si91x_adc_stop(sl_adc_config_t adc_config); /***************************************************************************/ /** - * Get the ADC version. - * It returns the API version of ADC. - * - * @param[in] none + * @brief Get the ADC version. + * @note It returns the API version of ADC. + * @param none * @return (sl_adc_version_t) type structure ******************************************************************************/ sl_adc_version_t sl_si91x_adc_get_version(void); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY! *********************** +/// @addtogroup ADC Analog to Digital Converter +/// @{ +/// +/// @details +/// +/// @n @section ADC_intro Introduction +/// +/// ADC stands for Analog-to-Digital Converter. +/// An ADC is a peripheral or component of a controller that transforms analog signals (continuous voltage levels) +/// into digital data (discrete binary values) that the controller can handle. +/// +/// @li This translation allows the controller to communicate with analog sensors or signals, +/// such as temperature sensors, light sensors, or analog joysticks, in digital systems or apps. +/// +/// @li Analog-to-Digital Converters (ADCs) are integral components in controllers across various applications. +/// Here are some common use cases: +/// +/// 1. Sensor Data Acquisition +/// +/// 2. Audio Processing +/// +/// 3. Instrumentation and Measurement +/// +/// 4. Motor Control +/// +/// 5. Battery Monitoring and Management +/// +/// 6. Feedback Control Systems etc., +/// +/// @n @section ADC_Conf Configuration +/// +/// Configuring an Analog-to-Digital Converter (ADC) typically involves several parameters and +/// settings to ensure proper operation and accurate conversion of analog signals into digital data. +/// The specific configuration details may vary depending on the ADC hardware and the requirements of your application, +/// but here are some few configurable items: +/// +/// @li To configure the number of ADC channels and Mode of ADC operation first set the appropriate values into this structure +/// @ref sl_adc_config_t, and then use this structure to use the API @ref sl_si91x_adc_set_channel_configuration(), +/// which will configure the number of channels. +/// +/// @li To configure the ADC channel such as input type @ref sl_adc_input_type_typedef_t, number of samples(1-1023), +/// Sampling Rate (1-2500000 samples per second) will configured through +/// @ref sl_adc_channel_config_t, once fill the structure need call the API : @ref sl_si91x_adc_set_channel_configuration(). +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section ADC_Usage Usage +/// +/// The common ADC functions can be used after the ADC Structures are specified, passing an instance of +/// @ref sl_adc_config_t and @ref sl_adc_channel_config_t. +/// These functions will initiate and configure the ADC below, which is the flow for implementation. +/// 1. @ref sl_si91x_adc_configure_clock +/// 2. @ref sl_si91x_adc_init +/// 3. @ref sl_si91x_adc_set_channel_configuration +/// 4. @ref sl_si91x_adc_register_event_callback +/// 5. @ref sl_si91x_adc_start +/// 6. @ref sl_si91x_adc_read_data +/// 7. @ref sl_si91x_adc_deinit +/// /** @} (end addtogroup ADC) */ - #ifdef __cplusplus } #endif -#endif /* SL_SI91X_ADC_H_ */ +#endif /* SL_SI91X_ADC_H_ */ \ No newline at end of file diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_analog_comparator.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_analog_comparator.h index 497262765..eff088550 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_analog_comparator.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_analog_comparator.h @@ -64,16 +64,16 @@ typedef enum { /// @brief Enumeration to represent analog comparator inputs typedef enum { - SL_COMPARATOR_GPIO_INPUT_0, ///< Select GPIO input for comparator non-inverting input - SL_COMPARATOR_GPIO_INPUT_1, ///< Select GPIO input for comparator non-inverting input - SL_COMPARATOR_DAC_OUTPUT, ///< Selects DAC output as comparator input - SL_COMPARATOR_REFERRENCE_BUFFER_OUTPUT, ///< Selects reference buffer output as comparator input - SL_COMPARATOR_REFERRENCE_SCALER_OUTPUT, ///< Selects reference scaler output as comparator input - SL_COMPARATOR_RESISTOR_BANK_OUTPUT, ///< Selects resistor bank output as comparator input - SL_COMPARATOR_OPAMP1_OUTPUT, ///< Selects OPAMP1 output as comparator input - SL_COMPARATOR_OPAMP2_OUTPUT, ///< Selects OPAMP2 output as comparator input - SL_COMPARATOR_OPAMP3_OUTPUT, ///< Selects OPAMP3 output as comparator input - SL_COMPARATOR_INPUT_LAST, ///< Last member of enum for validation + SL_COMPARATOR_GPIO_INPUT_0, ///< Select GPIO input for comparator non-inverting input + SL_COMPARATOR_GPIO_INPUT_1, ///< Select GPIO input for comparator non-inverting input + SL_COMPARATOR_DAC_OUTPUT, ///< Selects DAC output as comparator input + SL_COMPARATOR_REFERENCE_BUFFER_OUTPUT, ///< Selects reference buffer output as comparator input + SL_COMPARATOR_REFERENCE_SCALER_OUTPUT, ///< Selects reference scaler output as comparator input + SL_COMPARATOR_RESISTOR_BANK_OUTPUT, ///< Selects resistor bank output as comparator input + SL_COMPARATOR_OPAMP1_OUTPUT, ///< Selects OPAMP1 output as comparator input + SL_COMPARATOR_OPAMP2_OUTPUT, ///< Selects OPAMP2 output as comparator input + SL_COMPARATOR_OPAMP3_OUTPUT, ///< Selects OPAMP3 output as comparator input + SL_COMPARATOR_INPUT_LAST, ///< Last member of enum for validation } sl_analog_comparator_inputs_t; /// @brief Enumeration to represent the hysteresis control values @@ -206,11 +206,9 @@ void sl_si91x_analog_comparator_init(void); * @details Use this function to configure analog comparator number, select non-inverting and inverting inputs, * enable or disable hysteresis, and enable or disable filter for comparator outputs. * Also configure input pins. - * - * @pre Pre-condition: \ref sl_si91x_analog_comparator_init() - * + * @pre Pre-condition: + * - \ref sl_si91x_analog_comparator_init() * @param[in] comparator_config_ptr Pointer to analog comparator configuration structure \ref sl_analog_comparator_config_t - * * @return Status 0 if successful, else error code: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Analog comparator configuration structure member has invalid value. * - \ref SL_STATUS_OK (0x0000) - Success, analog comparator parameters configured properly. @@ -220,15 +218,12 @@ sl_status_t sl_si91x_analog_comparator_set_configurations(sl_analog_comparator_c /***************************************************************************/ /** * @brief Register Analog Comparator interrupt callback * @details Enables its interrupts as per comparator number - * * @pre Pre-conditions: * - \ref sl_si91x_analog_comparator_init() * - \ref sl_si91x_analog_comparator_set_configurations() * - \ref sl_si91x_analog_comparator_unregister_callback(), if already registered for any interrupt - * * @param[in] comparator_number For comparator Number, see \ref sl_analog_comparator_number_t for possible values. * @param[in] on_comparator_callback Callback function pointer, to be invoked when a comparator interrupt occurs. - * * @return Status 0 if successful, else error code: * - \ref SL_STATUS_NULL_POINTER (0x0022) - on_comparator_callback parameter is a null pointer. * - \ref SL_STATUS_BUSY (0x0004) - The callback is already registered, unregister @@ -242,12 +237,10 @@ sl_status_t sl_si91x_analog_comparator_register_callback(sl_analog_comparator_nu /***************************************************************************/ /** * @brief Unregister Analog Comparator interrupt callback * @details Disables its interrupts as per comparator number - * * @pre Pre-conditions: * - \ref sl_si91x_analog_comparator_init() * - \ref sl_si91x_analog_comparator_set_configurations() * - \ref sl_si91x_analog_comparator_register_callback() - * * @param[in] comparator_number For comparator Number, see \ref sl_analog_comparator_number_t for possible values. * * @return Status 0 if successful, else error code: @@ -260,14 +253,11 @@ sl_status_t sl_si91x_analog_comparator_unregister_callback(sl_analog_comparator_ * @brief Configure Analog Comparator resistor bank threshold * @details As per the threshold value, resistor bank output voltage will be configured. * Use this API when any GPIO or external input needs to compare with internal input (resistor bank). - * * @pre Pre-conditions: * - \ref sl_si91x_analog_comparator_init() * - \ref sl_si91x_analog_comparator_set_configurations() * - \ref sl_si91x_analog_comparator_register_callback() - * * @param[in] threshold_value For comparator resistor bank, see \ref sl_analog_comparator_threshold_values_t for possible values. - * * @return Status 0 if successful, else error code: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - threshold_value parameter has invalid value. * - \ref SL_STATUS_OK (0x0000) - Successfully registered timer timer-out callback. @@ -280,14 +270,11 @@ sl_status_t sl_si91x_analog_comparator_set_resistor_bank_threshold( * @details Sets the scale factor for the analog comparator module's reference scaler. * As per this scale factor, reference scalar output voltage will be set. * Use this API when any GPIO or external input needs to compare with internal input (reference scaler). - * * @pre Pre-conditions: * - \ref sl_si91x_analog_comparator_init() * - \ref sl_si91x_analog_comparator_set_configurations() * - \ref sl_si91x_analog_comparator_register_callback() - * * @param[in] scale_factor_value For comparator's reference scale, see \ref sl_analog_comparator_scale_factor_values_t for possible values. - * * @return Status 0 if successful, else error code: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - scale_factor_value parameter has invalid value. * - \ref SL_STATUS_OK (0x0000) - Successfully registered timer timer-out callback. @@ -298,12 +285,73 @@ sl_status_t sl_si91x_analog_comparator_set_reference_scaler_output( /***************************************************************************/ /** * @brief De-Initialize Analog Comparator * @details Disables Peripheral clock and interrupts -* * @return None *******************************************************************************/ void sl_si91x_analog_comparator_deinit(void); /** @} (end addtogroup Analog Comparator) */ + +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY! *********************** +/// @addtogroup ANALOGCOMP Analog Comparator +/// @{ +/// +/// @details +/// +/// @n @section ANALOGCOMP_Intro Introduction +/// +/// An analog comparator in a micro-controller is a peripheral that compares two analog input voltages +/// and generates a digital output based on the comparison result. It typically has two input pins +/// for comparing analog voltages and an output pin for displaying the result of the comparison. +/// +/// @li Analog comparators typically work in one of two modes: +/// +/// @li **Voltage Comparison Mode**: In this mode, the comparator compares the voltages across its two input pins. +/// If the voltage at the non-inverting input (+) exceeds the voltage at the inverting input (-), +/// the output becomes high and interrupt occurs. The output becomes low if the voltage at the inverting input (-) is higher. +/// +/// @li If the voltage at the inverting input (-) is higher, the output becomes low. +/// +/// @li **External and Internal Voltage comparison**: This mode lets you compare the external input voltage to internal voltage +/// generated using resister bank or reference scaler. +/// +/// @li The comparator's output can be used to initiate interrupts, wake up the micro-controller from low-power mode, +/// or control other system components using analog voltage levels. +/// +/// @li Analog comparators are commonly employed in applications such as battery monitoring, +/// threshold detection, sensor interface, and many more where analog signals must be compared +/// and acted on digitally by the micro-controller. +/// +/// @li It can compare DAC and OPAMP outputs with external or Internal voltages. +/// +/// @n @section ANALOGCOMP_Config Configuration +/// +/// It sets the reference LDO voltage, set the non-inverting and inverting inputs, +/// configures the pins in case of external inputs. +/// Set the value of the scaler factor, if the input is a ref scaler. +/// Set the threshold value, if the input consists of a bank of resistors. +/// Once everything is configured, we will activate interrupts and registers callback. +/// +/// @li To configure the non-inverting-input or inverting -input, hysteresis value and set filter enable or disable +/// use the structure @ref sl_analog_comparator_config_t to update the required configuration +/// and call the API @ref sl_si91x_analog_comparator_set_configurations(). +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section ANALOGCOMP_Usage Usage +/// +/// The common Analog Comparator functions can be used after the Analog Comparator Structures are specified, +/// passing an instance of @ref sl_analog_comparator_config_t +/// These functions will initiate and configure the Analog Comparator below, which is the flow for implementation. +/// +/// 1. @ref sl_si91x_analog_comparator_init +/// 2. @ref sl_si91x_analog_comparator_set_configurations +/// 3. @ref sl_si91x_analog_comparator_set_reference_scaler_output (If input is Reference scaler) +/// 4. @ref sl_si91x_analog_comparator_set_resistor_bank_threshold ( If input is Resistor bank) +/// 5. @ref sl_si91x_analog_comparator_register_callback +/// 6. @ref sl_si91x_analog_comparator_deinit +/// +/// @} end group ANALOGCOMP ********************************************************/ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_bjt_temperature_sensor.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_bjt_temperature_sensor.h index 4e05dc67f..b4f074431 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_bjt_temperature_sensor.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_bjt_temperature_sensor.h @@ -167,6 +167,60 @@ sl_status_t sl_si91x_get_bjt_temperature_sensor_conversion(double *temp_data, ******************************************************************************/ sl_status_t sl_si91x_bjt_temperature_sensor_deinit(adc_config_t sl_bjt_temperature_sensor_config); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup BJTTEMPSENSOR BJT Temperature Sensor +/// @{ +/// +/// @details +/// +/// +/// @n @section BJTTEMPSENSOR_intro Introduction +/// +/// @li By taking use of its temperature-dependent characteristics, a Bipolar Junction Transistor (BJT) +/// can be utilized as a temperature sensor. +/// +/// @li BJT temperature sensor peripheral will be used to transform a digital output into a temperature in degrees Celsius. +/// +/// @li BJT Temperature Sensor first reads the Band-gap and then reads the BJT value after the successful calibration +/// it just computes the temperature value by taking the difference between BJT output and Band-gap output value. +/// +/// @li By switching the current temperature mode, one can also obtain the temperature value in kelvin and fahrenheit. +/// +/// @n @section BJTTEMPSENSOR_Config Configuration +/// +/// @li By altering the macros in the mode below, one can change the temperature from +/// Celsius to Kelvin and from Celsius to Fahrenheit. +/// +/// @li @ref sl_bjt_temperature_sensor_enum_t +/// +/// @li By using the structured macros below, you can enable and disable the Bjt temperature sensor. +/// +/// @li @ref sl_bjt_temperature_sensor_state_t +/// +/// @n @section BJTTEMPSENSOR_Use Usage +/// +/// The Bjt temperature sensor will first call the callback event after initializing +/// and configuring the channel settings and operating mode. It will enable, configure, +/// and read the BJT temperature value in the read data along with configuring and reading the band gap value. +/// Once the values are successfully read, the temperature in Celsius will be computed. +/// +/// 1. @ref sl_si91x_bjt_temperature_sensor_init +/// +/// 2. @ref sl_si91x_bjt_temperature_sensor_read_data +/// +/// 3. @ref sl_si91x_bjt_temperature_sensor_state +/// +/// 4. @ref sl_si91x_bjt_temperature_sensor_set_channel_configuration +/// +/// 5. @ref sl_si91x_bjt_temperature_sensor_bg_set_channel_configuration +/// +/// @li In addition to the above mentioned apis, users can additionally modify the temperature mode +/// and deinitialize the callback event by using the conversion and deinit apis. +/// +/// 1. @ref sl_si91x_bjt_temperature_sensor_deinit +/// +/// 2. @ref sl_si91x_get_bjt_temperature_sensor_conversion +/// /** @} (end addtogroup BJTtemp) */ #ifdef __cplusplus diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_calendar.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_calendar.h index 10ebfae4c..fab1a7966 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_calendar.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_calendar.h @@ -119,18 +119,18 @@ typedef struct { // ----------------------------------------------------------------------------- // Prototypes /***************************************************************************/ /** - * Configuration and initialization of Calendar i.e., RTC clock. - * It takes input of clock type enum \ref sl_calendar_clock_t. - * The clock type can be RO, RC or XTAL. - * It configures the clock type and after configuration, initialized the RTC clock. - * + * @brief Configuration and initialization of Calendar i.e., RTC clock. + * @details It takes input of clock type enum \ref sl_calendar_clock_t. + * The clock type can be RO, RC or XTAL.It configures the clock type and after configuration, + * initialized the RTC clock. + * * @param[in] clock_type (sl_calendar_clock_t) Enum for RTC Clock Type (RO, RC or XTAL) - * @return status 0 if successful, else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid -*- - * \ref SL_STATUS_OK (0x0000) - Success -*- - * \ref SL_STATUS_FAIL (0x0001) - The function is failed + * + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success + * - \ref SL_STATUS_FAIL (0x0001) - The function is failed + * ******************************************************************************/ sl_status_t sl_si91x_calendar_set_configuration(sl_calendar_clock_t clock_type); @@ -148,15 +148,12 @@ sl_status_t sl_si91x_calendar_set_configuration(sl_calendar_clock_t clock_type); * - Second Seconds (uint8_t) (0-59) * - Milliseconds Milliseconds (uint16_t) (0-999) * @pre Pre-conditions: - * - \ref sl_si91x_calendar_set_configuration -* - \ref sl_si91x_calendar_init -* - * - * @param[in] config (sl_calendar_datetime_config_t) Pointer to the Date Configuration Structure - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid -*- - * \ref SL_STATUS_OK (0x0000) - Success + * - \ref sl_si91x_calendar_set_configuration + * - \ref sl_si91x_calendar_init + * @param[in] config (sl_calendar_datetime_config_t) Pointer to the Date Configuration Structure. + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success ******************************************************************************/ sl_status_t sl_si91x_calendar_set_date_time(sl_calendar_datetime_config_t *config); @@ -176,15 +173,13 @@ sl_status_t sl_si91x_calendar_set_date_time(sl_calendar_datetime_config_t *confi * - Second Seconds (uint8_t) (0-59) * - Milliseconds Milliseconds (uint16_t) (0-999) * @pre Pre-conditions: - * - \ref sl_si91x_calendar_set_configuration - * - \ref sl_si91x_calendar_init - * - \ref sl_si91x_calendar_set_date_time - * - * @param[in] config (sl_calendar_datetime_config_t) Pointer to the Date Configuration Structure - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid -*- - * \ref SL_STATUS_OK (0x0000) - Success + * - \ref sl_si91x_calendar_set_configuration + * - \ref sl_si91x_calendar_init + * - \ref sl_si91x_calendar_set_date_time + * @param[in] config (sl_calendar_datetime_config_t) Pointer to the Date Configuration Structure. + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success ******************************************************************************/ sl_status_t sl_si91x_calendar_get_date_time(sl_calendar_datetime_config_t *config); @@ -197,21 +192,15 @@ sl_status_t sl_si91x_calendar_get_date_time(sl_calendar_datetime_config_t *confi * - rc_enable_calibration: true to enable and false to disable RC calibration * - rc_enable_periodic_calibration: true to enable and false to disable RC periodic calibration * - rc_trigger_time: Expected values - 5 sec, 10 sec, 15 sec, 30 sec, 1 min, 2 min \ref RC_CLOCK_CALIBRATION_ENUM - * - * @note Only RC parameters are utilized in this function. - * - * @pre Pre-conditions: - * - \ref sl_si91x_calendar_calibration_init -* - * + * @pre Pre-condition: + * - \ref sl_si91x_calendar_calibration_init * @param[in] clock_calibration_config ( \ref clock_calibration_config_t) * pointer to the clock calibration structure - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid -*- - * \ref SL_STATUS_OK (0x0000) - Success + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success + * @note Only RC parameters are utilized in this function. ******************************************************************************/ sl_status_t sl_si91x_calendar_rcclk_calibration(clock_calibration_config_t *clock_calibration_config); @@ -228,21 +217,18 @@ sl_status_t sl_si91x_calendar_rcclk_calibration(clock_calibration_config_t *cloc * - ro_enable_calibration: true to enable and false to disable RO calibration * - ro_enable_periodic_calibration: true to enable and false to disable periodic calibration * - ro_trigger_time: Expected values - 1 sec, 2 sec, 4 sec, 8 sec \ref RO_CLOCK_CALIBRATION_ENUM - * - * @note Both RC and RO parameters are utilized in this function, so it is compulsory to update all the parameters. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_calendar_calibration_init -* - * + * * @param[in] clock_calibration_config ( \ref clock_calibration_config_t) - * pointer to the clock calibration structure - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid -*- - * \ref SL_STATUS_OK (0x0000) - Success + * pointer to the clock calibration structure. + * + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success + * + * @note Both RC and RO parameters are utilized in this function, so it is compulsory to update all the parameters. ******************************************************************************/ sl_status_t sl_si91x_calendar_roclk_calibration(clock_calibration_config_t *clock_calibration_config); @@ -252,15 +238,14 @@ sl_status_t sl_si91x_calendar_roclk_calibration(clock_calibration_config_t *cloc * It expects the function pointer as input argument. * Before calling this function again, it is mandatory to call \ref sl_si91x_calendar_unregister_msec_trigger_callback, * otherwise it returns SL_STATUS_BUSY error-code. - * + * * @param[in] msec_callback_ (function pointer \ref calendar_callback_t) Callback function pointer to be called when msec - * interrupt is triggered - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer -*- - * \ref SL_STATUS_OK (0x0000) - Success -*- - * \ref SL_STATUS_BUSY (0x0004) - The callback is already registered, + * interrupt is triggered. + * + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS_OK (0x0000) - Success + * - \ref SL_STATUS_BUSY (0x0004) - The callback is already registered, * unregister previous callback before registering new one ******************************************************************************/ sl_status_t sl_si91x_calendar_register_msec_trigger_callback(calendar_callback_t callback); @@ -271,15 +256,14 @@ sl_status_t sl_si91x_calendar_register_msec_trigger_callback(calendar_callback_t * It expects the function pointer as input argument. * Before calling this function again, it is mandatory to call \ref sl_si91x_calendar_unregister_sec_trigger_callback, * otherwise it returns SL_STATUS_BUSY error-code. - * + * * @param[in] sec_callback_ (function pointer \ref calendar_callback_t) Callback function pointer to be called when sec - * interrupt is triggered - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer -*- - * \ref SL_STATUS_OK (0x0000) - Success -*- - * \ref SL_STATUS_BUSY (0x0004) - The callback is already registered, + * interrupt is triggered. + * + * @return status 0 if successful, else error code as follow + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS_OK (0x0000) - Success + * - \ref SL_STATUS_BUSY (0x0004) - The callback is already registered, * unregister previous callback before registering new one ******************************************************************************/ sl_status_t sl_si91x_calendar_register_sec_trigger_callback(calendar_callback_t callback); @@ -290,64 +274,51 @@ sl_status_t sl_si91x_calendar_register_sec_trigger_callback(calendar_callback_t * It expects the function pointer as input argument. * Before calling this function again, it is mandatory to call \ref sl_si91x_calendar_unregister_alarm_trigger_callback, * otherwise it returns SL_STATUS_BUSY error-code. - * + * * @param[in] alarm_callback_ (function pointer \ref calendar_callback_t) Callback function pointer to be called when alarm - * interrupt is triggered - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer -*- - * \ref SL_STATUS_OK (0x0000) - Success -*- - * \ref SL_STATUS_BUSY (0x0004) - The callback is already registered, - * unregister previous callback before registering new one + * interrupt is triggered. + * + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS_OK (0x0000) - Success + * - \ref SL_STATUS_BUSY (0x0004) - The callback is already registered, + * unregister previous callback before registering new one ******************************************************************************/ sl_status_t sl_si91x_calendar_register_alarm_trigger_callback(calendar_callback_t callback); /***************************************************************************/ /** * Unregister the callback for one milli-second trigger and disable it. * It is mandatory to call this function before registering the callback again. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_calendar_register_msec_trigger_callback -* - * * @param none - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_OK (0x0000) - Success -*- - * \ref SL_STATUS_FAIL (0x0001) - The function is failed + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_OK (0x0000) - Success + * - \ref SL_STATUS_FAIL (0x0001) - The function is failed ******************************************************************************/ sl_status_t sl_si91x_calendar_unregister_msec_trigger_callback(void); /***************************************************************************/ /** * Unregister the callback for one second trigger and disable it. * It is mandatory to call this function before registering the callback again. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_calendar_register_sec_trigger_callback -* - * * @param none - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_OK (0x0000) - Success -*- - * \ref SL_STATUS_FAIL (0x0001) - The function is failed + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_OK (0x0000) - Success + * - \ref SL_STATUS_FAIL (0x0001) - The function is failed ******************************************************************************/ sl_status_t sl_si91x_calendar_unregister_sec_trigger_callback(void); /***************************************************************************/ /** * Unregister the callback for alarm trigger and disable it. * It is mandatory to call this function before registering the callback again. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - sl_si91x_calendar_register_alarm_trigger_callback -* - * * @param none - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_OK (0x0000) - Success -*- - * \ref SL_STATUS_FAIL (0x0001) - The function is failed + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_OK (0x0000) - Success + * - \ref SL_STATUS_FAIL (0x0001) - The function is failed ******************************************************************************/ sl_status_t sl_si91x_calendar_unregister_alarm_trigger_callback(void); @@ -365,18 +336,13 @@ sl_status_t sl_si91x_calendar_unregister_alarm_trigger_callback(void); * - Minute Minutes (uint8_t) (0-59) * - Second Seconds (uint8_t) (0-59) * - Milliseconds Milliseconds (uint16_t) (0-999) - * * @pre Pre-conditions: - * - \ref sl_si91x_calendar_set_configuration -*- - * \ref sl_si91x_calendar_init -* - * - * @param[in] alarm ( \ref sl_calendar_datetime_config_t) Pointer to the Date Configuration Structure - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid -*- - * \ref SL_STATUS_OK (0x0000) - Success + * - \ref sl_si91x_calendar_set_configuration + * - \ref sl_si91x_calendar_init + * @param[in] alarm ( \ref sl_calendar_datetime_config_t) Pointer to the Date Configuration Structure. + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success ******************************************************************************/ sl_status_t sl_si91x_calendar_set_alarm(sl_calendar_datetime_config_t *alarm); @@ -395,20 +361,14 @@ sl_status_t sl_si91x_calendar_set_alarm(sl_calendar_datetime_config_t *alarm); * - Minute Minutes (uint8_t) (0-59) * - Second Seconds (uint8_t) (0-59) * - Milliseconds Milliseconds (uint16_t) (0-999) - * * @pre Pre-conditions: - * - \ref sl_si91x_calendar_set_configuration -*- - * \ref sl_si91x_calendar_init -*- - * \ref sl_si91x_calendar_set_alarm -* - * - * @param[in] alarm ( \ref sl_calendar_datetime_config_t) Pointer to the Date Configuration Structure - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid -*- - * \ref SL_STATUS_OK (0x0000) - Success + * - \ref sl_si91x_calendar_set_configuration + * - \ref sl_si91x_calendar_init + * - \ref sl_si91x_calendar_set_alarm + * @param[in] alarm ( \ref sl_calendar_datetime_config_t) Pointer to the Date Configuration Structure. + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success ******************************************************************************/ sl_status_t sl_si91x_calendar_get_alarm(sl_calendar_datetime_config_t *alarm); @@ -427,10 +387,10 @@ sl_status_t sl_si91x_calendar_get_alarm(sl_calendar_datetime_config_t *alarm); * @param[in] Minute Minutes (uint8_t) (0-59) * @param[in] Second Seconds (uint8_t) (0-59) * @param[in] Milliseconds Milliseconds (uint16_t) (0-999) - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid - * \ref SL_STATUS_OK (0x0000) - Success + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success ******************************************************************************/ sl_status_t sl_si91x_calendar_build_datetime_struct(sl_calendar_datetime_config_t *date, uint8_t Century, @@ -448,26 +408,21 @@ sl_status_t sl_si91x_calendar_build_datetime_struct(sl_calendar_datetime_config_ * * @param[in] time (uint32_t) Unix timestamp * @param[in] ntp_time (uint32_t) variable to store NTP timestamp - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid -*- - * \ref SL_STATUS_OK (0x0000) - Success + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success ******************************************************************************/ sl_status_t sl_si91x_calendar_convert_unix_time_to_ntp_time(uint32_t time, uint32_t *ntp_time); /***************************************************************************/ /** * Convert NTP timestamp to Unix timestamp. - * * @param[in] ntp_time (uint32_t) NTP timestamp * @param[in] time (uint32_t) variable to store Unix timestamp - * @return status 0 if successful, else error code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid -*- - * \ref SL_STATUS_OK (0x0000) - Success + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - \ref SL_STATUS_OK (0x0000) - Success ******************************************************************************/ sl_status_t sl_si91x_calendar_convert_ntp_time_to_unix_time(uint32_t ntp_time, uint32_t *time); @@ -475,13 +430,10 @@ sl_status_t sl_si91x_calendar_convert_ntp_time_to_unix_time(uint32_t ntp_time, u * Return the state of one milli-second trigger of RTC (enabled or disabled). * If enabled, returns true. * If disabled, returns false. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_calendar_register_msec_trigger_callback -* - * * @param none - * @return (boolean)true if trigger is enabled, false otherwise + * @return (boolean) true if trigger is enabled, false otherwise ******************************************************************************/ boolean_t sl_si91x_calendar_is_msec_trigger_enabled(void); @@ -489,13 +441,10 @@ boolean_t sl_si91x_calendar_is_msec_trigger_enabled(void); * Return the state of one second trigger of RTC (enabled or disabled). * If enabled, returns true. * If disabled, returns false. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_calendar_register_sec_trigger_callback -* - * * @param none - * @return (boolean)true if trigger is enabled, false otherwise + * @return (boolean) true if trigger is enabled, false otherwise ******************************************************************************/ boolean_t sl_si91x_calendar_is_sec_trigger_enabled(void); @@ -503,27 +452,20 @@ boolean_t sl_si91x_calendar_is_sec_trigger_enabled(void); * Return the state of alarm trigger of RTC (enabled or disabled). * If enabled, returns true. * If disabled, returns false. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - sl_si91x_calendar_register_alarm_trigger_callback -* - * * @param none - * @return (boolean)true if trigger is enabled, false otherwise + * @return (boolean) true if trigger is enabled, false otherwise ******************************************************************************/ boolean_t sl_si91x_calendar_is_alarm_trigger_enabled(void); /***************************************************************************/ /** * Starts the Calendar RTC. - * * @pre Pre-conditions: * - \ref sl_si91x_calendar_set_configuration -*- - * \ref sl_si91x_calendar_init -* - * + * - \ref sl_si91x_calendar_init * @param none - * @return none + * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_calendar_rtc_start(void) { @@ -535,14 +477,10 @@ __STATIC_INLINE void sl_si91x_calendar_rtc_start(void) * * @pre Pre-conditions: * - \ref sl_si91x_calendar_set_configuration -*- - * \ref sl_si91x_calendar_init -*- - * \ref sl_si91x_calendar_rtc_start -* - * + * - \ref sl_si91x_calendar_init + * - \ref sl_si91x_calendar_rtc_start * @param none - * @return none + * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_calendar_rtc_stop(void) { @@ -553,12 +491,10 @@ __STATIC_INLINE void sl_si91x_calendar_rtc_stop(void) * Initialize the calibration for Calendar clocks. * It is mandatory to call this function before calling RO clock calibration or * RC clock calibration function. - * * @post \ref sl_si91x_calendar_rcclk_calibration \n * \ref sl_si91x_calendar_roclk_calibration \n - * * @param none - * @return none + * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_calendar_calibration_init(void) { @@ -570,7 +506,7 @@ __STATIC_INLINE void sl_si91x_calendar_calibration_init(void) * It is generally called in the IRQ handler. * * @param none - * @return none + * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_calendar_clear_msec_trigger(void) { @@ -580,9 +516,9 @@ __STATIC_INLINE void sl_si91x_calendar_clear_msec_trigger(void) /***************************************************************************/ /** * Clear the one second trigger. * It is generally called in the IRQ handler. - * + * * @param none - * @return none + * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_calendar_clear_sec_trigger(void) { @@ -592,9 +528,9 @@ __STATIC_INLINE void sl_si91x_calendar_clear_sec_trigger(void) /***************************************************************************/ /** * Clear the alarm trigger. * It is generally called in the IRQ handler. - * + * * @param none - * @return none + * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_calendar_clear_alarm_trigger(void) { @@ -604,12 +540,10 @@ __STATIC_INLINE void sl_si91x_calendar_clear_alarm_trigger(void) /***************************************************************************/ /** * Initialize calendar operation. * It power ups the RTC domain and starts the calendar clock. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_calendar_set_configuration - * * @param none - * @return none + * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_calendar_init(void) { @@ -619,12 +553,10 @@ __STATIC_INLINE void sl_si91x_calendar_init(void) /***************************************************************************/ /** * De-initialize calendar operation. * It power down the RTC domain and stops the calendar clock. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_calendar_init - * * @param none - * @return none + * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_calendar_deinit(void) { @@ -636,12 +568,57 @@ __STATIC_INLINE void sl_si91x_calendar_deinit(void) * It returns the API version of calendar. * * @param[in] none - * @return \ref sl_calendar_version_t type version + * + * @returns \ref sl_calendar_version_t type version ******************************************************************************/ sl_calendar_version_t sl_si91x_calendar_get_version(void); /** @} (end addtogroup Calendar) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup CALENDAR Calendar +/// @{ +/// +/// @details +/// +/// +/// @n @section CALENDAR_Intro Introduction +/// +/// The Calendar application for requires software that manages dates, events, alarms, +/// and reminders within hardware constraints. Here's a brief overview of how you would go about building such an application. +/// +/// @n @section CALENDAR_Config Configuration +/// +/// Calendar provides three types of trigger those are Alarm, Second and Millisecond. +/// @li **Second trigger**: Provides callback at every one second. +/// To configure Second trigger use, @ref sl_si91x_calendar_register_sec_trigger_callback(). +/// +/// @li **MilliSecond trigger**: Provides callback at every one millisecond. To configure MilliSecond trigger use, +/// @ref sl_si91x_calendar_register_msec_trigger_callback(). +/// +/// @li **Alarm trigger**: Provides callback at the alarm time configured by the user.To configure Alarm time use, +/// @ref sl_si91x_calendar_set_alarm(), and to configure alarm trigger use +/// @ref sl_si91x_calendar_register_alarm_trigger_callback(). +/// +/// The procedures for setting up a calendar +/// in an si91x is @ref sl_calendar_clock_t, after that These functions will +/// re-initiate and configure the calender @ref sl_si91x_calendar_set_configuration() +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section CALENDAR_Usage Usage +/// +/// The common Calendar functions can be used after the calendar Structures are specified, passing an instance of @ref sl_calendar_datetime_config_t. +/// These functions will initiate and configure the calendar below, which is the flow for implementation. +/// +/// 1. @ref sl_si91x_calendar_set_configuration +/// 2. @ref sl_si91x_calendar_init +/// 3. @ref sl_si91x_calendar_build_datetime_struct +/// 4. @ref sl_si91x_calendar_set_date_time +/// 5. @ref sl_si91x_calendar_deinit +/// +/// @} end group CALENDAR ********************************************************/ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_config_timer.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_config_timer.h index ef2d40e26..4be8892b6 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_config_timer.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_config_timer.h @@ -52,8 +52,8 @@ extern "C" { // ----------------------------------------------------------------------------- // Data Types -typedef OCU_PARAMS_T sl_config_timer_ocu_params_t; ///< Renaming OCU parameters structure type -typedef WFG_PARAMS_T sl_config_timer_wfg_config_t; ///< Renaming WFG parameters structure type +typedef OCU_PARAMS_T sl_config_timer_ocu_params_t; ///< Renaming OCU (Output Compare Unit) parameters structure type +typedef WFG_PARAMS_T sl_config_timer_wfg_config_t; ///< Renaming WFG parameters structure type typedef RSI_CT_CALLBACK_T sl_config_timer_pwm_callback_t; ///< Renaming MCPWM callback structure /***************************************************************************/ /** @@ -293,35 +293,30 @@ typedef struct { // Prototypes /***************************************************************************/ /** -* Initializes config-timer peripheral. -* Configures its output GPIO pins. -* Configures clock as 16 MHz. +* @brief This API will initialize config-timer peripheral. +* @details Configures its output GPIO pins and clock as 16 MHz. * -* @param[in] none -* @return none +* @param none +* @return none *******************************************************************************/ void sl_si91x_config_timer_init(void); /***************************************************************************/ /** - * Set Config-timer mode as 32-bit or 16-bit counters. - * In 32-bit mode Counter_1 and Counter_0 will be merged and used as a single 32 bit counter. + * @brief This API will set Config-timer mode as 32-bit or 16-bit counters. + * @details In 32-bit mode Counter_1 and Counter_0 will be merged and used as a single 32 bit counter. * In this mode, Counter_0 modes/triggers/enables will be used. * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); - * * @param[in] mode \ref sl_config_timer_mode_t for possible values - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid. -*- - * \ref SL_STATUS_OK (0x0000) - Success, timer-mode is set properly -* + * - \ref SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid. + * - \ref SL_STATUS_OK (0x0000) - Success, timer-mode is set properly *******************************************************************************/ sl_status_t sl_si91x_config_timer_set_mode(sl_config_timer_mode_t mode); /***************************************************************************/ /** - * Configures Config-timer parameters. - * Such as 32-bit or 16-bit mode, periodic mode, Counter trigger enable, + * @brief This API will configures Config-timer parameters. + * @details This API will set the Config-timer parameters such as 32-bit or 16-bit mode, periodic mode, Counter trigger enable, * soft reset enable, buffer enable, sync trigger enable and * sets direction for counter0 and counter1. * Counter trigger enable is enabled to start the counter. @@ -329,170 +324,138 @@ sl_status_t sl_si91x_config_timer_set_mode(sl_config_timer_mode_t mode); * Buffer enable will copy buffer data to Counter Match register. * Soft reset valid only when the counter is in two 16 bit counters mode, * this resets the counter on the write. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_config_timer_init(); - * * @param[in] timer_config_ptr Pointer to CT config structure \ref sl_config_timer_config_t - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer. -*- - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Counter direction parameter has invalid value. -*- - * \ref SL_STATUS_OK (0x0000) - Success, timer configurations are set properly\n -* + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Counter direction parameter has invalid value. + * - \ref SL_STATUS_OK (0x0000) - Success, timer configurations are set properly\n *******************************************************************************/ sl_status_t sl_si91x_config_timer_set_configuration(sl_config_timer_config_t *timer_config_ptr); /***************************************************************************/ /** -* Reset config-timer parameters and sets default parameter values. -* Sets 16-bit mode, sets up-counter direction -* Disables periodic mode, soft reset, buffer, sync & software trigger of counters. +* @brief This API will reset config-timer parameters and sets default parameter values. +* @details This sets 16-bit mode, up-counter direction +* Disables periodic mode, soft reset, buffer, sync and software trigger of counters. * -* @param[in] none -* @return none +* @param none +* @return none *******************************************************************************/ void sl_si91x_config_timer_reset_configuration(void); /***************************************************************************/ /** - * Set Config-timer OCU configurations. - * It enables outputs in OCU mode, OCU-DMA mode, + * @brief This API will set Config-timer OCU (Output Compare Unit) configurations. + * @details It enables outputs in OCU mode, OCU-DMA mode, * channel sync with OCU outputs, 8-bit mode for OCU outputs for both counters. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_config_timer_init(); -*- - * \ref sl_si91x_config_timer_set_configuration(); -* - * + * - \ref sl_si91x_config_timer_set_configuration(); * @param[in] ocu_config_ptr Pointer to CT OCU-config structure \ref sl_config_timer_ocu_config_t - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer. -*- - * \ref SL_STATUS_OK (0x0000) - Success, OCU configurations are set properly.\n -* -*******************************************************************************/ + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer. + * - \ref SL_STATUS_OK (0x0000) - Success, OCU configurations are set properly.\n + ******************************************************************************/ sl_status_t sl_si91x_config_timer_set_ocu_configuration(sl_config_timer_ocu_config_t *ocu_config_ptr); /***************************************************************************/ /** -* Reset config-timer OCU parameters -* Sets 16-bit mode, sets up-counter direction -* Disables DMA mode, channel sync and 8-bit mode for OCU outputs. +* @brief This API will reset config-timer OCU (Output Compare Unit) parameters. +* @details this will set 16-bit mode, sets up-counter direction also disables DMA mode, +* channel sync and 8-bit mode for OCU outputs. * -* @param[in] none -* @return none +* @param none +* @return none *******************************************************************************/ void sl_si91x_config_timer_reset_ocu_configuration(void); /***************************************************************************/ /** - * Set Config-timer OCU mode control params - * Sets first and next threshold values for counter outputs. - * Enable DMA support for counters. + * @brief This API will set Config-timer OCU mode control params. + * @details This Config-timer OCU mode control params Sets first and next threshold + * values for counter outputs. It also enables the DMA support for counters. * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); -*- - * \ref sl_si91x_config_timer_set_ocu_configuration(); + * - \ref sl_si91x_config_timer_set_ocu_configuration(); * * @param[in] ocu_config_ptr Pointer to CT OCU-config structure \ref sl_config_timer_ocu_control_t - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer. -*- - * \ref SL_STATUS_OK (0x0000) - Success, OCU mode control params are set properly.\n + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer. + * - \ref SL_STATUS_OK (0x0000) - Success, OCU mode control params are set properly. * *******************************************************************************/ sl_status_t sl_si91x_config_timer_set_ocu_control(sl_config_timer_ocu_control_t *ocu_params); /***************************************************************************/ /** - * Set Config-timer WFG mode configurations + * @brief This API will set the Config-timer WFG mode configurations. + * @details This API will configures the Config-timer WFG mode configurations * Such as select toggle high, low and peak for counter-0 & counter-1 outputs. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_config_timer_init(); -* * * @param[in] wfg_config_ptr Pointer to CT wfg-config structure \ref sl_config_timer_wfg_config_t - * * @return status 0 if successful, else error-code as follow * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer. -*- - * \ref SL_STATUS_OK (0x0000) - Success, WFG mode configurations are set properly.\n -* + * \ref SL_STATUS_OK (0x0000) - Success, WFG mode configurations are set properly. + * *******************************************************************************/ sl_status_t sl_si91x_config_timer_set_wfg_configuration(sl_config_timer_wfg_config_t *wfg_config_ptr); /***************************************************************************/ /** - * Set Config-timer initial count as per timer mode. - * For 32-bit mode, counter0_initial_value is passes to count value register - * For 32-bit mode pass counter1 initial-value as zero - * For 16-bit mode counters, ored value of both initial value is passed to the register + * @brief This API will set Config-timer initial count as per timer mode. + * @details Configurable timer mode are mentioned below: + * - For 32-bit mode, counter0_initial_value is passes to CT count register. + * For 32-bit mode pass counter1 initial-value as zero. + * - For 16-bit mode counters, ORed value of both initial value is passed to the register. * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); -*- - * \ref l_si91x_config_timer_set_configuration(); -* + * - \ref sl_si91x_config_timer_set_configuration(); * * @param[in] mode \ref sl_config_timer_mode_t for possible values * @param[in] counter0_initial_value (uint16_t) * @param[in] counter1_initial_value (uint16_t) - * * @return status 0 if successful, else error-code as follow * \ref SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid. -*- * \ref SL_STATUS_OK (0x0000) - Success, initial-count is set properly -* *******************************************************************************/ sl_status_t sl_si91x_config_timer_set_initial_count(sl_config_timer_mode_t mode, uint32_t counter0_initial_value, uint32_t counter1_initial_value); /***************************************************************************/ /** - * Set Config-timer match-count as per timer mode and counter-number. - * If mode is 32-bit, use counter0 + * @brief This API will set the Config-timer match-count as per timer mode and counter-number. + * @details If mode is 32-bit, use counter0 * If mode is 16-bit as per passed counter number it updates the match value * For 16-bit mode it takes 16-bit match-value only, else through error - * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); -*- - * \ref l_si91x_config_timer_set_configuration(); -* - * + * - \ref l_si91x_config_timer_set_configuration(); * @param[in] counter_number \ref sl_counter_number_t for possible values * @param[in] mode \ref sl_config_timer_mode_t for possible values * @param[in] match_value (uint32_t) - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid. -*- - * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. -*- - * \ref SL_STATUS_OK (0x0000) - Success, match-value is set properly -* + * - \ref SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid. + * - \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. + * - \ref SL_STATUS_OK (0x0000) - Success, match-value is set properly. *******************************************************************************/ sl_status_t sl_si91x_config_timer_set_match_count(sl_config_timer_mode_t mode, sl_counter_number_t counter_number, uint32_t match_value); /***************************************************************************/ /** - * Get Config-timer current count as per timer mode and counter-number. - * Updates the count value to count_value variable input parameter. + * @brief This API will get Config-timer current count. + * @details This API will get Config-timer current count as per timer mode and counter-number + * and it updates the count value to count_value variable input parameter. * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); -*- - * \ref l_si91x_config_timer_set_configuration(); -* + * - \ref l_si91x_config_timer_set_configuration(); * * @param[in] counter_number \ref sl_counter_number_t for possible values * @param[in] mode \ref sl_config_timer_mode_t for possible values * @param[in] count_value *(uint32_t), pointer to the variable to store count value * - * @return status 0 if successful, else errorcode + * @return status 0 if successful, else error code * \ref SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid. *- * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. @@ -507,152 +470,122 @@ sl_status_t sl_si91x_config_timer_get_count(sl_config_timer_mode_t mode, uint32_t *count_value); /***************************************************************************/ /** - * Resets Config-timer counter register value. - * Resets the Count values of selected counter. + * @brief This API will reset Config-timer counter register value. + * @note Resets the Count values of selected counter. * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); -*- - * \ref l_si91x_config_timer_set_configuration(); -* + *- \ref l_si91x_config_timer_set_configuration(); * * @param[in] counter_number \ref sl_counter_number_t for possible values - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. -*- - * \ref SL_STATUS_OK (0x0000) - Success, counter resets properly\n -* + * - \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. + * - \ref SL_STATUS_OK (0x0000) - Success, counter resets properly\n + * *******************************************************************************/ sl_status_t sl_si91x_config_timer_reset_counter(sl_counter_number_t counter_number); /***************************************************************************/ /** - * Starts selected config-timer counter. - * Starts the counter by enabling counter trigger + * @brief This API will start selected config-timer counter. + * @note This API triggers the 'counter_number' counter. * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); -*- - * \ref l_si91x_config_timer_set_configuration(),keep software trigger disable here -* + * - \ref l_si91x_config_timer_set_configuration(),keep software trigger disable here * * @param[in] counter_number \ref sl_counter_number_t for possible values - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. -*- - * \ref SL_STATUS_OK (0x0000) - Success, timer started properly\n -* + * - \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. + * - \ref SL_STATUS_OK (0x0000) - Success, timer started properly\n *******************************************************************************/ sl_status_t sl_si91x_config_timer_start_on_software_trigger(sl_counter_number_t counter_number); /***************************************************************************/ /** - * Selects config timer input events for triggering selected timer-actions. + * @brief This API will select config timer input events. + * @details This will select config timer input events for triggering selected timer-actions. * Different timer actions are start, stop, continue, halt, increment, capture, * interrupt and output. - * * @pre Pre-conditions: - * - \ref sl_si91x_config_timer_init(); -*- - * \ref sl_si91x_config_timer_set_configuration(), keep software trigger disable here -*- - * \ref sl_si91x_config_timer_register_callback(), keep event interrupt flag enable for + * - \ref sl_si91x_config_timer_init(); + * - \ref sl_si91x_config_timer_set_configuration(), keep software trigger disable here + * - \ref sl_si91x_config_timer_register_callback(), keep event interrupt flag enable for * respective counter - * * @param[in] action \ref sl_config_timer_action_t for possible values * @param[in] select_event_counter0 \ref sl_config_timer_event_t for possible values, * (selects input event for triggering counter-0 action ) * @param[in] select_event_counter1 \ref sl_config_timer_event_t for possible values, * (selects input event for triggering counter-1 action ) - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - Selected input event or action parameter value is invalid. -*- - * \ref SL_STATUS_OK (0x0000) - Success, input event is set properly\n -* + * - \ref SL_STATUS_INVALID_PARAMETER 0x0021) - Selected input event or action parameter value is invalid. + * - \ref SL_STATUS_OK (0x0000) - Success, input event is set properly\n *******************************************************************************/ sl_status_t sl_si91x_config_timer_select_action_event(sl_config_timer_action_t action, sl_config_timer_event_t select_event_counter0, sl_config_timer_event_t select_event_counter1); /***************************************************************************/ /** - * Configure config timer input-event's AND-event and OR-event for triggering + * @brief This API will configure config-timer. + * @details This configures config timer input-event's AND-event and OR-event for triggering * selected timer-action. * Different timer actions are start, stop, continue, halt, increment, capture, * interrupt and output. - * - * @pre Pre-conditions: - * - \ref sl_si91x_config_timer_init(); -*- - * \ref sl_si91x_config_timer_set_configuration(), keep software trigger disable here - * \ref sl_si91x_config_timer_register_callback(), keep event interrupt flag enable for - * respective counter - * \ref sl_si91x_config_timer_select_action_event(), first selects the input event for - * respective action for respective counter - * + * @pre Pre-condition: + * - \ref sl_si91x_config_timer_init(); + * - \ref sl_si91x_config_timer_set_configuration(), keep software trigger disable here + * - \ref sl_si91x_config_timer_register_callback(), keep event interrupt flag enable for + * respective counter + * - \ref sl_si91x_config_timer_select_action_event(), first selects the input event for + * respective action for respective counter * @param[in] event_config_handle Pointer to CT configure action events structure * \ref sl_config_action_event_t - * * @return status 0 if successful, else error-code as follow * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer. -*- * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - and-event or or-event or * event-valid-bits value is invalid. -*- * \ref SL_STATUS_OK (0x0000) - Success, AND event & OR event set properly\n -* *******************************************************************************/ sl_status_t sl_si91x_config_timer_configure_action_event(sl_config_action_event_t *event_config_handle); /***************************************************************************/ /** - * Register callback of config timer interrupts. - * Enabling respective interrupts as per selected interrupt flag. + * @brief This API will register callback of config timer interrupts. + * @details Enabling respective interrupts as per selected interrupt flag. * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); -*- - * \ref sl_si91x_config_timer_set_configuration(), keep software trigger disable here - * \ref sl_si91x_config_timer_unregister_timeout_callback(), if already registered for any interrupt - * + * - \ref sl_si91x_config_timer_set_configuration(), keep software trigger disable here + * - \ref sl_si91x_config_timer_unregister_timeout_callback(), if already registered for any interrupt * * @param[in] on_config_timer_callback (function pointer) Callback function pointer * to be called when timer interrupt occurred \ref sl_config_timer_callback_t * @param[in] callback_flag (void *) pointer to interrupt flag value variable \ref sl_config_timer_callback_t * @param[in] interrupt_flags pointer to interrupt flags structure \ref sl_config_timer_interrupt_flags_t - * * @return status 0 if successful, else error-code as follow - * SL_STATUS_NULL_POINTER (0x0022) - parameter is a null pointer. -*- - * SL_STATUS_BUSY (0x0004) - The callback is already registered, unregister + * - SL_STATUS_NULL_POINTER (0x0022) - parameter is a null pointer. + * - SL_STATUS_BUSY (0x0004) - The callback is already registered, unregister * previous callback before registering new one. -*- - * SL_STATUS_OK (0x0000) - Successfully registered timer timer-out callback. -* -*******************************************************************************/ + * - SL_STATUS_OK (0x0000) - Successfully registered timer timer-out callback. + * + *******************************************************************************/ sl_status_t sl_si91x_config_timer_register_callback(sl_config_timer_callback_t on_config_timer_callback, void *callback_flag_value, sl_config_timer_interrupt_flags_t *interrupt_flags); /***************************************************************************/ /** -* Unregisters timer interrupt callback -* Disables interrupts as per selected interrupt flag. +* @brief This API will unregister timer interrupt callback. +* @details Disables interrupts as per selected interrupt flag. * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_register_callback(), first register particular interrupt flag -* * @param[in] interrupt_flags pointer to interrupt flags structure \ref sl_config_timer_interrupt_flags_t -* * @return status 0 if successful, else error-code as follow * SL_STATUS_NULL_POINTER (0x0022) - parameter is a null pointer. -*- * SL_STATUS_OK (0x0000) - Successfully unregistered timer interrupt callback. -* *******************************************************************************/ sl_status_t sl_si91x_config_timer_unregister_callback(sl_config_timer_interrupt_flags_t *interrupt_flags); /***************************************************************************/ /** - * Resume halt operation of Config-timer counter. - * Counter will start running from the count where it was halted previously. + * @brief This API will Resume halt operation of Config-timer counter. + * @details Counter will start running from the count where it was halted previously. * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); @@ -661,77 +594,61 @@ sl_status_t sl_si91x_config_timer_unregister_callback(sl_config_timer_interrupt_ * * * @param[in] counter_number \ref sl_counter_number_t for possible values - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. -*- - * \ref SL_STATUS_OK (0x0000) - Success, halt operation resumed properly\n + * - \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. + * - \ref SL_STATUS_OK (0x0000) - Success, halt operation resumed properly\n * *******************************************************************************/ sl_status_t sl_si91x_config_timer_resume_halt_event(sl_counter_number_t counter_number); /***************************************************************************/ /** - * Gets Config-timer count value when capture occurs - * Updates the capture count value of timer to capture_value variable input parameter. + * @brief This API Gets Config-timer count value when capture occurs. + * @details Updates the capture count value of timer to capture_value variable input parameter. * * @pre Pre-conditions: - * - \ref sl_si91x_config_timer_init(); -*- - * \ref l_si91x_config_timer_set_configuration(); -*- - * \ref sl_si91x_config_timer_select_action_event(), first select events for capture action - * + * - \ref sl_si91x_config_timer_init(); + * - \ref l_si91x_config_timer_set_configuration(); + * - \ref sl_si91x_config_timer_select_action_event(), first select events for capture action * @param[in] counter_number \ref sl_counter_number_t for possible values * @param[in] capture_value (uint16_t*), pointer to the variable to store count * value at capture event. - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter 'capture_value' is null pointer. -*- - * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. -*- - * \ref SL_STATUS_OK (0x0000) - Success, capture count-value is read properly\n -* + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter 'capture_value' is null pointer. + * - \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. + * - \ref SL_STATUS_OK (0x0000) - Success, capture count-value is read properly\n *******************************************************************************/ sl_status_t sl_si91x_config_timer_read_capture(sl_counter_number_t counter_number, uint16_t *capture_value); /***************************************************************************/ /** - * Sync counter output with other channels, as per sync_counter_value. + * @brief This API will synchronize counter output with other channels, as per sync_counter_value. * * @pre Pre-conditions: - * - \ref sl_si91x_config_timer_init(); -*- - * \ref l_si91x_config_timer_set_configuration(); -* + * - \ref sl_si91x_config_timer_init(); + * - \ref l_si91x_config_timer_set_configuration(); * * @param[in] counter_number \ref sl_counter_number_t for possible values * @param[in] sync_counter (uint8_t) - * * @return status 0 if successful, else error-code as follow * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid. -*- * \ref SL_STATUS_OK (0x0000) - Success, counter output synced properly\n -* + * *******************************************************************************/ sl_status_t sl_si91x_config_timer_set_counter_sync(sl_counter_number_t counter_number, uint8_t sync_counter_value); /***************************************************************************/ /** - * This API is used to configure config timer output events for ADC trigger - * Configures input events for counter0 and counter1 outputs to trigger ADC - * + * @brief This API is used to configure config timer output events for ADC trigger. + * @details Configures events for counter0 and counter1 outputs to trigger ADC. + * * @pre Pre-conditions: * - \ref sl_si91x_config_timer_init(); -*- * \ref l_si91x_config_timer_set_configuration(); -* + * * * @param[in] pin1 Counter0 output event for ADC trigger (0 to 31) \ref sl_config_timer_event_t * @param[in] pin2 Counter1 output event for ADC trigger (0 to 31) \ref sl_config_timer_event_t - * * @return status 0 if successful, else error-code as follow - * \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'pin_1' or 'pin_2' parameter value is invalid.\n -*- - * \ref SL_STATUS_OK (0x0000) - Success, ADC trigger events set properly\n + * - \ref SL_STATUS_INVALID_PARAMETER 0x0021) - 'pin_1' or 'pin_2' parameter value is invalid.\n + * - \ref SL_STATUS_OK (0x0000) - Success, ADC trigger events set properly\n * *******************************************************************************/ sl_status_t sl_si91x_config_timer_set_output_adc_pin(uint8_t pin1, uint8_t pin2); @@ -741,24 +658,72 @@ sl_status_t sl_si91x_config_timer_set_wfg_compare_values(sl_counter_number_t cou sl_config_timer_ocu_params_t *ocu_params); /***************************************************************************/ /** -* De-initialize config-timer by disabling its clock. -* @param[in] none -* @return none +* @brief This API de-initialize config-timer by disabling its clock. +* @param none +* @return none * @note Unregisters the callback and disables all config timer interrupts. *******************************************************************************/ void sl_si91x_config_timer_deinit(void); /***************************************************************************/ /** - * Gets Config timer version - * It returns API version of Config timer + * @brief This API will get Config timer API version and it returns the same. * - * @param[in] none + * @param none * @return (sl_config_version_t) type structure ******************************************************************************/ sl_config_timer_version_t sl_si91x_config_timer_get_version(void); /** @} (end addtogroup Config-timer) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY! *********************** +/// @addtogroup CONFIG-TIMER Config Timer +/// @{ +/// +/// @details +/// +/// +/// @n @section CONFIG-TIMER_Intro Introduction +/// +/// Configurable timers can be used for modulated signal output, event capture on +/// the GPIOs in input mode, and clock and event counting. +/// They can be configured to operate in the Pulse Width Modulation (PWM) mode, +/// which drives a pulse width modulated wave on the outputs in accordance with +/// the ON and OFF periods that are programmed. +/// +/// Timers are often built-in peripherals found in micro-controllers and microprocessors. +/// They function independently of the CPU and other peripherals, allowing them to maintain +/// track of time and conduct timing-related tasks without requiring CPU intervention. +/// +/// +/// @n @section CONFIG-TIMER_Config Configuration +/// +/// Few parameters need to be defined in order to configure the config-timer. +/// These include the timer mode, counter direction, counter buffer, soft reset trigger, +/// counter trigger, and counter sync trigger. +/// +/// @li To Configures Config-timer parameters such as 32-bit or 16-bit mode @ref sl_config_timer_mode_t, +/// periodic mode (Enable/Disable), Counter trigger (Enable/Disable), +/// soft reset (Enable/Disable), buffer enable (Enable/Disable), +/// sets direction for counter0 @ref sl_counter0_direction_t and counter1 @ref sl_counter1_direction_t after making the +/// required configuration in @ref sl_config_timer_config_t need to call the API @ref sl_si91x_config_timer_set_configuration(). +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section CONFIG-TIMER_Use Usage +/// +/// After specifying the CT Structures, the common configurable Timer (CT) functions can be called by giving an instance of @ref sl_config_timer_config_t. +/// These routines will start and configure the CT below, which is the pipeline for implementation. +/// +/// 1. @ref sl_si91x_config_timer_init +/// 2. @ref sl_si91x_config_timer_set_configuration +/// 3. @ref sl_si91x_config_timer_set_initial_count (Optional) +/// 4. @ref sl_si91x_config_timer_set_match_count +/// 5. @ref sl_si91x_config_timer_register_callback +/// 6. @ref sl_si91x_config_timer_start_on_software_trigger +/// 7. @ref sl_si91x_config_timer_deinit +/// +/// @} end group CONFIG-TIMER ********************************************************/ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_dac.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_dac.h index c873c9c75..11428b578 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_dac.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_dac.h @@ -117,52 +117,55 @@ typedef struct { // ----------------------------------------------------------------------------- // Prototypes /***************************************************************************/ /** - * Initialize the DAC. - * This API will power_ON to DAC peripheral and set the clock for DAC controller. - * - The DAC clock configurations are listed below: - * - soc_pll_clock (Frequency range from 1 MHZ to 180 MHz) - * - soc_pll_reference_clock (Frequency range from 15MHZ to 65 MHz) - * - division_factor (0 to 63). - * Default value is recommended for DAC clock configurations. + * @brief Initializes the DAC(Digital to Analog Converter). + * @details This API will enable on the DAC peripheral as well as set the clock for the DAC controller. + * - The DAC clock configurations are mentioned as follows: + * - soc_pll_clock (Frequency range: 1 MHz to 180 MHz), + * - soc_pll_reference_clock (Frequency range: 15 MHz to 65 MHz) and  + * - division_factor (0–63). * * @param[in] dac_clock clock structure variables ( \ref sl_dac_clock_config_t) * - * @return Status 0 if successful, else error code: - * - SL_STATUS_OK (0x0000) - Success - * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid - * - SL_STATUS_FAIL (0x0001) - The function failed - * - SL_STATUS_NOT_INITIALIZED (0x0011) - Clock is not initialized + * @return Status 0 if successful, else below are the error codes: + * - SL_STATUS_OK (0x0000) - Success + * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - SL_STATUS_FAIL (0x0001) - The function failed + * - SL_STATUS_NOT_INITIALIZED (0x0011) - Clock is not initialized + * + * @note Default value is recommended for DAC clock configurations. ******************************************************************************/ sl_status_t sl_si91x_dac_init(sl_dac_clock_config_t *dac_clock); /***************************************************************************/ /** - * Configure DAC control parameters. - * - The configurations are listed below: + * @brief Configure DAC control parameters + * @details The configurations are listed below: * - Operation mode (Static/FIFO/Reference voltage for ADC) - * - Sample rate (16sps to 5 Msps) - * - DAC FIFO Threshold value(0 to 7). - * - * @pre Pre-conditions: + * - Sample rate (63 sps to 5 Msps) + * - DAC FIFO Threshold value(0 to 7) + * - ADC Channel(0 to 15) + * @pre Pre-condition: * - \ref sl_si91x_dac_init - * * @param[in] dac_config DAC configuration structure variable ( \ref sl_dac_config_t) - * @param[in] vref_value Reference voltage. + * @param[in] vref_value Reference voltage in the range of 1.8 to 3.6v. * @return Status 0 if successful, else error code: * - SL_STATUS_OK (0x0000) - Success * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid * - SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range + * @note In DAC If "Reference voltage for ADC" is the operation mode, choose ADC Channel. ******************************************************************************/ sl_status_t sl_si91x_dac_set_configuration(sl_dac_config_t dac_config, float vref_value); /***************************************************************************/ /** - * Write digital input samples to DAC. This API will write digital sample to both - * dynamic and static mode of DAC. For static mode sample length is '1'. - * - * @pre Pre-conditions: + * @brief Writes digital input samples to DAC and also writes the digital sample to both + * dynamic and static mode of DAC. + * @details If Static mode is enabled data written to the DR will not be written to the FIFO + * It will be played on DAC directly. Only single sample can be held at a time. + * If FIFO mode enabled. Data written to the DR is written to the FIFO in this mode. + * @note For static mode sample length is '1'. + * @pre Pre-condition: * - \ref sl_si91x_dac_init * - \ref sl_si91x_dac_set_configuration - * * @param[in] data Input samples buffer pointer. * @param[in] length Number of samples to play in DAC * @return Status 0 if successful, else error code: @@ -173,29 +176,26 @@ sl_status_t sl_si91x_dac_set_configuration(sl_dac_config_t dac_config, float vre sl_status_t sl_si91x_dac_write_data(int16_t *data, uint16_t length); /***************************************************************************/ /** - * Read DAC analog output data. Reads the analog output data of the DAC - * in dynamic and static mode, returning the last data played on DAC. - * + * @brief Read DAC analog output data. + * @details Reads the analog output data of the DAC from data register for dynamic + * and static mode, returning the last data played on DAC. * @pre Pre-conditions: * - \ref sl_si91x_dac_init * - \ref sl_si91x_dac_set_configuration * - \ref sl_si91x_dac_write_data * - \ref sl_si91x_dac_start - * * @param[out] dac_output_data DAC data will be read from DR and store in dac_output_data variable. * @return Status 0 for successful execution (SL_STATUS_OK) ******************************************************************************/ sl_status_t sl_si91x_dac_read_data(uint16_t *dac_output_data); /***************************************************************************/ /** - * Get the DAC sample clock. - * This API will return the DAC sample clock. - * + * @brief Get the DAC sample clock. + * @details This API will read the configured clock and return the achieved sample clock. * @pre Pre-conditions: * - \ref sl_si91x_dac_init * - \ref sl_si91x_dac_set_configuration - * - * @param[in] sample_rate Sample rate to sample input data per sec. + * @param[in] sample_rate Sample rate to sample input data per sec in the range of (63- 5000000). * @param[out] sample_clock Sample frequency value will return in this variable. * @return Status 0 if successful, else error code: * - SL_STATUS_OK (0x0000) - Success @@ -204,32 +204,27 @@ sl_status_t sl_si91x_dac_read_data(uint16_t *dac_output_data); sl_status_t sl_si91x_dac_get_achieved_sample_clock(uint32_t sample_rate, uint32_t *sample_clock); /***************************************************************************/ /** - * Rewrite the DAC sample data. Rewrites the input sample data in DAC FIFO operating mode. - * The rewrite is only applicable for FIFO mode, it will rewrite the - * sample data in DAC continuously. - * + * @brief Rewrite the DAC sample data. Rewrites the input sample data in DAC FIFO operating mode, + * it will rewrite the sample data in DAC continuously. * @pre Pre-conditions: * - \ref sl_si91x_dac_init * - \ref sl_si91x_dac_set_configuration * - \ref sl_si91x_dac_write_data * - \ref sl_si91x_dac_start - * * @param[in] data Input samples buffer pointer. - * @param[in] length Number of samples to play in DAC. + * @param[in] length Number of samples to play in DAC in the range of (1- 1024). * @return Status 0 if successful, else error code: * - SL_STATUS_OK (0x0000) - Success * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range + * - SL_STATUS_INVALID_RANGE (0x0028) - Mismatch + * @note The rewrite is only applicable for FIFO mode. ******************************************************************************/ sl_status_t sl_si91x_dac_rewrite_data(int16_t *data, uint16_t length); /***************************************************************************/ /** - * Register the user callback function. - * At the time of events, the function passed in the parameter is called with the respective + * @brief Register the user callback function. + * @details At the time of events, the function passed in the parameter is called with the respective * event as the parameter. - * Before calling this function again, it is mandatory to call the \ref sl_si91x_dac_unregister_event_callback - * function to unregister the callback, otherwise it returns SL_STATUS_BUSY error code. - * * @pre Pre-conditions: * - \ref sl_si91x_dac_init * - \ref sl_si91x_dac_set_configuration @@ -240,72 +235,122 @@ sl_status_t sl_si91x_dac_rewrite_data(int16_t *data, uint16_t length); * - SL_STATUS_OK (0x0000) - Success * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer * - SL_STATUS_BUSY (0x0004) - Driver is busy + * @note Before calling this function again, it is mandatory to call the \ref sl_si91x_dac_unregister_event_callback + * function to unregister the callback, otherwise it returns SL_STATUS_BUSY error code. ******************************************************************************/ sl_status_t sl_si91x_dac_register_event_callback(sl_dac_callback_t callback_event); /***************************************************************************/ /** - * Unregister the user callback function. - * It is mandatory to call this function before registering the callback again. - * + * @brief Unregister the user callback function. + * @note It is mandatory to call this function before registering the callback again. * @pre Pre-condition: * - \ref sl_si91x_dac_register_event_callback - * * @param[in] none * @return Status 0 for successful execution (SL_STATUS_OK) ******************************************************************************/ sl_status_t sl_si91x_dac_unregister_event_callback(void); /***************************************************************************/ /** - * Start the DAC operation. It will enable signal to DAC, enable path to + * @brief Start the DAC operation. It will enable signal to DAC, enable path to * DAC controller, enable the DAC FIFO config and enable dynamic. - * * @pre Pre-conditions: * - \ref sl_si91x_dac_init * - \ref sl_si91x_dac_set_configuration * - \ref sl_si91x_dac_register_event_callback * - \ref sl_si91x_dac_write_data - * * @return Status 0 for successful execution (SL_STATUS_OK) ******************************************************************************/ sl_status_t sl_si91x_dac_start(void); /***************************************************************************/ /** - * Stop the DAC operation. It will stop signal to DAC, disconnect path to + * @brief Stop the DAC operation. It will stop signal to DAC, disconnect path to * DAC controller and disable the DAC FIFO config. - * * @pre Pre-conditions: * - \ref sl_si91x_dac_init * - \ref sl_si91x_dac_set_configuration * - \ref sl_si91x_dac_register_event_callback * - \ref sl_si91x_dac_write_data * - \ref sl_si91x_dac_start - * * @return Status 0 for successful execution (SL_STATUS_OK) ******************************************************************************/ sl_status_t sl_si91x_dac_stop(void); /***************************************************************************/ /** - * De-initialize the DAC. It will shutdown/power_off the power of DAC. - * + * @brief De-initialize the DAC. It will shutdown/power_off the power of DAC. * @pre Pre-condition: * - \ref sl_si91x_dac_init - * * @return Status 0 for successful execution (SL_STATUS_OK) ******************************************************************************/ sl_status_t sl_si91x_dac_deinit(void); /***************************************************************************/ /** - * Get the DAC version. Returns the release, SQA, and dev versions of the DAC. + * @brief Get the DAC version. Returns the release, SQA, and dev versions of the DAC. * * @param[in] none - * @return (sl_dac_version_t) type structure + * + * @return (sl_dac_version_t) type structure ******************************************************************************/ sl_dac_version_t sl_si91x_dac_get_version(void); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup DAC +/// @{ +/// @details +/// @n @section DAC_Intro Introduction +/// +/// +/// DAC stands for Digital-to-Analog Converter. +/// An analog signal, such as voltage or current, is transformed from digital signals, +/// which are generally represented by binary digits, using a digital-to-analog converter (DAC). +/// A DAC's objective is to generate a continuous, accurate analog output signal that matches +/// the digital data entered. The number of unique analog output levels that +/// a DAC can generate is known as its resolution, and it is based on the number of bits in the digital input. +/// +/// @li An 10-bit DAC, for instance, can provide 2 ^ 10 (1024) different output levels. +/// Finer granularity and superior analog signal representation are offered by higher resolution DACs. +/// +/// @li Digital-to-Analog Converter (DACs) are integral components in controllers across various applications. +/// +/// @li Here are some common use cases: +/// +/// +/// 1. Audio Systems +/// +/// 2. Telecommunications +/// +/// 3. Control Systems +/// +/// 4. Signal Processing etc., +/// +/// @n @section DAC_Config Configuration +/// +/// @li Configuring a Digital-to-Analog Converter (DAC) normally entails various parameters and +/// settings to enable appropriate operation and precise conversion of digital signals to analog signals. +/// +/// @li As part of DAC configuration, available parameters include mode of operation by configuring +/// @ref sl_dac_operation_mode_t, DAC sampling rate in the range of (63-5000000 samples per second), +/// FIFO threshold in the range of (0-7), and if mode of operation is **Reference voltage for ADC**, +/// then the channel @ref sl_channel_id_for_adc_t must be set. All of this can be configured through +/// @ref sl_dac_config_t, and then call the API @ref sl_si91x_dac_set_configuration(). +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section DAC_Use Usage +/// +/// The common DAC functions can be used after the DAC Structures are specified, passing an instance of @ref sl_dac_config_t. +/// These functions will initiate and configure the DAC below, which is the flow for implementation. +/// +/// 1. @ref sl_si91x_dac_init +/// 2. @ref sl_si91x_dac_set_configuration +/// 3. @ref sl_si91x_dac_register_event_callback +/// 4. @ref sl_si91x_dac_write_data +/// 5. @ref sl_si91x_dac_start +/// 6. @ref sl_si91x_dac_rewrite_data (For FIFO mode of DAC operation) +/// 7. @ref sl_si91x_dac_deinit +/// /** @} (end addtogroup DAC) */ #ifdef __cplusplus } #endif - #endif /* SL_SI91X_DAC_H_ */ diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_dma.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_dma.h index a5aac161e..d61c1189c 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_dma.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_dma.h @@ -47,16 +47,16 @@ extern "C" { // ----------------------------------------------------------------------------- // Macros #define SL_STATUS_DMA_CHANNEL_ALLOCATED \ - (sl_status_t)0x45 //// Status code indicates that DMA channel already allocated for another transfer + (sl_status_t)0x45 //// Status code indicates that the DMA channel already allocated for another transfer #define SL_STATUS_DMA_NO_CHANNEL_AVAILABLE \ (sl_status_t)0x46 //// Status code indicates that no DMA channel is available for allocation #define SL_STATUS_DMA_CHANNEL_ALREADY_UNALLOCATED \ - (sl_status_t)0X47 //// Status code indicates that DMA channel is already unallocated + (sl_status_t)0X47 //// Status code indicates that the DMA channel is already unallocated #define SL_STATUS_DMA_CHANNEL_UNALLOCATED \ (sl_status_t)0X48 //// Status code indicates that channel is not allocated for DMA transfer #define SL_CHANNEL_COUNT 32 //// DMA channel count -#define ALTERNATE_DESCRIPTOR_DISABLE 0 // DMA doesn't use alternate descriptor +#define ALTERNATE_DESCRIPTOR_DISABLE 0 // DMA doesn't use the alternate descriptor #define ALTERNATE_DESCRIPTOR_ENABLE 1 // DMA use alternate descriptor #define BURST_REQUEST_ENABLE 1 // DMA burst request enable #define BURST_REQUEST_DISABLE 0 // DMA burst request disable @@ -81,7 +81,7 @@ extern "C" { */ /***************************************************************************/ /** - * Typedef for user supplied callback function which is called when a DMA transfer completes + * Typedef for user-supplied callback function which is called when a DMA transfer completes * * @param[in] channel_no DMA channel number * @param[in] *data An extra parameter for user application @@ -90,7 +90,7 @@ extern "C" { typedef void (*sl_dma_transfer_complete)(uint32_t channel, void *data); /***************************************************************************/ /** - * Typedef for user supplied callback function which is called when a DMA error occurs + * Typedef for user-supplied callback function which is called when a DMA error occurs * * @param[in] channel_no DMA channel number * @param[in] *data An extra parameter for user application @@ -191,180 +191,159 @@ extern sl_channel_data_t sl_channel_allocation_data_t[2][SL_CHANNEL_COUNT]; ///< */ /***************************************************************************/ /** - * This function initializes the DMA peripheral by enabling DMA clock and clearing DMA interrupts. - * Configure dma_init->dma_number to 0 for initializing UDMA0 and 1 for initializing UDMA1 - * - * @pre Pre-conditions: - * - \ref none -* - * @param[in] *dma_init dma initialization structure, + * @brief This API initializes the DMA peripheral. + * @details This API enables DMA clock and clears DMA interrupts. Configure + * dma_init->dma_number to 0 for initializing UDMA0 and 1 for initializing UDMA1 + * @pre Pre-condition: + * - \ref none + * @param[in] *dma_init DMA initialization structure, * dma_init->dma_number - 0->UDMA0, 1->UDMA1 * @return Initialization status - SL_STATUS_OK - Initialization success - SL_STATUS_NOT_INITIALIZED - Initialization fail - + * - SL_STATUS_OK - Initialization success + * - SL_STATUS_NOT_INITIALIZED - Initialization fail ******************************************************************************/ sl_status_t sl_si91x_dma_init(sl_dma_init_t *dma_init); /***************************************************************************/ /** - * This function deinitializes the DMA module by disabling peripheral clock and interrupts. + * @brief This function de-initializes the DMA peripheral. + * @details This API disables the DMA peripheral clock and interrupts. * DMA will be deinitialized only if there is no ongoing transfer. - * - * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -* + * @pre Pre-condition: + * - \ref sl_si91x_dma_init * @param[in] dma_number 0->UDMA0, 1->UDMA1 * @return deinitialization status - SL_STATUS_OK - Deinit success - SL_STATUS_BUSY - Cannot deinit the peripheral due to an ongoing transfer - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized - + * - SL_STATUS_OK - Deinit success + * - SL_STATUS_BUSY - Cannot deinit the peripheral due to an ongoing transfer + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized ******************************************************************************/ sl_status_t sl_si91x_dma_deinit(uint32_t dma_number); /***************************************************************************/ /** - * This function checks the available DMA channel and allocates the channel. This function also sets the priority of allocated channel - * and assigns the channel number to *channel_no variable. If no channel is available, it will return SL_DMA_NO_CHANNEL_AVAILABLE. - * Note: Users can also initialize the desired channel number and this API checks whether desired channel is available and allocates the + * @brief This API allocates DMA channel for the transfer + * @details This API checks the available DMA channel and allocates the channel. This function also sets the priority of the allocated channel + * and assigns the channel number to the *channel_no variable. If no channel is available, it will return SL_DMA_NO_CHANNEL_AVAILABLE. + * Note: Users can also initialize the desired channel number and this API checks whether the desired channel is available and allocates the * channel if available. If users want the driver to allocate the available channel, channel_no should be initialized to 0. - * - * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -* + * @pre Pre-condition: + * - \ref sl_si91x_dma_init * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] *channel_no 0 -> Automatically allocates available channel for DMA transfer (1-32) -> Allocates given channel for UDMA0 transfer (1-12) -> Allocates given channel for UDMA1 transfer * @param[in] priority 0 -> low priority 1 -> high priority - * @return channel allocation status - SL_STATUS_OK - Channel allocated - SL_STATUS_DMA_NO_CHANNEL_AVAILABLE - All DMA channels are allocated - SL_STATUS_DMA_CHANNEL_ALLOCATED - Desired channel is already allocated - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized - SL_STATUS_INVALID_PARAMETER - Channel no is invalid + * @return channel allocation status: + * - SL_STATUS_OK - Channel allocated + * - SL_STATUS_DMA_NO_CHANNEL_AVAILABLE - All DMA channels are allocated + * - SL_STATUS_DMA_CHANNEL_ALLOCATED - The desired channel is already allocated + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * - SL_STATUS_INVALID_PARAMETER - Channel no is invalid ******************************************************************************/ sl_status_t sl_si91x_dma_allocate_channel(uint32_t dma_number, uint32_t *channel_no, uint32_t priority); /***************************************************************************/ /** - * This function deallocates the DMA channel if there is no ongoing transfer on channel. + * @brief This API deallocates the DMA channel + * @details This API deallocates the DMA channel if there is no ongoing transfer on the channel. * Deallocating the channel will also unregister the callbacks for transfer complete * and error. - * * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -*- - * \ref sl_si91x_dma_allocate_channel -* + * - \ref sl_si91x_dma_init + * - \ref sl_si91x_dma_allocate_channel * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] channel_no (1-32) -> UDMA0 (1-12) -> UDMA1 - * @return channel deallocation status - SL_STATUS_OK - Channel deallocated - SL_STATUS_BUSY - Cannot deallocate channel due to an ongoing transfer - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized - SL_STATUS_INVALID_PARAMETER - Channel no is invalid + * @return channel deallocation status: + * - SL_STATUS_OK - Channel deallocated + * - SL_STATUS_BUSY - Cannot deallocate channel due to an ongoing transfer + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * - SL_STATUS_INVALID_PARAMETER - Channel no is invalid ******************************************************************************/ sl_status_t sl_si91x_dma_deallocate_channel(uint32_t dma_number, uint32_t channel_no); /***************************************************************************/ /** - * This function registers the DMA callbacks (transfer complete & error) - * Users must update the sl_dma_callback_t structure and pass its address to this function. - * Users can have seperate callbacks for transfer complete and error for each channel - * + * @brief This API registers the DMA callbacks (transfer complete & error). + * @details User must update the sl_dma_callback_t structure and pass its address to this function. + * A separate callback can be present for transfer complete and error for each channel. * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -*- - * \ref sl_si91x_dma_allocate_channel -* + * - \ref sl_si91x_dma_init + * - \ref sl_si91x_dma_allocate_channel * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] channel_no (1-32) -> UDMA0 (1-12) -> UDMA1 * @param[in] callback_t structure containing callback functions * - * @return channel deallocation status - SL_STATUS_OK - Callback registered successfully - SL_STATUS_INVALID_PARAMETER - Invalid channel number - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * @return channel deallocation status: + * - SL_STATUS_OK - Callback registered successfully + * - SL_STATUS_INVALID_PARAMETER - Invalid channel number + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized ******************************************************************************/ sl_status_t sl_si91x_dma_register_callbacks(uint32_t dma_number, uint32_t channel_no, sl_dma_callback_t *callback_t); /***************************************************************************/ /** - * This function unregisters the DMA callbacks (transfer complete & error) - * Users need to update the 8-bit variable callback_type and pass to the function + * @brief This API unregisters the DMA callbacks (transfer complete & error). + * @details Users need to update the 8-bit variable callback_type and pass to the function * Each bit is mapped to a specific callback. - * * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -*- - * \ref sl_si91x_dma_allocate_channel -*- - * \ref sl_si91x_dma_register_callbacks -* - * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 + * - \ref sl_si91x_dma_init + * - \ref sl_si91x_dma_allocate_channel + * - \ref sl_si91x_dma_register_callbacks + * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] channel_no (1-32) -> UDMA0 (1-12) -> UDMA1 - * @param[in] callback_type Unregister the DMA callbacks based on the callback type (bit mapped to callbacks), + * @param[in] callback_type Unregister the DMA callbacks based on the callback type (bit-mapped to callbacks), (SL_DMA_TRANSFER_DONE_CB) -> unregister transfer complete callback (SL_DMA_ERROR_CB) -> unregister error callback (SL_DMA_TRANSFER_DONE_CB | SL_DMA_ERROR_CB) -> unregister both transfer complete and error callback - * @return channel deallocation status - SL_STATUS_OK - Callback unregistered successfully - SL_STATUS_INVALID_PARAMETER - Invalid channel number - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * @return channel de-allocation status: + * - SL_STATUS_OK - Callback unregistered successfully + * - SL_STATUS_INVALID_PARAMETER - Invalid channel number + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized ******************************************************************************/ sl_status_t sl_si91x_dma_unregister_callbacks(uint32_t dma_number, uint32_t channel_no, uint8_t callback_type); /***************************************************************************/ /** - * This function configures the DMA channel descriptor and initiate DMA transfer + * @brief This API starts the DMA transfer + * @details This API configures the DMA channel descriptor and initiates the DMA transfer * DMA primary descriptor is updated in this function and based on transfer mode * alternate descriptor is updated (only for ping pong mode). Also other DMA parameters - * like peripheral ACK signal (for peripheral memory transfers), DMA priority etc. are + * like peripheral ACK signal (for peripheral memory transfers), DMA priority, etc. are * updated in this function. - * * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -*- - * \ref sl_si91x_dma_allocate_channel -*- - * \ref sl_si91x_dma_register_callbacks -* + * - \ref sl_si91x_dma_init + * - \ref sl_si91x_dma_allocate_channel + * - \ref sl_si91x_dma_register_callbacks * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] channel_no (1-32) -> UDMA0 (1-12) -> UDMA1 * @param[in] *dma_transfer_t channel transfer data structure containing channel descriptor and other basic DMA parameters. - * @return DMA transfer status - SL_STATUS_OK - Transfer started successfully - SL_STATUS_SUSPENDED - Transfer initialization fail - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized - SL_STATUS_INVALID_PARAMETER - Channel no is invalid + * @return DMA transfer status: + * - SL_STATUS_OK - Transfer started successfully + * - SL_STATUS_SUSPENDED - Transfer initialization fails + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * - SL_STATUS_INVALID_PARAMETER - Channel no is invalid ******************************************************************************/ sl_status_t sl_si91x_dma_transfer(uint32_t dma_number, uint32_t channel_no, sl_dma_xfer_t *dma_transfer_t); /***************************************************************************/ /** - * This function configures the DMA channel descriptor and initiate simple memory to memory - * DMA transfer. Users need to pass the source address and destination address of transfer + * @brief This API starts a simple memory to memory DMA transfer + * @details This API configures the DMA channel descriptor and initiates simple memory-to-memory + * DMA transfer. Users need to pass the source address and destination address of the transfer * along with transfer length in bytes. - * * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -*- - * \ref sl_si91x_dma_allocate_channel -*- - * \ref sl_si91x_dma_register_callbacks -* - * + * - \ref sl_si91x_dma_init + * - \ref sl_si91x_dma_allocate_channel + * - \ref sl_si91x_dma_register_callbacks * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] channel_no (1-32) -> UDMA0 (1-12) -> UDMA1 @@ -372,11 +351,11 @@ sl_status_t sl_si91x_dma_transfer(uint32_t dma_number, uint32_t channel_no, sl_d * @param[in] *dst_addr destination address. * @param[in] data_size transfer size in bytes - * @return DMA transfer status - SL_STATUS_OK - Transfer success - SL_STATUS_SUSPENDED - Transfer initialization fail - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized - SL_STATUS_INVALID_PARAMETER - Channel no is invalid + * @return DMA transfer status: + * - SL_STATUS_OK - Transfer success + * - SL_STATUS_SUSPENDED - Transfer initialization fails + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * - SL_STATUS_INVALID_PARAMETER - Channel no is invalid ******************************************************************************/ sl_status_t sl_si91x_dma_simple_transfer(uint32_t dma_number, @@ -386,98 +365,90 @@ sl_status_t sl_si91x_dma_simple_transfer(uint32_t dma_number, uint32_t data_size); /***************************************************************************/ /** - * This function stops any active transfer on the channel. If there is no active transfer on the channel, - * this function returns SL_DMA_CHANNEL_IDLE - * + * @brief This API stops DMA transfer + * @details This API stops any active transfer on the channel by disabling the DMA channel. + * If there is no active transfer on the channel, this function returns SL_DMA_CHANNEL_IDLE * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -*- - * \ref sl_si91x_dma_allocate_channel -*- - * \ref sl_si91x_dma_simple_transfer/sl_si91x_dma_transfer -* + * - \ref sl_si91x_dma_init + * - \ref sl_si91x_dma_allocate_channel + * - \ref sl_si91x_dma_simple_transfer/sl_si91x_dma_transfer * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] channel_no (1-32) -> UDMA0 (1-12) -> UDMA1 - * @return DMA transfer status - SL_STATUS_OK - Transfer stopped successfully - SL_STATUS_IDLE - There is no active transfer on channel - SL_STATUS_INVALID_PARAMETER - Invalid channel number - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * @return DMA transfer status: + * - SL_STATUS_OK - Transfer stopped successfully + * - SL_STATUS_IDLE - There is no active transfer on the channel + * - SL_STATUS_INVALID_PARAMETER - Invalid channel number + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized ******************************************************************************/ sl_status_t sl_si91x_dma_stop_transfer(uint32_t dma_number, uint32_t channel_no); /***************************************************************************/ /** - * This function returns the following channel status, + * @brief This API returns the DMA channel status + * @details This API returns the following channel status, * SL_STATUS_DMA_CHANNEL_ALREADY_ALLOCATED - DMA channel allocated but no active transfer in progress * SL_STATUS_BUSY - Channel is allocated and active transfer is in progress * SL_STATUS_IDLE - Channel is not allocated. - * * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -* + * - \ref sl_si91x_dma_init * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] channel_no (1-32) -> UDMA0 (1-12) -> UDMA1 * @return channel status - SL_STATUS_IDLE - Channel is not allocated - SL_STATUS_DMA_CHANNEL_ALREADY_ALLOCATED - Channel is already allocated and idle - SL_STATUS_BUSY - Channel is allocated and busy - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized - SL_STATUS_INVALID_PARAMETER - Channel no is invalid + * - SL_STATUS_IDLE - Channel is not allocated + * - SL_STATUS_DMA_CHANNEL_ALREADY_ALLOCATED - Channel is already allocated and idle + * - SL_STATUS_BUSY - Channel is allocated and busy + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * - SL_STATUS_INVALID_PARAMETER - Channel no is invalid ******************************************************************************/ sl_status_t sl_si91x_dma_channel_status_get(uint32_t dma_number, uint32_t channel_no); /***************************************************************************/ /** - * This function enables the DMA channel. Enabling channel will trigger DMA transfer if DMA is - * already enabled. Also, the channel should be allocated and transfer parameters should be configured + * @brief This API enables the DMA channel + * @details Enabling channel will trigger DMA transfer if DMA is already enabled. + * Also, the channel should be allocated and transfer parameters should be configured * before enabling the channel. - * * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -* + * - \ref sl_si91x_dma_init * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] channel_no (1-32) -> UDMA0 (1-12) -> UDMA1 * @return channel status - SL_STATUS_OK - Channel enable success - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized - SL_STATUS_INVALID_PARAMETER - Channel no is invalid + * - SL_STATUS_OK - Channel enables success + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * - SL_STATUS_INVALID_PARAMETER - Channel no is invalid ******************************************************************************/ sl_status_t sl_si91x_dma_channel_enable(uint32_t dma_number, uint32_t channel_no); /***************************************************************************/ /** - * This function disables the DMA channel. Disabling the DMA channel will abort any ongoing - * active transfers on the channel. Enabling the channel back will not resume previous - * transfer. - * - * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -* + * @brief This API disables the DMA channel. + * @details Disabling the DMA channel will abort any ongoing active transfers + * on the channel. Enabling the channel back will not resume the previous transfer. + * @pre Pre-condition: + * - \ref sl_si91x_dma_init * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @param[in] channel_no (1-32) -> UDMA0 (1-12) -> UDMA1 * @return channel status - SL_STATUS_OK - Channel disable success - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized - SL_STATUS_INVALID_PARAMETER - Channel no is invalid + * - SL_STATUS_OK - Channel disable success + * - SL_STATUS_NOT_INITIALIZED - DMA peripheral not initialized + * - SL_STATUS_INVALID_PARAMETER - Channel no is invalid ******************************************************************************/ sl_status_t sl_si91x_dma_channel_disable(uint32_t dma_number, uint32_t channel_no); /***************************************************************************/ /** - * This function enables the DMA peripheral. Enabling the DMA will trigger transfer if the channel is - * already enabled. Also, the channel should be allocated and transfer parameters should be configured + * @brief This API enables DMA peripheral. + * @details Enabling the DMA will trigger transfer if the channel is already enabled. + * Also, the channel should be allocated and transfer parameters should be configured * before enabling the DMA. - * - * @pre Pre-conditions: - * - \ref sl_si91x_dma_init -* + * @pre Pre-condition: + * - \ref sl_si91x_dma_init * @param[in] dma_number dma_number 0->UDMA0, 1->UDMA1 * @return SL_STATUS_OK - Channel enable success @@ -487,6 +458,68 @@ sl_status_t sl_si91x_dma_enable(uint32_t dma_number); /** @} (end addtogroup DMA) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup DMA Direct Memory Access +/// @{ +/// +/// @details +/// +/// +/// @n @section DMA_Intro Introduction +/// +/// Direct Memory Access (DMA) is a process of transferring data from one memory location +/// to another without the direct involvement of the processor (CPU). The main benefit of +/// using DMA is more efficient data movement in the embedded system. +/// +/// Here are some common applications of DMA in micro-controller systems: +/// +/// @li **Data Transfer**: One of the primary uses of DMA is to facilitate data transfer between +/// peripherals and memory +/// +/// @li **Memory-to-Memory Transfer**: DMA can also be utilized for moving data between different memory locations, +/// providing fast and efficient memory operations without CPU intervention. +/// This is particularly useful for tasks like memory copying, memory clearing, or memory initialization. +/// +/// @li **Peripheral Initialization**: DMA can assist in initializing peripheral registers or buffers by +/// transferring predefined data patterns or configurations directly from memory to the peripheral +/// registers, speeding up the initialization process. +/// +/// @li **Data Processing**: DMA can be employed for offloading data processing tasks from +/// the CPU to dedicated hardware peripherals. +/// +/// @li **Real-Time Systems**: DMA is essential in real-time systems where predictable and +/// deterministic data transfer is crucial. By minimizing CPU involvement in data +/// transfer operations, DMA helps meet strict timing requirements and reduces the +/// likelihood of missed deadlines in time-critical applications. +/// +/// @li **Power Management**: DMA can contribute to power efficiency by reducing CPU +/// wake-up times and allowing the CPU to enter low-power modes more frequently. +/// By handling data transfer tasks autonomously, DMA can help optimize power +/// consumption in battery-operated or energy-constrained systems. +/// +/// @n @section DMA_Config Configuration +/// +/// @li Configuring DMA has three parameters that can be configured in such, +/// if DAM instance configuration to configured through @ref and call th API @ref sl_si91x_dma_init(), +/// DAM Channel can be configured in the range of 1-32 by passing the instance and +/// channel in the API @ref sl_si91x_dma_allocate_channel(), and transfer size also can be configured in the range of (1-10000). +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section DMA_Use Usage +/// +/// The common DMA functions can be used after the DMA Structures are specified, passing an instance of +/// @ref sl_dma_init_t. These functions will initiate and configure the DMA below, which is the flow for implementation. +/// +/// 1. @ref sl_si91x_dma_init +/// 2. @ref sl_si91x_dma_allocate_channel +/// 3. @ref sl_si91x_dma_register_callbacks +/// 4. @ref sl_si91x_dma_simple_transfer or +/// 5. @ref sl_si91x_dma_transfer +/// 6. @ref sl_si91x_dma_deinit +/// +/// @} end group DMA ********************************************************/ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_driver_gpio.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_driver_gpio.h index 4b94ecdbe..56a03462a 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_driver_gpio.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_driver_gpio.h @@ -1,1387 +1,1142 @@ -/***************************************************************************/ /** - * @file sl_si91x_driver_gpio.h - * @brief sl si91x driver gpio header file - ******************************************************************************* - * # License - * Copyright 2018 Silicon Laboratories Inc. www.silabs.com - ******************************************************************************* - * - * SPDX-License-Identifier: Zlib - * - * The licenser of this software is Silicon Laboratories Inc. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be miss represented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * miss represented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - ******************************************************************************/ -#ifndef SL_SI91X_DRIVER_GPIO_H -#define SL_SI91X_DRIVER_GPIO_H - -#if !defined(GPIO_PRESENT) -#include "sl_status.h" -#include "sl_driver_gpio.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ /** - * @addtogroup GPIO General-Purpose Input-Output - * @ingroup SI91X_PERIPHERAL_APIS - * @{ - * - ******************************************************************************/ -/******************************************************************************* - ***************************** PROTOTYPES ********************************** - ******************************************************************************/ - -/***************************************************************************/ /** - * @brief Set the direction for a GPIO pin. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use corresponding pad receiver API for corresponding GPIO instance. - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] pin - The pin number on the port. - * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. - * Port 3 has 9 pins. - * ULP instance has total 12 pins. - * @param[in] direction - pin direction of type \ref sl_si91x_gpio_direction_t - * '0' - Output - * - - * '1' - Input - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_set_pin_direction(uint8_t port, uint8_t pin, sl_si91x_gpio_direction_t direction); - -/***************************************************************************/ /** - * @brief Get the direction of a selected GPIO pin. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use corresponding pad receiver API for corresponding GPIO instance. - * - - * \ref sl_si91x_gpio_driver_set_pin_direction() - * - - * \ref sl_si91x_gpio_driver_get_pin_direction() - * - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] pin - The pin number on the port. - * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. - * Port 3 has 9 pins. - * ULP instance has total 12 pins. - * @return Returns the direction of the pin. - * '0' - Output - * - - * '1' - Input - * - ******************************************************************************/ -uint8_t sl_si91x_gpio_driver_get_pin_direction(uint8_t port, uint8_t pin); - -/***************************************************************************/ /** - * @brief Enable the receiver enable bit in the PAD configuration register for reading the GPIO pin status. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - * @param[in] gpio_num - GPIO pin number to be use. - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_enable_pad_receiver(uint8_t gpio_num); - -/***************************************************************************/ /** - * @brief Disable the receiver enable bit in the PAD configuration register. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance - * - * @param[in] gpio_num - GPIO pin number to be use. - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_disable_pad_receiver(uint8_t gpio_num); - -/***************************************************************************/ /** - * @brief Enable the pad selection bit in the PAD selection register. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @param[in] gpio_padnum - PAD number to be use - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_enable_pad_selection(uint8_t gpio_padnum); - -/***************************************************************************/ /** - * @brief Select the drive strength for an HP instance GPIO pin. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver() - * @param[in] gpio_num - GPIO pin number to be use - * @param[in] strength - Drive strength selector(E1,E2) of type - * \ref sl_si91x_gpio_driver_strength_select_t - * possible values are - * 0, for two_milli_amps (E1=0,E2=0) - * - - * 1, for four_milli_amps (E1=0,E2=1) - * - - * 2, for eight_milli_amps (E1=1,E2=0) - * - - * 3, for twelve_milli_amps(E1=1,E2=1) - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_select_pad_driver_strength(uint8_t gpio_num, - sl_si91x_gpio_driver_strength_select_t strength); - -/***************************************************************************/ /** - * @brief Select the Driver disabled state control for an HP instance GPIO pin. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver() - * @param[in] gpio_num - GPIO pin number to be use - * @param[in] disable_state - driver disable state of type - * \ref sl_si91x_gpio_driver_disable_state_t - * possible values are - * 0, for HiZ (P1=0,P2=0) - * - - * 1, for Pull-up (P1=0,P2=1) - * - - * 2, for Pull-down (P1=1,P2=0) - * - - * 3, for Repeater (P1=1,P2=1) - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_select_pad_driver_disable_state(uint8_t gpio_num, - sl_si91x_gpio_driver_disable_state_t disable_state); - -/***************************************************************************/ /** - * @brief Select AND/OR type of the group interrupt. If multiple interrupts - * on same port (or) different are to be generated, then use this API. - * Example: Consider port 0: pin 2,3 and port 3: pin 1,2 for interrupt generation. - * Choose OR, any of the selected pin condition triggers the group interrupt generation - * Choose AND, all the selected pin conditions should match to trigger group interrupt generation - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * - * Use the corresponding pad receiver API for the corresponding GPIO instance. - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance - * - * Use corresponding group interrupt configuration API for corresponding GPIO instance. - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] group_interrupt - Group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @param[in] and_or - AND/OR of GPIO group interrupts of type - * \ref sl_si91x_gpio_and_or_t - * '0' - AND - * - - * '1' - OR - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_select_group_interrupt_and_or(uint8_t port, - sl_si91x_group_interrupt_t group_interrupt, - sl_si91x_gpio_and_or_t and_or); - -/***************************************************************************/ /** - * @brief Clear the selected group interrupt status value. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver() - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt() - * @param[in] group_interrupt - Group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_clear_group_interrupt(sl_si91x_group_interrupt_t group_interrupt); - -/***************************************************************************/ /** - * @brief Get the current status of the selected group interrupt. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use corresponding pad receiver API for corresponding GPIO instance. - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode(), - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance - * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] group_interrupt - Group interrupt number of type (0 to 1) - * \ref sl_si91x_group_interrupt_t - * @return returns the group interrupt status register - * 1, when interrupt is enabled - * - - * 0, when interrupt is disabled - * - ******************************************************************************/ -uint32_t sl_si91x_gpio_driver_get_group_interrupt_status(uint8_t port, sl_si91x_group_interrupt_t group_interrupt); - -/***************************************************************************/ /** - * @brief Configure the group interrupt as a wake up source across sleep wakeups. - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] group_interrupt - Group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @param[in] flags - GPIO group interrupt wake up flag of type - * \ref sl_si91x_gpio_wakeup_t - * '1' - enable - * - - * '0' - disable - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_select_group_interrupt_wakeup(uint8_t port, - sl_si91x_group_interrupt_t group_interrupt, - sl_si91x_gpio_wakeup_t flags); - -/***************************************************************************/ /** - * @brief Configure the MCU HP instance group interrupts with trigger type (level/edge), polarity (high/low), interrupt type (and/or) - * and register the callback function for interrupts. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver() - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * @param[in] configuration - configuration pointer to - * \ref sl_si91x_gpio_group_interrupt_config_t structure - * @param[in] gpio_callback - IRQ function pointer - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_configure_group_interrupt(sl_si91x_gpio_group_interrupt_config_t *configuration, - sl_gpio_irq_callback_t gpio_callback); - -/***************************************************************************/ /** - * @brief Get the configured polarity of group interrupt. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use corresponding pad receiver API for corresponding GPIO instance. - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance - * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. - * @param[in] group_interrupt - GPIO group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] pin - The pin number on the port. - * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. - * Port 3 has 9 pins. - * ULP instance has total 12 pins. - * @return returns group interrupt polarity - * 1, when GPIO pin status is HIGH -*- - * 0, when GPIO pin status is LOW -* - ******************************************************************************/ -uint8_t sl_si91x_gpio_driver_get_group_interrupt_polarity(sl_si91x_group_interrupt_t group_interrupt, - uint8_t port, - uint8_t pin); - -/***************************************************************************/ /** - * @brief Configure the polarity to a selected group interrupt which decides the active value of the pin to be - * considered for group interrupt generation. - * '0' – group interrupt gets generated when gpio input pin status is LOW - * '1' – group interrupt gets generated when gpio input pin status is HIGH - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use the corresponding pad receiver API for the corresponding GPIO instance. - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance - * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. - * @param[in] group_interrupt - GPIO group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] pin - The pin number on the port. - * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. - * Port 3 has 9 pins. - * ULP instance has total 12 pins. - * @param[in] polarity - polarity of GPIO group interrupt of type - * \ref sl_si91x_gpio_polarity_t - * 1, group interrupt gets generated when GPIO pin status is '1' - * - - * 0, group interrupt gets generated when GPIO pin status is '0' - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_set_group_interrupt_polarity(sl_si91x_group_interrupt_t group_interrupt, - uint8_t port, - uint8_t pin, - sl_si91x_gpio_polarity_t polarity); - -/***************************************************************************/ /** - * @brief Get the configured level/edge event for the selected group interrupt. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use corresponding pad receiver API for corresponding GPIO instance. - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode(), - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction(), - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance - * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] group_interrupt - GPIO group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @return returns group interrupt level_edge - * 1, for Edge - * - - * 0, for Level - * - ******************************************************************************/ -uint8_t sl_si91x_gpio_driver_get_group_interrupt_level_edge(uint8_t port, sl_si91x_group_interrupt_t group_interrupt); - -/***************************************************************************/ /** - * @brief Set the level/edge event for the selected group interrupt. - * '1' Triggers interrupt generation when configured edge is detected on pin - * '0' Triggers interrupt generation when configured level is detected on pin - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use the corresponding pad receiver API for the corresponding GPIO instance. - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance - * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] group_interrupt - GPIO group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @param[in] level_edge - GPIO level edge group interrupt of type - * \ref sl_si91x_gpio_level_edge_t - * 1, for Edge - * - - * 0, for Level - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_set_group_interrupt_level_edge(uint8_t port, - sl_si91x_group_interrupt_t group_interrupt, - sl_si91x_gpio_level_edge_t level_edge); - -/***************************************************************************/ /** - * @brief Unmask the selected group interrupt to enable interrupt clearing upon generation. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use corresponding pad receiver API for corresponding GPIO instance. - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance - * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] group_interrupt - GPIO group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_unmask_group_interrupt(uint8_t port, sl_si91x_group_interrupt_t group_interrupt); - -/***************************************************************************/ /** - * @brief Mask the selected group interrupt. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use the corresponding pad receiver API for the corresponding GPIO instance. - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] group_interrupt - GPIO group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_mask_group_interrupt(uint8_t port, sl_si91x_group_interrupt_t group_interrupt); - -/***************************************************************************/ /** - * @brief Disable the clock for either the HP or ULP instance of the GPIO Peripheral. - * @param[in] clock - Selects M4 clock or ULP clock of type - * \ref sl_si91x_gpio_select_clock_t - * 0, for M4 GPIO CLK - * - - * 1, for ULP GPIO CLK - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_disable_clock(sl_si91x_gpio_select_clock_t clock); - -/***************************************************************************/ /** - * @brief Enable the clock for either the HP or ULP instance of the GPIO peripheral. - * @param[in] clock - Selects M4 clock or ULP clock of type - * \ref sl_si91x_gpio_select_clock_t - * 0, for M4 GPIO CLK - * - - * 1, for ULP GPIO CLK - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_enable_clock(sl_si91x_gpio_select_clock_t clock); - -/***************************************************************************/ /** - * @brief Enable the selected group interrupts for either the HP or ULP instance of the GPIO peripheral. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * Use the corresponding pad receiver API for the corresponding GPIO instance. - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance - * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. - * @param[in] group_interrupt - GPIO group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] pin - The pin number on the port. - * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. - * Port 3 has 9 pins. - * ULP instance has total 12 pins. - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * -*******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_enable_group_interrupt(sl_si91x_group_interrupt_t group_interrupt, - uint8_t port, - uint8_t pin); - -/***************************************************************************/ /** - * @brief Disable the selected group interrupts for either the HP or ULP instance of the GPIO peripheral. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance - * - * Use the corresponding pad receiver API for the corresponding GPIO instance. - * - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance - * - * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. - * @param[in] group_interrupt - GPIO group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @param[in] port - The port to associate with the pin. - * HP instance - PORT 0,1,2,3 - * ULP instance - PORT 4 - * @param[in] pin - The pin number on the port. - * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. - * Port 3 has 9 pins. - * ULP instance has total 12 pins. - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * -*******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_disable_group_interrupt(sl_si91x_group_interrupt_t group_interrupt, - uint8_t port, - uint8_t pin); - -/***************************************************************************/ /** - * @brief Select the slew rate for the ULP instance of the GPIO peripheral. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() - * - * @param[in] gpio_num - GPIO pin number to be use - * @param[in] slew_rate - slew rate of type \ref sl_si91x_gpio_slew_rate_t - * '0' - Slow - * - - * '1' - Fast - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_select_ulp_pad_slew_rate(uint8_t gpio_num, sl_si91x_gpio_slew_rate_t slew_rate); - -/***************************************************************************/ /** - * @brief Select the drive strength for the ULP instance of the GPIO peripheral. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() - * - * @param[in] gpio_num - GPIO pin number to be use - * @param[in] strength - Drive strength selector(E1,E2) of type - * \ref sl_si91x_gpio_driver_strength_select_t - * 0, for two_milli_amps (E1=0,E2=0) - * - - * 1, for four_milli_amps (E1=0,E2=1) - * - - * 2, for eight_milli_amps (E1=1,E2=0) - * - - * 3, for twelve_milli_amps(E1=1,E2=1) - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_select_ulp_pad_driver_strength(uint8_t gpio_num, - sl_si91x_gpio_driver_strength_select_t strength); - -/***************************************************************************/ /** - * @brief Select the driver-disabled state control for the ULP instance of the GPIO peripheral. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() - * - * @param[in] gpio_num - GPIO pin number to be use - * @param[in] disable_state - driver disable state of type - * \ref sl_si91x_gpio_driver_disable_state_t - * 0, for HiZ (P1=0,P2=0) - * - - * 1, for Pull up (P1=0,P2=1) - * - - * 2, for Pull down (P1=1,P2=0) - * - - * 3, for Repeater (P1=1,P2=1) - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_select_ulp_pad_driver_disable_state( - uint8_t gpio_num, - sl_si91x_gpio_driver_disable_state_t disable_state); - -/***************************************************************************/ /** - * @brief Disable the receiver enable bit for the ULP instance of the GPIO peripheral. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @param[in] gpio_num - GPIO pin number to be used - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_disable_ulp_pad_receiver(uint8_t gpio_num); - -/***************************************************************************/ /** - * @brief Enable the receiver enable bit for the ULP instance of the GPIO peripheral. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @param[in] gpio_num - GPIO pin number to be used - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_enable_ulp_pad_receiver(uint8_t gpio_num); - -/***************************************************************************/ /** - * @brief Configure the MCU ULP instance pin interrupts with the trigger type (level/edge) - * and register the callback function for interrupts. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() - * - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * - * @param[in] int_no - The interrupt number to trigger. - * @param[in] flags - Interrupt configuration flags of type - * \ref sl_si91x_gpio_interrupt_config_flag_t - * @param[in] pin - GPIO pin number (0 to 11) - * @param[in] gpio_callback - IRQ function pointer - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_configure_ulp_pin_interrupt(uint8_t int_no, - sl_si91x_gpio_interrupt_config_flag_t flags, - sl_si91x_gpio_pin_ulp_t pin, - sl_gpio_irq_callback_t gpio_callback); - -/***************************************************************************/ /** - * @brief Set the NPSS GPIO pin MUX (mode) to the selected mode. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - - * \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @param[in] pin - NPSS GPIO pin number(0...4) of type - * \ref sl_si91x_uulp_npss_mode_t - * @param[in] mode - NPSS GPIO MUX value (0 to 10) - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_set_uulp_npss_pin_mux(uint8_t pin, sl_si91x_uulp_npss_mode_t mode); - -/***************************************************************************/ /** - * @brief Enable/disable the NPSS GPIO Input Buffer. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @param[in] pin - is NPSS GPIO pin number (0...4) - * @param[in] receiver - is enable/disable NPSS GPIO receiver of type - * \ref sl_si91x_gpio_receiver_t - * '1' - Enable - * - - * '0' - Disable - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_select_uulp_npss_receiver(uint8_t pin, sl_si91x_gpio_receiver_t receiver); - -/***************************************************************************/ /** - * @brief Set the direction for the selected NPSS GPIO. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @param[in] pin - is NPSS GPIO pin number (0...4) - * @param[in] direction - is direction value (Input / Output) of type - * \ref sl_si91x_gpio_direction_t - * '1' - Input Direction - * - - * '0' - Output Direction - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_set_uulp_npss_direction(uint8_t pin, sl_si91x_gpio_direction_t direction); - -/***************************************************************************/ /** - * @brief Get the direction of the selected NPSS GPIO. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() - * - * @param[in] pin - is NPSS GPIO pin number(0...4) - * @return returns the GPIO pin direction - * - 1, Input Direction \n - * - 0, Output Direction \n - *******************************************************************************/ -uint8_t sl_si91x_gpio_driver_get_uulp_npss_direction(uint8_t pin); - -/***************************************************************************/ /** - * @brief Control(set or clear) the NPSS GPIO pin value. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() - * - * @param[in] pin - is NPSS GPIO pin number (0...4) of type - * \ref sl_si91x_gpio_pin_value_t - * @param[in] pin_value - is NPSS GPIO pin value - * '0' - Output - * - - * '1' - Input - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_set_uulp_npss_pin_value(uint8_t pin, sl_si91x_gpio_pin_value_t pin_value); - -/***************************************************************************/ /** - * @brief Read the status of the selected NPSS GPIO pin value. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_value() - * - * @param[in] pin - is NPSS GPIO pin number (0...4) - * @return returns the pin logical state of pin - * '0' - Output - * - - * '1' - Input - * - ******************************************************************************/ -uint8_t sl_si91x_gpio_driver_get_uulp_npss_pin(uint8_t pin); - -/***************************************************************************/ /** - * @brief Select the NPSS GPIO polarity for generating the interrupt. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @param[in] pin - is NPSS GPIO pin number (0...4) - * @param[in] polarity - GPIO polarity - * \ref sl_si91x_gpio_polarity_t - * '1' - High - * - - * '0' - Low - * - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_select_uulp_npss_polarity(uint8_t pin, sl_si91x_gpio_polarity_t polarity); - -/***************************************************************************/ /** - * @brief Set the NPSS GPIO interrupt as a wake up source across sleep wakeups. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_set_uulp_npss_wakeup_interrupt(uint8_t npssgpio_interrupt); - -/***************************************************************************/ /** - * @brief Clear the UULP NPSS GPIO Interrupt as a wake up source. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_clear_uulp_npss_wakeup_interrupt(uint8_t npssgpio_interrupt); - -/***************************************************************************/ /** - * @brief Mask the selected NPSS GPIO interrupt. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_set_uulp_pad_configuration() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() - * - * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_mask_uulp_npss_interrupt(uint8_t npssgpio_interrupt); - -/***************************************************************************/ /** - * @brief Unmask the selected NPSS GPIO interrupt. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_set_uulp_pad_configuration() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() - * - * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_unmask_uulp_npss_interrupt(uint8_t npssgpio_interrupt); - -/***************************************************************************/ /** - * @brief Clear the selected NPSS GPIO interrupt. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_set_uulp_pad_configuration() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_configure_uulp_interrupt() - * - * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_clear_uulp_interrupt(uint8_t npssgpio_interrupt); - -/***************************************************************************/ /** - * @brief Get the current status of all the NPSS GPIO interrupt status. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_set_uulp_pad_configuration() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_configure_uulp_interrupt() - * - * @param[in] None - * @return returns the UULP INTR status. - * 1, interrupt has been raised - * - - * 0, interrupt is masked or not raised - * - ******************************************************************************/ -uint8_t sl_si91x_gpio_driver_get_uulp_interrupt_status(void); - -/***************************************************************************/ /** - * @brief Get the selected ULP instance GPIO pin interrupt status. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() - * - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_configure_ulp_pin_interrupt() - * - * @param[in] flags : ULP GPIO interrupt sources status. - * @return returns the ULP INTR status. - * 1, interrupt has been raised - * - - * 0, interrupt is masked or not raised - * - ******************************************************************************/ -uint32_t sl_si91x_gpio_driver_get_ulp_interrupt_status(uint32_t flags); - -/***************************************************************************/ /** - * @brief Clear the selected ULP instance GPIO pin interrupts. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() - * - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_configure_ulp_pin_interrupt() - * - * @param[in] flags : ULP GPIO interrupt sources to clear. - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_clear_ulp_interrupt(uint32_t flags); - -/***************************************************************************/ /** - * @brief Clear the selected ULP instance group interrupt. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() - * - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * - * \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt() - * - * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. - * @param[in] group_interrupt - Group interrupt number of type - * \ref sl_si91x_group_interrupt_t - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_clear_ulp_group_interrupt(sl_si91x_group_interrupt_t group_interrupt); - -/***************************************************************************/ /** - * @brief Configure the UULP GPIO pin interrupt with interrupt type level or edge and registers callback function for interrupts. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_set_uulp_pad_configuration() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() - * - * @param[in] flags - Interrupt configuration flags of type - * \ref sl_si91x_gpio_interrupt_config_flag_t - * @param[in] npssgpio_interrupt - NPSS GPIO input number (0 to 4) - * @param[in] gpio_callback - IRQ function pointer - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_configure_uulp_interrupt(sl_si91x_gpio_interrupt_config_flag_t flags, - uint8_t npssgpio_interrupt, - sl_gpio_irq_callback_t gpio_callback); - -/***************************************************************************/ /** - * @brief Configure the MCU ULP instance group interrupts with trigger type (level/edge), polarity (high/low), interrupt type (and/or) - * and register the callback function for interrupts. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() - * - * @pre Pre-conditions: - * - \ref sl_gpio_driver_set_pin_mode() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_pin_direction() - * - * @param[in] configuration - configuration pointer to - * \ref sl_si91x_gpio_group_interrupt_config_t structure - * @param[in] gpio_callback - IRQ function pointer - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_configure_ulp_group_interrupt(sl_si91x_gpio_group_interrupt_config_t *configuration, - sl_gpio_irq_callback_t gpio_callback); - -/***************************************************************************/ /** - * @brief Toggle the selected UULP pin status. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() - * - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() - * - * @param[in] pin - UULP pin number to toggle - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument - * - - * \ref SL_STATUS _OK (0X000) - Success - * - ******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_toggle_uulp_npss_pin(uint8_t pin); - -/***************************************************************************/ /** - * @brief Configure the UULP GPIO pin mode, receiver enable, direction and polarity settings. - * @pre Pre-conditions: - * - \ref sl_si91x_gpio_driver_enable_clock() - * - * @param[in] pad_config : PAD configuration pointer to \ref uulp_pad_config_t structure - * @return returns status 0 if successful, - * else error code as follow. - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - - * \ref SL_STATUS _OK (0X000) - Success - * - *******************************************************************************/ -sl_status_t sl_si91x_gpio_driver_set_uulp_pad_configuration(uulp_pad_config_t *pad_config); - -/***************************************************************************/ /** -* @brief Get the release, SQA, and development version numbers of the GPIO peripheral. -* @param[in] None -* @return returns structure of type \ref sl_si91x_gpio_version_t -*******************************************************************************/ -sl_si91x_gpio_version_t sl_si91x_gpio_driver_get_version(void); - -/** @} (end addtogroup GPIO) */ - -#ifdef __cplusplus -} -#endif - -#endif ///< GPIO_PRESENT -#endif ///< SL_SI91X_DRIVER_GPIO_H +/***************************************************************************/ /** + * @file sl_si91x_driver_gpio.h + * @brief sl si91x driver gpio header file + ******************************************************************************* + * # License + * Copyright 2018 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licenser of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be miss represented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * miss represented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ +#ifndef SL_SI91X_DRIVER_GPIO_H +#define SL_SI91X_DRIVER_GPIO_H + +#if !defined(GPIO_PRESENT) +#include "sl_status.h" +#include "sl_driver_gpio.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/***************************************************************************/ /** + * @addtogroup GPIO General-Purpose Input-Output + * @ingroup SI91X_PERIPHERAL_APIS + * @{ + * + ******************************************************************************/ +/******************************************************************************* + ***************************** PROTOTYPES ********************************** + ******************************************************************************/ + +/***************************************************************************/ /** + * @brief Set the direction for a GPIO pin. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use corresponding pad receiver API for corresponding GPIO instance. + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] pin - The pin number on the port. + * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. + * Port 3 has 9 pins. + * ULP instance has total 12 pins. + * @param[in] direction - pin direction of type \ref sl_si91x_gpio_direction_t + * - '0' - Output + * - '1' - Input + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_set_pin_direction(uint8_t port, uint8_t pin, sl_si91x_gpio_direction_t direction); + +/***************************************************************************/ /** + * @brief Get the direction of a selected GPIO pin. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use corresponding pad receiver API for corresponding GPIO instance. + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_get_pin_direction() + * + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] pin - The pin number on the port. + * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. + * Port 3 has 9 pins. + * ULP instance has total 12 pins. + * @return Returns the direction of the pin. + * - '0' - Output + * - '1' - Input + * + ******************************************************************************/ +uint8_t sl_si91x_gpio_driver_get_pin_direction(uint8_t port, uint8_t pin); + +/***************************************************************************/ /** + * @brief Enable the receiver enable bit in the PAD configuration register for reading the GPIO pin status. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * + * @param[in] gpio_num - GPIO pin number to be use. + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_enable_pad_receiver(uint8_t gpio_num); + +/***************************************************************************/ /** + * @brief Disable the receiver enable bit in the PAD configuration register. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_pad_selection(), for HP instance + * + * @param[in] gpio_num - GPIO pin number to be use. + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_disable_pad_receiver(uint8_t gpio_num); + +/***************************************************************************/ /** + * @brief Enable the pad selection bit in the PAD selection register. + * @pre Pre-condition: + * - \ref sl_si91x_gpio_driver_enable_clock() + * @param[in] gpio_padnum - PAD number to be use + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_enable_pad_selection(uint8_t gpio_padnum); + +/***************************************************************************/ /** + * @brief Select the drive strength for an HP instance GPIO pin. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock + * - \ref sl_si91x_gpio_driver_enable_pad_receiver() + * @param[in] gpio_num - GPIO pin number to be use + * @param[in] strength - Drive strength selector(E1,E2) of type + * \ref sl_si91x_gpio_driver_strength_select_t + * possible values are + * - 0, for two_milli_amps (E1=0,E2=0) + * - 1, for four_milli_amps (E1=0,E2=1) + * - 2, for eight_milli_amps (E1=1,E2=0) + * - 3, for twelve_milli_amps(E1=1,E2=1) + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_select_pad_driver_strength(uint8_t gpio_num, + sl_si91x_gpio_driver_strength_select_t strength); + +/***************************************************************************/ /** + * @brief Select the Driver disabled state control for an HP instance GPIO pin. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock + * - \ref sl_si91x_gpio_driver_enable_pad_receiver() + * @param[in] gpio_num - GPIO pin number to be use + * @param[in] disable_state - driver disable state of type + * \ref sl_si91x_gpio_driver_disable_state_t + * possible values are + * + * - 0, for HiZ (P1=0,P2=0) + * - 1, for Pull-up (P1=0,P2=1) + * - 2, for Pull-down (P1=1,P2=0) + * - 3, for Repeater (P1=1,P2=1) + * + * @return returns status 0 if successful, + * else error code as follow. + * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_select_pad_driver_disable_state(uint8_t gpio_num, + sl_si91x_gpio_driver_disable_state_t disable_state); + +/***************************************************************************/ /** + * @brief Select AND/OR type of the group interrupt. If multiple interrupts + * on same port (or) different are to be generated, then use this API. + * Example: Consider port 0: pin 2,3 and port 3: pin 1,2 for interrupt generation. + * Choose OR, any of the selected pin condition triggers the group interrupt generation + * Choose AND, all the selected pin conditions should match to trigger group interrupt generation + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use the corresponding pad receiver API for the corresponding GPIO instance. + * - \ref sl_gpio_driver_set_pin_mode() + + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance + * Use corresponding group interrupt configuration API for corresponding GPIO instance. + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] group_interrupt - Group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @param[in] and_or - AND/OR of GPIO group interrupts of type + * \ref sl_si91x_gpio_and_or_t + * - '0' - AND + * - '1' - OR + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_select_group_interrupt_and_or(uint8_t port, + sl_si91x_group_interrupt_t group_interrupt, + sl_si91x_gpio_and_or_t and_or); + +/***************************************************************************/ /** + * @brief Clear the selected group interrupt status value. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock + * - \ref sl_si91x_gpio_driver_enable_pad_receiver() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt() + * @param[in] group_interrupt - Group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_clear_group_interrupt(sl_si91x_group_interrupt_t group_interrupt); + +/***************************************************************************/ /** + * @brief Get the current status of the selected group interrupt. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use corresponding pad receiver API for corresponding GPIO instance. + * - \ref sl_gpio_driver_set_pin_mode(), + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance + * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] group_interrupt - Group interrupt number of type (0 to 1) + * \ref sl_si91x_group_interrupt_t + * @return returns the group interrupt status register + * - 1, when interrupt is enabled + * - 0, when interrupt is disabled + * + ******************************************************************************/ +uint32_t sl_si91x_gpio_driver_get_group_interrupt_status(uint8_t port, sl_si91x_group_interrupt_t group_interrupt); + +/***************************************************************************/ /** + * @brief Configure the group interrupt as a wake up source across sleep wakeups. + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] group_interrupt - Group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @param[in] flags - GPIO group interrupt wake up flag of type + * \ref sl_si91x_gpio_wakeup_t + * - '1' - enable + * - '0' - disable + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_select_group_interrupt_wakeup(uint8_t port, + sl_si91x_group_interrupt_t group_interrupt, + sl_si91x_gpio_wakeup_t flags); + +/***************************************************************************/ /** + * @brief Configure the MCU HP instance group interrupts with trigger type (level/edge), polarity (high/low), interrupt type (and/or) + * and register the callback function for interrupts. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock + * - \ref sl_si91x_gpio_driver_enable_pad_receiver() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * @param[in] configuration - configuration pointer to + * \ref sl_si91x_gpio_group_interrupt_config_t structure + * @param[in] gpio_callback - IRQ function pointer + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_configure_group_interrupt(sl_si91x_gpio_group_interrupt_config_t *configuration, + sl_gpio_irq_callback_t gpio_callback); + +/***************************************************************************/ /** + * @brief Get the configured polarity of group interrupt. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use corresponding pad receiver API for corresponding GPIO instance. + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance + * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. + * @param[in] group_interrupt - GPIO group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] pin - The pin number on the port. + * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. + * Port 3 has 9 pins. + * ULP instance has total 12 pins. + * @return returns group interrupt polarity + * - 1, when GPIO pin status is HIGH + * - 0, when GPIO pin status is LOW + * + ******************************************************************************/ +uint8_t sl_si91x_gpio_driver_get_group_interrupt_polarity(sl_si91x_group_interrupt_t group_interrupt, + uint8_t port, + uint8_t pin); + +/***************************************************************************/ /** + * @brief Configure the polarity to a selected group interrupt which decides the active value of the pin to be + * considered for group interrupt generation. + * '0' – group interrupt gets generated when gpio input pin status is LOW + * '1' – group interrupt gets generated when gpio input pin status is HIGH + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use the corresponding pad receiver API for the corresponding GPIO instance. + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance + * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. + * @param[in] group_interrupt - GPIO group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] pin - The pin number on the port. + * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. + * Port 3 has 9 pins. + * ULP instance has total 12 pins. + * @param[in] polarity - polarity of GPIO group interrupt of type + * \ref sl_si91x_gpio_polarity_t + * - 1, group interrupt gets generated when GPIO pin status is '1' + * - 0, group interrupt gets generated when GPIO pin status is '0' + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_set_group_interrupt_polarity(sl_si91x_group_interrupt_t group_interrupt, + uint8_t port, + uint8_t pin, + sl_si91x_gpio_polarity_t polarity); + +/***************************************************************************/ /** + * @brief Get the configured level/edge event for the selected group interrupt. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use corresponding pad receiver API for corresponding GPIO instance. + * - \ref sl_gpio_driver_set_pin_mode(), + * - \ref sl_si91x_gpio_driver_set_pin_direction(), + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance + * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] group_interrupt - GPIO group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @return returns group interrupt level_edge + * - 1, for Edge + * - 0, for Level + * + ******************************************************************************/ +uint8_t sl_si91x_gpio_driver_get_group_interrupt_level_edge(uint8_t port, sl_si91x_group_interrupt_t group_interrupt); + +/***************************************************************************/ /** + * @brief Set the level/edge event for the selected group interrupt. + * '1' Triggers interrupt generation when configured edge is detected on pin + * '0' Triggers interrupt generation when configured level is detected on pin + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use the corresponding pad receiver API for the corresponding GPIO instance. + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance + * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. + * @param[in] port - The port to associate with the pin. + * - HP instance - PORT 0,1,2,3 + * - ULP instance - PORT 4 + * @param[in] group_interrupt - GPIO group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @param[in] level_edge - GPIO level edge group interrupt of type + * \ref sl_si91x_gpio_level_edge_t + * - 1, for Edge + * - 0, for Level + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_set_group_interrupt_level_edge(uint8_t port, + sl_si91x_group_interrupt_t group_interrupt, + sl_si91x_gpio_level_edge_t level_edge); + +/***************************************************************************/ /** + * @brief Unmask the selected group interrupt to enable interrupt clearing upon generation. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use corresponding pad receiver API for corresponding GPIO instance. + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance + * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] group_interrupt - GPIO group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_unmask_group_interrupt(uint8_t port, sl_si91x_group_interrupt_t group_interrupt); + +/***************************************************************************/ /** + * @brief Mask the selected group interrupt. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use the corresponding pad receiver API for the corresponding GPIO instance. + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * @param[in] port - The port to associate with the pin. + * - HP instance - PORT 0,1,2,3 + * - ULP instance - PORT 4 + * @param[in] group_interrupt - GPIO group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_mask_group_interrupt(uint8_t port, sl_si91x_group_interrupt_t group_interrupt); + +/***************************************************************************/ /** + * @brief Disable the clock for either the HP or ULP instance of the GPIO Peripheral. + * @param[in] clock - Selects M4 clock or ULP clock of type + * \ref sl_si91x_gpio_select_clock_t + * - 0, for M4 GPIO CLK + * - 1, for ULP GPIO CLK + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_disable_clock(sl_si91x_gpio_select_clock_t clock); + +/***************************************************************************/ /** + * @brief Enable the clock for either the HP or ULP instance of the GPIO peripheral. + * @param[in] clock - Selects M4 clock or ULP clock of type + * \ref sl_si91x_gpio_select_clock_t + * - 0, for M4 GPIO CLK + * - 1, for ULP GPIO CLK + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_enable_clock(sl_si91x_gpio_select_clock_t clock); + +/***************************************************************************/ /** + * @brief Enable the selected group interrupts for either the HP or ULP instance of the GPIO peripheral. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use the corresponding pad receiver API for the corresponding GPIO instance. + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance + * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. + * @param[in] group_interrupt - GPIO group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @param[in] port - The port to associate with the pin. + * - HP instance - PORT 0,1,2,3 + * - ULP instance - PORT 4 + * @param[in] pin - The pin number on the port. + * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. + * Port 3 has 9 pins. + * ULP instance has total 12 pins. + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * +*******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_enable_group_interrupt(sl_si91x_group_interrupt_t group_interrupt, + uint8_t port, + uint8_t pin); + +/***************************************************************************/ /** + * @brief Disable the selected group interrupts for either the HP or ULP instance of the GPIO peripheral. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_clock, for HP instance + * - \ref sl_si91x_gpio_driver_enable_pad_receiver(), for HP instance + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver(), for ULP instance + * Use the corresponding pad receiver API for the corresponding GPIO instance. + * + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt(), for HP instance + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt, for ULP instance + * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. + * @param[in] group_interrupt - GPIO group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @param[in] port - The port to associate with the pin. + * HP instance - PORT 0,1,2,3 + * ULP instance - PORT 4 + * @param[in] pin - The pin number on the port. + * HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. + * Port 3 has 9 pins. + * ULP instance has total 12 pins. + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * +*******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_disable_group_interrupt(sl_si91x_group_interrupt_t group_interrupt, + uint8_t port, + uint8_t pin); + +/***************************************************************************/ /** + * @brief Select the slew rate for the ULP instance of the GPIO peripheral. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() + * + * @param[in] gpio_num - GPIO pin number to be use + * @param[in] slew_rate - slew rate of type \ref sl_si91x_gpio_slew_rate_t + * - '0' - Slow + * - '1' - Fast + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_select_ulp_pad_slew_rate(uint8_t gpio_num, sl_si91x_gpio_slew_rate_t slew_rate); + +/***************************************************************************/ /** + * @brief Select the drive strength for the ULP instance of the GPIO peripheral. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() + * + * @param[in] gpio_num - GPIO pin number to be use + * @param[in] strength - Drive strength selector(E1,E2) of type + * \ref sl_si91x_gpio_driver_strength_select_t + * - 0, for two_milli_amps (E1=0,E2=0) + * - 1, for four_milli_amps (E1=0,E2=1) + * - 2, for eight_milli_amps (E1=1,E2=0) + * - 3, for twelve_milli_amps(E1=1,E2=1) + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_select_ulp_pad_driver_strength(uint8_t gpio_num, + sl_si91x_gpio_driver_strength_select_t strength); + +/***************************************************************************/ /** + * @brief Select the driver-disabled state control for the ULP instance of the GPIO peripheral. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() + * + * @param[in] gpio_num - GPIO pin number to be use + * @param[in] disable_state - driver disable state of type + * \ref sl_si91x_gpio_driver_disable_state_t + * - 0, for HiZ (P1=0,P2=0) + * - 1, for Pull up (P1=0,P2=1) + * - 2, for Pull down (P1=1,P2=0) + * - 3, for Repeater (P1=1,P2=1) + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_select_ulp_pad_driver_disable_state( + uint8_t gpio_num, + sl_si91x_gpio_driver_disable_state_t disable_state); + +/***************************************************************************/ /** + * @brief Disable the receiver enable bit for the ULP instance of the GPIO peripheral. + * @pre Pre-condition: + * - \ref sl_si91x_gpio_driver_enable_clock() + * @param[in] gpio_num - GPIO pin number to be used + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_disable_ulp_pad_receiver(uint8_t gpio_num); + +/***************************************************************************/ /** + * @brief Enable the receiver enable bit for the ULP instance of the GPIO peripheral. + * @pre Pre-condition: + * - \ref sl_si91x_gpio_driver_enable_clock() + * @param[in] gpio_num - GPIO pin number to be used + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_enable_ulp_pad_receiver(uint8_t gpio_num); + +/***************************************************************************/ /** + * @brief Configure the MCU ULP instance pin interrupts with the trigger type (level/edge) + * and register the callback function for interrupts. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * @param[in] int_no - The interrupt number to trigger. + * @param[in] flags - Interrupt configuration flags of type + * \ref sl_si91x_gpio_interrupt_config_flag_t + * @param[in] pin - GPIO pin number (0 to 11) + * @param[in] gpio_callback - IRQ function pointer + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_configure_ulp_pin_interrupt(uint8_t int_no, + sl_si91x_gpio_interrupt_config_flag_t flags, + sl_si91x_gpio_pin_ulp_t pin, + sl_gpio_irq_callback_t gpio_callback); + +/***************************************************************************/ /** + * @brief Set the NPSS GPIO pin MUX (mode) to the selected mode. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * + * @param[in] pin - NPSS GPIO pin number(0...4) of type + * \ref sl_si91x_uulp_npss_mode_t + * @param[in] mode - NPSS GPIO MUX value (0 to 10) + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_set_uulp_npss_pin_mux(uint8_t pin, sl_si91x_uulp_npss_mode_t mode); + +/***************************************************************************/ /** + * @brief Enable/disable the NPSS GPIO Input Buffer. + * @pre Pre-condition: + * - \ref sl_si91x_gpio_driver_enable_clock() + * @param[in] pin - is NPSS GPIO pin number (0...4) + * @param[in] receiver - is enable/disable NPSS GPIO receiver of type + * \ref sl_si91x_gpio_receiver_t + * - '1' - Enable + * - '0' - Disable + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_select_uulp_npss_receiver(uint8_t pin, sl_si91x_gpio_receiver_t receiver); + +/***************************************************************************/ /** + * @brief Set the direction for the selected NPSS GPIO. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * @param[in] pin - is NPSS GPIO pin number (0...4) + * @param[in] direction - is direction value (Input / Output) of type + * \ref sl_si91x_gpio_direction_t + * - '1' - Input Direction + * - '0' - Output Direction + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_set_uulp_npss_direction(uint8_t pin, sl_si91x_gpio_direction_t direction); + +/***************************************************************************/ /** + * @brief Get the direction of the selected NPSS GPIO. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() + * + * @param[in] pin - is NPSS GPIO pin number(0...4) + * @return returns the GPIO pin direction + * - 1, Input Direction + * - 0, Output Direction + *******************************************************************************/ +uint8_t sl_si91x_gpio_driver_get_uulp_npss_direction(uint8_t pin); + +/***************************************************************************/ /** + * @brief Control(set or clear) the NPSS GPIO pin value. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() + * @param[in] pin - is NPSS GPIO pin number (0...4) of type + * \ref sl_si91x_gpio_pin_value_t + * @param[in] pin_value - is NPSS GPIO pin value + * - '0' - Output + * - '1' - Input + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_set_uulp_npss_pin_value(uint8_t pin, sl_si91x_gpio_pin_value_t pin_value); + +/***************************************************************************/ /** + * @brief Read the status of the selected NPSS GPIO pin value. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_value() + * @param[in] pin - is NPSS GPIO pin number (0...4) + * @return returns the pin logical state of pin + * - '0' - Output + * - '1' - Input + * + ******************************************************************************/ +uint8_t sl_si91x_gpio_driver_get_uulp_npss_pin(uint8_t pin); + +/***************************************************************************/ /** + * @brief Select the NPSS GPIO polarity for generating the interrupt. + * @pre Pre-condition: + * - \ref sl_si91x_gpio_driver_enable_clock() + * @param[in] pin - is NPSS GPIO pin number (0...4) + * @param[in] polarity - GPIO polarity + * \ref sl_si91x_gpio_polarity_t + * - '1' - High + * - '0' - Low + * + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_select_uulp_npss_polarity(uint8_t pin, sl_si91x_gpio_polarity_t polarity); + +/***************************************************************************/ /** + * @brief Set the NPSS GPIO interrupt as a wake up source across sleep wakeups. + * @pre Pre-condition: + * - \ref sl_si91x_gpio_driver_enable_clock() + * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_set_uulp_npss_wakeup_interrupt(uint8_t npssgpio_interrupt); + +/***************************************************************************/ /** + * @brief Clear the UULP NPSS GPIO Interrupt as a wake up source. + * @pre Pre-condition: + * - \ref sl_si91x_gpio_driver_enable_clock() + * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_clear_uulp_npss_wakeup_interrupt(uint8_t npssgpio_interrupt); + +/***************************************************************************/ /** + * @brief Mask the selected NPSS GPIO interrupt. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_set_uulp_pad_configuration() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() + * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_mask_uulp_npss_interrupt(uint8_t npssgpio_interrupt); + +/***************************************************************************/ /** + * @brief Unmask the selected NPSS GPIO interrupt. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_set_uulp_pad_configuration() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() + * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_unmask_uulp_npss_interrupt(uint8_t npssgpio_interrupt); + +/***************************************************************************/ /** + * @brief Clear the selected NPSS GPIO interrupt. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_set_uulp_pad_configuration() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() + * - \ref sl_si91x_gpio_configure_uulp_interrupt() + * @param[in] npssgpio_interrupt - OR'ed values of the NPSS GPIO interrupts + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_clear_uulp_interrupt(uint8_t npssgpio_interrupt); + +/***************************************************************************/ /** + * @brief Get the current status of all the NPSS GPIO interrupt status. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_set_uulp_pad_configuration() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() + * - \ref sl_si91x_gpio_configure_uulp_interrupt() + * + * @param none + * @return returns the UULP INTR status. + * - 1, interrupt has been raised + * - 0, interrupt is masked or not raised + * + ******************************************************************************/ +uint8_t sl_si91x_gpio_driver_get_uulp_interrupt_status(void); + +/***************************************************************************/ /** + * @brief Get the selected ULP instance GPIO pin interrupt status. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_configure_ulp_pin_interrupt() + * @param[in] flags : ULP GPIO interrupt sources status. + * @return returns the ULP INTR status. + * 1, interrupt has been raised + * 0, interrupt is masked or not raised + ******************************************************************************/ +uint32_t sl_si91x_gpio_driver_get_ulp_interrupt_status(uint32_t flags); + +/***************************************************************************/ /** + * @brief Clear the selected ULP instance GPIO pin interrupts. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_configure_ulp_pin_interrupt() + * @param[in] flags : ULP GPIO interrupt sources to clear. + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_clear_ulp_interrupt(uint32_t flags); + +/***************************************************************************/ /** + * @brief Clear the selected ULP instance group interrupt. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * - \ref sl_si91x_gpio_driver_configure_ulp_group_interrupt() + * + * Use the corresponding group interrupt configuration API for the corresponding GPIO instance. + * @param[in] group_interrupt - Group interrupt number of type + * \ref sl_si91x_group_interrupt_t + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_clear_ulp_group_interrupt(sl_si91x_group_interrupt_t group_interrupt); + +/***************************************************************************/ /** + * @brief Configure the UULP GPIO pin interrupt with interrupt type level or edge and registers callback function for interrupts. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_set_uulp_pad_configuration() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() + * @param[in] flags - Interrupt configuration flags of type + * \ref sl_si91x_gpio_interrupt_config_flag_t + * @param[in] npssgpio_interrupt - NPSS GPIO input number (0 to 4) + * @param[in] gpio_callback - IRQ function pointer + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_configure_uulp_interrupt(sl_si91x_gpio_interrupt_config_flag_t flags, + uint8_t npssgpio_interrupt, + sl_gpio_irq_callback_t gpio_callback); + +/***************************************************************************/ /** + * @brief Configure the MCU ULP instance group interrupts with trigger type (level/edge), polarity (high/low), interrupt type (and/or) + * and register the callback function for interrupts. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_enable_ulp_pad_receiver() + * - \ref sl_gpio_driver_set_pin_mode() + * - \ref sl_si91x_gpio_driver_set_pin_direction() + * @param[in] configuration - configuration pointer to + * \ref sl_si91x_gpio_group_interrupt_config_t structure + * @param[in] gpio_callback - IRQ function pointer + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_configure_ulp_group_interrupt(sl_si91x_gpio_group_interrupt_config_t *configuration, + sl_gpio_irq_callback_t gpio_callback); + +/***************************************************************************/ /** + * @brief Toggle the selected UULP pin status. + * @pre Pre-conditions: + * - \ref sl_si91x_gpio_driver_enable_clock() + * - \ref sl_si91x_gpio_driver_select_uulp_npss_receiver() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux() + * - \ref sl_si91x_gpio_driver_set_uulp_npss_direction() + * @param[in] pin - UULP pin number to toggle + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument + * - \ref SL_STATUS _OK (0X000) - Success + * + ******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_toggle_uulp_npss_pin(uint8_t pin); + +/***************************************************************************/ /** + * @brief Configure the UULP GPIO pin mode, receiver enable, direction and polarity settings. + * @pre Pre-condition: + * - \ref sl_si91x_gpio_driver_enable_clock() + * @param[in] pad_config : PAD configuration pointer to \ref uulp_pad_config_t structure + * @return returns status 0 if successful, + * else error code as follow. + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - \ref SL_STATUS _OK (0X000) - Success + * + *******************************************************************************/ +sl_status_t sl_si91x_gpio_driver_set_uulp_pad_configuration(uulp_pad_config_t *pad_config); + +/***************************************************************************/ /** +* @brief Get the release, SQA, and development version numbers of the GPIO peripheral. +* @param none +* @return returns structure of type \ref sl_si91x_gpio_version_t +*******************************************************************************/ +sl_si91x_gpio_version_t sl_si91x_gpio_driver_get_version(void); + +/** @} (end addtogroup GPIO) */ + +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup GPIO General-Purpose Input-Output +/// @{ +/// +/// @details +/// +/// @n @section GPIO_Intro Introduction +/// The GPIO (General Purpose Input/Output) driver provides a comprehensive set of functions to +/// configure and control the GPIO pins. The GPIO pins can be used for various purposes such as reading +/// digital signals, controlling external devices, generating interrupts, etc. The GPIO driver simplifies the process of interacting +/// with GPIO pins, making it easier to integrate GPIO functionality into the application. +/// +/// @n @section GPIO_Config Configuration +/// +/// @li To configure the GPIO driver, identify the GPIO instance and pins you want to configure. Set the direction of each pin +/// as either input or output. Then, if needed, set the drive strength for the pins to ensure they can +/// handle the required current. Set the GPIO mux and pad selection if needed. Configure any interrupt settings, such as trigger type (level or edge) and +/// interrupt polarity (high or low). If interrupts are used, register the appropriate callback functions to handle them. +/// +/// @li Additionally, make sure to enable the GPIO clock for the selected instance to ensure the GPIO peripheral operates correctly. +/// +/// @li These steps are necessary for the GPIO pins to function correctly and trigger interrupts as required by the application. +/// The respective APIs for the same functionality will change depending on the GPIO in use i.e. Ultra Ultra Low Power (UULP), Ultra Low Power (ULP), or High Power (HP). +/// +/// @n @section GPIO_Usage Usage +/// +/// @li For UULP GPIOs, common functions include: +/// +/// 1. @ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux +/// 2. @ref sl_si91x_gpio_driver_select_uulp_npss_receiver +/// 3. @ref sl_si91x_gpio_driver_set_uulp_npss_direction +/// 4. @ref sl_si91x_gpio_driver_set_uulp_npss_pin_value +/// 5. @ref sl_si91x_gpio_driver_get_uulp_npss_pin +/// +/// @li To set the pin MUX mode, @ref sl_si91x_gpio_driver_set_uulp_npss_pin_mux can be used. +/// For enabling or disabling the input buffer, use @ref sl_si91x_gpio_driver_select_uulp_npss_receiver. Additionally, +/// set pin direction with @ref sl_si91x_gpio_driver_set_uulp_npss_direction. Also, use @ref sl_si91x_gpio_driver_set_uulp_npss_pin_value to set the pin value. +/// +/// @li For ULP GPIOs, common functions include: +/// +/// 1. @ref sl_si91x_gpio_driver_select_ulp_pad_slew_rate +/// 2. @ref sl_si91x_gpio_driver_select_ulp_pad_driver_strength +/// 3. @ref sl_si91x_gpio_driver_disable_ulp_pad_receiver +/// 4. @ref sl_si91x_gpio_driver_enable_ulp_pad_receiver +/// 5. @ref sl_si91x_gpio_driver_configure_ulp_pin_interrupt +/// +/// @li With @ref sl_si91x_gpio_driver_select_ulp_pad_slew_rate, set the slew rate for ULP GPIO pins. With @ref sl_si91x_gpio_driver_select_ulp_pad_driver_strength +/// choose the drive strength. To manage the receiver, @ref sl_si91x_gpio_driver_enable_ulp_pad_receiver and for disabling and enabling the receiver +/// @ref sl_si91x_gpio_driver_enable_ulp_pad_receiver can be used, respectively. For configuring interrupts, @ref sl_si91x_gpio_driver_configure_ulp_pin_interrupt +/// can be used to set up pin interrupts with defined trigger types (level/edge). +/// +/// @li For HP GPIOs, common functions include: +/// +/// 1. @ref sl_si91x_gpio_driver_set_pin_direction +/// 2. @ref sl_si91x_gpio_driver_enable_pad_receiver +/// 3. @ref sl_si91x_gpio_driver_enable_pad_selection +/// 4. @ref sl_si91x_gpio_driver_configure_group_interrupt +/// 5. @ref sl_si91x_gpio_driver_enable_clock +/// +/// @li To configure a GPIO pin, first, use @ref sl_si91x_gpio_driver_set_pin_direction to set its direction. +/// To enable the receiver for reading the pin status, use @ref sl_si91x_gpio_driver_enable_pad_receiver. +/// For selecting the pad, use @ref sl_si91x_gpio_driver_enable_pad_selection. To configure group interrupts for the MCU HP instance, +/// use @ref sl_si91x_gpio_driver_configure_group_interrupt. Make sure to enable the clock for HP or ULP instances, +/// using @ref sl_si91x_gpio_driver_enable_clock. +/// +/// @li Other APIs can be referred to in the API Documentation. +/// +/// @} end group GPIO ********************************************************/ + +#ifdef __cplusplus +} +#endif + +#endif ///< GPIO_PRESENT +#endif ///< SL_SI91X_DRIVER_GPIO_H diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_efuse.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_efuse.h index c05677532..b50e9ec2f 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_efuse.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_efuse.h @@ -78,19 +78,18 @@ typedef struct { /***************************************************************************/ /** * @brief This API is used to get the release, sqa and dev version of EFUSE -* @param[in] none +* @param none * @return \ref sl_efuse_version_t type structure -* ******************************************************************************/ sl_efuse_version_t sl_si91x_efuse_get_version(void); /***************************************************************************/ /** * @brief This API is used to enable peripheral clock for efuse. -* @param[in] none +* @param none * @return returns status 0 if successful, * else error code. -* \ref SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument \n -* \ref SL_STATUS _OK - Success \n +* - \ref SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument \n +* - \ref SL_STATUS_OK - Success \n ******************************************************************************/ sl_status_t sl_si91x_efuse_enable_clock(void); @@ -104,28 +103,29 @@ sl_status_t sl_si91x_efuse_enable_clock(void); * * @pre \ref sl_si91x_efuse_memory_mapped_read_byte() * -* @param[in] none +* @param none * @return returns status 0 if successful, * else error code. -* \ref SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument \n -* \ref SL_STATUS _OK - Success \n +* - \ref SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument \n +* - \ref SL_STATUS_OK - Success \n ******************************************************************************/ sl_status_t sl_si91x_efuse_disable_clock(void); /***************************************************************************/ /** -* @brief This API is used to Initialize the eFUSE. This API first enables the -* efuse clock and then efuse. -* @param[in] none -* @return returns status 0 if successful, -* else error code. -* \ref SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument \n -* \ref SL_STATUS _OK - Success \n +* @brief This API is used to Initialize the eFUSE. This API first enables the efuse clock and then efuse. +* +* @param none +* +* @return returns status 0 if successful,else error code. +* - \ref SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument \n +* - \ref SL_STATUS_OK - Success \n ******************************************************************************/ sl_status_t sl_si91x_efuse_init(void); /***************************************************************************/ /** -* @brief This API is used to un-initialize the eFUSE. This API first disables -* the efuse and then efuse clock. +* @brief This API is used to un-initialize the eFUSE. This API first disables the efuse and then efuse clock. +* +* @pre Pre-conditions: * @pre \ref sl_si91x_efuse_init() * * @pre \ref sl_si91x_efuse_set_address() @@ -134,26 +134,25 @@ sl_status_t sl_si91x_efuse_init(void); * * @pre \ref sl_si91x_efuse_memory_mapped_read_byte() * -* @param[in] none -* @return returns status 0 if successful, -* else error code. -* \ref SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument \n -* \ref SL_STATUS _OK - Success \n +* @param none +* @return returns status 0 if successful,else error code. +* - \ref SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument \n +* - \ref SL_STATUS_OK - Success \n ******************************************************************************/ sl_status_t sl_si91x_efuse_deinit(void); /***************************************************************************/ /** * @brief This API is used to set the eFUSE address for read and write * operations. -* @pre \ref sl_si91x_efuse_init() -* +* @pre Pre-condition: +* - \ref sl_si91x_efuse_init() * @param[in] address - Holds the address at which the data has to be written -* in the efuse +* in the efuse Max is 0x31. * @return returns status 0 if successful, * else error code. * - SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid * argument -* - SL_STATUS _OK - Success +* - SL_STATUS_OK - Success * ******************************************************************************/ sl_status_t sl_si91x_efuse_set_address(uint16_t address); @@ -161,17 +160,16 @@ sl_status_t sl_si91x_efuse_set_address(uint16_t address); /***************************************************************************/ /** * @brief This API is used to get the eFUSE address for read and write * operations. -* @pre \ref sl_si91x_efuse_init() -* -* @pre \ref sl_si91x_efuse_set_address() -* +* @pre Pre-conditions: +* - \ref sl_si91x_efuse_init() +* - \ref sl_si91x_efuse_set_address() * @param[out] read_address - Pointer holds the address at which the data has * to be written in the efuse * @return returns status 0 if successful, * else error code as follow: * - SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid * argument -* - SL_STATUS _OK - Success +* - SL_STATUS_OK - Success * ******************************************************************************/ sl_status_t sl_si91x_efuse_get_address(uint16_t *read_address); @@ -180,19 +178,18 @@ sl_status_t sl_si91x_efuse_get_address(uint16_t *read_address); * @brief This API is used to write the bit in the position of an 8-bit location * in eFUSE specified address. There is only one programming scheme, * which is single bit programming. - * @pre \ref sl_si91x_efuse_init() -* - * @pre \ref sl_si91x_efuse_set_address() -* + * @pre Pre-conditions: + * - \ref sl_si91x_efuse_init() + * - \ref sl_si91x_efuse_set_address() * @param[in] address - Holds the address at which the data has to be written in - * the efuse + * the efuse Max is 0x31. * @param[in] bit_pos - Variable that holds the position of bit on which the - * data will be placed + * data will be placed (1 - 7). * @param[in] hold_time - eFUSE strobe hold time, depends on clock frequency of eFUSE controller * @return returns status 0 if successful, * else error code as follow. * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - SL_STATUS _OK - Success + * - SL_STATUS_OK - Success * ******************************************************************************/ sl_status_t sl_si91x_efuse_write_bit(uint16_t address, uint8_t bit_pos, uint32_t hold_time); @@ -206,18 +203,17 @@ sl_status_t sl_si91x_efuse_write_bit(uint16_t address, uint8_t bit_pos, uint32_t * * @pre \ref sl_si91x_efuse_write_bit() * - * @param[in] address - Holds the address from where we are reading the 1 word - * of data + * @param[in] address - Holds the address from where we are reading the 1 word (max value is 0x31). + * of data (max value is 0x31). * @param[out] read_word - Pointer that points to the data which is stored in the * efuse - * @param[in] soc_clk - It is input clock frequency of eFUSE controller + * @param[in] soc_clk - It is input clock frequency of eFUSE controller in range between (1000000 -180000000). * @return returns status 0 if successful, * else error code as follow. * - SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid * argument -*- * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - SL_STATUS _OK - Success + * - SL_STATUS_OK - Success * ******************************************************************************/ sl_status_t sl_si91x_efuse_memory_mapped_read_word(uint16_t address, uint16_t *read_word, uint32_t soc_clk); @@ -225,50 +221,44 @@ sl_status_t sl_si91x_efuse_memory_mapped_read_word(uint16_t address, uint16_t *r /***************************************************************************/ /** * @brief This API is used to read a 1 byte of data from 32x8 byte eFUSE memory(OTP) in * memory mapped mode. - * @pre \ref sl_si91x_efuse_init() -* - * @pre \ref sl_si91x_efuse_set_address() -* - * @pre \ref sl_si91x_efuse_write_bit() -* + * @pre Pre-conditions: + * - \ref sl_si91x_efuse_init() + * - \ref sl_si91x_efuse_set_address() + * - \ref sl_si91x_efuse_write_bit() * @param[in] address - Holds the address from where we are reading the 1 byte - * of data + * of data (max value is 0x31). * @param[out] read_byte - Pointer that points to the 8 bit data which is stored * in the efuse - * @param[in] soc_clk - It is input clock frequency + * @param[in] soc_clk - It is input clock frequency in range between (1000000 -180000000). * @return returns status 0 if successful, * else error code as follow. * - SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid * argument -*- * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - SL_STATUS _OK - Success -* + * - SL_STATUS_OK - Success + * ******************************************************************************/ sl_status_t sl_si91x_efuse_memory_mapped_read_byte(uint16_t address, uint8_t *read_byte, uint32_t soc_clk); /***************************************************************************/ /** * @brief This API is used to read a 1 byte of data from 32x8 byte eFUSE memory (OTP) in * fsm mode. - * @pre \ref sl_si91x_efuse_init() -* - * @pre \ref sl_si91x_efuse_set_address() -* - * @pre \ref sl_si91x_efuse_write_bit() -* + * @pre Pre-conditions: + * - \ref sl_si91x_efuse_init() + * - \ref sl_si91x_efuse_set_address() + * - \ref sl_si91x_efuse_write_bit() * @param[in] address - Holds the address from where we are reading the 1 byte - * of data + * of data (max value is 0x31). * @param[out] read_byte - Pointer that points to the 8 bit data which is stored * in the efuse - * @param[in] soc_clk - It is input clock frequency + * @param[in] soc_clk - It is input clock frequency in range between (1000000 -180000000). * @return returns status 0 if successful, * else error code as follow. - * - SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid + * - SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid * argument -*- - * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - SL_STATUS _OK - Success -* + * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - SL_STATUS_OK - Success + * ******************************************************************************/ sl_status_t sl_si91x_efuse_fsm_read_byte(uint16_t address, uint8_t *read_byte, uint32_t soc_clk); @@ -276,7 +266,8 @@ sl_status_t sl_si91x_efuse_fsm_read_byte(uint16_t address, uint8_t *read_byte, u * @brief This API is used to enable the EFUSE. * @pre \ref sl_si91x_efuse_enable_clock() * -* @param[in] none +* @param none +* * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_efuse_enable(void) @@ -294,7 +285,7 @@ __STATIC_INLINE void sl_si91x_efuse_enable(void) * * @pre \ref sl_si91x_efuse_memory_mapped_read_byte() * -* @param[in] none +* @param none * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_efuse_disable(void) @@ -302,7 +293,63 @@ __STATIC_INLINE void sl_si91x_efuse_disable(void) RSI_EFUSE_Disable(EFUSE); } +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup EFUSE +/// @{ +/// +/// @details +/// +/// @n @section EFUSE_Intro Introduction +/// +/// Electrically programmable fuses or eFUSEs contains one-time programmable memory +/// that are used to store configuration or data in integrated circuits (ICs). +/// E-fuse use 32-bit addressing with each address containing 8 bits. +/// The eFuse controller is used to program and read these bits. +/// +/// @li Once information is programmed into an eFUSE, it is typically irreversible. +/// Due to their irreversible nature, eFUSEs are suitable for storing critical data that cannot be altered. +/// +/// @li eFUSEs find application in various areas, including +/// +/// 1. Supports eFuse programming and read operations +/// +/// 2. Supports memory mapped and FSM based read operation +/// +/// @n @section EFUSE_Config Configuration +/// +/// The following apis allows users to read and write into the E-fuse 256-bit address. +/// +/// 1. @ref sl_si91x_efuse_fsm_read_byte or @ref sl_si91x_efuse_memory_mapped_read_byte or @ref sl_si91x_efuse_memory_mapped_read_word +/// +/// 2. @ref sl_si91x_efuse_write_bit +/// +/// @n @section EFUSE_Use Usage +/// +/// The Efuse application provides an example of how to use various write and read +/// operations to write to and read from OTP (one-time programmable) memory. +/// The WRITE_ENABLE macro must first be enabled before an application may write to memory. +/// By default, only read operations are carried out at the designated memory address. The efuse +/// can be initialized and configured using the following apis in default mode. And it also has +/// other apis where one can use them as per requirements which are discussed in functions. +/// +/// 1. @ref sl_si91x_efuse_init +/// +/// 2. @ref sl_si91x_efuse_set_address +/// +/// 3. @ref sl_si91x_efuse_get_address +/// +/// 4. @ref sl_si91x_efuse_write_bit +/// +/// 5. @ref sl_si91x_efuse_fsm_read_byte can be used to read byte when the mode of read is FSM. +/// +/// 6. @ref sl_si91x_efuse_memory_mapped_read_byte can be used to read byte when the mode of read is Memory mapped mode. +/// +/// 7. @ref sl_si91x_efuse_memory_mapped_read_word can be used to read word when the mode of read is Memory mapped mode. +/// +/// 8. @ref sl_si91x_efuse_deinit +/// /** @} (end addtogroup EFUSE) */ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_gspi.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_gspi.h index 74c048adb..81d6a33a0 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_gspi.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_gspi.h @@ -134,9 +134,9 @@ typedef struct { // Prototypes /***************************************************************************/ /** - * Set the clock for the GSPI peripheral, Configures the PLL clock and + * @brief This API will configure the clock for GSPI module. + * @details Set the clock for the GSPI peripheral, Configures the PLL clock and * SOC clock with the value set by the user in the clock configuration structure. - * * @param clock_configuration Pointer to the clock configuration structure \ref sl_gspi_clock_config_t * @return status * - \ref SL_STATUS_OK (0x0000) - Success @@ -149,13 +149,12 @@ sl_status_t sl_si91x_gspi_configure_clock(sl_gspi_clock_config_t *clock_configur /***************************************************************************/ /** - * Initialize the GSPI. If the DMA is enabled, it also initializes the DMA. - * Pass the address of the pointer for storing the GSPI master handle, + * @brief This API will initializes the GSPI. + * @details as partof GSPI initialization if the DMA is enabled, it also initializes the DMA module. + * Passing the address of the pointer for storing the GSPI master handle, * which can be used in the future for other function calls. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_gspi_configure_clock - * * @param[in] instance GSPI Instance. \ref sl_gspi_instance_t * @param[in] gspi_handle Double Pointer to the GSPI driver handle \ref sl_gspi_handle_t * @return status @@ -167,21 +166,33 @@ sl_status_t sl_si91x_gspi_init(sl_gspi_instance_t instance, sl_gspi_handle_t *gs /***************************************************************************/ /** - * Uninitialize the GSPI. If the DMA is enabled, it also uninitializes the DMA. - * - * @pre Pre-conditions: + * @brief This API will Uninitialize the GSPI. + * @details This will Uninitialize the GSPI and if the DMA is enabled, + * it also uninitializes the DMA module. + * @pre Pre-condition: * - \ref sl_si91x_gspi_init - * * @param[in] gspi_handle Pointer to the GSPI driver handle \ref sl_gspi_handle_t * @return status * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * + * @note + * When the GSPI module is used in combination with other peripherals, while de-initializing in the application, refer to the notes below: + * 1. Whenever sl_si91x_gspi_deinit() gets called, it will power down the domain (PERI_EFUSE) which contains different peripherals mentioned below: + * USART, UART, I2C, SSI Master, SSI Slave, Generic-SPI Master, I2S Master, I2S Slave, Micro-DMA Controller, Config Timer, + * Random-Number Generator, CRC Accelerator, SIO, QEI, MCPWM and EFUSE. + * Since deinit power downs the PERI_EFUSE doamin, it's recommended to call the sl_si91x_gspi_deinit() API at the end of the application. + * 2. Few peripherlas (ULP Peripherals, UULP Peripherals, GPDMA and SDIO-SPI) have seperate domains that can be powered down indepedently. For additional details, refer to the Power architecture section in the Hardware Reference Manual + * e.g., To power down ULP UART, use the API below: + * RSI_PS_M4ssPeriPowerDown(ULPSS_PWRGATE_ULP_UART); + * Here, ULP_UART has seperate power domain ULPSS_PWRGATE_ULP_UART, which can be power down indepedently. Refer to the rsi_power_save.h file for all power gates definitions. ******************************************************************************/ sl_status_t sl_si91x_gspi_deinit(sl_gspi_handle_t gspi_handle); /***************************************************************************/ /** - * Control and configure the GSPI. + * @brief This API will be used to configure the GSPI module. + * @details The GSPI control and configuration options are listed below: * - The configurations are listed below: * - swap_read (enable/disable) * - swap_write (enable/disable) @@ -189,11 +200,9 @@ sl_status_t sl_si91x_gspi_deinit(sl_gspi_handle_t gspi_handle); * - clock_mode (mode0/mode3) * - slave_select_mode (hw_output/sw) * - bitrate - * * @pre Pre-conditions: * - \ref sl_si91x_gspi_configure_clock * - \ref sl_si91x_gspi_init - * * @param[in] gspi_handle Pointer to the GSPI driver handle \ref sl_gspi_handle_t * @param[in] control_configuration pointer to the configuration structure \ref sl_gspi_control_config_t * @return status @@ -212,17 +221,15 @@ sl_status_t sl_si91x_gspi_set_configuration(sl_gspi_handle_t gspi_handle, /***************************************************************************/ /** - * Receive data from the secondary device. - * If DMA is enabled, it configures the DMA channel and required parameters. + * @brief This API will receives data from the secondary device. + * @details If DMA is enabled, it configures the DMA channel and required parameters. * When the received data is equal to data_length passed in this function, * a callback event is generated which can be registered using \ref sl_si91x_gspi_register_event_callback - * * @pre Pre-conditions: * - \ref sl_si91x_gspi_configure_clock * - \ref sl_si91x_gspi_init * - \ref sl_si91x_gspi_set_configuration * - \ref sl_si91x_gspi_set_slave_number - * * @param[in] gspi_handle Pointer to the GSPI driver handle \ref sl_gspi_handle_t * @param[in] data pointer to the variable that will store the received data * @param[in] data_length (uint32_t) number of data items to receive @@ -237,17 +244,15 @@ sl_status_t sl_si91x_gspi_receive_data(sl_gspi_handle_t gspi_handle, void *data, /***************************************************************************/ /** - * Send data to the secondary device. - * If DMA is enabled, it configures the DMA channel and required parameters. + * @brief This API will Send data to the secondary device. + * @details If DMA is enabled, it configures the DMA channel and required parameters. * When the send data is equal to data_length passed in this function, * a callback event is generated which can be registered using \ref sl_si91x_gspi_register_event_callback - * * @pre Pre-conditions: * - \ref sl_si91x_gspi_configure_clock * - \ref sl_si91x_gspi_init * - \ref sl_si91x_gspi_set_configuration - * - \ref sl_si91x_gspi_set_slave_number - * + * - \ref sl_si91x_gspi_set_slave_number * @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) * @param[in] data const pointer to the variable that has data which needs to be sent * @param[in] data_length (uint32_t) number of data items to send @@ -262,17 +267,15 @@ sl_status_t sl_si91x_gspi_send_data(sl_gspi_handle_t gspi_handle, const void *da /***************************************************************************/ /** - * Send and receive data to the secondary device simultaneously. - * If DMA is enabled, it configures the DMA channel and required parameters. + * @brief This API will Send and receive data to the secondary device simultaneously. + * @details If DMA is enabled, it configures the DMA channel and required parameters. * When the received data and send data is equal to data_length passed in this function, - * a callback event is generated which can be registered using \ref sl_si91x_gspi_register_event_callback - * + * a callback event is generated which can be registered using \ref sl_si91x_gspi_register_event_callback. * @pre Pre-conditions: * - \ref sl_si91x_gspi_configure_clock * - \ref sl_si91x_gspi_init * - \ref sl_si91x_gspi_set_configuration - * - \ref sl_si91x_gspi_set_slave_number - * + * - \ref sl_si91x_gspi_set_slave_number * @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) * @param[in] data_out const pointer to the variable that has data which needs to be sent * @param[in] data pointer to the variable that will store the received data @@ -291,30 +294,30 @@ sl_status_t sl_si91x_gspi_transfer_data(sl_gspi_handle_t gspi_handle, /***************************************************************************/ /** - * Set the main state, i.e., activate/de-activate the main. - * - * @pre Pre-conditions: - * - \ref sl_si91x_gspi_configure_clock - * - \ref sl_si91x_gspi_init - * - * @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) - * @param[in] value (boolean_t) Enable or Disable - * @return status - * - \ref SL_STATUS_OK (0x0000) - Success - * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - \ref SL_STATUS_BUSY (0x0004) - Driver is busy - * - \ref SL_STATUS_INVALID_MODE (0x0024) - Mode is invalid (Fails to activate master) - ******************************************************************************/ +* @brief This API will set the master state as active or de-active. +* @details Set the main state, i.e., activate/de-activate. +* If the master is not required in the application for a specific time, +* it can be turned on/off in runtime by using this API. +* @pre Pre-conditions: +* - \ref sl_si91x_gspi_configure_clock +* - \ref sl_si91x_gspi_init +* @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) +* @param[in] value (boolean_t) Enable or Disable +* @return status +* - \ref SL_STATUS_OK (0x0000) - Success +* - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer +* - \ref SL_STATUS_BUSY (0x0004) - Driver is busy +* - \ref SL_STATUS_INVALID_MODE (0x0024) - Mode is invalid (Fails to activate master) +******************************************************************************/ sl_status_t sl_si91x_gspi_set_master_state(sl_gspi_handle_t gspi_handle, boolean_t value); /***************************************************************************/ /** - * Register the user callback function. - * At the time of events, the function passed in the parameter is called with the respective + * @brief This API will Register the user callback function. + * @details At the time of events, the function passed in the parameter is called with the respective * event as the parameter. * Before calling this function again, it is mandatory to call the \ref sl_si91x_gspi_unregister_event_callback * function to unregister the callback, otherwise it returns SL_STATUS_BUSY error code. - * * @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) * @param[in] callback_event Pointer to the function that needs to be called at the time of interrupt * ( \ref sl_gspi_signal_event_t) @@ -327,54 +330,48 @@ sl_status_t sl_si91x_gspi_register_event_callback(sl_gspi_handle_t gspi_handle, /***************************************************************************/ /** - * Un-register the user callback function. - * It is mandatory to call this function before registering the callback again. - * - * @pre Pre-conditions: + * @brief This API will Un-register the user callback function. + * @note It is mandatory to call this function before registering the callback again. + * @pre Pre-condition: * - \ref sl_si91x_gspi_register_event_callback - * * @param[in] none * @return none ******************************************************************************/ void sl_si91x_gspi_unregister_event_callback(void); /***************************************************************************/ /** - * Get the GSPI version. - * It returns the API version of GSPI. - * + * @brief This API will Gets the GSPI version. + * @details This will read the current API vesion of GSPI and + * It returns same. * @param[in] none - * @return (sl_gspi_version_t) type structure + * @return \ref sl_gspi_version_t type structure ******************************************************************************/ sl_gspi_version_t sl_si91x_gspi_get_version(void); /***************************************************************************/ /** - * Get the transfer status GSPI. - * It returns the \ref sl_gspi_status_t type structure. The members are: + * @brief This API will Get the transfer status GSPI. + * @details It returns the \ref sl_gspi_status_t type structure. The members are: * - Busy * - Data Lost * - Mode Fault - * It is generally used to poll the busy status of GSPI Master. - * + * It is used to poll the busy status of GSPI Master. * @pre Pre-conditions: * - \ref sl_si91x_gspi_configure_clock * - \ref sl_si91x_gspi_init * - \ref sl_si91x_gspi_set_configuration - * * @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) * @return sl_gspi_status_t type structure ******************************************************************************/ sl_gspi_status_t sl_si91x_gspi_get_status(sl_gspi_handle_t gspi_handle); /***************************************************************************/ /** - * Get data receive count of the GSPI. - * If a receive operation is started, this function can be used to get number + * @brief This API will Get data receive count of the GSPI. + * @details If a receive operation is started, this function can be used to get number * of data bytes received. - * * @pre Pre-conditions: * - \ref sl_si91x_gspi_configure_clock * - \ref sl_si91x_gspi_init * - \ref sl_si91x_gspi_set_configuration - * * @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) * @return uint32_t value of the RX data count ******************************************************************************/ @@ -382,15 +379,13 @@ uint32_t sl_si91x_gspi_get_rx_data_count(sl_gspi_handle_t gspi_handle); /***************************************************************************/ /** - * Get the transmit data count of GSPI. - * If a send operation is started, this function can be used to get number - * of data bytes send. - * + * @brief This API will Get the transmit data count of GSPI. + * @details If a send operation is started, this function can be used to get number + * of data bytes sent. * @pre Pre-conditions: * - \ref sl_si91x_gspi_configure_clock * - \ref sl_si91x_gspi_init * - \ref sl_si91x_gspi_set_configuration - * * @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) * @return uint32_t value of the tx data count ******************************************************************************/ @@ -398,31 +393,34 @@ uint32_t sl_si91x_gspi_get_tx_data_count(void); /***************************************************************************/ /** - * Fetch the clock division factor. - * - * @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) - * @return factor (int32_t) The value of the clock division factor - ******************************************************************************/ +* @brief This API will fetch the clock division factor. +* @details The clock division factor is calculated on the based of peripheral clock configured. +* It decides the baud rate of GSPI. +* @param[in] gspi_handle Pointer to the GSPI driver handle ( \ref sl_gspi_handle_t) +* @return factor (int32_t) The value of the clock division factor +******************************************************************************/ int32_t sl_si91x_gspi_get_clock_division_factor(sl_gspi_handle_t gspi_handle); /***************************************************************************/ /** - * Fetch the frame length, i.e., bit width. - * The frame length ranges between 1 and 15. - * + * @brief This API will Fetch the frame length, i.e., bit width. + * @details This will get the frame length and the frame length ranges between 1 and 15. + * * @param[in] none - * @return frame_length (uint32_t) The value of the frame length + * + * @return frame_length (uint32_t) The value of the frame length ******************************************************************************/ uint32_t sl_si91x_gspi_get_frame_length(void); /***************************************************************************/ /** - * Set the secondary number in multi-secondary operation. - * For a single secondary also, this API needs to be called before transferring the - * data - * + * @brief This API will Set the secondary number in multi-secondary operation. + * @details For a single secondary also, this API needs to be called before transferring the + * data. + * * @param[in] number Secondary number ( \ref sl_gspi_slave_number_t) - * @return none + * + * @return none ******************************************************************************/ __STATIC_INLINE sl_status_t sl_si91x_gspi_set_slave_number(uint8_t number) { @@ -436,8 +434,67 @@ __STATIC_INLINE sl_status_t sl_si91x_gspi_set_slave_number(uint8_t number) return status; } +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup GSPI +/// @{ +/// @details +/// +/// @n @section GSPI_Intro Introduction +/// +/// The Generic SPI Master is available in MCU HP peripherals. +/// It provides an I/O interface for a large range of SPI-compatible peripheral devices. +/// SPI is a synchronous four-wire interface made up of two data pins (MOSI and MISO), +/// a device select pin (CSN), and a gated clock pin (SCLK). With two data pins, +/// it supports full-duplex operation with other SPI-compatible devices. +/// +/// @li Typical SPI-compatible peripheral devices that can be used to interface include: +/// LCD displays, A/D converters, D/A converters, Codecs, Micro-controllers and Flashes. +/// +/// @li GSPI (General Serial Peripheral Interface) can be used in various applications within embedded systems +/// where high-speed, synchronous serial communication is required. Here are some common areas where GSPI can be employed in embedded systems: +/// +/// 1. Test and Measurement Equipment +/// +/// 2. Sensor Interfacing +/// +/// 3. Display Interfaces +/// +/// 4. Memory Devices +/// +/// 5. Communication Interfaces +/// +/// 6. Motor Control +/// +/// 7. Audio Processing +/// +/// 8. Wireless Communication +/// +/// @n @section Configuration +/// +/// Configuring GSPI (General Serial Peripheral Interface) in a micro-controller involves several steps, +/// including setting up the peripheral registers, configuring GPIO pins, +/// and selecting the appropriate operating mode and settings. +/// +/// @li To configure the GSPI operating mode, modify @ref clock_mode_typedef_t (Mode-0 and Mode-3 can be configured), +/// Bit Rate (Range 1 - 40000000), Data Width (Range 1- 15), and configure the GSPI slave select mode +/// by configuring @ref slave_select_mode_typedef_t. All of these must be configured in the structure +/// @ref sl_gspi_control_config_t and call the API @ref sl_si91x_gspi_set_configuration(). +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section Usage +/// +/// The common GSPI functions can be used after the GSPI Structures are specified, passing an instance of +/// @ref sl_gspi_control_config_t. These functions will initiate and configure the GSPI below, which is the flow for implementation. +/// +/// 1. @ref sl_si91x_gspi_configure_clock +/// 2. @ref sl_si91x_gspi_init +/// 3. @ref sl_si91x_gspi_set_configuration +/// 4. @ref sl_si91x_gspi_register_event_callback +/// 5. @ref sl_si91x_gspi_send_data +/// 6. @ref sl_si91x_gspi_deinit +/// /** @} (end addtogroup GSPI) */ - #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2c.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2c.h index 3503289b6..cbc933d2c 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2c.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2c.h @@ -76,6 +76,7 @@ extern "C" { #define SL_I2C2_DMA_TX_CHANNEL 5 // I2C2 DMA TX channel number #define SL_I2C2_DMA_RX_CHANNEL 4 // I2C2 DMA RX channel number #define ULP_I2C SL_I2C2 // defining ULP_I2C instance + // ----------------------------------------------------------------------------- // Data Types @@ -123,13 +124,6 @@ typedef enum { SL_I2C_OPERATING_MODE_LAST, ///< Last member of enum for validation } sl_i2c_operating_mode_t; -/// @brief Enumeration to represent I2C power modes -typedef enum { - SL_I2C_ULP_MODE, ///< The driver leader ULP mode - SL_I2C_HP_MODE, ///< The driver leader HP mode - SL_I2C_POWER_MODE_LAST, ///< For Validation -} sl_i2c_power_modes_t; - typedef void (*sl_i2c_callback_t)(sl_i2c_instance_t i2c_instance, uint32_t status); ///< Callback for I2C Driver /// @brief Structure to hold the parameters of I2C instance configurations @@ -166,18 +160,26 @@ typedef struct { uint8_t scl_pad; ///< PWM GPIO pad } sl_i2c_pin_init_t; +/// @brief Enumeration to represent I2C power modes +typedef enum { + SL_I2C_ULP_MODE, ///< The driver leader ULP mode + SL_I2C_HP_MODE, ///< The driver leader HP mode + SL_I2C_POWER_MODE_LAST, ///< For Validation +} sl_i2c_power_modes_t; // ----------------------------------------------------------------------------- // Prototypes /***************************************************************************/ /** - * Initialize the I2C Module and clock. Sets I2C instance mode, - * operating mode (bus-speed), frequency, and transfer type (using Interrupt or DMA). + * @brief Initialize the I2C Module and clock. + * @details Sets I2C instance mode,operating mode (bus-speed), frequency, and transfer type (using Interrupt or DMA). * If the transfer type is DMA, it initializes DMA as well. * Registers I2C instance callback and clears pending interrupts. * Configures SDL and SCL pins as per the instance. - * - * @param[in] i2c_instance I2C Instance to be initialized \ref sl_i2c_instance_t + * + * @param[in] i2c_instance I2C Instance to be initialized \ref sl_i2c_instance_t. + * * @param[in] p_user_config A pointer to I2C configuration structure \ref sl_i2c_config_t + * * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid @@ -187,17 +189,19 @@ sl_i2c_status_t sl_i2c_driver_init(sl_i2c_instance_t i2c_instance, const sl_i2c_ /***************************************************************************/ /** - * This API configures the follower address of the I2C module. Should be - * used only in Follower mode after instance initialization. - * I2C leader device initiates an I2C transfer with an address that matches this - * address in the IC_SAR register of I2C follower device. - * + * @brief This API configures the follower address of the I2C module. + * @details Should be used only in Follower mode after instance initialization. + * It updates the slave address register + * I2C leader device initiates transfer with the address that matches slave address register of follower device. * @pre Pre-conditions: * - \ref sl_i2c_driver_init * - Here I2C mode should be set as follower mode - * + * * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t - * @param[in] address Follower own address + * + * @param[in] address Follower own address, can be provided in 7-bit length (0-127) + * or in 10-bit length(0-1023). + * * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid @@ -206,18 +210,17 @@ sl_i2c_status_t sl_i2c_driver_set_follower_address(sl_i2c_instance_t i2c_instanc /***************************************************************************/ /** - * This function is used to configure the TX and RX FIFO threshold values. - * The valid range is 0-255, with the additional restriction that hardware does + * @brief This API configures the TX and RX FIFO threshold values. + * @details The valid range is 0-255, with the additional restriction that hardware does * not allow this value to be set to a value larger than the depth of the buffer. * A value of 0 sets the threshold for 1 entry, * and a value of 255 sets the threshold for 256 entries. * This should be called after I2C instance initialization. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_i2c_driver_init - * * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t - * @param[in] tx_threshold_value Transmit FIFO threshold value - * @param[in] rx_threshold_value Receive FIFO threshold value + * @param[in] tx_threshold_value Transmit FIFO threshold value: Range between 0 to 255. + * @param[in] rx_threshold_value Receive FIFO threshold value: Range between 0 to 255. * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid @@ -228,40 +231,40 @@ sl_i2c_status_t sl_i2c_driver_configure_fifo_threshold(sl_i2c_instance_t i2c_ins /***************************************************************************/ /** - * This API gets the current frequency of I2C transfer in MHz, + * @brief This API will read the current I2C clock frequency. + * @details This API gets the current clock frequency of I2C in MHz, * by reading the system core clock frequency. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_i2c_driver_init - * * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t - * @param[out] frequency Currently configured frequency. - * @return status 0 if successful, else error code as follow - * - \ref SL_I2C_SUCCESS (0x0000) - Success - * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid + * @param[in] frequency Pointer to a variable to store currently configured frequency. + * @return status 0 if successful, else error code as follow. + * - \ref SL_I2C_SUCCESS (0x0000) - Success. + * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid. ******************************************************************************/ sl_i2c_status_t sl_i2c_driver_get_frequency(sl_i2c_instance_t i2c_instance, uint32_t *frequency); /***************************************************************************/ /** - * This API sends the data in blocking mode (using interrupt), + * @brief This API sends the data in blocking mode. + * @details This API sends the data in blocking mode using interrupt, * sets follower address when used in leader application, - * sets transmit empty interrupt and enable I2C interrupts. - * + * sets transmit empty interrupt and enable I2C interrupts. + * It keeps the call blocked until the last byte is transferred. * @pre Pre-conditions: * - \ref sl_i2c_driver_init * - Here transfer-type should be set as interrupt-type * - \ref sl_i2c_driver_set_follower_address (if sending from slave) * - \ref sl_i2c_driver_configure_fifo_threshold - * - * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t - * @param[in] address Follower address, in follower mode, this parameter will be ignored - * @param[in] tx_buffer A pointer to transmit data buffer - * @param[in] tx_len Data length in number of bytes - * @note Maximum tx_len used can be 80000 (receives in around 10 seconds) - * @return status 0 if successful, else error code as follow - * - \ref SL_I2C_SUCCESS (0x0000) - Success - * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid + * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t. + * @param[in] address Follower address, can be provided in 7-bit length (0-127) + * or in 10-bit length(0-1023). In follower mode this parameter will be ignored. + * @param[in] tx_buffer A pointer to transmit data buffer. + * @param[in] tx_len Data length in number of bytes in the range of 1- 80000 bytes. + * @note Maximum tx_len used can be 80000 (receives in around 10 seconds). + * @return status 0 if successful, else error code as follow. + * - \ref SL_I2C_SUCCESS (0x0000) - Success. + * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid. ******************************************************************************/ sl_i2c_status_t sl_i2c_driver_send_data_blocking(sl_i2c_instance_t i2c_instance, uint16_t address, @@ -270,21 +273,22 @@ sl_i2c_status_t sl_i2c_driver_send_data_blocking(sl_i2c_instance_t i2c_instance, /***************************************************************************/ /** - * This API sends the data in non-blocking mode (using DMA), + * @brief This API sends the data in non-blocking mode. + * @details This API sends the data in non-blocking mode using DMA * also sets the follower address when used in Leader application. * Configures DMA rx and tx channels. * Registers DMA callback & enables DMA channels. - * + * It updates the transfer complete flag \ref SL_I2C_DATA_TRANSFER_COMPLETE after data transfer completion. * @pre Pre-conditions: * - \ref sl_i2c_driver_init * - Here transfer-type should be set as DMA-type * - \ref sl_i2c_driver_set_follower_address, if used in salve application - * * @param[in] i2c_instance I2C Instance. - * @param[in] address Follower address + * @param[in] address Follower address can be provided in 7-bit length (0-127) + * or in 10-bit length(0-1023). * @param[in] tx_buffer A pointer to transmit data buffer - * @param[in] tx_len Data length in number of bytes - * @param[in] dma_config A pointer to DMA configuration structure \ref sl_i2c_dma_config_t + * @param[in] tx_len Data length in number of bytes in the range of 1- 30000 bytes. + * @param[in] dma_config A pointer to DMA configuration structure \ref sl_i2c_dma_config_t. * @note Maximum tx_len values can be 30000 (receives back in around 4 seconds) * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success @@ -299,20 +303,21 @@ sl_i2c_status_t sl_i2c_driver_send_data_non_blocking(sl_i2c_instance_t i2c_insta /***************************************************************************/ /** - * This API receives the data in blocking mode (using interrupt), + * @brief This API receives the data in blocking mode. + * @details This API receives the data in blocking mode using interrupt, * also sets the follower address when used in Leader application. * Sets receive full interrupt and enables I2C interrupts. - * + * It keeps the call blocked until the last byte is transferred. * @pre Pre-conditions: * - \ref sl_i2c_driver_init * - Here transfer-type should be set as interrupt-type * - \ref sl_i2c_driver_set_follower_address, if used in follower application * - \ref sl_i2c_driver_configure_fifo_threshold - * * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t - * @param[in] address Follower address, in follower mode this parameter will be ignored + * @param[in] address Follower address, can be provided in 7-bit length (0-127) + * or in 10-bit length(0-1023). In follower mode this parameter will be ignored. * @param[in] rx_buffer A pointer to receive data buffer - * @param[in] rx_len Data length in number of bytes + * @param[in] rx_len Data length in number of bytes in the range of 1-80000. * @note Maximum rx_len used can be 80000 (receives in around 10 seconds) * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success @@ -325,22 +330,26 @@ sl_i2c_status_t sl_i2c_driver_receive_data_blocking(sl_i2c_instance_t i2c_instan /***************************************************************************/ /** - * This API receives the data in non-blocking mode (using DMA), + * @brief This API receives the data in non-blocking mode. + * @details This API receives the data in non-blocking mode (using DMA), * also sets the follower address when used in Leader application. * Configures DMA rx and tx channels. * Registers DMA callback & enables DMA channels. - * + * It updates the transfer complete flag \ref SL_I2C_DATA_TRANSFER_COMPLETE after data transfer completion. * @pre Pre-conditions: * - \ref sl_i2c_driver_init * - Here transfer-type should be set as DMA-type * - \ref sl_i2c_driver_set_follower_address, if used in salve application - * * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t - * @param[in] address Follower address - * @param[in] rx_buffer A pointer to receive data buffer - * @param[in] rx_len Data length in number of bytes + * @param[in] address Follower address, can be provided in 7-bit length (0-127) + * or in 10-bit length(0-1023). + * @param[in] rx_buffer A pointer to receive data buffer. + * @param[in] rx_len Data length in number of bytes in the range of 1- 30000 Bytes. * @param[in] dma_config A pointer to DMA configuration structure \ref sl_i2c_dma_config_t - * @note Maximum rx_len values can be 30000 (receives back in around 4 seconds) + * @note + * - Maximum rx_len values can be 30000 (receives back in around 4 seconds). + * - The default values cannot be any of the reserved address locations: that is, 0x00 to 0x07, + * or 0x78 to 0x7f. * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid @@ -354,23 +363,25 @@ sl_i2c_status_t sl_i2c_driver_receive_data_non_blocking(sl_i2c_instance_t i2c_in /***************************************************************************/ /** - * This API first transmits data and then receives data from an I2C device (using interrupts). + * @brief This API transmits data and then receives data from an I2C device. + * @details This API first transmits data and then receives data from an I2C device using interrupts. * Also sets follower address when used in Leader application. * Sets & enable transmit empty interrupt while transmitting data . - * Sets & enable receive full interrupt while receiving data - * + * Sets & enable receive full interrupt while receiving data. * @pre Pre-conditions: * - \ref sl_i2c_driver_init * - Here transfer-type should be set as Interrupt-type * - \ref sl_i2c_driver_set_follower_address, if used in follower application - * * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t - * @param[in] address Follower address + * @param[in] address Follower address, can be provided in 7-bit length (0-127) + * or in 10-bit length(0-1023). * @param[in] p_transfer_config A pointer to transfer configuration structure \ref sl_i2c_transfer_config_t - * @note Maximum tx_len & rx_len values can be 80000 (sends & receives back in around 20 seconds) + * @note Maximum tx_len & rx_len values can be 80000 (sends & receives back in around 20 seconds). + * - The default values cannot be any of the reserved address locations: that is, 0x00 to 0x07, + * or 0x78 to 0x7f. * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success - * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid + * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid ******************************************************************************/ sl_i2c_status_t sl_i2c_driver_transfer_data(sl_i2c_instance_t i2c_instance, sl_i2c_transfer_config_t const *p_transfer_config, @@ -378,24 +389,35 @@ sl_i2c_status_t sl_i2c_driver_transfer_data(sl_i2c_instance_t i2c_instance, /***************************************************************************/ /** - * De-initializes the I2C peripheral, disables clock, and unregisters the callback. - * - * @pre Pre-conditions: + * @brief De-initializes the I2C peripheral and clock + * @details This API will de-initializes the I2C peripheral, disables its clock and unregisters the callback. + * @pre Pre-condition: * - \ref sl_i2c_driver_init - * * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid + * @note + * When the I2C module is used in combination with other peripherals, while de-initializing in the application, refer to the notes below: + * 1. Whenever sl_i2c_driver_deinit() gets called, it will power down the domain (PERI_EFUSE), which contains different peripherals mentioned below: + * USART, UART, I2C, SSI Master, SSI Slave, Generic-SPI Master, I2S Master, I2S Slave, Micro-DMA Controller, Config Timer, + * Random-Number Generator, CRC Accelerator, SIO, QEI, MCPWM and EFUSE. + * Since deinit power downs the PERI_EFUSE doamin, it's recommended to call the sl_i2c_driver_deinit() API at the end of the application. + * 2. Few peripherals (ULP Peripherals, UULP Peripherals, GPDMA and SDIO-SPI) have seperate domains that can be powered down indepedently. For additional details, refer to the Power architecture section in the Hardware Reference Manual + * e.g., To power down ULP I2C, use the API below: + * RSI_PS_M4ssPeriPowerDown(ULPSS_PWRGATE_ULP_I2C); + * Here, ULP_I2C has seperate power domain ULPSS_PWRGATE_ULP_I2C, which can be powered down indepedently. Refer to the rsi_power_save.h file for all power gates definitions. ******************************************************************************/ sl_i2c_status_t sl_i2c_driver_deinit(sl_i2c_instance_t i2c_instance); /***************************************************************************/ /** - * Set the Pin configuration for I2C. It configures the SDA and SCL pins. + * @brief Set the Pin configuration for I2C. + * @details It configures the SDA and SCL pins. * Also enables internal pullups of SDA & SCL lines of follower device. - * + * * @param[in] pin_init Pointer to pin init structure \ref sl_i2c_pin_init_t + * * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid @@ -404,15 +426,14 @@ sl_i2c_status_t sl_si91x_i2c_pin_init(sl_i2c_pin_init_t *pin_init); /***************************************************************************/ /** - * Re-Config the I2C driver leader instance (I2C2) for ULP/HP mode. + * @brief This API re-configures the I2C leader device on power mode changes. + * @details Re-Config the I2C driver leader instance (I2C2) for ULP/HP mode. * It will re-config I2C clock frequency required for I2C operating(speed) mode to run in ULP/HP mode. - * * @pre Pre-conditions: * - \ref sl_i2c_driver_init * - Instance should be ULP mode when new mode is HP * - Instance should be HP mode when new mode is ULP * - Instance used should be ULP-I2C instance - * * @param[in] power_mode , new power state to switch to \ref sl_i2c_power_modes_t * @return status 0 if successful, else error code as follow * - \ref SL_I2C_SUCCESS (0x0000) - Success @@ -420,6 +441,86 @@ sl_i2c_status_t sl_si91x_i2c_pin_init(sl_i2c_pin_init_t *pin_init); ******************************************************************************/ sl_i2c_status_t sl_i2c_driver_leader_reconfig_on_power_mode_change(sl_i2c_power_modes_t new_power_mode); +/***************************************************************************/ +/** + * @brief To enable or disable repeated start, to enable or disable combined format transfer + * @details Details : + * - This API should be called by a leader application to enable repeated start, before starting data transfer. + * - By enabling this, one can use combined format transfers. + * - With this, I2C can perform combined write/read operations to same or different slave without releasing the + * line, thus with the guarantee that the operation is not interrupted. + * @pre Pre-condition: + * - \ref sl_i2c_driver_init + * + * @param[in] i2c_instance I2C Instance \ref sl_i2c_instance_t + * + * @param[in] enable_rep_start true to enable & false to disable repeated start + * + * @return status 0 if successful, else error code as follow + * - \ref SL_I2C_SUCCESS (0x0000) - Success + * - \ref SL_I2C_INVALID_PARAMETER (0x0F) - Parameters are invalid + ******************************************************************************/ +sl_i2c_status_t sl_i2c_driver_enable_repeated_start(sl_i2c_instance_t i2c_instance, boolean_t enable_rep_start); + +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup I2C +/// @{ +/// +/// @details +/// +/// @n @section I2C_Intro Introduction +/// +/// I2C, which stands for Inter-Integrated Circuit, +/// is a serial communication protocol commonly used in micro-controllers +/// and other integrated circuits for communication between various peripheral devices and sensors. +/// In micro-controllers, I2C is often used to connect peripherals like sensors, EEPROMs, real-time clocks, +/// and other integrated circuits. The I2C protocol uses only two wires for communication: +/// a serial data line (SDA) and a serial clock line (SCL). This makes it very efficient in terms of pin usage, +/// which is particularly important in micro-controller systems where pin count might be limited. +/// +/// @li In embedded industries, I2C (Inter-Integrated Circuit) is widely used for various applications due to its simplicity, +/// flexibility, and low pin count requirements. Here are some common use cases of I2C in embedded systems: +/// +/// 1. Sensor Integration +/// +/// 2. Sensor Hubs and Fusion Algorithms +/// +/// 3. Memory Expansion +/// +/// 4. Real-Time Clock (RTC) +/// +/// 5. Display Interfaces +/// +/// 6. Peripheral Control +/// +/// 7. Communication with Other Micro-controllers and Modules +/// +/// 8. System Configuration and Control +/// +/// @n @section Configuration +/// +/// @li I2C can be configured by configuring parameters such as Leader or Follower mode using @ref sl_i2c_mode_t, +/// the Transfer type using @ref sl_i2c_transfer_type_t and operating speed Mode using @ref sl_i2c_operating_mode_t. +/// All of these configurations can be made using a structure called @ref sl_i2c_config_t, after which the API +/// @ref sl_i2c_driver_init() can be called. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section Usage +/// +/// The common I2C functions can be used after the I2C Structures are specified, passing an instance of @ref sl_i2c_config_t. +/// These functions will initiate and configure the I2C below, which is the flow for implementation. +/// +/// 1. @ref sl_i2c_driver_init +/// 2. @ref sl_i2c_driver_set_follower_address (for follower) +/// 3. @ref sl_i2c_driver_configure_fifo_threshold +/// 4. @ref sl_i2c_driver_receive_data_blocking or +/// 5. @ref sl_i2c_driver_send_data_blocking +/// 6. @ref sl_i2c_driver_deinit +/// +/// **Note** : The above flow is for I2C non-DMA operations. If the requirement is to use DMA Mode, then use send and receive non-blocking APIs +/// @ref sl_i2c_driver_receive_data_non_blocking and @ref sl_i2c_driver_send_data_non_blocking. +/// /** @} (end addtogroup I2C) */ #ifdef __cplusplus diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h index 6a4fd074e..1ec9c6ba8 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_i2s.h @@ -22,7 +22,7 @@ * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be + * 2. Altered source versions must be marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * @@ -148,16 +148,16 @@ typedef struct { // Prototypes /***************************************************************************/ /** - * Initialize the I2S. Pass the address of the pointer for storing the I2S handle, - * which can be used in future for other function calls. - * - * @pre Pre-conditions: + * @brief This API Initializes the I2S peripheral. + * @details This API enable clock for I2S peripheral and configure SCLK, WSCLK, + * DIN and DOUT pins. Pass the address of the pointer for storing the I2S handle, + * which can be used in the future for other function calls. + * @pre Pre-condition: * - \ref none - * * @param[in] I2S instance , 0 - I2S0 - 1 - I2S1 + * 1 - I2S1 * @param[in] i2s_handle Double Pointer to the I2S driver handle - * @return status 0 if successful, else error code as follow + * @return status 0 if successful, else error code is as follow * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid * - \ref SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument @@ -167,32 +167,41 @@ sl_status_t sl_si91x_i2s_init(uint32_t i2s_instance, sl_i2s_handle_t *i2s_handle /***************************************************************************/ /** - * Uninitialize I2S peripheral. This will also disable the DMA instance used for I2S transfer. - * This API needs to be called only if the I2S peripheral is initialized before using sl_si91x_i2s_init(). - * - * @pre Pre-conditions: + * @brief This API uninitialize I2S peripheral. + * @details This API disable the DMA instance used for I2S transfer and power down I2S peripheral + * by disabling the clock supply to I2S + * @pre Pre-condition: * - \ref sl_si91x_i2s_init - * * @param[in] i2s_handle Pointer to the I2S driver handle - * @return status 0 if successful, else error code as follow + * @return status 0 if successful, else error code is as follow * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid * - \ref SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument + * + * @note + * When the I2S module is used in combination with other peripherals, while de-initializing in the application, refer to the notes below: + * 1. Whenever sl_si91x_i2s_deinit() gets called, it will power down the domain (PERI_EFUSE), which contains different peripherals, as mentioned below: + * USART, UART, I2C, SSI Master, SSI Slave, Generic-SPI Master, I2S Master, I2S Slave, Micro-DMA Controller, Config Timer, + * Random-Number Generator, CRC Accelerator, SIO, QEI, MCPWM and EFUSE. + * Since deinit power downs the PERI_EFUSE doamin, it's recommended to call the sl_si91x_i2s_deinit() API at the end of the application. + * 2. Few peripherals (ULP Peripherals, UULP Peripherals, GPDMA and SDIO-SPI) have seperate domains that can be powered down indepedently. For additional details, refer to the Power architecture section in the Hardware Reference Manual + * e.g., To power down ULP I2S, use the API below: + * RSI_PS_M4ssPeriPowerDown(ULPSS_PWRGATE_ULP_I2S); + * Here, ULP_I2S has seperate power domain ULPSS_PWRGATE_ULP_I2S, which can be power down indepedently. Refer to the rsi_power_save.h file for all power gates definitions. ******************************************************************************/ sl_status_t sl_si91x_i2s_deinit(sl_i2s_handle_t *i2s_handle); /***************************************************************************/ /** - * Change the power mode of I2S, the supported modes are + * @brief This API configure I2S power mode + * @details The supported modes are * POWER_OFF - I2S peripheral clocks and I2S DMA channel is disabled. * FULL_POWER - Enable I2S peripheral clocks and configure I2S DMA channel. - * * @pre Pre-conditions: * - \ref sl_si91x_i2s_init - * * @param[in] i2s_handle Pointer to the I2S driver handle * @param[in] power state, SL_I2S_POWER_OFF/SL_I2S_FULL_POWER - * @return status 0 if successful, else error code as follow + * @return status 0 if successful, else error code is as follow * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid * - \ref SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument @@ -201,19 +210,16 @@ sl_status_t sl_si91x_i2s_configure_power_mode(sl_i2s_handle_t i2s_handle, sl_i2s /***************************************************************************/ /** - * Configure transmitter/Receiver parameters for I2S transfer. - * DMA transmit and receive configurations. + * @brief This API configures transmitter/Receiver parameters for I2S transfer. + * @details This API configures I2S DMA transmit and receive channels. * Configuring transfer_type to SL_I2S_TRANSMIT will configure Tx channel and SL_I2S_RECEIVE - * will configure Rx channel. - * receiving data. - * - * @pre Pre-conditions: + * will configure the Rx channel. + * @pre Pre-condition: * - \ref sl_si91x_i2s_init - * - \ref sl_si91x_i2s_configure_power_mode - * + * - \ref sl_si91x_i2s_configure_power_mode * @param[in] i2s_handle Pointer to the I2S driver handle * @param[in] Address of structure which stores transfer parameters - * @return status 0 if successful, else error code as follow + * @return status 0 if successful, else error code is as follow * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid * - \ref SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument @@ -222,18 +228,18 @@ sl_status_t sl_si91x_i2s_config_transmit_receive(sl_i2s_handle_t i2s_handle, sl_ /***************************************************************************/ /** - * Configure I2S tx DMA channel descriptors and trigger dma transfer. sl_si91x_i2s_config_transmit_receive() - * should be called with transfer_type set to SL_I2S_TRANSMIT before sending data. - * + * @brief This API transmit I2S data + * @details This API configures I2S tx DMA channel descriptors and trigger + * DMA transfer. sl_si91x_i2s_config_transmit_receive() should be called with + * transfer_type set to SL_I2S_TRANSMIT before sending data. * @pre Pre-conditions: * - \ref sl_si91x_i2s_init * - \ref sl_si91x_i2s_configure_power_mode * - \ref sl_si91x_i2s_config_transmit_receive - * * @param[in] i2s_handle Pointer to the I2S driver handle * @param[in] Address of transmit data * @param[in] data size - * @return status 0 if successful, else error code as follow + * @return status 0 if successful, else error code is as follow * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid * - \ref SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument @@ -242,18 +248,18 @@ sl_status_t sl_si91x_i2s_transmit_data(sl_i2s_handle_t i2s_handle, const void *d /***************************************************************************/ /** - * Configure I2S rx DMA channel descriptors and enable dma channel to recieve data. sl_si91x_i2s_config_transmit_receive() + * @brief This API receive I2S data + * @details This API configures I2S rx DMA channel descriptors and enables DMA + * channel to receive data. sl_si91x_i2s_config_transmit_receive() * should be called with transfer_type set to SL_I2S_RECEIVE before receiving data. - * * @pre Pre-conditions: * - \ref sl_si91x_i2s_init * - \ref sl_si91x_i2s_configure_power_mode * - \ref sl_si91x_i2s_config_transmit_receive - * * @param[in] i2s_handle Pointer to the I2S driver handle * @param[in] Address of receive data * @param[in] data size - * @return status 0 if successful, else error code as follow + * @return status 0 if successful, else error code is as follow * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid * - \ref SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument @@ -262,15 +268,15 @@ sl_status_t sl_si91x_i2s_receive_data(sl_i2s_handle_t i2s_handle, const void *da /***************************************************************************/ /** - * Register the user callback function. Transfer complete event can be notified using this callback. - * Callbacks should be registered before starting I2S transfer. - * + * @brief This API Registers the user callback function. + * @details Transfer complete event can be notified using this callback. + * Callbacks should be registered before starting the I2S transfer. * @pre Pre-conditions: - * - \ref none - * + * - \ref sl_si91x_i2s_init + * - \ref sl_si91x_i2s_configure_power_mode * @param[in] i2s_handle Pointer to the I2S driver handle * @param[in] callback_event Pointer to the function which needs to be called at the time of interrupt - * @return status 0 if successful, else error code as follow + * @return status 0 if successful, else error code as follows * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer * - \ref SL_STATUS_BUSY (0x0004) - Driver is busy @@ -279,12 +285,11 @@ sl_status_t sl_si91x_i2s_register_event_callback(sl_i2s_handle_t i2s_handle, sl_ /***************************************************************************/ /** - * Un-register the user callback function. This function can be used only if callbacks are + * @brief This API un-registers the user callback function. + * @details This function can be used only if callbacks are * registered before using sl_si91x_i2s_register_event_callback() - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_i2s_register_event_callback - * * @param[in] i2s_handle Pointer to the I2S driver handle * @return status 0 if successful, else error code * \ref SL_STATUS_OK (0x0000) - Success \n @@ -295,15 +300,14 @@ sl_status_t sl_si91x_i2s_unregister_event_callback(sl_i2s_handle_t i2s_handle); /***************************************************************************/ /** - * Get the transmit data count of I2S. If an active I2S transfer is started, this function - * can be used to get number of data bytes transfered. - * + * @brief This API returns the transmitted data count + * @details Get the transmit data count of I2S. If an active I2S transfer is started, this function + * can be used to get several data bytes transferred. * @pre Pre-conditions: * - \ref sl_si91x_i2s_init * - \ref sl_si91x_i2s_configure_power_mode * - \ref sl_si91x_i2s_config_transmit_receive * - \ref sl_si91x_i2s_transmit_data - * * @param[in] i2s_handle Pointer to the I2S driver handle * @return uint32_t value of the tx data count ******************************************************************************/ @@ -311,9 +315,9 @@ uint32_t sl_si91x_i2s_get_transmit_data_count(sl_i2s_handle_t i2s_handle); /***************************************************************************/ /** - * Get the receive data count of I2S. If I2S is configured for receive, this function - * can be used to get number of data bytes received. - * + * @brief This API return receives data count + * @details Get the received data count of I2S. If I2S is configured for receive, this function + * can be used to get several data bytes received. * @pre Pre-conditions: * - \ref sl_si91x_i2s_init * - \ref sl_si91x_i2s_configure_power_mode @@ -321,36 +325,33 @@ uint32_t sl_si91x_i2s_get_transmit_data_count(sl_i2s_handle_t i2s_handle); * - \ref sl_si91x_i2s_receive_data * * @param[in] i2s_handle Pointer to the I2S driver handle - * @return uint32_t value of the rx data count + * @return uint32_t value of the RX data count ******************************************************************************/ uint32_t sl_si91x_i2s_get_receive_data_count(sl_i2s_handle_t i2s_handle); /***************************************************************************/ /** - * Get the release, sqa, and dev version of I2S. - * - * @pre Pre-conditions: + * @brief Get the release, sqa, and dev version of I2S. + * @pre Pre-condition: * - \ref none - * - * @param[in] none + * @param none * @return (sl_i2s_version_t) type structure ******************************************************************************/ sl_i2s_version_t sl_si91x_i2s_get_version(void); /***************************************************************************/ /** - * Get following transfer status of I2S, + * @brief This API return I2S peripheral status + * @details Get following transfer status of I2S, * 1. Frame error * 2. Rx busy * 3. Rx overflow * 4. Tx busy * 5. Tx underflow - * * @pre Pre-conditions: * - \ref sl_si91x_i2s_init * - \ref sl_si91x_i2s_configure_power_mode * - \ref sl_si91x_i2s_config_transmit_receive - * * @param[in] i2s_handle Pointer to the I2S driver handle * @return (sl_i2s_status_t) type structure ******************************************************************************/ @@ -358,24 +359,82 @@ sl_i2s_status_t sl_si91x_i2s_get_status(sl_i2s_handle_t i2s_handle); /***************************************************************************/ /** - * Abort I2S Tx/Rx operations. Disable I2S clocks and DMA channel. - * This function need to be called after completion of I2S transmit/receive. - * + * @brief This API aborts I2S transfer. + * @details This API disable I2S clocks and DMA channel. This API also stops + * WSCLK generation. * @pre Pre-conditions: * - \ref sl_si91x_i2s_init * - \ref sl_si91x_i2s_configure_power_mode * - \ref sl_si91x_i2s_config_transmit_receive * - \ref sl_si91x_i2s_transmit_data/sl_si91x_i2s_receive_data - * * @param[in] i2s_handle Pointer to the I2S driver handle * @param[in] abort type, ARM_SAI_ABORT_SEND/ARM_SAI_ABORT_RECEIVE - * @return status 0 if successful, else error code as follow + * @return status 0 if successful, else error code is as follows * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid * - \ref SL_STATUS_NULL_POINTER (0x0022) - Invalid null pointer received as argument ******************************************************************************/ sl_status_t sl_si91x_i2s_end_transfer(sl_i2s_handle_t i2s_handle, sl_i2s_xfer_type_t abort_type); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup I2S I2S +/// @{ +/// +/// @details +/// +/// +/// @n @section I2S_Intro Introduction +/// +/// A serial communication protocol called I2S, or Inter-IC Sound, is intended to +/// convey digital audio data between integrated circuits (ICs) in electronic devices. +/// Connecting audio components like digital signal processors, digital-to-analog converters, +/// and microphones is a popular usage for it. +/// +/// @li In an I2S connection, one device typically serves as the master, generating the clock signals, +/// while the other device operates as the slave, synchronizing its data transmission to the master's clock. +/// +/// The following is a brief discussion of the I2S peripheral's capability for +/// +/// 1. Programmable audio resolutions +/// +/// 2. Sampling rates +/// +/// 3. Full duplex communication +/// +/// @n @section I2S_Config Configuration +/// +/// @li The I2S module supports 5 resolutions, which can be programmable audio resolutions @ref sl_i2s_data_resolution_t +/// I2S also supports 11 audio sampling rates @ref sl_i2s_sampling_rate_t +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section I2S_Use Usage +/// +/// The default I2S is Initialised and configured with the 16 bit resolution and 8 kHz sampling rate. +/// Just after calling the register callback it will goes to transmit-receive mode and communicates over +/// Interrupt given. +/// +/// 1. @ref sl_si91x_i2s_init +/// +/// 2. @ref sl_si91x_i2s_register_event_callback +/// +/// 3. @ref sl_si91x_i2s_transmit_data +/// +/// 4. @ref sl_si91x_i2s_receive_data +/// +/// 5. @ref sl_si91x_i2s_deinit +/// +/// @li I2S also had some of the apis with which one can configure the power modes, unregister the callback, +/// get the data count and abort the transfer. +/// +/// 1. @ref sl_si91x_i2s_configure_power_mode +/// +/// 2. @ref sl_si91x_i2s_unregister_event_callback +/// +/// 3. @ref sl_si91x_i2s_get_receive_data_count +/// +/// 4. @ref sl_si91x_i2s_end_transfer +/// /** @} (end addtogroup I2S) */ #ifdef __cplusplus diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_psram.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_psram.h index 801000976..acb5320cc 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_psram.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_psram.h @@ -219,34 +219,23 @@ sl_psram_return_type_t sl_si91x_psram_init(void); sl_psram_return_type_t sl_si91x_psram_uninit(void); /***************************************************************************/ /** - * @brief - * Reset the PSRAM Device - * + * @brief Reset the PSRAM Device * @param none - * - * @return - * Status Code of the operation + * @return Status Code of the operation ******************************************************************************/ sl_psram_return_type_t sl_si91x_psram_reset(void); /***************************************************************************/ /** - * @brief - * Write data to PSRAM in manual mode - * + * @brief Write data to PSRAM in manual mode * @param[in] addr * PSRAM address for write operation - * * @param[in] SourceBuf * Reference of the Source buffer - * * @param[in] hSize * Size of each element - * * @param[in] num_of_elements * Number of elements for write operation - * - * @return - * Status Code of the operation + * @return Status Code of the operation ******************************************************************************/ sl_psram_return_type_t sl_si91x_psram_manual_write_in_blocking_mode(uint32_t addr, void *SourceBuf, @@ -254,23 +243,16 @@ sl_psram_return_type_t sl_si91x_psram_manual_write_in_blocking_mode(uint32_t add uint32_t length); /***************************************************************************/ /** - * @brief - * Read data from PSRAM in manual mode - * + * @brief Read data from PSRAM in manual mode * @param[in] addr * PSRAM address for read operation - * * @param[in] hSize * Size of each element - * * @param[in] num_of_elements * Number of elements for read operation - * * @param[out] DestBuf * Reference of the Destination buffer - * - * @return - * Status Code of the operation + * @return Status Code of the operation ******************************************************************************/ sl_psram_return_type_t sl_si91x_psram_manual_read_in_blocking_mode(uint32_t addr, void *DestBuf, @@ -278,26 +260,18 @@ sl_psram_return_type_t sl_si91x_psram_manual_read_in_blocking_mode(uint32_t addr uint32_t length); /***************************************************************************/ /** - * @brief - * Write data to PSRAM in manual mode using DMA - * + * @brief Write data to PSRAM in manual mode using DMA * @param[in] addr * PSRAM address for write operation - * * @param[in] SourceBuf * Reference of the Source buffer - * * @param[in] hSize * Size of each element - * * @param[in] length * Number of elements for write operation - * * @param[out] dmastatus * DMA operation completion status - * - * @return - * Status Code of the operation + * @return Status Code of the operation ******************************************************************************/ sl_psram_return_type_t sl_si91x_psram_manual_write_in_dma_mode(uint32_t addr, void *SourceBuf, @@ -306,26 +280,18 @@ sl_psram_return_type_t sl_si91x_psram_manual_write_in_dma_mode(uint32_t addr, sl_psram_dma_status_type_t *dmastatus); /***************************************************************************/ /** - * @brief - * Read data from PSRAM in manual mode using DMA - * + * @brief Read data from PSRAM in manual mode using DMA * @param[in] addr * PSRAM address for read operation - * * @param[in] hSize * Size of each element - * * @param[in] length * Number of elements for read operation - * * @param[out] DestBuf * Reference of the Destination buffer - * * @param[out] dmastatus * DMA operation completion status - * - * @return - * Status Code of the operation + * @return Status Code of the operation ******************************************************************************/ sl_psram_return_type_t sl_si91x_psram_manual_read_in_dma_mode(uint32_t addr, void *DestBuf, @@ -335,102 +301,94 @@ sl_psram_return_type_t sl_si91x_psram_manual_read_in_dma_mode(uint32_t addr, #if PSRAM_HALF_SLEEP_SUPPORTED /***************************************************************************/ /** - * @brief - * Put PSRAM Device in sleep - * - * Sleep mode is a feature which puts the PSRAM device in an ultra-low power state, + * @brief Put PSRAM Device in sleep + * @details Sleep mode is a feature which puts the PSRAM device in an ultra-low power state, * while the stored data is retained. - * * @param none - * - * @return - * Status Code of the operation + * @return Status Code of the operation ******************************************************************************/ sl_psram_return_type_t sl_si91x_psram_sleep(void); /***************************************************************************/ /** - * @brief - * Exit PSRAM device from sleep - * + * @brief Exit PSRAM device from sleep * @param none - * - * @return - * Status Code of the operation - * + * @return Status Code of the operation * @note This function call re-initializes the PSRAM device after wakeup sequence. ******************************************************************************/ sl_psram_return_type_t sl_si91x_psram_wakeup(void); #endif /***************************************************************************/ /** - * @brief - * Enable CTR encryption-decryption on PSRAM - * + * @brief Enable CTR encryption-decryption on PSRAM * @param[in] keySize * Pass 128/256-Bit size - * - * @return - * Status Code of the operation + * @return Status Code of the operation ******************************************************************************/ sl_psram_return_type_t sl_si91x_psram_enable_encry_decry(uint16_t keySize); -/** @} (end addtogroup PSRAM) */ - -/* *INDENT-OFF* */ -/************ THIS SECTION IS FOR DOCUMENTATION ONLY !**********************/ /** - * @addtogroup PSRAM PSRAM Driver - * @brief PSRAM Memory Management driver - * @{ - - # Introduction {#psram_intro} - PSRAM (Pseudo Static Random Access Memory) is a random-access memory whose - internal structure is based on dynamic memory with refresh control signals - generated internally, in the standby mode, so that it can mimic the functionality - of a static memory. It combines the high density of DRAM with the ease-of-use - of true SRAM. The M4 core communicates with the PSRAM via Quad SPI interface. - - # PSRAM Device Configuration {#psram_device_configuration} - The PSRAM Driver offers configuring the following: - - Read-Write type - - Normal: This supported only in SPI interface mode. Supports maximum - frequency of 33MHz. Uses normal read and normal write command. - - Fast: Supported in SPI and QPI mode. Uses fast read and normal write. - - Quad IO: Supported in SPI and QPI mode. Uses fast quad read and write. - - Interface mode - - SPI Mode (Serial IO) - - QPI Mode (Quad IO) - - Operation frequency Source - - Interface PLL Clock - - ULP Reference Clock - - SoC PLL Clock - - M4_SOCCLKNOSWLSYNCCLKTREEGATED Clock - - # Linker configurations {#psram_linker_configuration} - The text segment, data segment, bss, heap and stack can be placed in PSRAM by - installing the respective components present under "PSRAM Linker Configurations" - from "SOFTWARE COMPONENTS" GUI. Since PSRAM is already initiliazed in bootloader, - these components can be installed and the respective segments can be placed in - PSRAM without installing "PSRAM Core" component and without initializing psram - from application. - - # Usage {#psram_usage} - PSRAM Driver and QSPI are initiliazed by bootloader with Quad IO read-write type - and QPI interface. The application is not required to reinitialize PSRAM device - and QSPI unless the configurations required are different from the default set - by the bootloader. - - The PSRAM device handle "PSRAM_Device" of type @ref sl_psram_info_type_t is defined - "in sl_si91x_psram_handle.c". - - @ref sl_si91x_psram_uninit assumes that PSRAM was initialized with QPI mode and exits - QPI mode within definition. If the PSRAM configuration in bootcode has SPI mode enabled, - user is expected to comment the exit QPI mode function call in @ref sl_si91x_psram_uninit. - - To reconfigure and initliaze PSRAM, set required configurations from PSRAM Core component - and call @ref sl_si91x_psram_init within application. - - * @} end group PSRAM ****************************************************/ - -/** @} (end addtogroup PSRAM) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup PSRAM PSRAM Driver +/// @{ +/// +/// @details +/// +/// +/// @n @section PSRAM_Intro Introduction +/// +/// PSRAM (Pseudo Static Random Access Memory) is a random-access memory whose +/// internal structure is based on dynamic memory with refresh control signals +/// generated internally, in the standby mode, so that it can mimic the functionality +/// of a static memory. It combines the high density of DRAM with the ease-of-use +/// of true SRAM. The M4 core communicates with the PSRAM via Quad SPI interface. +/// +/// @n @section PSRAM_Config Configuration +/// +/// # PSRAM Device Configuration +/// +/// The PSRAM Driver offers configuring the following: +/// - Read-Write type +/// - Normal: This supported only in SPI interface mode. Supports maximum +/// frequency of 33MHz. Uses normal read and normal write command. +/// - Fast: Supported in SPI and QPI mode. Uses fast read and normal write. +/// - Quad IO: Supported in SPI and QPI mode. Uses fast quad read and write. +/// - Interface mode +/// - SPI Mode (Serial IO) +/// - QPI Mode (Quad IO) +/// - Operation frequency Source +/// - Interface PLL Clock +/// - ULP Reference Clock +/// - SoC PLL Clock +/// - M4_SOCCLKNOSWLSYNCCLKTREEGATED Clock +/// +/// # Linker configurations +/// +/// The text segment, data segment, bss, heap and stack can be placed in PSRAM by +/// installing the respective components present under "PSRAM Linker Configurations" +/// from "SOFTWARE COMPONENTS" GUI. Since PSRAM is already initialized in bootloader, +/// these components can be installed and the respective segments can be placed in +/// PSRAM without installing "PSRAM Core" component and without initializing psram +/// from application. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section PSRAM_Usage Usage +/// +/// PSRAM Driver and QSPI are initialized by bootloader with Quad IO read-write type +/// and QPI interface. The application is not required to reinitialize PSRAM device +/// and QSPI unless the configurations required are different from the default set +/// by the bootloader. +/// +/// The PSRAM device handle "PSRAM_Device" of type @ref sl_psram_info_type_t is defined +/// "in sl_si91x_psram_handle.c". +/// +/// @ref sl_si91x_psram_uninit assumes that PSRAM was initialized with QPI mode and exits +/// QPI mode within definition. If the PSRAM configuration in bootcode has SPI mode enabled, +/// user is expected to comment the exit QPI mode function call in @ref sl_si91x_psram_uninit. +/// +/// To reconfigure and initliaze PSRAM, set required configurations from PSRAM Core component +/// and call @ref sl_si91x_psram_init within application. +/// +/// +/// @} end group PSRAM ********************************************************/ #endif //__SL_SI91X_PSRAM_H_ diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h index 2626b97cf..ae8841408 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h @@ -283,29 +283,30 @@ typedef struct { ******************************************************************************/ /***************************************************************************/ /** - * @brief This API is used to de-initialize the PWM peripheral. It disables + * @brief This API is used to de-initialize the PWM peripheral. + * @details This will de-initialize the PWM peripheral and also it disables * PWM module clock. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration - * @param[in] none + * @param none * @return none ******************************************************************************/ void sl_si91x_pwm_deinit(void); /***************************************************************************/ /** - * @brief This API is used to get the PWM version which includes Release, + * @brief This API is used to get the API version of PWM. version which includes Release, * SQA and DEV version numbers of PWM - * @param[in] none + * @param none * @return returns structure of type \ref sl_pwm_version_t ******************************************************************************/ sl_pwm_version_t sl_si91x_pwm_get_version(void); /***************************************************************************/ /** - * @brief This API is used to set the PWM configuration parameters. It configures - * output polarity, set time period, output mode, set duty cycle set base timer - * mode, and base timer selection for each channel. - * @pre Pre-conditions: + * @brief This API sets the PWM configuration parameters. + * @details It configures the output polarity, set time period, output mode, + * set duty cycle set base timer mode and base timer selection for each channel. + * @pre Pre-condition: * - \ref sl_si91x_pwm_init * @param[in] pwm_config: pointer to configuration parameters of type \ref sl_pwm_config_t * @return returns status 0 if successful, @@ -317,10 +318,10 @@ sl_pwm_version_t sl_si91x_pwm_get_version(void); sl_status_t sl_si91x_pwm_set_configuration(sl_pwm_config_t *pwm_config); /***************************************************************************/ /** - * @brief This API is used to set output polarity for MCPWM. Setting polarity - * positive sets the digital pulse ON for the duty cycle and off for remainder + * @brief This API is used to set output polarity for Motor Control Pulse Width Modulation (MCPWM). + * @details Setting polarity positive sets the digital pulse ON for the duty cycle and off for remainder * of the period. Setting polarity negative is vice-versa of positive polarity set. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_pwm_init * @param[in] polarity_low: Output polarity for low side (L3, L2, L1, L0) * @param[in] polarity_high: Output polarity for high side (H3, H2, H1, H0) @@ -333,9 +334,9 @@ sl_status_t sl_si91x_pwm_set_configuration(sl_pwm_config_t *pwm_config); sl_status_t sl_si91x_pwm_set_output_polarity(boolean_t polarity_low, boolean_t polarity_high); /***************************************************************************/ /** - * @brief This API is used to start the MCPWM operation for required channel, - * based on duty cycle set, polarity and all other configurations done for - * respective channel. + * @brief This API is used to start the Motor Control Pulse Width Modulation (MCPWM). + * @details Operation for required channel is based on duty cycle set, polarity and all other configurations done for + * respective channels. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -352,7 +353,7 @@ sl_status_t sl_si91x_pwm_set_output_polarity(boolean_t polarity_low, boolean_t p sl_status_t sl_si91x_pwm_start(sl_pwm_channel_t channel); /***************************************************************************/ /** - * @brief This API is used to stop the MCPWM operation for the required channel + * @brief This API is used to stop the Motor Control Pulse Width Modulation (MCPWM) operation for the required channel * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -371,7 +372,10 @@ sl_status_t sl_si91x_pwm_stop(sl_pwm_channel_t channel); /***************************************************************************/ /** * @brief This API is used to select number of base timers as four base timers for - * four channels or one base timer for all channels of MCPWM + * four channels or one base timer for all channels of Motor Control Pulse Width Modulation (MCPWM). One base timer + * is used when single timer to be selected for all channels. Instead of only + * one base timer, there is also one base timer for each channel selection, where + * separate base timers are used for separate channels. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -386,13 +390,14 @@ sl_status_t sl_si91x_pwm_control_base_timer(sl_pwm_timer_t base_timer); /***************************************************************************/ /** * @brief This API is used to set time period and counter initial value for the - * required MCPWM channel. + * required Motor Control Pulse Width Modulation (MCPWM) channel. It updates the base timer period and base timer counter +* initial values for required channel. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration - * @param[in] channel: Channel number (1 to 4) of type \ref sl_pwm_channel_t - * @param[in] period: Time period value - * @param[in] init_val: Update the base time counter initial value + * @param[in] channel: Channel number (1 to 4) of type \ref sl_pwm_channel_t. + * @param[in] period: Time period value in the range of 0 - 65535. + * @param[in] init_val: Update the base time counter initial value, in the range of 0 - 65535. * @return returns status 0 if successful, * else error code as follows: * - SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument @@ -402,7 +407,7 @@ sl_status_t sl_si91x_pwm_control_base_timer(sl_pwm_timer_t base_timer); sl_status_t sl_si91x_pwm_set_time_period(sl_pwm_channel_t channel, uint32_t period, uint32_t init_val); /***************************************************************************/ /** - * @brief This API is used to configure special event trigger generation for required MCPWM channel which + * @brief This API is used to configure special event trigger generation for required Motor Control Pulse Width Modulation (MCPWM) channel which * allows the A/D converter to be synchronized to the PWM time base. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init @@ -421,7 +426,7 @@ sl_status_t sl_si91x_pwm_set_time_period(sl_pwm_channel_t channel, uint32_t peri sl_status_t sl_si91x_pwm_trigger_special_event(sl_pwm_svt_t direction, sl_si91x_pwm_svt_config_t *pwm_config); /***************************************************************************/ /** - * @brief This API is used to configure Dead time insertion parameters for MCPWM. + * @brief This API is used to configure Dead time insertion parameters for Motor Control Pulse Width Modulation (MCPWM). * Dead time is a small amount of time inserted between the switching edges of * PWM signals. * @pre Pre-conditions: @@ -441,7 +446,7 @@ sl_status_t sl_si91x_pwm_trigger_special_event(sl_pwm_svt_t direction, sl_si91x_ sl_status_t sl_si91x_pwm_configure_dead_time(sl_si91x_pwm_dt_config_t *dead_time, sl_pwm_channel_t channel); /***************************************************************************/ /** - * @brief This API is used to reset the required channel of MCPWM. + * @brief This API is used to reset the required channel of Motor Control Pulse Width Modulation (MCPWM). * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -458,7 +463,7 @@ sl_status_t sl_si91x_pwm_configure_dead_time(sl_si91x_pwm_dt_config_t *dead_time sl_status_t sl_si91x_pwm_reset_channel(sl_pwm_channel_t channel); /***************************************************************************/ /** - * @brief This API is used to reset the counter from the required channel of MCPWM + * @brief This API is used to reset the counter from the required channel of Motor Control Pulse Width Modulation (MCPWM) * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -475,7 +480,9 @@ sl_status_t sl_si91x_pwm_reset_channel(sl_pwm_channel_t channel); sl_status_t sl_si91x_pwm_reset_counter(sl_pwm_channel_t channel); /***************************************************************************/ /** - * @brief This API is used to set base time period control for the required MCPWM channel. + * @brief This API is used to set base time period control for the required Motor Control Pulse Width Modulation (MCPWM) channel. + * This sets the base timer output post scalar bits and base timer input clock prescalar + * value. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -529,7 +536,7 @@ sl_status_t sl_si91x_pwm_control_fault(sl_pwm_fault_t fault, sl_pwm_output_t pwm sl_status_t sl_si91x_pwm_set_base_timer_mode(sl_pwm_base_timer_mode_t mode, sl_pwm_channel_t channel); /***************************************************************************/ /** - * @brief This API is used to set output mode for the MCPWM. There are two modes + * @brief This API is used to set output mode for the Motor Control Pulse Width Modulation (MCPWM). There are two modes * we can configure i.e., independent mode (or) complementary mode. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init @@ -545,7 +552,7 @@ sl_status_t sl_si91x_pwm_set_base_timer_mode(sl_pwm_base_timer_mode_t mode, sl_p sl_status_t sl_si91x_pwm_set_output_mode(sl_pwm_mode_t mode, sl_pwm_channel_t channel); /***************************************************************************/ /** - * @brief Handles all interrupt flags of MCPWM. It handles IRQ handler, Timer + * @brief Handles all interrupt flags of Motor Control Pulse Width Modulation (MCPWM). It handles IRQ handler, Timer * interrupt and callback event which handles different events. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init @@ -554,7 +561,7 @@ sl_status_t sl_si91x_pwm_set_output_mode(sl_pwm_mode_t mode, sl_pwm_channel_t ch * - \ref sl_si91x_pwm_control_period * - \ref sl_si91x_pwm_register_callback * @param[in] callback_event: Structure of type \ref sl_si91x_pwm_callback_t - * @param[in] flag: It is the logical OR of different interrupts generated on multiple channels + * @param[in] flag: It is the logical OR of different interrupts generated on multiple channels(in the range of 0 - 65535). * @return returns status 0 if successful, * else error code as follows: * - SL_STATUS_OK - Success @@ -571,7 +578,7 @@ sl_status_t sl_si91x_pwm_register_callback(sl_si91x_pwm_callback_t *callback_eve * - \ref sl_si91x_pwm_control_period * - \ref sl_si91x_pwm_register_callback * - \ref sl_si91x_pwm_start - * @param[in] flag: It is the logical OR of different interrupts generated on multiple channels + * @param[in] flag: It is the logical OR of different interrupts generated on multiple channels(in the range of 0 - 65535). * @return returns status 0 if successful, * else error code as follows: * - SL_STATUS_OK - Success @@ -580,7 +587,7 @@ sl_status_t sl_si91x_pwm_register_callback(sl_si91x_pwm_callback_t *callback_eve sl_status_t sl_si91x_pwm_unregister_callback(uint16_t flag); /***************************************************************************/ /** - * @brief This API is used to read the counter current value + * @brief This API is used to read the counter current value for required Motor Control Pulse Width Modulation (MCPWM) channel. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -600,7 +607,7 @@ sl_status_t sl_si91x_pwm_read_counter(uint16_t *counter_value, sl_pwm_channel_t /***************************************************************************/ /** * @brief This API is used to get time period counter direction status of - * required MCPWM channel whether counter up / down. + * required Motor Control Pulse Width Modulation (MCPWM) channel whether counter up / down. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -626,7 +633,7 @@ sl_status_t sl_si91x_pwm_get_counter_direction(uint8_t *counter_direction, sl_pw * - \ref sl_si91x_pwm_set_configuration * - \ref sl_si91x_pwm_set_base_timer_mode * @param[in] dead_time: Enum of type \ref sl_pwm_dead_time_t - * @param[in] flag: ORing of the following values: + * @param[in] flag: ORing of the following values: (In the range of 0 - 65535). * - DT_EN_CH0 * - DT_EN_CH1 * - DT_EN_CH2 @@ -640,7 +647,7 @@ sl_status_t sl_si91x_pwm_get_counter_direction(uint8_t *counter_direction, sl_pw sl_status_t sl_si91x_pwm_control_dead_time(sl_pwm_dead_time_t dead_time, uint32_t flag); /***************************************************************************/ /** - * @brief This API is used to clear the interrupts of MCPWM + * @brief This API is used to clear the interrupts of Motor Control Pulse Width Modulation (MCPWM) * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -648,7 +655,7 @@ sl_status_t sl_si91x_pwm_control_dead_time(sl_pwm_dead_time_t dead_time, uint32_ * - \ref sl_si91x_pwm_control_period * - \ref sl_si91x_pwm_register_callback * - \ref sl_si91x_pwm_start - * @param[in] flag: The logical OR of different interrupts generated on multiple channels + * @param[in] flag: The logical OR of different interrupts generated on multiple channels(in the range of 0-511). * @return returns status 0 if successful, * else error code as follows: * - SL_STATUS_OK - Success @@ -657,7 +664,7 @@ sl_status_t sl_si91x_pwm_control_dead_time(sl_pwm_dead_time_t dead_time, uint32_ sl_status_t sl_si91x_pwm_clear_interrupt(uint32_t flag); /***************************************************************************/ /** - * @brief This API is used to get the interrupt status of interrupt flags of MCPWM. + * @brief This API is used to get the interrupt status of interrupt flags of Motor Control Pulse Width Modulation (MCPWM). * Events which are raised can be identified by checking the status. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init @@ -666,7 +673,7 @@ sl_status_t sl_si91x_pwm_clear_interrupt(uint32_t flag); * - \ref sl_si91x_pwm_control_period * - \ref sl_si91x_pwm_register_callback * - \ref sl_si91x_pwm_start - * @param[in] flag: Flag value + * @param[in] flag: Flag value (0 - 65535) * @param[out] intr_status: Pointer to interrupt status * @return Interrupt status of the required interrupt flag ******************************************************************************/ @@ -674,13 +681,16 @@ sl_status_t sl_si91x_pwm_get_interrupt_status(uint32_t flag, uint16_t *intr_stat /***************************************************************************/ /** * @brief This API is used to control duty cycle control parameters for the - * required MCPWM channel. It can enable (or) disable duty cycle updation. + * required Motor Control Pulse Width Modulation (MCPWM) channel. + * @details This API controls duty cycle parameters for the required Motor + * Control Pulse Width Modulation (MCPWM) channel. + * It can also enable (or prevent) duty cycle updating. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration * - \ref sl_si91x_pwm_set_base_timer_mode * @param[in] duty_cycle: Enum of type \ref sl_pwm_duty_cycle_t - * @param[in] value: This can be a logical OR of the following parameters: + * @param[in] value: This can be a logical OR of the following parameters:(Range 0 -127). * - IMDT_DUTYCYCLE_UPDATE_EN: Enable to update the duty cycle immediately * - DUTYCYCLE_UPDATE_DISABLE: Duty cycle register updation disable * @param[in] channel: Channel number (1 to 4) of type \ref sl_pwm_channel_t @@ -693,8 +703,9 @@ sl_status_t sl_si91x_pwm_get_interrupt_status(uint32_t flag, uint16_t *intr_stat sl_status_t sl_si91x_pwm_configure_duty_cycle(sl_pwm_duty_cycle_t duty_cycle, uint32_t value, sl_pwm_channel_t channel); /***************************************************************************/ /** - * @brief This API is used to control the output override operation of MCPWM. - * It is used to set / reset the PWM output override enable. + * @brief This API is used to control the output override operation of Motor Control Pulse Width Modulation (MCPWM). + * @details This API controls MCPWM's output override operation. + * It enables you to enable or disable PWM output override. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -710,8 +721,10 @@ sl_status_t sl_si91x_pwm_configure_duty_cycle(sl_pwm_duty_cycle_t duty_cycle, ui sl_status_t sl_si91x_pwm_output_override(sl_pwm_override_t override, sl_pwm_output_t pwm_output); /***************************************************************************/ /** - * @brief This API is used to control the override control parameter, output is in sync with PWM time period - * depending on operating mode + * @brief This API is used to control the override control parameter and output is in sync with PWM time period + * depending on operating mode. + * @details This API is used for controlling the override control parameters and also + * the output is synchronized with the PWM time period, depending on the operating mode. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -727,7 +740,7 @@ sl_status_t sl_si91x_pwm_output_override(sl_pwm_override_t override, sl_pwm_outp sl_status_t sl_si91x_pwm_control_override(sl_pwm_override_t override, sl_pwm_output_override_t value); /***************************************************************************/ /** - * @brief This API is used to control override value for the required output of MCPWM + * @brief This API is used to control override value for the required output of Motor Control Pulse Width Modulation (MCPWM) * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -746,7 +759,8 @@ sl_status_t sl_si91x_pwm_control_override_value(sl_pwm_override_t override, sl_pwm_override_value_t value); /***************************************************************************/ /** - * @brief This API is used to control output fault override control parameters for the required PWM output + * @brief This API is used to control output fault in pwm module. + * @details This API is used to control output fault in pwm override control parameters for the required PWM output. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -755,7 +769,7 @@ sl_status_t sl_si91x_pwm_control_override_value(sl_pwm_override_t override, * - \ref sl_si91x_pwm_register_callback * - \ref sl_si91x_pwm_start * @param[in] output_fault: Enum of type \ref sl_pwm_output_fault_t - * @param[in] value: This can be a logical OR of the below parameters: + * @param[in] value: This can be a logical OR of the below parameters: (in the range of 0 - 65535) * - FLT_A_MODE: if bit one then cycle by cycle by mode and zero then latched mode * - FLT_B_MODE: if bit one then cycle by cycle by mode and zero then latched mode * - OP_POLARITY_H: Output polarity for high (H3, H2, H1, H0) side signals. @@ -775,7 +789,9 @@ sl_status_t sl_si91x_pwm_control_override_value(sl_pwm_override_t override, sl_status_t sl_si91x_pwm_control_output_fault(sl_pwm_output_fault_t output_fault, uint32_t value); /***************************************************************************/ /** - * @brief This API is used to control the generation of a special event trigger for the required channel of MCPWM + * @brief This API is used to control the special event trigger. + * @details This API controls the generation of a special event trigger + * for the required channel of the Motor Control Pulse Width Modulation (MCPWM). * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -789,13 +805,14 @@ sl_status_t sl_si91x_pwm_control_output_fault(sl_pwm_output_fault_t output_fault sl_status_t sl_si91x_pwm_control_special_event_trigger(sl_pwm_event_t event); /***************************************************************************/ /** - * @brief This API is used to control dead time control parameters for the required channel. + * @brief This API is used to control the dead time. + * @details This API is used to control dead time control parameters for the required channel. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration * - \ref sl_si91x_pwm_set_base_timer_mode * @param[in] dead_time: Enum of type \ref sl_pwm_dead_time_t - * @param[in] value: This can be a logical OR of the below parameters: + * @param[in] value: This can be a logical OR of the below parameters: (in the range of 0 - 4095). * - DEADTIME_SELECT_ACTIVE: Deadtime select bits for PWM going active * Possible values are as below if bit zero then use counter A, if one then use counter B * - DEADTIME_SELECT_INACTIVE: Deadtime select bits for PWM going inactive @@ -808,11 +825,11 @@ sl_status_t sl_si91x_pwm_control_special_event_trigger(sl_pwm_event_t event); sl_status_t sl_si91x_pwm_select_dead_time(sl_pwm_dead_time_t dead_time, uint32_t value); /***************************************************************************/ /** - * @brief This API is used to select duty cycle for the required MCPWM channel. + * @brief This API is used to select duty cycle for the required Motor Control Pulse Width Modulation (MCPWM) channel. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration - * @param[in] duty_cycle: Duty cycle value + * @param[in] duty_cycle: Duty cycle value (0 - 65535). * @param[in] channel: Channel number (1 to 4) of type \ref sl_pwm_channel_t * @return returns status 0 if successful, * else error code as follows: @@ -823,7 +840,7 @@ sl_status_t sl_si91x_pwm_select_dead_time(sl_pwm_dead_time_t dead_time, uint32_t sl_status_t sl_si91x_pwm_set_duty_cycle(uint32_t duty_cycle, sl_pwm_channel_t channel); /***************************************************************************/ /** - * @brief This API is used to get duty cycle for the required MCPWM channel. + * @brief This API is used to get duty cycle for the required Motor Control Pulse Width Modulation (MCPWM) channel. * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -838,8 +855,9 @@ sl_status_t sl_si91x_pwm_set_duty_cycle(uint32_t duty_cycle, sl_pwm_channel_t ch sl_status_t sl_si91x_pwm_get_duty_cycle(sl_pwm_channel_t channel, uint32_t *duty_cycle); /***************************************************************************/ /** - * @brief This API is used to enable the use of an external trigger for base time counter - * increment or decrement of MCPWM + * @brief This API is used to enables an external trigger. + * @details This API is used to enables the use of an external trigger for base time counter + * increment or decrement of Motor Control Pulse Width Modulation (MCPWM). * @pre Pre-conditions: * - \ref sl_si91x_pwm_init * - \ref sl_si91x_pwm_set_configuration @@ -888,7 +906,105 @@ sl_status_t sl_si91x_pwm_init(sl_pwm_init_t *pwm_init); ******************************************************************************/ sl_status_t sl_si91x_pwm_fault_init(sl_pwm_fault_init_t *pwm_fault); +/***************************************************************************/ /** + * @brief This API is used to disable the reset for the required channel of MCPWM. + * @pre Pre-conditions: + * - \ref sl_si91x_pwm_init + * - \ref sl_si91x_pwm_set_configuration + * - \ref sl_si91x_pwm_set_base_timer_mode + * - \ref sl_si91x_pwm_control_period + * - \ref sl_si91x_pwm_register_callback + * - \ref sl_si91x_pwm_start + * @param[in] channel: Channel number (0 to 3) of type \ref sl_pwm_channel_t + * @return returns status 0 if successful, + * else error code as follows: + * - SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument + * - SL_STATUS_OK - Success +******************************************************************************/ +sl_status_t sl_si91x_pwm_reset_channel_disable(sl_pwm_channel_t channel); + +/***************************************************************************/ /** + * @brief This API is used to disable the counter reset for the required channel of MCPWM + * @pre Pre-conditions: + * - \ref sl_si91x_pwm_init + * - \ref sl_si91x_pwm_set_configuration + * - \ref sl_si91x_pwm_set_base_timer_mode + * - \ref sl_si91x_pwm_control_period + * - \ref sl_si91x_pwm_register_callback + * - \ref sl_si91x_pwm_start + * @param[in] channel: Channel number (0 to 3) of type \ref sl_pwm_channel_t + * @return returns status 0 if successful, + * else error code as follows: + * - SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument + * - SL_STATUS_OK - Success +******************************************************************************/ +sl_status_t sl_si91x_pwm_reset_counter_disable(sl_pwm_channel_t channel); + +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup PWM Pulse Width Modulation +/// @{ +/// +/// @details +/// +/// +/// @n @section PWM_Intro Introduction +/// +/// +/// The Motor Control Pulse Width Modulation (MCPWM) controller is used to generate a periodic pulse waveform, +/// which is useful in motor control and power control applications. +/// The MCPWM controller acts as a timer to count up to a period count value. +/// The time period and the duty cycle of the pulses are both programmable. +/// +/// @li Features of Pulse Width Modulation: +/// +/// 1. Supports up to eight PWM outputs with four duty cycle generators +/// +/// 2. Complementary and Independent output modes are supported +/// +/// 3. Dead time insertion in Complementary mode +/// +/// 4. Manual override option for PWM output pins. Output pin polarity is programmable +/// +/// 5. Supports generation of interrupt for different events +/// +/// 6. Supports two hardware fault input pins +/// +/// 7. Special event trigger for synchronizing analog-to-digital conversions +/// +/// @n @section PWM_Config Configuration +/// +/// The configurable parameters of Pulse Width Modulation are frequency, mode, timer counter, duty cycle, +/// output polarity, duty cycle. And the apis used to call them are: +/// +/// 1. @ref sl_si91x_pwm_set_output_polarity +/// 2. @ref sl_si91x_pwm_set_time_period +/// 3. @ref sl_si91x_pwm_set_output_mode +/// 4. @ref sl_si91x_pwm_get_time_period +/// 5. @ref sl_si91x_pwm_set_duty_cycle +/// 6. @ref sl_si91x_pwm_set_base_timer_mode +/// 7. @ref sl_si91x_pwm_control_base_timer +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section PWM_Use Usage +/// +/// @li The driver PWM exhibits the production of a 50% duty cycle, continuous ON/OFF digital signal +/// at a frequency of 25 kHz. Since this component may be instantiated, several named instances +/// can be made of it.An initialization struct set in accordance with the configuration is constructed +/// for every instance. An instance of channel_0 is generated by default. and the APIs utilized to set up +/// and initialize PWM are +/// +/// 1. @ref sl_si91x_pwm_init +/// 2. @ref sl_si91x_pwm_set_configuration +/// 3. @ref sl_si91x_pwm_control_period +/// 4. @ref sl_si91x_pwm_configure_duty_cycle +/// 5. @ref sl_si91x_pwm_register_callback +/// 6. @ref sl_si91x_pwm_start +/// 7. @ref sl_si91x_pwm_stop +/// 8. @ref sl_si91x_pwm_deinit +/// /** @} (end addtogroup PWM) */ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h index 42c4114d9..f9f42e4b2 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h @@ -105,7 +105,7 @@ typedef enum { * @brief Set reference clock count for RO temperature sensor * @details This API is used to set the count of reference clock on which ptat clock counts. * - * @param[in] count Count of reference clock on which ptat clock counts + * @param[in] count Count of reference clock on which ptat clock counts (0- 1024) * * @return Status 0 if successful, else error code: * - SL_STATUS_OK on success @@ -117,11 +117,9 @@ sl_status_t sl_si91x_ro_temperature_set_count(uint32_t count); /***************************************************************************/ /** * @brief Select reference clock for RO temperature sensor * @details This API is used to select the reference clock to the temperature sensor - * * @param[in] ref_clk Reference clock selection: * - 0 - reference RO clock from analog * - 1 - MCU FSM clock - * * @return Status 0 if successful, else error code: * - SL_STATUS_OK on success \n * - SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument @@ -132,11 +130,9 @@ sl_status_t sl_si91x_ro_temperature_select_reference_clock(sl_ro_reference_clock /***************************************************************************/ /** * @brief Enable/disable RO temperature sensor * @details This API is used to enable / disable the temperature sensor - * * @param[in] state Enable / disable the temperature sensor: * - 0 - Disable * - 1 - Enable - * * @return Status 0 if successful, else error code: * - SL_STATUS_OK on success * - SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument @@ -148,7 +144,7 @@ sl_status_t sl_si91x_ro_temperature_enable(sl_ro_temperature_state_t state); * @brief Set nominal value for RO temperature sensor * @details This API is used to set the nominal value of the temperature sensor * - * @param[in] value Calibrated temperature value + * @param[in] value Calibrated temperature value(0-128). * * @return Status 0 if successful, else error code: * - SL_STATUS_OK on success @@ -160,9 +156,7 @@ sl_status_t sl_si91x_ro_temperature_nominal(uint32_t value); /***************************************************************************/ /** * @brief Read value from RO temperature sensor * @details This API is used to read the temperature value - * * @param[out] temperature Temperature value reading - * * @return Status 0 if successful, else error code: * - SL_STATUS_OK on success * - SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer @@ -172,9 +166,7 @@ sl_status_t sl_si91x_ro_temperature_read(int32_t *temperature); /***************************************************************************/ /** * @brief Calculate temperature from RO temperature sensor reading * @details This API is used to updating temperature through RO based calculation - * * @param[in] enable Enable RO based BJT temperature update - * * @return Status 0 if successful, else error code: * - SL_STATUS_OK on success * - SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument @@ -186,7 +178,7 @@ sl_status_t sl_si91x_ro_temperature_based_update(sl_ro_temperature_update_t enab * @brief Update temperature for RO temperature sensor * @details This API is used to updating temperature * - * @param[in] temperature Known temperature + * @param[in] temperature Known temperature (0- 255) * * @return SL_STATUS_OK on success ******************************************************************************/ @@ -195,9 +187,7 @@ sl_status_t sl_si91x_ro_temperature_load(uint8_t temperature); /***************************************************************************/ /** * @brief Get reference clock count for RO temperature sensor * @details This API is used to read the reference clock count - * * @param[out] ref_count Count of f1 clock cycles - * * @return Status 0 if successful, else error code: * - SL_STATUS_OK on success * - SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer @@ -207,9 +197,7 @@ sl_status_t sl_si91x_ro_temperature_get_reference_clk_count(uint32_t *ref_count) /***************************************************************************/ /** * @brief Get ptat clock count for RO temperature sensor * @details This API is used to read the ptat clock count - * * @param[out] ptat_count Count of f2 clock cycles - * * @return Status 0 if successful, else error code: * - SL_STATUS_OK on success * - SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer @@ -219,14 +207,12 @@ sl_status_t sl_si91x_ro_temperature_get_ptat_clk_count(uint32_t *ptat_count); /***************************************************************************/ /** * @brief Update temperature periodically for RO temperature sensor * @details This API is used to update the temperature periodically after some time - * * @param[in] periodic_check Enable periodic checking of temperature * @param[in] trigger_time Periodic check time in sec: * - 0 - for every 1 sec * - 1 - for every 2 secs * - 2 - for every 4 secs * - 3 - for every 5 secs - * * @return Status 0 if successful, else error code: * - SL_STATUS_OK on success * - SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument @@ -235,6 +221,60 @@ sl_status_t sl_si91x_ro_temperature_get_ptat_clk_count(uint32_t *ptat_count); sl_status_t sl_si91x_ro_temperature_periodic_update(sl_ro_temperature_periodic_check_t periodic_check, sl_ro_temperature_trigger_time_t trigger_time); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup ROTEMPSENSOR RO Temperature Sensor +/// @{ +/// +/// @details +/// +/// +/// @n @section ROTEMPSENSOR_Intro Introduction +/// +/// +/// A Ring Oscillator Temperature Sensor (RO Temperature Sensor) is a type of temperature sensor that utilizes +/// a ring oscillator circuit to measure temperature variations. A ring oscillator is a circuit configuration that +/// consists of an odd number of inverters connected in a loop. The frequency of oscillation of the ring oscillator +/// is influenced by various factors, including temperature. +/// +/// Here's how a Ring Oscillator Temperature Sensor typically works: +/// +/// @li **Ring Oscillator Circuit**: The ring oscillator is designed with an odd number of inverters (amplifiers) connected in a loop. +/// The delay through each inverter contributes to the overall oscillation frequency of the ring. +/// +/// @li **Temperature Sensitivity**: The delay through each inverter is sensitive to temperature variations. As the temperature changes, +/// the characteristics of the transistors in the inverters are affected, causing a change in the overall delay and, consequently, the oscillation frequency. +/// +/// @li **Frequency Measurement**: The frequency of the ring oscillator is measured or monitored. This frequency is directly related to the +/// temperature of the environment or the temperature of the integrated circuit itself. +/// +/// @li **Temperature Calibration**: The sensor is often calibrated to provide an accurate temperature reading based on the measured oscillation frequency. +/// Calibration may involve correlating the frequency with a temperature reference to create a temperature-sensitive output. +/// +/// @n @section ROTEMPSENSOR_Config Configuration +/// +/// By altering the mode in the structure below, one can update the trigger time @li @ref sl_ro_temperature_trigger_time_t. +/// +/// @n @section ROTEMPSENSOR_Use Usage +/// +/// RO temperature sensor is set with nominal temperature and the temperature sensor is enabled +/// after the Temperature is updated through RO based calculation. RO temperature sensor will be +/// triggered and updated for every 2 seconds. +/// And the apis used in the RO Temperature Sensor are: +/// +/// 1. @ref sl_si91x_ro_temperature_select_reference_clock +/// +/// 2. @ref sl_si91x_ro_temperature_nominal +/// +/// 3. @ref sl_si91x_ro_temperature_based_update +/// +/// 4. @ref sl_si91x_ro_temperature_set_count +/// +/// 5. @ref sl_si91x_ro_temperature_enable +/// +/// 6. @ref sl_si91x_ro_temperature_periodic_update +/// +/// 7. @ref sl_si91x_ro_temperature_read +/// /** @} (end addtogroup SL_SI91X_RO_TEMPERATURE_SENSOR) */ #ifdef __cplusplus diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sdio_secondary.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sdio_secondary.h index 205378bf7..99245604b 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sdio_secondary.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sdio_secondary.h @@ -73,94 +73,118 @@ typedef void (*sl_sdio_secondary_gpdma_callback_t)(uint8_t dma_ch); // SDIO dma sl_status_t sl_si91x_sdio_secondary_init(void); /***************************************************************************/ /** - * Trigger sequence to send data from the SDIO secondary in non-blocking mode to the + * @brief Trigger sequence to send data from the SDIO secondary in non-blocking mode to the * host/primary device. - * This API accepts the num of blocks i.e., one block will have block length - * (1 to 1024) bytes and a pointer to the data buffer to be transffered. + * @details This API accepts the num of blocks i.e., one block will have block length + * (1 to 1024) bytes and a pointer to the data buffer to be transferred. * - * @param[in] num_of_blocks - * Number of blocks to be sent - * - * @param[in] data_buf - * Reference of the Source buffer + * @param[in] num_of_blocks Number of blocks to be sent + * + * @param[in] data_buf Reference of the Source buffer * * @return none ******************************************************************************/ void sl_si91x_sdio_secondary_send(uint8_t num_of_blocks, uint8_t *data_buf); /***************************************************************************/ /** - * Receive data on the SDIO secondary in non-blocking mode from the host/primary device + * @brief Receive data on the SDIO secondary in non-blocking mode from the host/primary device * using DMA. - * * @param[in] data_buf * Reference of the Destination buffer in which data will receive - * * @return none ******************************************************************************/ void sl_si91x_sdio_secondary_receive(uint8_t *data_buf); /***************************************************************************/ /** -* Register the SDIO secondary user callback function. -* -* @pre Pre-conditions: - * - sl_si91x_sdio_secondary_init(); -* +* @brief Register the SDIO secondary user callback function. +* @pre Pre-condition: +* - sl_si91x_sdio_secondary_init(); * @param[in] callback_event Pointer to the function which needs to be called at the time of interrupt * @param[in] flag Interrupt flag to be registered * @return status 0 if successful, else error code as follow -* \ref SL_STATUS_OK (0x0000) - Success -*- -* \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer -*- -* \ref SL_STATUS_BUSY (0x0004) - Driver is busy -* +* - \ref SL_STATUS_OK (0x0000) - Success +* - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer +* - \ref SL_STATUS_BUSY (0x0004) - Driver is busy ******************************************************************************/ sl_status_t sl_si91x_sdio_secondary_register_event_callback(sl_sdio_secondary_callback_t callback_event, uint32_t flag); /***************************************************************************/ /** -* Unregister the SDIO secondary user callback function. -* +* @brief Unregister the SDIO secondary user callback function. * @param[in] flag Interrupt flag to be unregistered * @return none ******************************************************************************/ void sl_si91x_sdio_secondary_unregister_event_callback(uint32_t flag); /***************************************************************************/ /** -* Register the SDIO secondary DMA user callback function. -* +* @brief Register the SDIO secondary DMA user callback function. * @pre Pre-conditions: - * - sl_si91x_sdio_secondary_init(); -* +* - sl_si91x_sdio_secondary_init(); * @param[in] callback_event Pointer to the function which needs to be called at the time of interrupt * @return status 0 if successful, else error code as follow -* \ref SL_STATUS_OK (0x0000) - Success -*- -* \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer -*- -* \ref SL_STATUS_BUSY (0x0004) - Driver is busy -* +* - \ref SL_STATUS_OK (0x0000) - Success +* - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer +* - \ref SL_STATUS_BUSY (0x0004) - Driver is busy ******************************************************************************/ sl_status_t sl_si91x_sdio_secondary_gpdma_register_event_callback(sl_sdio_secondary_gpdma_callback_t callback_event); /***************************************************************************/ /** -* Unregister the SDIO secondary DMA user callback function. -* +* @brief Unregister the SDIO secondary DMA user callback function. * @param[in] none * @return none ******************************************************************************/ void sl_si91x_sdio_secondary_gpdma_unregister_event_callback(void); /***************************************************************************/ /** -* Get the SDIO Secondary Driver version. +* @brief Get the SDIO Secondary Driver version. * This function is used to know the SDIO Secondary Driver version. * * @param[in] none +* * @return \ref sl_sdio_secondary_version_t type version +* ******************************************************************************/ sl_sdio_secondary_version_t sl_si91x_sdio_secondary_get_version(void); /** @} (end addtogroup SDIO Secondary) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup SDIO SDIO Secondary +/// @{ +/// +/// @details +/// +/// +/// @n @section SDIO_Intro Introduction +/// +/// +/// Secure Digital Input/Output(SDIO). It is an extension of the SD (Secure Digital) card +/// standard that adds support for input and output functions. +/// +/// SDIO demonstrates the SDIO Secondary transmitting and receiving the data +/// to and from the external SDIO Master. +/// +/// The data is received continually depending on the clock. And the throughput will also be calculated +/// by taking the difference between clock time and total bits received. +/// +/// @n @section SDIO_Config Configuration +/// +/// @li Most SDIO configurations take place at the Master side, where it enables read, write, and read-write operations. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section SDIO_Usage Usage +/// +/// The initialization and configuration of the SDIO Secondary will be completed, transitioning it to a waiting state. +/// It will remain in this state until an interrupt is triggered from the Master. Subsequently, the send and receive APIs will +/// configure all DMA descriptors and initiate the DMA to transmit and receive data. Continuous data reception will commence after two seconds. +/// +/// 1. @ref sl_si91x_sdio_secondary_init +/// 2. @ref sl_si91x_sdio_secondary_register_event_callback +/// 3. @ref sl_si91x_sdio_secondary_send +/// 4. @ref sl_si91x_sdio_secondary_receive +/// +/// @} end group SDIO ********************************************************/ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sdio_slave.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sdio_slave.h index 6937143b6..c6f492f45 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sdio_slave.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sdio_slave.h @@ -81,30 +81,23 @@ typedef void (*sl_sdio_slave_callback_t)(uint8_t events); ******************************************************************************/ /***************************************************************************/ /** - * @brief - * Initialize sdio slave peripheral for transfers - * + * @brief Initialize sdio slave peripheral for transfers * @param[in] event_callback * Address of application callback function for host interrupt events ******************************************************************************/ void sl_si91x_sdio_slave_init(sl_sdio_slave_callback_t event_callback); /***************************************************************************/ /** - * @brief - * Trigger sequence to send data from sdio slave to host/master device - * + * @brief Trigger sequence to send data from sdio slave to host/master device * @param[in] num_of_blocks * Number of blocks to be sent - * * @param[in] data_buf * Reference of the Source buffer ******************************************************************************/ void sl_si91x_sdio_slave_send(uint8_t num_of_blocks, uint8_t *data_buf); /***************************************************************************/ /** - * @brief - * Trigger sequence to receive data on sdio slave from host/master device - * + * @brief Trigger sequence to receive data on sdio slave from host/master device * @param[in] data_buf * Reference of the Destination buffer ******************************************************************************/ diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h index 1e9dce71f..b4097a78d 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h @@ -191,9 +191,10 @@ typedef struct { /***************************************************************************/ /** * @brief Initialize the SIO module. It initializes the SIO * GPIO's and enables the SIO module clock. - * @param[in] none - * @return returns status 0 if successful, - * else error code as follows: + * + * @param none + * + * @return returns status 0 if successful, else error code as follows: * - \ref SL_STATUS_FAIL (0x0001) - Fail, SIO initialization failed * - \ref SL_STATUS_OK (0x0000) - Success, SIO initialization successful ******************************************************************************/ @@ -203,7 +204,7 @@ sl_status_t sl_si91x_sio_init(void); * @brief Initialize the SIO-SPI module. It configures * the SPI mode, bit length, bit order, SIO frequency, and the SIO channels for * the SPI transfer lines. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] configuration - Pointer to SIO-SPI configuration structure * \ref sl_sio_spi_config_t @@ -217,7 +218,7 @@ sl_status_t sl_si91x_sio_spi_init(sl_sio_spi_config_t *configuration); /***************************************************************************/ /** * @brief This API is used to De-initialize SIO module - * @param[in] none + * @param none * @return none ******************************************************************************/ void sl_si91x_sio_deinit(void); @@ -235,7 +236,9 @@ sl_status_t sl_si91x_sio_spi_pin_initialization(sl_sio_spi_t *sio_spi_init); /***************************************************************************/ /** * @brief Initialize SIO UART pins and clock. This holds the UART Tx, Rx pins * configuration. + * * @param[in] sio_uart_init : Pointer to the structure of type \ref sl_sio_uart_t + * * @return returns status 0 if successful, * else error code as follows: * - \ref SL_STATUS_OK - Success @@ -246,7 +249,9 @@ sl_status_t sl_si91x_sio_uart_pin_initialization(sl_sio_uart_t *sio_uart_init); /***************************************************************************/ /** * @brief Initialize SIO I2C pins and clock. This holds the I2C SDA, SCL pins * configuration. + * * @param[in] sio_i2c_init : Pointer to the structure of type \ref sl_sio_i2c_t + * * @return returns status 0 if successful, * else error code as follows: * - \ref SL_STATUS_OK - Success @@ -255,7 +260,8 @@ sl_status_t sl_si91x_sio_uart_pin_initialization(sl_sio_uart_t *sio_uart_init); sl_status_t sl_si91x_sio_i2c_pin_initialization(sl_sio_i2c_t *sio_i2c_init); /***************************************************************************/ /** - * @brief Assert the SIO SPI chip select. This tells peripheral that it should wake up + * @brief Assert the SIO SPI chip select. + * @details This tells peripheral that it should wake up * and receive / send data and is also used when multiple peripherals are present to * select the one you'd like to communicate with. * @pre Pre-conditions: @@ -314,7 +320,7 @@ sl_status_t sl_si91x_sio_spi_register_event_callback(sl_sio_spi_callback_t callb * - \ref sl_si91x_sio_init() * - \ref sl_si91x_sio_spi_init() * - \ref sl_si91x_sio_spi_register_event_callback() - * @param[in] none + * @param none * @return none ******************************************************************************/ void sl_si91x_sio_spi_unregister_event_callback(void); @@ -326,10 +332,11 @@ void sl_si91x_sio_spi_unregister_event_callback(void); * - \ref sl_si91x_sio_init() * - \ref sl_si91x_sio_spi_init() * - \ref sl_si91x_sio_spi_cs_assert() + * * @param[in] xfer_config - Pointer to SIO-SPI transfer configuration structure * \ref sl_sio_spi_xfer_config_t - * @return returns status 0 if successful, - * else error code as follows: + * + * @return returns status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer * - \ref SL_STATUS_OK (0x0000) - Success @@ -339,7 +346,7 @@ sl_status_t sl_si91x_sio_spi_transfer(sl_sio_spi_xfer_config_t *xfer_config); /***************************************************************************/ /** * @brief Get the SIO version. It is used to get the release, SQA and DEV version * of the SIO module. - * @param[in] none + * @param none * @return returns structure of type \ref sl_sio_version_t ******************************************************************************/ sl_sio_version_t sl_si91x_sio_get_version(void); @@ -448,7 +455,7 @@ sl_status_t sl_si91x_sio_uart_register_event_callback(sl_sio_uart_callback_t cal * - \ref sl_si91x_sio_i2c_generate_start() * @param[in] configuration - pointer to the I2C configuration structure * \ref stc_sio_i2c_config_t in SIO module - * @param[in] address - slave address + * @param[in] address - slave address(1- 255). * @param[in] data - pointer to the data * @param[in] length - data length * @return returns status 0 if successful, @@ -471,7 +478,7 @@ sl_status_t sl_si91x_sio_i2c_write(stc_sio_i2c_config_t *configuration, * - \ref sl_si91x_sio_i2c_transfer() * @param[in] configuration - pointer to the I2C configuration structure * \ref stc_sio_i2c_config_t in SIO module - * @param[in] address - slave address + * @param[in] address - slave address(1- 255). * @param[out] data - pointer to the data * @param[in] length - data length * @return returns status 0 if successful, @@ -489,7 +496,7 @@ sl_status_t sl_si91x_sio_i2c_read(stc_sio_i2c_config_t *configuration, uint8_t a * - \ref sl_si91x_sio_i2c_generate_start() * @param[in] configuration - Pointer to the I2C configuration structure * \ref stc_sio_i2c_config_t in SIO module - * @param[in] address - Slave address + * @param[in] address - Slave address (1- 255). * @param[in] tx_buffer - Pointer to the data transmit buffer * @param[in] tx_length - TX data length * @param[out] rx_buffer - Pointer to the data receive buffer @@ -509,9 +516,9 @@ sl_status_t sl_si91x_sio_i2c_transfer(stc_sio_i2c_config_t *configuration, /***************************************************************************/ /** * @brief Generate I2C start in SIO. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() - * @param[in] none + * @param none * @return none ******************************************************************************/ void sl_si91x_sio_i2c_generate_start(void); @@ -523,7 +530,7 @@ void sl_si91x_sio_i2c_generate_start(void); * - \ref sl_si91x_sio_i2c_generate_start() * - \ref sl_si91x_sio_i2c_write() (or) * - \ref sl_si91x_sio_i2c_transfer() - * @param[in] none + * @param none * @return none ******************************************************************************/ void sl_si91x_sio_i2c_generate_stop(void); @@ -535,7 +542,7 @@ void sl_si91x_sio_i2c_generate_stop(void); * - \ref sl_si91x_sio_init() * - \ref sl_si91x_sio_uart_init() * - \ref sl_si91x_sio_uart_register_event_callback() - * @param[in] none + * @param none * @return none ******************************************************************************/ void sl_si91x_sio_uart_unregister_event_callback(void); @@ -547,7 +554,7 @@ void sl_si91x_sio_uart_unregister_event_callback(void); * - \ref sl_si91x_sio_uart_init() * - \ref sl_si91x_sio_uart_send() * - \ref sl_si91x_sio_uart_read() - * @param[in] none + * @param none * @return none ******************************************************************************/ void sl_si91x_sio_uart_rx_done(void); @@ -578,7 +585,7 @@ sl_status_t sl_si91x_sio_configure_interrupt(en_sio_channels_t channel, interrup * @param[in] pattern - Pattern match bit to be enabled for pattern match to take place \ref pattern_match_t * - Pattern match disable: 0 * - Pattern match enable: 1 - * @param[in] slice - Slice number (0,1,2,8,9,10) to select + * @param[in] slice - Slice number (0,1,2,8,9,10) to select. * @param[in] slice_pattern - Pattern to match for selected slice * @return returns status 0 if successful, * else error code as follows: @@ -660,7 +667,7 @@ sl_status_t sl_si91x_sio_control_flow(en_sio_channels_t channel, flow_control_t /***************************************************************************/ /** * @brief Load data to buffer in reverse order. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] channel - SIO channel to be selected \ref en_sio_channels_t * @param[in] reverse - If data to be shifted out MSB first, it is to be set \ref reverse_load_t @@ -674,7 +681,7 @@ sl_status_t sl_si91x_sio_reverse_load(en_sio_channels_t channel, reverse_load_t /***************************************************************************/ /** * @brief Enable the common swap interrupt. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] channel - SIO channel to be selected \ref en_sio_channels_t * @return returns status 0 if successful, @@ -716,7 +723,7 @@ sl_status_t sl_si91x_sio_mask_interrupt(en_sio_channels_t channel); /***************************************************************************/ /** * @brief Unmask the common swap interrupt. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] channel - SIO channel to be selected \ref en_sio_channels_t * @return returns status 0 if successful, @@ -729,16 +736,16 @@ sl_status_t sl_si91x_sio_unmask_interrupt(en_sio_channels_t channel); /***************************************************************************/ /** * @brief Read the common swap interrupt status. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() - * @param[in] none + * @param none * @return returns interrupt status ******************************************************************************/ uint32_t sl_si91x_sio_get_interrupt_status(void); /***************************************************************************/ /** * @brief Enable the common shift interrupt. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] channel - SIO channel to be selected \ref en_sio_channels_t * @return returns status 0 if successful, @@ -751,7 +758,7 @@ sl_status_t sl_si91x_sio_set_shift_interrupt(en_sio_channels_t channel); /***************************************************************************/ /** * @brief Disable the common shift interrupt. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] channel - SIO channel to be selected \ref en_sio_channels_t * @return returns status 0 if successful, @@ -764,7 +771,7 @@ sl_status_t sl_si91x_sio_clear_shift_interrupt(en_sio_channels_t channel); /***************************************************************************/ /** * @brief Mask the common shift interrupt. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] channel - SIO channel to be selected \ref en_sio_channels_t * @return returns status 0 if successful, @@ -777,7 +784,7 @@ sl_status_t sl_si91x_sio_mask_shift_interrupt(en_sio_channels_t channel); /***************************************************************************/ /** * @brief Unmask the common shift interrupt. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] channel - SIO channel to be selected \ref en_sio_channels_t * @return returns status 0 if successful, @@ -790,7 +797,7 @@ sl_status_t sl_si91x_sio_unmask_shift_interrupt(en_sio_channels_t channel); /***************************************************************************/ /** * @brief Read the common shift interrupt status. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] channel - SIO channel to be selected \ref en_sio_channels_t * @return returns shift interrupt status @@ -799,7 +806,7 @@ uint32_t sl_si91x_sio_shift_interrupt_status(void); /***************************************************************************/ /** * @brief Select edge of the clock cycle for sampling bits. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * @param[in] channel - SIO channel to be selected \ref en_sio_channels_t * @param[in] edge_sel - Select the edge for bit sample to start \ref edge_select_t @@ -815,7 +822,7 @@ sl_status_t sl_si91x_sio_edge_select(en_sio_channels_t channel, edge_select_t ed /***************************************************************************/ /** * @brief Read SIO buffer register. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * - \ref sl_si91x_sio_uart_init() * - \ref sl_si91x_sio_uart_register_event_callback() @@ -827,7 +834,7 @@ uint32_t sl_si91x_sio_read_buffer(en_sio_channels_t channel); /***************************************************************************/ /** * @brief Write into SIO buffer register. - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sio_init() * - \ref sl_si91x_sio_uart_init() * - \ref sl_si91x_sio_uart_register_event_callback() @@ -842,7 +849,95 @@ uint32_t sl_si91x_sio_read_buffer(en_sio_channels_t channel); ******************************************************************************/ sl_status_t sl_si91x_sio_write_buffer(en_sio_channels_t channel, uint32_t data); -/** @} (end addtogroup SIO) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY! *********************** +/// @addtogroup SIO Serial Input-Output +/// @{ +/// +/// @details +/// +/// +/// @n @section SIO_Intro Introduction +/// +/// +/// Serial Input/Output (SIO) refers to a method of data transfer where information is sent and received +/// sequentially, one bit at a time, over a single communication channel. This communication can occur between +/// different electronic devices, such as micro-controllers, sensors, or other components. +/// +/// Key features of SIO include: +/// +/// @li SIO Functionality is supported by Eight GPIO pins. +/// +/// @li Detects a 32-bit pattern on the input pins. +/// +/// @li SIO will transmit or receive the MSB First. +/// +/// @n @section SIO_Config Configuration +/// +/// Various parameters SPI bit order, SPI clock, MOSI channel, MISO channel, +/// SPI CS channel, bit length, SPI mode can be configured. +/// Various parameters UART baud rate, bit length, parity, receive channel selection, transmit +/// channel selection, stop bits can be configured with below given Enumerations. +/// +/// 1. @ref sl_sio_spi_event_t +/// +/// 2. @ref sl_sio_uart_event_t +/// +/// 3. @ref sl_sio_spi_mode_t +/// +/// 4. @ref sl_sio_spi_bit_width_t +/// +/// 5. @ref sl_sio_spi_msb_lsb_t +/// +/// 6. @ref sl_sio_spi_bit_length_t +/// +/// 7. @ref sl_sio_spi_parity_t +/// +/// 8. @ref sl_sio_spi_stop_bit_t +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section SIO_Use Usage +/// +/// Data is transferred over SIO SPI after it has been initialized and configured. A callback +/// API is then called to register the callback at the moment of the event. Before transfer has +/// begin, chip select assert is to be done. In order to do this test, the MISO and MOSI pins must +/// be connected in loopback mode. +/// +/// After transfer completion, chip select de-assert is to be done using When the transfer complete event +/// is generated, it compares the sent and received data. +/// +/// 1. @ref sl_si91x_sio_spi_pin_initialization +/// +/// 2. @ref sl_si91x_sio_spi_init +/// +/// 3. @ref sl_si91x_sio_spi_register_event_callback +/// +/// 4. @ref sl_si91x_sio_spi_cs_assert +/// +/// 5. @ref sl_si91x_sio_spi_transfer +/// +/// 6. @ref sl_si91x_sio_spi_cs_deassert +/// +/// 7. @ref sl_si91x_sio_deinit +/// +/// Data is sent and received by SIO UART after it has been initiated and configured. A callback API is +/// then called to register the callback at the moment of the event. Subsequently, the transfer buffer will +/// transmit the required number of bytes, and the receive buffer will obtain the data bytes. It compares the +/// sent and received data when the receive complete event is created. +/// +/// 1. @ref sl_si91x_sio_uart_pin_initialization +/// +/// 2. @ref sl_si91x_sio_uart_init +/// +/// 2. @ref sl_si91x_sio_uart_register_event_callback +/// +/// 3. @ref sl_si91x_sio_uart_send +/// +/// 4. @ref sl_si91x_sio_uart_read +/// +/// 5. @ref sl_si91x_sio_deinit +/// +/** @} (end addtogroup PWM) */ #ifdef __cplusplus } diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ssi.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ssi.h index 98161d5b8..b997a1fdd 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ssi.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ssi.h @@ -116,119 +116,146 @@ typedef enum { } sl_ssi_slave_number_t; /***************************************************************************/ /** - * Set the clock for the SSI peripheral, Configures the PLL clock and + * @brief This API will configures the SSI clock. + * @details To set the clock for the SSI peripheral, Configures the PLL clock and * SOC clock with the value set by user in the clock configuration structure. * * @param[in] clock_config Pointer to clock config structure \ref sl_ssi_clock_config_t + * * @return status 0 if successful, else error code as follow. - * - SL_STATUS_OK (0x0000) - Success, timer clock-source parameters configured properly - * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer \n - * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid \n - * - SL_STATUS_FAIL (0x0001) - The function is failed \n - * - SL_STATUS_NOT_INITIALIZED (0x0011) - Clock is not initialized + * - SL_STATUS_OK (0x0000) - Success, timer clock-source parameters configured properly + * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer \n + * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid \n + * - SL_STATUS_FAIL (0x0001) - The function is failed \n + * - SL_STATUS_NOT_INITIALIZED (0x0011) - Clock is not initialized *******************************************************************************/ sl_status_t sl_si91x_ssi_configure_clock(sl_ssi_clock_config_t *clock_config); /***************************************************************************/ /** - * Initialize the SSI. If the DMA is enabled, it also initializes the DMA. + * @brief This API will initialize the SSI. + * @details This will initialize the SSI and if the DMA is enabled, + * it also initializes the DMA module. * Pass the address of the pointer for storing the SSI Primary/Secondary/ULP Primary * handle, which can be used in future for other function calls. * * @param[in] instance (Primary/Secondary/ULP Primary) ( \ref sl_ssi_instance_t) + * * @param[in] ssi_handle Double Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) + * * @return status 0 if successful, else error code as follow. - * - SL_STATUS_OK (0x0000) - Success, otherwise fail error code as follow - * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid \n - * - SL_STATUS_BUSY (0x0004) - Driver is busy + * - SL_STATUS_OK (0x0000) - Success, otherwise fail error code as follow + * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid \n + * - SL_STATUS_BUSY (0x0004) - Driver is busy *******************************************************************************/ sl_status_t sl_si91x_ssi_init(sl_ssi_instance_t instance, sl_ssi_handle_t *ssi_handle); /***************************************************************************/ /** - * Uninitialize the SSI. If the DMA is enabled, it also uninitializes the - * DMA + * @brief This API will uninitialize the SSI. + * @details This will uninitialize the SSI and also if the DMA is enabled, it also uninitializes the + * DMA module. * * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) + * * @return status 0 if successful, else error code as follow. - * - SL_STATUS_OK (0x0000) - Success, otherwise fail error code as follow - * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - SL_STATUS_OK (0x0000) - Success, otherwise fail error code as follow + * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * @note + * When the SSI module is used in combination with other peripherals, while de-initializing in the application, refer to the notes below: + * 1. Whenever sl_si91x_ssi_deinit() gets called it will power down the domain(PERI_EFUSE) which contains different peripherals mentioned below. + * USART, UART, I2C, SSI Master, SSI Slave, Generic-SPI Master, I2S Master, I2S Slave, Micro-DMA Controller, Config Timer, + * Random-Number Generator, CRC Accelerator, SIO, QEI, MCPWM and EFUSE. + * Since deinit power downs the PERI_EFUSE doamin, it's recommended to call the sl_si91x_ssi_deinit() API at the end of the application. + * 2. Few peripherals (ULP Peripherals, UULP Peripherals, GPDMA and SDIO-SPI) have seperate domains that can be powered down indepedently. For additional details, refer to the Power architecture section in the Hardware Reference Manual + * e.g., To power down ULP SSI, use the API below: + * RSI_PS_M4ssPeriPowerDown(ULPSS_PWRGATE_ULP_SSI); + * Here, ULP_SSI has seperate power domain ULPSS_PWRGATE_ULP_SSI, which can be powered down indepedently. Refer to the rsi_power_save.h file for all power gates definitions. *******************************************************************************/ sl_status_t sl_si91x_ssi_deinit(sl_ssi_handle_t ssi_handle); /***************************************************************************/ /** - * Control and configure the SSI. + * @brief This API will control and configure the SSI. + * @details This will control and configure the SSI. As part of that, following parameters are configured: * - Mode (Primary/Secondary/ULP Primary) * - bit_width (4 bit to 16 bit) * - clock_mode/Frame format (mode0 to mode3, TI and Microwire) * - bitrate (10 Mbps to 40 Mbps) - * - Rx sample delay (0 to 63) - * - * @param[in] ssi_handle pointer to ssi instance handle. ( \ref sl_ssi_handle_t) - * @param[in] control_configuration pointer to control config structure. ( \ref sl_ssi_control_config_t) + * - Rx sample delay (0 to 63). + * + * @param[in] ssi_handle pointer to ssi instance handle. ( \ref sl_ssi_handle_t). + * @param[in] control_configuration pointer to control config structure. ( \ref sl_ssi_control_config_t). * @param[in] slave_number In the current implementation variable slave_number is un-used - * ( \ref sl_ssi_slave_number_t) + * ( \ref sl_ssi_slave_number_t). * - * @return status 0 if successful, else error code as follow. - * - SL_STATUS_OK (0x0000) - Success - * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer - * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid - * - SL_STATUS_FAIL (0x0001) - The function is failed - * - SL_STATUS_NOT_SUPPORTED (0x000F) - Parameter is not supported - * - SL_STATUS_BUSY (0x0004) - Driver is busy - * - SL_STATUS_INVALID_MODE (0x0024) - Slave select Mode is invalid - * - SL_STATUS_INVALID_TYPE (0x0026) - SPI frame format is not valid - * - SL_STATUS_INVALID_RANGE (0x0028) - Data bits (frame length) is not in range + * @return status 0 if successful, else error code as follow. + * - SL_STATUS_OK (0x0000) - Success + * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - SL_STATUS_FAIL (0x0001) - The function is failed + * - SL_STATUS_NOT_SUPPORTED (0x000F) - Parameter is not supported + * - SL_STATUS_BUSY (0x0004) - Driver is busy + * - SL_STATUS_INVALID_MODE (0x0024) - Slave select Mode is invalid + * - SL_STATUS_INVALID_TYPE (0x0026) - SPI frame format is not valid + * - SL_STATUS_INVALID_RANGE (0x0028) - Data bits (frame length) is not in range *******************************************************************************/ sl_status_t sl_si91x_ssi_set_configuration(sl_ssi_handle_t ssi_handle, sl_ssi_control_config_t *control_configuration, sl_ssi_slave_number_t slave_number); /***************************************************************************/ /** - * Start receiving the data from the SSI interface. - * - * @pre \ref sl_si91x_ssi_configure_clock \n - * @pre \ref sl_si91x_ssi_init \n - * @pre \ref sl_si91x_ssi_set_configuration \n - * @pre \ref sl_si91x_ssi_set_slave_number - * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) + * @brief This API will receive data from the secondary device. + * @details This will receive data from the secondary device. + * If DMA is enabled, it configures the DMA channel and required parameters. + * When the received data is equal to data_length passed in this function, + * a callback event is generated which can be registered using \ref sl_si91x_ssi_register_event_callback. + * @pre Pre-conditions: + * - \ref sl_si91x_ssi_configure_clock \n + * - \ref sl_si91x_ssi_init \n + * - \ref sl_si91x_ssi_set_configuration \n + * - \ref sl_si91x_ssi_set_slave_number + * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t). * @param[in] data pointer to the variable which will store the received data - * @param[in] data_length (uint32_t) number of data items to receive + * @param[in] data_length (uint32_t) number of data items to receive. * @return status 0 if successful, else error code as follow. - * - SL_STATUS_OK (0x0000) - Success - * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer - * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid - * - SL_STATUS_FAIL (0x0001) - The function is failed - * - SL_STATUS_BUSY (0x0004) - Driver is busy + * - SL_STATUS_OK (0x0000) - Success + * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - SL_STATUS_FAIL (0x0001) - The function is failed + * - SL_STATUS_BUSY (0x0004) - Driver is busy *******************************************************************************/ sl_status_t sl_si91x_ssi_receive_data(sl_ssi_handle_t ssi_handle, void *data, uint32_t data_length); /***************************************************************************/ /** - * Start sending the data from the SSI interface. - * - * @pre \ref sl_si91x_ssi_configure_clock \n - * @pre \ref sl_si91x_ssi_init \n - * @pre \ref sl_si91x_ssi_set_configuration \n - * @pre \ref sl_si91x_ssi_set_slave_number - * + * @brief This API will send data to the secondary device. + * @details If DMA is enabled, it configures the DMA channel and required parameters. + * When the send data is equal to data_length passed in this function, + * a callback event is generated which can be registered using \ref sl_si91x_ssi_register_event_callback. + * @pre Pre-conditions: + * - \ref sl_si91x_ssi_configure_clock \n + * - \ref sl_si91x_ssi_init \n + * - \ref sl_si91x_ssi_set_configuration \n + * - \ref sl_si91x_ssi_set_slave_number * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) * @param[in] data pointer to the variable which will store the received data * @param[in] data_length (uint32_t) number of data items to receive * @return status 0 if successful, else error code as follow. - * - SL_STATUS_OK (0x0000) - Success - * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer - * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid - * - SL_STATUS_FAIL (0x0001) - The function is failed - * - SL_STATUS_BUSY (0x0004) - Driver is busy + * - SL_STATUS_OK (0x0000) - Success + * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid + * - SL_STATUS_FAIL (0x0001) - The function is failed + * - SL_STATUS_BUSY (0x0004) - Driver is busy *******************************************************************************/ sl_status_t sl_si91x_ssi_send_data(sl_ssi_handle_t ssi_handle, const void *data, uint32_t data_length); /***************************************************************************/ /** - * Start to send and receive bi-directional full duplex data to/from the SPI secondary. - * - * @pre \ref sl_si91x_ssi_configure_clock \n - * @pre \ref sl_si91x_ssi_init \n - * @pre \ref sl_si91x_ssi_set_configuration \n - * @pre \ref sl_si91x_ssi_set_slave_number - * + * @brief Send and receive data to the secondary device simultaneously. + * @details If DMA is enabled, it configures the DMA channel and required parameters. + * When the received data and send data is equal to data_length passed in this function, + * a callback event is generated which can be registered using \ref sl_si91x_ssi_register_event_callback. + * @pre Pre-conditions: + * - \ref sl_si91x_ssi_configure_clock \n + * - \ref sl_si91x_ssi_init \n + * - \ref sl_si91x_ssi_set_configuration \n + * - \ref sl_si91x_ssi_set_slave_number * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) * @param[in] data_out const pointer to the variable that has data which needs to be sent * @param[in] data_in pointer to the variable which will store the received data @@ -247,48 +274,42 @@ sl_status_t sl_si91x_ssi_transfer_data(sl_ssi_handle_t ssi_handle, uint32_t data_length); /***************************************************************************/ /** - * Get the SSI status. + * @brief This API will get the SSI version. + * @details This will get the SSI version. It returns the API version of SSI. * - * @param[in] ssi handle - * @return busy, data lost or mode fault returns as a bit field. + * @param None * -*******************************************************************************/ -sl_ssi_status_t sl_si91x_ssi_get_status(sl_ssi_handle_t ssi_handle); - -/***************************************************************************/ /** - * Get the SSI version. - * It returns the API version of SSI. - * - * @param[in] None * @return driver version. - * *******************************************************************************/ sl_ssi_version_t sl_si91x_ssi_get_version(void); /***************************************************************************/ /** - * Get the transfer status SSI. - * It returns the \ref sl_ssi_status_t type structure. The members are: - * - Busy - * - Data Lost - * - Mode Fault + * @brief This API will get the transfer status SSI. + * @details This will get the transfer status SSI. It returns the \ref sl_ssi_status_t type structure. + * -The members are: + * - Busy + * - Data Lost + * - Mode Fault * It is generally used to poll the busy status of SSI Master/ULP Master. - * - * @pre \ref sl_si91x_ssi_configure_clock \n - * @pre \ref sl_si91x_ssi_init \n - * @pre \ref sl_si91x_ssi_set_configuration \n - * + * @pre Pre-conditions: + * - \ref sl_si91x_ssi_configure_clock \n + * - \ref sl_si91x_ssi_init \n + * - \ref sl_si91x_ssi_set_configuration \n + * * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) + * * @return ( \ref sl_ssi_status_t) type structure *******************************************************************************/ sl_ssi_status_t sl_si91x_ssi_get_status(sl_ssi_handle_t ssi_handle); /***************************************************************************/ /** - * Get data receive count of the SSI. - * It returns the number of data received at the time of function call. - * - * @pre \ref sl_si91x_ssi_configure_clock \n - * @pre \ref sl_si91x_ssi_init \n - * @pre \ref sl_si91x_ssi_set_configuration \n + * @brief This API will get data receive count of the SSI. + * @details This will get data receive count of the SSI and it returns the number of + * data received at the time of function call. + * @pre Pre-conditions: + * - \ref sl_si91x_ssi_configure_clock \n + * - \ref sl_si91x_ssi_init \n + * - \ref sl_si91x_ssi_set_configuration \n * * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) * @return uint32_t value of the RX data count @@ -296,47 +317,51 @@ sl_ssi_status_t sl_si91x_ssi_get_status(sl_ssi_handle_t ssi_handle); uint32_t sl_si91x_ssi_get_rx_data_count(sl_ssi_handle_t ssi_handle); /***************************************************************************/ /** - * Get the transmit data count of SSI. - * It returns the number of data transmit at the time of function call - * - * @pre \ref sl_si91x_ssi_configure_clock \n - * @pre \ref sl_si91x_ssi_init \n - * @pre \ref sl_si91x_ssi_set_configuration \n - * + * @brief This API will get the transmit data count of SSI. + * @details This will get the transmit data count of SSI. + * It returns the number of data transmit at the time of function call. + * @pre Pre-conditions: + * - \ref sl_si91x_ssi_configure_clock \n + * - \ref sl_si91x_ssi_init \n + * - \ref sl_si91x_ssi_set_configuration \n * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) * @return uint32_t value of the tx data count *******************************************************************************/ uint32_t sl_si91x_ssi_get_tx_data_count(sl_ssi_handle_t ssi_handle); /***************************************************************************/ /** - * Register the user event callback. - * It registers the callback, i.e., stores the callback function address + * @brief This API will register the user event callback. + * @details It registers the callback, i.e., stores the callback function address * and pass to the variable that is called in Interrupt Handler. * If another callback is registered without unregistering previous callback then, it * returns an error code as follow, so it is mandatory to unregister the callback before registering * another callback. * * @param[in] ssi handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) + * * @param[in] callback_event Pointer to the function which needs to be called at the time of interrupt + * * @return status 0 if successful, else error code as follow. - * - SL_STATUS_BUSY (0x0004) - The callback is already registered, unregister previous callback before registering new one. - * - SL_STATUS_OK (0x0000) - Success - * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer + * - SL_STATUS_BUSY (0x0004) - The callback is already registered, unregister previous callback before registering new one. + * - SL_STATUS_OK (0x0000) - Success + * - SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer ******************************************************************************/ sl_status_t sl_si91x_ssi_register_event_callback(sl_ssi_handle_t ssi_handle, sl_ssi_signal_event_t callback_event); /***************************************************************************/ /** - * Unregister the user event callback. - * It unregisters the callback, i.e., clears the callback function address + * @brief This API will unregister the user event callback. + * @details It unregisters the callback, i.e., clears the callback function address * and passes a NULL value to the variable. - * - * @pre \ref sl_si91x_ssi_register_event_callback - * @param[in] None + * @pre Pre-conditions: + * - \ref sl_si91x_ssi_register_event_callback + * @param None ******************************************************************************/ void sl_si91x_ssi_unregister_event_callback(void); /***************************************************************************/ /** - * Fetch the clock division factor. + * @brief This API will fetch the clock division factor. + * @details The clock division factor is calculated based on the peripheral clock configured. + * It decides the baud rate of SSI. * * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) * @return factor(int32_t) The value of clock division fac @@ -344,49 +369,55 @@ void sl_si91x_ssi_unregister_event_callback(void); uint32_t sl_si91x_ssi_get_clock_division_factor(sl_ssi_handle_t ssi_handle); /***************************************************************************/ /** - * Fetch the frame length i.e., bit width. - * The frame length ranges between 4 and 16. - * - * @param[in] none + * @brief This API will fetch the frame length i.e., bit width and also + * @details The frame length ranges between 4 and 16. + * + * @param none + * * @return frame_length (uint32_t) The value of frame length + * ******************************************************************************/ uint32_t sl_si91x_ssi_get_frame_length(sl_ssi_handle_t ssi_handle); /*******************************************************************************/ /** - * To fetch the transmit FIFO threshold value, this value controls the level of + * @brief This API will fetch the transmit FIFO threshold value, this value controls the level of * entries at which the transmit FIFO controller triggers an interrupt. - * * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) * @return Transmit fifo threshold (uint32_t) The value of transmit fifo threshold ***********************************************************************************/ uint32_t sl_si91x_ssi_get_tx_fifo_threshold(sl_ssi_handle_t ssi_handle); /******************************************************************************/ /** - * To fetch the receiver FIFO threshold value, this value controls the level of + * @brief This API is to fetch the receiver FIFO threshold value, this value controls the level of * entries at which the receive FIFO controller triggers an interrupt. * * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) + * * @return Receiver fifo threshold (uint32_t) The value of receiver fifo threshold **********************************************************************************/ uint32_t sl_si91x_ssi_get_rx_fifo_threshold(sl_ssi_handle_t ssi_handle); /******************************************************************************/ /** - * To fetch the receiver sample delay value, it used to delay the sample of the + * @brief This API is to fetch the receiver sample delay value, it used to delay the sample of the * RX input signal. Each value represents a single ssi_clk delay on the sample * of the rxd signal. * - * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) + * @param[in] ssi_handle Pointer to the SSI driver handle ( \ref sl_ssi_handle_t) + * * @return Receiver sample delay (uint32_t) The value of receiver sample delay + * **********************************************************************************/ uint32_t sl_si91x_ssi_get_receiver_sample_delay(sl_ssi_handle_t ssi_handle); /***************************************************************************/ /** - * Set the secondary number in multi-secondary operation. - * For single secondary also, this API needs to be called before transferring the + * @brief This API will set the secondary number in multi-secondary operation. + * @details For single secondary also, this API needs to be called before transferring the * data. - * + * * @param[in] number Secondary number ( \ref sl_ssi_slave_number_t ) + * * @return none + * ******************************************************************************/ __STATIC_INLINE sl_status_t sl_si91x_ssi_set_slave_number(uint8_t number) { @@ -400,6 +431,52 @@ __STATIC_INLINE sl_status_t sl_si91x_ssi_set_slave_number(uint8_t number) return status; } +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY! *********************** +/// @addtogroup SSI +/// @{ +/// @details +/// +/// @n @section SSI_Intro Introduction +/// +/// Synchronous Serial Interface (SSI) is a communication protocol used to transfer data synchronously over a +/// serial interface between a microcontroller and a peripheral device. A clock signal is used to synchronize +/// the data transfer. +/// +/// @li SPI (Serial Peripheral Interface) or microwire interfaces are typically used to implement an SSI connection. +/// +/// @li The SiWx91x device supports SSI over SPI. +/// +/// @li SSI is widely supported in microcontroller architectures and is simple and flexible. +/// +/// @n @section Configuration +/// +/// @li SSI enables the configuration of several parameters, including the mode of the SSI clock, +/// which can be set using @ref sl_ssi_clock_config_t and then called by the API +/// @ref sl_si91x_ssi_configure_clock(); the mode of the SSI peripheral clock such as clock polarity and clock phase, +/// which can be set using @ref ssi_peripheral_clock_mode_t; the SSI peripheral device mode +/// (SSI master/SSI slave/ULP SSI Master) can be configured using @ref sl_ssi_instance_t; +/// Bit width may be adjusted between 4 and 16, +/// and bit rate between 500000 and 40000000 bits per second. By sending this structure to an API +/// @ref sl_si91x_ssi_set_configuration(), all configuration may be done using a structure +/// @ref sl_ssi_control_config_t. +/// the SSI slave number can be set using @ref sl_ssi_slave_number_t and call the API @ref sl_si91x_ssi_set_slave_number(). +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section Usage +/// +/// Most of the SSI functions take @ref sl_ssi_control_config_t as an argument and are invoked in +/// the following order: +/// +/// 1. @ref sl_si91x_ssi_configure_clock +/// 2. @ref sl_si91x_ssi_init +/// 3. @ref sl_si91x_ssi_set_configuration +/// 4. @ref sl_si91x_ssi_register_event_callback +/// 5. @ref sl_si91x_ssi_send_data +/// 6. @ref sl_si91x_ssi_deinit +/// +/** @} (end addtogroup SSI ) */ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h index ccae90025..4c97feed9 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h @@ -108,12 +108,10 @@ typedef struct { // Prototypes /***************************************************************************/ /** - * Initializes SYSRTC and enables the peripheral. - * Also configures that SYSRTC should run during debug halt, as per user input. - * - * @pre Pre-conditions: + * @brief Initializes SYSRTC and enables the peripheral. + * @details Also configures that SYSRTC should run during debug halt, as per user input. + * @pre Pre-condition: * - \ref sl_si91x_sysrtc_configure_clock - * * @param[in] config_ptr Pointer to SYSRTC config structure \ref sl_sysrtc_config_t. * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer. @@ -122,11 +120,12 @@ typedef struct { sl_status_t sl_si91x_sysrtc_init(const sl_sysrtc_config_t *config_ptr); /***************************************************************************/ /** - * Configures the SYSRTC input clock source frequency - * It configures clock source as 32khz RC, 32khz RO or 1Khz RO clock source as per user input. + * @brief Configures the SYSRTC input clock source frequency + * @details It configures clock source as 32khz RC, 32khz RO or 1Khz RO clock source as per user input. * For using 1KHz clock source, pass division factor value as '16' else pass '0'. * * @param[in] clk_ptr Pointer to clock configuration structure \ref sl_sysrtc_clock_config_t. + * * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Clock source parameter has an invalid value. * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer. @@ -135,14 +134,12 @@ sl_status_t sl_si91x_sysrtc_init(const sl_sysrtc_config_t *config_ptr); sl_status_t sl_si91x_sysrtc_configure_clock(sl_sysrtc_clock_config_t *clk_ptr); /***************************************************************************/ /** - * To configure the SYSRTC groups of compare and capture channels - * Configures group number and enables its compare & capture channels. + * @brief To configure the SYSRTC groups of compare and capture channels + * @details Configures group number and enables its compare & capture channels. * Also configures match out actions for respective compare channel and input events for capture - * * @pre Pre-conditions: * - \ref sl_si91x_sysrtc_configure_clock * - \ref sl_si91x_sysrtc_init - * * @param[in] group_number SYSRTC group number to be used. * @param[in] config_ptr (const *) Pointer to group configuration structure \ref sl_sysrtc_group_config_t. * @return status 0 if successful, else error code as follows: @@ -154,15 +151,13 @@ sl_status_t sl_si91x_sysrtc_configure_group(sl_sysrtc_group_number_t group_numbe sl_sysrtc_group_config_t const *config_ptr); /***************************************************************************/ /** - * To register the callback of the timer interrupt. - * Also enables the respective interrupts as per selected interrupt flags. - * + * @brief To register the callback of the timer interrupt. + * @details Also enables the respective interrupts as per selected interrupt flags. * @pre Pre-conditions: * - \ref sl_si91x_sysrtc_init * - \ref sl_si91x_sysrtc_configure_clock * - \ref sl_si91x_sysrtc_configure_group(), keep respective interrupt channel enable * - \ref sl_si91x_sysrtc_unregister_timeout_callback(), if already registered for any interrupt - * * @param[in] on_sysrtc_callback (function pointer) Callback function pointer * to be called when timer interrupt occurred. * @param[in] callback_flag (void *) pointer to interrupt flag value variable \ref sl_sysrtc_callback_t. @@ -181,12 +176,10 @@ sl_status_t sl_si91x_sysrtc_register_callback(sl_sysrtc_callback_t on_sysrtc_cal sl_sysrtc_interrupt_enables_t *interrupt_enable_ptr); /***************************************************************************/ /** - * Unregisters timer interrupt callback and disables interrupts as per + * @brief Unregisters timer interrupt callback and disables interrupts as per * selected interrupt flag. - * * @pre Pre-conditions: * - \ref sl_si91x_sysrtc_register_callback(), first register a particular interrupt flag. - * * @param[in] interrupt_enable_ptr pointer to interrupts enable structure \ref sl_sysrtc_interrupt_enables_t. * @param[in] group_number SYSRTC group number whose interrupts needs to be enabled. * @return status 0 if successful, else error code as follows: @@ -198,12 +191,10 @@ sl_status_t sl_si91x_sysrtc_unregister_callback(sl_sysrtc_group_number_t group_n sl_sysrtc_interrupt_enables_t *interrupt_enabled_handle); /***************************************************************************/ /** - * Sets SYSRTC compare value for the selected channel of the given group. - * + * @brief Sets SYSRTC compare value for the selected channel of the given group. * @pre Pre-conditions: * - First enable the compare channel of the respective group through * \ref sl_si91x_sysrtc_configure_group. - * * @param[in] group_number SYSRTC group number to use. * @param[in] channel Channel number to use. * @param[in] value Compare register value. @@ -216,8 +207,7 @@ sl_status_t sl_si91x_sysrtc_set_compare_value(sl_sysrtc_group_number_t group_num uint32_t compare_value); /***************************************************************************/ /** - * Gets SYSRTC current compare register value for selected channel of selected group. - * + * @brief Gets SYSRTC current compare register value for selected channel of selected group. * @param[in] group_number SYSRTC group number to use. * @param[in] channel Channel number to use. * @param[in] compare_value Pointer to the variable to store compare value read. @@ -231,15 +221,13 @@ sl_status_t sl_si91x_sysrtc_get_compare_value(sl_sysrtc_group_number_t group_num uint32_t *compare_value); /***************************************************************************/ /** - * Sets register-input for the capture channel of the selected group of SYSRTC. - * In other words, configures the SYSRTC Input (Capture) from register. - * + * @brief Sets register-input for the capture channel of the selected group of SYSRTC. + * @details In other words, configures the SYSRTC Input (Capture) from register. * @pre Pre-conditions: * - First, enable and configure the capture channel of the respective group through * \ref sl_si91x_sysrtc_configure_group. * - Disable GPIO input through \ref sl_si91x_sysrtc_enable_input_output_gpio, by * passing false. - * * @param[in] group_number SYSRTC group number to use. * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - group_number parameter has an invalid value. @@ -248,17 +236,15 @@ sl_status_t sl_si91x_sysrtc_get_compare_value(sl_sysrtc_group_number_t group_num sl_status_t sl_si91x_sysrtc_sets_register_capture_input(sl_sysrtc_group_number_t group_number); /***************************************************************************/ /** - * Configures input pins for the SYSRTC capture channel of selected group. - * Configures gpio-0 and gpio-1 as input pins for the capture channel of group0 & group-1 + * @brief Configures input pins for the SYSRTC capture channel of selected group. + * @details Configures gpio-0 and gpio-1 as input pins for the capture channel of group0 & group-1 * respectively. * Sets pins mode, mux and direction. - * * @pre Pre-conditions: * - First, enable and configure the capture channel of the respective group through * \ref sl_si91x_sysrtc_configure_group. * - Enable GPIO IO through \ref sl_si91x_sysrtc_enable_input_output_gpio, by * passing true. - * * @param[in] group_number SYSRTC group number to use. * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - group_number parameter has an invalid value. @@ -267,15 +253,14 @@ sl_status_t sl_si91x_sysrtc_sets_register_capture_input(sl_sysrtc_group_number_t sl_status_t sl_si91x_sysrtc_set_gpio_as_capture_input(sl_sysrtc_group_number_t group_number); /***************************************************************************/ /** - * Configures the output pins of the selected compare channel of given group. - * Configures gpio-3 and gpio-4 as output pins for compare channel 0 & 1 of group0 respectively. + * @brief Configures the output pins of the selected compare channel of given group. + * @details Configures gpio-3 and gpio-4 as output pins for compare channel 0 & 1 of group0 respectively. * Configures gpio-1 and gpio-2 as output pins for compare channel 0 & 1 of group1 respectively.. * Sets pins mode, mux and direction. * Also enables pins input buffer. - * * @pre Pre-conditions: * - First, enable and configure the output action of the compare channel of the respective group through - * \ref sl_si91x_sysrtc_configure_group. + * - \ref sl_si91x_sysrtc_configure_group. * * @param[in] group_number SYSRTC group number to use. * @param[in] channel Channel number to use. @@ -287,8 +272,8 @@ sl_status_t sl_si91x_sysrtc_set_compare_output_gpio(sl_sysrtc_group_number_t gro sl_sysrtc_channel_number_t channel); /***************************************************************************/ /** - * Gets the SYSRTC current counter register value. - * Updates the current count of the timer to count_value input parameter. + * @brief Gets the SYSRTC current counter register value. + * @details Updates the current count of the timer to count_value input parameter. * @param[in] count_value Pointer to the variable to store count value read. * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_NULL_POINTER (0x0022) - count_value parameter is a null pointer. @@ -297,9 +282,8 @@ sl_status_t sl_si91x_sysrtc_set_compare_output_gpio(sl_sysrtc_group_number_t gro sl_status_t sl_si91x_sysrtc_get_count(uint32_t *count_value); /***************************************************************************/ /** - * Gets the SYSRTC capture register value of a given group. - * Updates the capture count value of timer to capture_value input parameter. - * + * @brief Gets the SYSRTC capture register value of a given group. + * @details Updates the capture count value of timer to capture_value input parameter. * @param[in] group_number SYSRTC group number to use. * @param[in] capture_value Pointer to the variable to store capture value read. * @return status 0 if successful, else error code as follows: @@ -310,12 +294,15 @@ sl_status_t sl_si91x_sysrtc_get_count(uint32_t *count_value); sl_status_t sl_si91x_sysrtc_get_capture_value(sl_sysrtc_group_number_t group_number, uint32_t *capture_value); /***************************************************************************/ /** - * Reads the SYSRTC compare channel output bit value of a given group. - * Updates the bit value to compare_output_bit input parameter. + * @brief Reads the SYSRTC compare channel output bit value of a given group. + * @details Updates the bit value to compare_output_bit input parameter. * * @param[in] group_number SYSRTC group number to use. + * * @param[in] channel Channel number to use. + * * @param[in] compare_output Pointer to the variable to store compare output. + * * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_NULL_POINTER (0x0022) - compare_output parameter is a null pointer. * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - group_number or channel parameter has an invalid value. @@ -326,11 +313,12 @@ sl_status_t sl_si91x_sysrtc_get_compare_output(sl_sysrtc_group_number_t group_nu uint32_t *compare_output_bit); /***************************************************************************/ /** - * Gets the SYSRTC running status, status is true if running, false if stopped. - * Updates 'true' if SYSRTC is running else 'false' if not running, to the running_status + * @brief Gets the SYSRTC running status, status is true if running, false if stopped. + * @details Updates 'true' if SYSRTC is running else 'false' if not running, to the running_status * input parameter. * * @param[in] running_status Pointer to the variable to store the SYSRTC running status. + * * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_NULL_POINTER (0x0022) - running_status parameter is a null pointer. * - \ref SL_STATUS_OK (0x0000) - Success, parameters configured properly. @@ -338,11 +326,12 @@ sl_status_t sl_si91x_sysrtc_get_compare_output(sl_sysrtc_group_number_t group_nu sl_status_t sl_si91x_sysrtc_is_running(boolean_t *running_status); /***************************************************************************/ /** - * Gets the SYSRTC lock status. - * Updates 'true' if SYSRTC is locked, 'false' if unlocked, to the lock_status + * @brief Gets the SYSRTC lock status. + * @details Updates 'true' if SYSRTC is locked, 'false' if unlocked, to the lock_status * input parameter. * * @param[in] lock_status Pointer to the variable to store SYSRTC lock status. + * * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_NULL_POINTER (0x0022) - lock_status parameter is a null pointer. * - \ref SL_STATUS_OK (0x0000) - Success, parameters configured properly. @@ -350,35 +339,32 @@ sl_status_t sl_si91x_sysrtc_is_running(boolean_t *running_status); sl_status_t sl_si91x_sysrtc_is_locked(boolean_t *lock_status); /***************************************************************************/ /** - * Sets the SYSRTC input output mode for the capture and compare channels. - * If passed true, then input to capture channel and output of compare channel will + * @brief Sets the SYSRTC input output mode for the capture and compare channels. + * @details If passed true, then input to capture channel and output of compare channel will * be through GPIO, else disabled. * * @param[in] is_gpio_enabled Bool to enable or disable IO through GPIO. + * * @return none ******************************************************************************/ void sl_si91x_sysrtc_enable_input_output_gpio(bool is_gpio_enabled); /***************************************************************************/ /** - * Starts the SYSRTC counter. - * This function will send a start command to the SYSRTC peripheral. + * @brief Starts the SYSRTC counter. + * @details This function will send a start command to the SYSRTC peripheral. * It waits till the start command to be executed. - * * @pre Pre-conditions: * - \ref sl_si91x_sysrtc_init * - \ref sl_si91x_sysrtc_configure_clock(), keep software trigger disable here * - \ref sl_si91x_sysrtc_configure_group(), keep respective interrupt channel enable * - \ref sl_si91x_sysrtc_register_callback, keep respective interrupt enabled * - \ref sl_si91x_sysrtc_set_count - * - * @note - * This function will send a start command to the SYSRTC peripheral. The SYSRTC - * peripheral will use some LF clock ticks before the command is executed. - * The rsi_sysrtc_wait_sync() function is used to wait for the start - * command to be executed. - * * @param none * @return none + * @note This function will send a start command to the SYSRTC peripheral. + * @note The SYSRTC peripheral will use some LF clock ticks before the command is executed. + * @note The rsi_sysrtc_wait_sync() function is used to wait for the start + * command to be executed. ******************************************************************************/ __STATIC_INLINE void sl_si91x_sysrtc_start(void) { @@ -386,14 +372,15 @@ __STATIC_INLINE void sl_si91x_sysrtc_start(void) } /***************************************************************************/ /** - * Stops the SYSRTC counter. - * This function will send a stop command to the SYSRTC peripheral. + * @brief Stops the SYSRTC counter. + * @details This function will send a stop command to the SYSRTC peripheral. * It waits till the stop command to be executed. * - * @note This function requires the SYSRTC to be enabled. - * * @param none + * * @return none + * + * @note This function requires the SYSRTC to be enabled. ******************************************************************************/ __STATIC_INLINE void sl_si91x_sysrtc_stop(void) { @@ -401,9 +388,10 @@ __STATIC_INLINE void sl_si91x_sysrtc_stop(void) } /***************************************************************************/ /** - * Restores the SYSRTC to its reset state. + * @brief Restores the SYSRTC to its reset state. * * @param none + * * @return none ******************************************************************************/ __STATIC_INLINE void sl_si91x_sysrtc_reset(void) @@ -412,10 +400,9 @@ __STATIC_INLINE void sl_si91x_sysrtc_reset(void) } /***************************************************************************/ /** - * Locks the SYSRTC registers. - * When SYSRTC registers are locked SYSRTC_EN, SYSRTC_CFG, SYSRTC_CMD, + * @brief Locks the SYSRTC registers. + * @details When SYSRTC registers are locked SYSRTC_EN, SYSRTC_CFG, SYSRTC_CMD, * SYSRTC_SWRST, SYSRTC_CNT and SYSRTC_TOPCNT registers cannot be written to. - * * @param none * @return none ******************************************************************************/ @@ -425,13 +412,11 @@ __STATIC_INLINE void sl_si91x_sysrtc_lock(void) } /***************************************************************************/ /** - * Unlocks the SYSRTC registers. - * When SYSRTC registers are locked SYSRTC_EN, SYSRTC_CFG, SYSRTC_CMD, + * @brief Unlocks the SYSRTC registers. + * @details When SYSRTC registers are locked SYSRTC_EN, SYSRTC_CFG, SYSRTC_CMD, * SYSRTC_SWRST, SYSRTC_CNT and SYSRTC_TOPCNT registers cannot be written to. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sysrtc_lock - * * @param none * @return none ******************************************************************************/ @@ -441,13 +426,11 @@ __STATIC_INLINE void sl_si91x_sysrtc_unlock(void) } /***************************************************************************/ /** - * Sets the SYSRTC counter register value of counter + * @brief Sets the SYSRTC counter register value of counter * This can be used to change the count of SYSRTC, when it is stopped. * After calling this API user should start SYSRTC. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_sysrtc_stop - * * @param[in] value The new SYSRTC counter value. * @return none ******************************************************************************/ @@ -457,17 +440,15 @@ __STATIC_INLINE void sl_si91x_sysrtc_set_count(uint32_t value) } /***************************************************************************/ /** - * Gets the SYSRTC version + * @brief Gets the SYSRTC version * It returns API version of SYSRTC - * * @param[in] none * @return (sl_sysrtc_version_t) type structure. - * ******************************************************************************/ sl_sysrtc_version_t sl_si91x_sysrtc_get_version(void); /***************************************************************************/ /** -* De-initializes the SYSRTC by disabling its clock. +* @brief De-initializes the SYSRTC by disabling its clock. * @param[in] none * @return none * @note Unregisters the SYSRTC callback and disables all interrupts. @@ -475,6 +456,56 @@ sl_sysrtc_version_t sl_si91x_sysrtc_get_version(void); void sl_si91x_sysrtc_deinit(void); /** @} (end addtogroup SYSRTC) */ + +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup SYSRTC System RTC +/// @{ +/// +/// @details +/// +/// @n @section SYSRTC_Intro Introduction +/// The System Real-Time Clock (SYSRTC) offers precise timekeeping and timer +/// functionality essential for various applications. It serves as a cornerstone for tasks requiring accurate time measurement, +/// event scheduling, and power management. This SYSRTC driver provides a robust set of +/// functions to configure and use this peripheral effectively, ensuring optimal performance and reliability in time-critical applications. +/// +/// @n @section SYSRTC_Config Configuration +/// The @ref sl_si91x_sysrtc_configure_clock function allows setting the clock source frequency, +/// choosing between 32kHz RC, 1kHz RO clock sources. Initialization of the SYSRTC is achieved through +/// the @ref sl_si91x_sysrtc_init function, which not only initializes the peripheral but also enables it. Additionally, +/// SYSRTC can be configured to run during debug halt by specifying the appropriate setting in the initialization function. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section SYSRTC_Usage Usage +/// +/// @li SYSRTC has to be initialised by calling the @ref sl_si91x_sysrtc_configure_clock and @ref sl_si91x_sysrtc_init. +/// @li Once configured, the SYSRTC can be tailored to specific application requirements using the functions in the driver. +/// The @ref sl_si91x_sysrtc_configure_group configures group number and enables its compare & capture channels. +/// To handle timer interrupts and execute actions accordingly, users can register callback functions using the @ref sl_si91x_sysrtc_register_callback function. +/// Furthermore, functions such as @ref sl_si91x_sysrtc_set_compare_value and @ref sl_si91x_sysrtc_get_count facilitate setting compare values and retrieving the +/// current counter value, respectively, allowing for fine-grained control over time-sensitive operations. +/// Functions such as @ref sl_si91x_sysrtc_start and @ref sl_si91x_sysrtc_stop +/// enable starting and stopping the timer, while the @ref sl_si91x_sysrtc_lock locks the SYSRTC registers. +/// +/// @li Below functions will initiate and configure the SYSRTC, which is the general flow for implementation: +/// +/// 1. @ref sl_si91x_sysrtc_configure_clock +/// 2. @ref sl_si91x_sysrtc_init +/// 3. @ref sl_si91x_sysrtc_configure_group +/// 4. @ref sl_si91x_sysrtc_register_callback +/// 5. @ref sl_si91x_sysrtc_set_count +/// 6. @ref sl_si91x_sysrtc_set_compare_value (If compare channel is enabled) +/// 7. @ref sl_si91x_sysrtc_is_running (If required to check timer running status) +/// 8. @ref sl_si91x_sysrtc_start +/// 9. @ref sl_si91x_sysrtc_get_count (If required to check timer current count) +/// 10. @ref sl_si91x_sysrtc_stop +/// 11. @ref sl_si91x_sysrtc_deinit +/// + +/// +/// @} end group SYSRTC ********************************************************/ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h index e0f49afc4..70872dba4 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h @@ -125,21 +125,34 @@ typedef struct { // ----------------------------------------------------------------------------- // Prototypes /***************************************************************************/ /** - * Configures and enables the ULP-Timer input clock source. - * By default, configures the 'reference clock source' (32 MHZ) as the timer clock source, - * clock-type as 'static', disables synchronization to ULPSS pclk and skips waiting - * for switching of timer clock. + * @brief This API will initialize the ULP-Timer by enabling its clock source. + * @details It configures clock frequency, clock-type, enables/disables synchronization to ULPSS pclk + * & skips/allows waiting for timer clock switching. + * + * @param[in] timer_clk_ptr Pointer to timer_clk configuration structure + * @return status 0 if successful, else error code as follows: + * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Timer clock type or timer clock source values are invalid + * - \ref SL_STATUS_INVALID_CONFIGURATION (0x0023) - Timer clock-source configuration structure members have invalid configurations. + * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer + * - \ref SL_STATUS_OK (0x0000) - Success, timer clock-source parameters configured properly +*******************************************************************************/ +sl_status_t sl_si91x_ulp_timer_init(ulp_timer_clk_src_config_t *timer_clk_ptr); + +/***************************************************************************/ /** + * @brief This API will configures and enables the ULP-Timer input clock source. + * @details It configures clock frequency, clock-type, enables/disables synchronization to ULPSS pclk + * & skips/allows waiting for timer clock switching. * It is called inside \ref sl_si91x_ulp_timer_init API. - * @note: - * There are two \ref XTAL Clk sources one is Internal and external \ref XTAL clk source. - * In order to enable the external XTAL clk source need to configure the \ref NPSS_GPIO pins - * which can be done through sl_si91x_ulp_timer_configure_xtal_clock(uint8_t xtal_pin) API - * i.e user need to call that API first. - * In order to enable the soc CLK source need to configure the Ulpss soc Clk from M4 soc clk - * please refer \ref sl_si91x_ulp_timer_configure_soc_clock(boolean_t div_factor_type, - uint16_t div_factor ) + * + * @note + * @li There are two XTAL Clk sources internal and external + * In order to enable the external XTAL clk source need to configure the NPSS_GPIO pins + * through \ref sl_si91x_ulp_timer_configure_xtal_clock API + * i.e user need to call this API first. + * @li In order to use SOC source user need to use \ref sl_si91x_ulp_timer_configure_soc_clock API + * to configure the ULPSS SOC instead of clock configure API. * - * @param[in] timer_clk_ptr Pointer to timer_clk configuration structure + * @param[in] timer_clk_ptr Pointer to timer_clk configuration structure \ref ulp_timer_clk_src_config_t. * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Timer clock type or timer clock source values are invalid * - \ref SL_STATUS_INVALID_CONFIGURATION (0x0023) - Timer clock-source configuration structure members have invalid configurations. @@ -149,29 +162,16 @@ typedef struct { sl_status_t sl_si91x_ulp_timer_configure_clock(ulp_timer_clk_src_config_t *timer_clk_ptr); /***************************************************************************/ /** - * Initializes the ULP-Timer module by configuring and enabling the clock source. - * By default, configures the 'reference clock source' (32 MHZ) as the timer clock source, - * clock-type as 'static', disables synchronization to ULPSS pclk and skips waiting - * for switching of timer clock. - * - * @param[in] timer_clk_ptr Pointer to timer_clk configuration structure - * @return status 0 if successful, else error code. - * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Timer clock type or timer clock source values are invalid \n - * \ref SL_STATUS_INVALID_CONFIGURATION (0x0023) - Timer clock-source configuration structure members has invalid configurations. \n - * \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer \n - * \ref SL_STATUS_OK (0x0000) - Success, timer clock-source parameters configured properly -*******************************************************************************/ -sl_status_t sl_si91x_ulp_timer_init(ulp_timer_clk_src_config_t *timer_clk_ptr); - -/***************************************************************************/ /** - * Configures the ULP-Timer parameters such as timer number, mode, type, match-value, and direction. + * @brief This API will configure the ULP-Timer parameters. + * @details It configures the parameters such as timer number, + * mode, type, match-value, and direction. * Also configures the integral and fractional values of clock cycles per microseconds or - * per 256 microseconds, as per the timer-type value. + * per 256 microseconds as per the selected timer-type. * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock(); + * - \ref sl_si91x_ulp_timer_init(); * - * @param[in] timer_config_ptr Pointer to the timer_configuration structure + * @param[in] timer_config_ptr Pointer to the timer_configuration structure \ref ulp_timer_config_t. * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer * - \ref SL_STATUS_INVALID_INDEX (0x0027) - Timer configuration structure member 'timer_num' has an invalid value. @@ -183,16 +183,13 @@ sl_status_t sl_si91x_ulp_timer_init(ulp_timer_clk_src_config_t *timer_clk_ptr); sl_status_t sl_si91x_ulp_timer_set_configuration(ulp_timer_config_t *timer_config_ptr); /***************************************************************************/ /** - * Starts the ULP-Timer. - * Sets the start bit of timer control register, which is a self clearing bit. - * Should be called after clock & timer configurations and timeout-callback registrations. - * Timer instance must not be in running state when calling this API. + * @brief This API will start the ULP-Timer. + * @note Timer instance must not be in running state when calling this API. * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock + * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_set_configuration * - \ref sl_si91x_ulp_timer_register_timeout_callback - * * @param[in] timer_num enum for ULP-timer Number (0 to 3), \ref ulp_timer_instance_t for possible values * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid. @@ -201,15 +198,15 @@ sl_status_t sl_si91x_ulp_timer_set_configuration(ulp_timer_config_t *timer_confi sl_status_t sl_si91x_ulp_timer_start(ulp_timer_instance_t timer_num); /***************************************************************************/ /** - * Stops the running ULP-Timer instance. - * Sets the stop bit of timer control register, which is a self clearing bit. - * This will only stops the timer but not disables & unregisters its interrupts. - * + * @brief This API will stop the 'timer_num' instance of timer. + * @details Sets the stop bit of timer control register, which is a self clearing bit. + * This will only stops the timer but not disables it. To disable it use @ref sl_si91x_ulp_timer_deinit. + * + * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock + * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_set_configuration * - \ref sl_si91x_ulp_timer_start - * * @param[in] timer_num enum for ULP-timer Number (0 to 3), \ref ulp_timer_instance_t for possible values * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid. @@ -218,15 +215,15 @@ sl_status_t sl_si91x_ulp_timer_start(ulp_timer_instance_t timer_num); sl_status_t sl_si91x_ulp_timer_stop(ulp_timer_instance_t timer_num); /***************************************************************************/ /** - * Restarts an already running ULP-Timer, which means it will first stop the timer instance - * and then starts it again . - * This will only restarts the count of an already running counter. + * @brief This API will restart an already running ULP-Timer. + * @details ULP-Timer restart which means it will first stop the timer instance + * and then starts it again. + * This will just restart the currently running counter. * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock + * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_set_configuration * - \ref sl_si91x_ulp_timer_start - * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid. @@ -235,16 +232,16 @@ sl_status_t sl_si91x_ulp_timer_stop(ulp_timer_instance_t timer_num); sl_status_t sl_si91x_ulp_timer_restart(ulp_timer_instance_t timer_num); /***************************************************************************/ /** - * Set the ULP-Timer type as 256 µs type, 1µs type or Count-down timer type + * @brief This API will set the ULP-Timer type. + * @details Timer types include 256 µs, 1 µs, and count-down. * - 1 microsecond type : The time unit is 1µs. * - 256 microsecond type : The time unit is 256µs. * - Count-down timer type : The time unit is one clock cycle period. - * This API should be used when timer is stopped + * @note This API should be used when timer is stopped. * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock + * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_stop - * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values * @param[in] timer_type enum for ULP-timer Type, \ref ulp_timer_type_t for possible values * @return status 0 if successful, else error code as follows: @@ -255,14 +252,14 @@ sl_status_t sl_si91x_ulp_timer_restart(ulp_timer_instance_t timer_num); sl_status_t sl_si91x_ulp_timer_set_type(ulp_timer_instance_t timer_num, ulp_timer_type_t timer_type); /***************************************************************************/ /** - * Set the ULP-Timer direction as up-counting or down-counting, - * by default, it works as down-counter - * This API should be used when timer is stopped. + * @brief This API will set the ULP-Timer direction. + * @details ULP timer set direction will set the ULP-Timer direction as up-counting or down-counting, + * by default it works as down-counter. + * @note This API should be used when timer is stopped. * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock + * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_stop - * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values * @param[in] timer_type enum for ULP-timer direction, \ref ulp_timer_direction_t for possible values * @return status 0 if successful, else error code as follows: @@ -273,16 +270,14 @@ sl_status_t sl_si91x_ulp_timer_set_type(ulp_timer_instance_t timer_num, ulp_time sl_status_t sl_si91x_ulp_timer_set_direction(ulp_timer_instance_t timer_num, ulp_timer_direction_t timer_direction); /***************************************************************************/ /** - * Sets the ULP-Timer Mode as one-shot or periodic. - * In one shot operation, the timer counts till the timeout and then generates a single interrupt - * after which it returns to idle state. Where as in periodic operation the timer when reaches the - * timeout value generates an interrupt and starts counting again from the originally set value. + * @brief This API will set the ULP-Timer Mode as one-shot or periodic. + * @details In one shot operation, the timer counts till the timeout and then generates a single interrupt + * after which it returns to idle state. Where as in periodic operation the timer generates interrupts continously with + * interval equal to timeout. * This API should be used when timer is stopped - * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock + * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_stop - * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values * @param[in] timer_mode enum for ULP-timer mode, \ref ulp_timer_mode_t for possible values * @return status 0 if successful, else error code as follows: @@ -293,20 +288,19 @@ sl_status_t sl_si91x_ulp_timer_set_direction(ulp_timer_instance_t timer_num, ulp sl_status_t sl_si91x_ulp_timer_set_mode(ulp_timer_instance_t timer_num, ulp_timer_mode_t timer_mode); /***************************************************************************/ /** - * Sets the ULP-Timer match value. - * When the timer reaches the timeout value & if the interrupt is enabled the timeout condition + * @brief This API will sets the ULP-Timer match value. + * @details When the timer reaches the match value & if the interrupt is enabled it * will generate an interrupt to the processor. * - For one microsecond type, match-value = number of microseconds * - For 256 microsecond type, match-value = (time in microseconds)/256 - * - For normal up/down counter type, timer = (number of clock cycles per microseconds * time in microseconds) - * This API should be used when timer is stopped. - * - * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock - * - \ref sl_si91x_ulp_timer_stop - * - \ref sl_si91x_ulp_timer_set_type - * - \ref sl_si91x_ulp_timer_set_direction + * - For normal up/down counter type, timer = (number of clock cycles per microseconds * time in microseconds). * + * @note This API should be used when timer is stopped. + * @pre Pre-conditions: + * - \ref sl_si91x_ulp_timer_init + * - \ref sl_si91x_ulp_timer_stop + * - \ref sl_si91x_ulp_timer_set_type + * - \ref sl_si91x_ulp_timer_set_direction * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values. * @param[in] timer_match_value for ULP-timer timeout value * @return status 0 if successful, else error-code @@ -316,18 +310,17 @@ sl_status_t sl_si91x_ulp_timer_set_mode(ulp_timer_instance_t timer_num, ulp_time sl_status_t sl_si91x_ulp_timer_set_count(ulp_timer_instance_t timer_num, uint32_t timer_match_value); /***************************************************************************/ /** - * Reads the ULP-Timer current count. - * If counter-down is set register bits indicate time remaining before timeout + * @brief This API will read the ULP-Timer current count. + * @details If counter-down is set then counter register bits indicate time remaining before timeout * (read as 32'hFFFF_FFFF initially). - * If counter-up is set these bits directly gives out the up-running counter/timer value. + * If counter-up is set then these bits directly gives out the up-running counter/timer value. * Updates the timer current-count value to the count-value variable, passed as - * reference by user (2nd argument) + * reference by user (2nd argument). * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock + * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_start * - \ref sl_si91x_ulp_timer_set_count - * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values. * @param[in] count_value Pointer to variable which will store the current count of the timer * @return status 0 if successful, else error code as follows: @@ -338,17 +331,16 @@ sl_status_t sl_si91x_ulp_timer_set_count(ulp_timer_instance_t timer_num, uint32_ sl_status_t sl_si91x_ulp_timer_get_count(ulp_timer_instance_t timer_num, uint32_t *count_value); /***************************************************************************/ /** - * Reads the ULP-Timer type. - * Updates the timer type value to the timer_type variable, passed as - * reference by user (2nd argument) as below : - * 0 for down-counter type - * 1 for 1us type - * 2 for 256us type + * @brief This API will read the ULP-Timer type. + * @details Updates the timer type value to the timer_type variable, passed as + * reference by user. + * - '0' for down-counter type + * - '1' for 1us type + * - '2' for 256us type * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock + * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_set_type - * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values. * @param[in] timer_type Pointer to variable which will store the current type of the timer * @return status 0 if successful, else error code as follows: @@ -359,16 +351,15 @@ sl_status_t sl_si91x_ulp_timer_get_count(ulp_timer_instance_t timer_num, uint32_ sl_status_t sl_si91x_ulp_timer_get_type(ulp_timer_instance_t timer_num, uint32_t *timer_type); /***************************************************************************/ /** - * Reads the ULP-Timer mode. - * Updates the timer mode value to the timer_mode variable, passed as - * reference by user (2nd argument) as below : - * 0 for one-shot mode - * 1 for periodic mode + * @brief This API will reads the ULP-Timer mode. + * @details Updates the timer mode value to the timer_mode variable, passed as + * reference by user. + * - '0' for one-shot mode + * - '1' for periodic mode * * @pre Pre-conditions: * - \ref sl_si91x_ulp_timer_configure_clock * - \ref sl_si91x_ulp_timer_set_mode - * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values. * @param[in] timer_mode Pointer to variable which will store the current mode of the timer * @return status 0 if successful, else error code as follows: @@ -379,16 +370,15 @@ sl_status_t sl_si91x_ulp_timer_get_type(ulp_timer_instance_t timer_num, uint32_t sl_status_t sl_si91x_ulp_timer_get_mode(ulp_timer_instance_t timer_num, uint32_t *timer_mode); /***************************************************************************/ /** - * Read the ULP-Timer direction (up-counter or down-counter). - * Updates the timer direction to the timer_direction variable, passed as - * reference by user (2nd argument) as below : - * 0 for down-counting - * 1 for up-counting + * @brief This API will read the ULP-Timer direction (up-counter or down-counter). + * @details Updates the timer direction to the timer_direction variable, passed as + * reference by user. + * - '0' for down-counting + * - '1' for up-counting * * @pre Pre-conditions: - * - \ref sl_si91x_ulp_timer_configure_clock + * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_set_direction - * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values. * @param[in] timer_direction Pointer to variable which will store the current direction of the timer * @return status 0 if successful, else error code as follows: @@ -399,15 +389,17 @@ sl_status_t sl_si91x_ulp_timer_get_mode(ulp_timer_instance_t timer_num, uint32_t sl_status_t sl_si91x_ulp_timer_get_direction(ulp_timer_instance_t timer_num, uint32_t *timer_direction); /***************************************************************************/ /** - * Registers the callback for the timer timeout interrupt and enables the interrupt, + * @brief This API will registers the callback for the timer timeout interrupt and enables the interrupt, * as per instance. - * If any callback is already registered, the user needs to unregister the + * @details If any callback is already registered, the user needs to unregister the * callback first before registering the callback else it will return call \ref SL_STATUS_BUSY * error. - * + * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values. + * * @param[in] on_timeout_callback (function pointer) Callback function pointer * to be called when the timer timeout interrupt occurred. + * * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_NULL_POINTER (0x0022) - 'pointer to callback_data_input' parameter is a null pointer. * - \ref SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid. @@ -420,12 +412,10 @@ sl_status_t sl_si91x_ulp_timer_register_timeout_callback(ulp_timer_instance_t ti ulp_timer_callback_t on_timeout_callback); /***************************************************************************/ /** - * Unregisters the callback for the timer timeout interrupt and disabling its interrupts + * @brief This API will unregister the callback for the timer interrupt and disabling its interrupts * as per timer instance. - * * @pre Pre-conditions: * - \ref sl_si91x_ulp_timer_register_timeout_callback - * * @param[in] timer_num enum for ULP-timer Number, \ref ulp_timer_instance_t for possible values. * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid. @@ -435,73 +425,116 @@ sl_status_t sl_si91x_ulp_timer_register_timeout_callback(ulp_timer_instance_t ti sl_status_t sl_si91x_ulp_timer_unregister_timeout_callback(ulp_timer_instance_t timer_num); /***************************************************************************/ /** - * Configures the Ulpss SoC clock from M4 SOC clock, to enable the SOC clock source. - * This API is used to select the ULPSS processor clock source when input is soc clock + * @brief This API will configure the ULPSS SOC clock from M4 SOC clock, to enable the SOC clock source. + * @details This API is used to select the ULPSS processor clock source as timer input clock * source which is greater than 100MHz(used for high-power mode) * To divide the clock, ensure that it should be odd number if div_factor_type is 1 & viceversa * Div_factor_type selects the type of divider for m4_soc_clk_2ulpss - * - 0 => Even Divider is selected - * - 1 => Odd Divider is selected - * Use this API in place of timer clock config API, when using soc clock source + * - '0' Even Divider is selected + * - '1' Odd Divider is selected + * Use this API in place of timer clock config API, when using SOC clock source * with timer in high power mode * * @param[in] div_factor value to divide the clock, ensure that it should be an odd number * if div_factor_type is 1 & vice versa * @param[in] div_factor_type selects the type of divider for m4_soc_clk_2ulpss - * - 0 => Even Divider is selected - * - 1 => Odd Divider is selected + * - '0' Even Divider is selected + * - '1' Odd Divider is selected * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER(0x0021) - 'div_factor' is not according to div_factor_type *******************************************************************************/ sl_status_t sl_si91x_ulp_timer_configure_soc_clock(boolean_t div_factor_type, uint16_t div_factor); /***************************************************************************/ /** - * Configures the XTAL clock, when clock source is external XTAL clock. - * To enable the external XTAL clk source need to call this API before calling + * @brief This API will configure the XTAL clock, when clock source is external XTAL clock. + * @details To enable the external XTAL clk source need to call this API before calling * \ref sl_si91x_ulp_timer_configure_clock API. * - * @param[in] xtal_pin : Pin number of NPSS_GPIO. Possible values are 0,1,2,3,4 + * @param[in] xtal_pin : Pin number of NPSS_GPIO. Possible values are 0 to 4. * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER(0x0021) - 'xtal_pin' parameter value is invalid. *******************************************************************************/ sl_status_t sl_si91x_ulp_timer_configure_xtal_clock(uint8_t xtal_pin); /***************************************************************************/ /** - * Initializes the ULP-Timer clock by configuring the clock source. - * - * @param[in] timer_clk_ptr Pointer to timer_clk configuration structure - * @return status 0 if successful, else error code as follows: - * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Timer clock type or timer clock source values are invalid - * - \ref SL_STATUS_INVALID_CONFIGURATION (0x0023) - Timer clock-source configuration structure members have invalid configurations. - * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer - * - \ref SL_STATUS_OK (0x0000) - Success, timer clock-source parameters configured properly -*******************************************************************************/ -sl_status_t sl_si91x_ulp_timer_init(ulp_timer_clk_src_config_t *timer_clk_ptr); - -/***************************************************************************/ /** - * De-Initializes the ULP-Timer clock by disabling the peripheral clock. + * @brief This API will de-Initializes the ULP-Timer clock by disabling the peripheral clock. + * @details It also Unregisters callback of all timer instances * @pre Pre-conditions: * - \ref sl_si91x_ulp_timer_init * - \ref sl_si91x_ulp_timer_unregister_timeout_callback * - * @param[in] none + * @param none * @return none * @note Unregisters the callbacks of all timer instances *******************************************************************************/ void sl_si91x_ulp_timer_deinit(void); /***************************************************************************/ /** - * Gets the ULP-timer version. - * It returns the API version of ULP-timer. + * @brief This API will get the ULP-timer API version. + * @details This API is used to know the API version of ULP_TIMER. * - * @details - * This function is used to know the ULP_TIMER version - * - * @param[in] none + * @param none * @return \ref sl_ulp_timer_version_t type version ******************************************************************************/ sl_ulp_timer_version_t sl_si91x_ulp_timer_get_version(void); +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY! *********************** +/// @addtogroup ULP-TIMER Ultra Low-Power Timer +/// @{ +/// +/// @details +/// +/// +/// @n @section ULP-TIMER_Intro Introduction +/// +/// Ultra-Low-Power (ULP) timers typically used to operate with extremely low power consumption. +/// These timers are commonly found in battery-powered or energy-efficient devices where minimizing +/// power usage is crucial to extending battery life. +/// +/// ULP timers typically provide configurable settings, allowing developers to adjust parameters such +/// as clock frequency, timer resolution, and interrupt behavior to meet the specific needs of their applications. +/// +/// @li The ULP-Timer module supports 4 different instances @ref ulp_timer_instance_t. +/// @li Each of the ULP-timers can be independently programmed to work in periodic or one-shot mode @ref ulp_timer_mode_t. +/// @li Each of the ULP-timers can be independently configured as a 32-bit counter or as a microsecond timer @ref ulp_timer_type_t. +/// +/// @n @section ULP-TIMER_Config Configuration +/// @li By calling the @ref sl_si91x_ulp_timer_init ulp-timer is initialized and its clocks are configured. +/// @li By using @ref sl_si91x_ulp_timer_set_configuration +/// ulp-timer parameters including match count, timer type, mode, timer direction can be configured. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section ULP-TIMER_Use Usage +/// +/// The common ULP-timer functions can be used after ulp-timer Structures are specified, +/// passing an instance of @ref ulp_timer_config_t. +/// @li These functions will initiate and configure the ULP-timer below, which is the flow for implementation. +/// +/// 1. @ref sl_si91x_ulp_timer_init +/// 2. @ref sl_si91x_ulp_timer_set_configuration +/// 3. @ref sl_si91x_ulp_timer_register_timeout_callback +/// 4. @ref sl_si91x_ulp_timer_start +/// 5. @ref sl_si91x_ulp_timer_stop +/// 6. @ref sl_si91x_ulp_timer_deinit +/// +/// @li Above functions allow for initializing the ULP-TIMER instance and generates interrupt upon expiration. +/// +/// @li Other functions are called to change the timer type, direction and to unregister the callback. +/// 1. @ref sl_si91x_ulp_timer_set_type +/// 2. @ref sl_si91x_ulp_timer_set_mode +/// 3. @ref sl_si91x_ulp_timer_set_direction +/// 4. @ref sl_si91x_ulp_timer_set_count +/// +/// @li Below section shows functions to read timer parameters: +/// +/// 1. @ref sl_si91x_ulp_timer_get_mode +/// 2. @ref sl_si91x_ulp_timer_get_type +/// 3. @ref sl_si91x_ulp_timer_get_direction +/// 4. @ref sl_si91x_ulp_timer_get_count +/// +/// @} end group ULP-TIMER ********************************************************/ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_usart.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_usart.h index bfa0ddca1..1c096206d 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_usart.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_usart.h @@ -178,13 +178,11 @@ typedef struct { ***************************** PROTOTYPES ********************************** ******************************************************************************/ /***************************************************************************/ /** - * Initilize the USART/UART module. + * @brief Initilize the USART/UART module. * This function will configure the clocks for USART/UART module and also * initialization of the DMA for UART/USART, if DMA is enabled for data transfers. - * * @details This function will configure the clocks for USART/UART module and also * initialize the DMA for UART/USART if DMA is enabled for data transfers. - * * @param[in] usart_handle Pointer to the USART/UART driver * @param[in] callback_event Callback function which needs to be called on data transfer * @return status 0 if successful, else error code as follows: @@ -195,27 +193,38 @@ typedef struct { sl_status_t sl_si91x_usart_init(usart_peripheral_t usart_instance, sl_usart_handle_t *usart_handle); /***************************************************************************/ /** - * Uninitialize the USART/UART module. - * This function will disable the clocks for USART/UART module and also + * @brief Uninitialize the USART/UART module. + * @details This function will disable the clocks for USART/UART module and also * Deinit the DMA for UART/USART if DMA is enabled for data transfers. * * @param[in] usart_handle Pointer to the USART/UART driver + * * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_FAIL (0x0001) - Fail, UART/USART Deinitialization failed * - \ref SL_STATUS_OK (0x0000) - Success, UART/USART Deinitialization done properly + * @note + * When the USART/UART module is used in combination with other peripherals, while de-initializing in the application, refer to the notes below: + * 1. Whenever sl_si91x_usart_deinit() gets called, it will power down the domain (PERI_EFUSE), which contains different peripherals as mentioned below: + * USART, UART, I2C, SSI Master, SSI Slave, Generic-SPI Master, I2S Master, I2S Slave, Micro-DMA Controller, Config Timer, + * Random-Number Generator, CRC Accelerator, SIO, QEI, MCPWM and EFUSE. + * Since deinit power downs the PERI_EFUSE domain, it's recommended to call the sl_si91x_usart_deinit() API at the end of the application. + * 2. Few peripherlas(ULP Peripherls, UULP Peripherlas, GPDMA and SDIO-SPI) have seperate domains those can be powered down indepedently. For additional details, refer to the Power architecture section in the Hardware Reference Manual + * e.g., To power down ULP UART, use the API below: + * RSI_PS_M4ssPeriPowerDown(ULPSS_PWRGATE_ULP_UART); + * Here, ULP_UART has seperate power domain ULPSS_PWRGATE_ULP_UART, which can be powered down indepedently. Refer to the rsi_power_save.h file for all power gates definitions. ******************************************************************************/ sl_status_t sl_si91x_usart_deinit(sl_usart_handle_t usart_handle); /***************************************************************************/ /** - * Register the user callback function. - * If another callback is registered without unregistering previous callback then, + * @brief Register the user callback function. + * @details If another callback is registered without unregistering previous callback then, * it returns an error code, so it is mandatory * to unregister the callback before registering to another callback. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_usart_set_configuration * * @param[in] callback_event Pointer to the function which needs to be called at the time of interrupt + * * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_OK (0x0000) - Success * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer @@ -224,21 +233,21 @@ sl_status_t sl_si91x_usart_deinit(sl_usart_handle_t usart_handle); sl_status_t sl_si91x_usart_register_event_callback(sl_usart_signal_event_t callback_event); /***************************************************************************/ /** -* Unregister the user callback function. +* @brief Unregister the user callback function. * Unregister the user callback function before regsitering new callback function. * * @param[in] none +* * @return none ******************************************************************************/ void sl_si91x_usart_unregister_event_callback(void); /***************************************************************************/ /** -* This function registers the user callback function for multiple usart instances i.e., to use different +* @brief This function registers the user callback function for multiple USART instances i.e., to use different * instance (USART_O, UART_1, ULP_UART) this API need to use -* -* @pre sl_si91x_usart_set_configuration(); -* -* @param[in] usart_instance Usart Instance +* @pre Pre-condition: +* - \ref sl_si91x_usart_set_configuration(); +* @param[in] usart_instance USART Instance * @param[in] callback_event Pointer to the function which needs to be called at the time of interrupt * @return status 0 if successful, else error code * \ref SL_STATUS_OK (0x0000) - Success \n @@ -249,46 +258,40 @@ sl_status_t sl_si91x_usart_multiple_instance_register_event_callback(usart_perip sl_usart_signal_event_t callback_event); /***************************************************************************/ /** -* Unregister the user callback function in case of multiple usart insatances. -* -* @param[in] usart_instance Usart Instance +* @brief Unregister the user callback function in case of multiple USART instances. +* @param[in] usart_instance USART Instance * @return none ******************************************************************************/ void sl_si91x_usart_multiple_instance_unregister_event_callback(usart_peripheral_t usart_instance); /***************************************************************************/ /** -* Send the USART data when USART/UART is configured. -* if DMA mode is set this function will configure the DMA channel and enables the DMA channel , -* then transfer's the data pointed to it else it fill the data to the transfer FIFO and transfer the data -* -* @pre \ref sl_si91x_usart_init(); -* \ref sl_si91x_usart_set_configuration(); -* +* @brief Send the USART data when USART/UART is configured. +* @details If DMA mode is set this function will configure the DMA channel and enables the DMA channel , +* then transfers the data pointed to it, else it fill the data to the transfer FIFO and transfer the data +* @pre Pre-conditions: +* - \ref sl_si91x_usart_init(); +* - \ref sl_si91x_usart_set_configuration(); * @param[in] usart_handle Pointer to the USART/UART driver * @param[in] data Pointer to the variable which contains transfer data * @param[in] data_length Data_length to Send -* * @return status 0 if successful, else error code * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument * \ref SL_STATUS_FAIL (0x0001) - Fail , Data transfer failed * \ref SL_STATUS_BUSY (0x0004) - Busy ,already data transfer is going on * \ref SL_STATUS _OK (0X000) - Success ,UART/USART initialization done properly -* ********************************************************************************/ sl_status_t sl_si91x_usart_send_data(sl_usart_handle_t usart_handle, const void *data, uint32_t data_length); /***************************************************************************/ /** -* To Send the data in async mode when USART/UART is configured. -* This function returns immediately(non blocking) and data transfer happens asyncronously. Once the data transfer compeletes , +* @brief To Send the data in async mode when USART/UART is configured. +* @details This function returns immediately(non blocking) and data transfer happens asyncronously. Once the data transfer compeletes, * registered user callback get invoked -* -* @pre \ref sl_si91x_usart_init(); -* \ref sl_si91x_usart_set_configuration(); -* +* @pre Pre-conditions: +* - \ref sl_si91x_usart_init(); +* - \ref sl_si91x_usart_set_configuration(); * @param[in] usart_handle Pointer to the USART/UART driver * @param[in] data Pointer to the variable which will store the transferred data * @param[in] data_length Data_length to transfer -* * @return status 0 if successful, else error code * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument * \ref SL_STATUS_FAIL (0x0001) - Fail , Data transfer failed @@ -299,14 +302,12 @@ sl_status_t sl_si91x_usart_send_data(sl_usart_handle_t usart_handle, const void sl_status_t sl_si91x_usart_async_send_data(sl_usart_handle_t usart_handle, const void *data, uint32_t data_length); /***************************************************************************/ /** - * To receive the data when USART/UART is configured. - * If DMA mode is set, it configures the DMA channel, enables the DMA channel, + * @brief To receive the data when USART/UART is configured. + * @details If DMA mode is set, it configures the DMA channel, enables the DMA channel, * and receives data via DMA. If DMA mode is not set, it receives the data from FIFO. - * * @pre Pre-conditions: * - \ref sl_si91x_usart_init * - \ref sl_si91x_usart_set_configuration - * * @param[in] usart_handle Pointer to the USART/UART driver * @param[in] data Pointer to the variable which will store the received data * @param[in] data_length Data_length to receive @@ -319,17 +320,15 @@ sl_status_t sl_si91x_usart_async_send_data(sl_usart_handle_t usart_handle, const sl_status_t sl_si91x_usart_receive_data(sl_usart_handle_t usart_handle, void *data, uint32_t data_length); /***************************************************************************/ /** -* To receive the data in async mode when USART/UART is configured. -* This function returns immediately(Non blocking) and data reception happens asyncronously. Once the data reception compeletes, +* @brief To receive the data in async mode when USART/UART is configured. +* @details This function returns immediately(Non blocking) and data reception happens asyncronously. Once the data reception compeletes, * registered user callback get invoked -* -* @pre \ref sl_si91x_usart_init(); -* \ref sl_si91x_usart_set_configuration(); -* +* @pre Pre-conditions: +* - \ref sl_si91x_usart_init(); +* - \ref sl_si91x_usart_set_configuration(); * @param[in] usart_handle Pointer to the USART/UART driver * @param[in] data Pointer to the variable which will store the received data * @param[in] data_length Data_length to receive -* * @return status 0 if successful, else error code * \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument * \ref SL_STATUS_FAIL (0x0001) - Fail , Data transfer failed @@ -340,16 +339,14 @@ sl_status_t sl_si91x_usart_receive_data(sl_usart_handle_t usart_handle, void *da sl_status_t sl_si91x_usart_async_receive_data(sl_usart_handle_t usart_handle, void *data, uint32_t data_length); /***************************************************************************/ /** -* To send and receive the data when USART in Synchronous mode is enabled. - * This function sends and receives the data to and from usart transmitter and +* @brief To send and receive the data when USART in Synchronous mode is enabled. + * @details This function sends and receives the data to and from usart transmitter and * receiver in synchronous mode of operation. * Configure the DMA channel and enables the DMA channel, if DMA mode is set and * transfer's the data pointed to it else transfer the data from fifo. - * * @pre Pre-conditions: * - \ref sl_si91x_usart_init * - \ref sl_si91x_usart_set_configuration - * * @param[in] usart_handle Pointer to the USART/UART driver * @param[in] data_out Pointer to the variable which will store the data to be transferred * @param[in] data_in Pointer to the variable which will store the received data @@ -369,30 +366,34 @@ sl_status_t sl_si91x_usart_transfer_data(sl_usart_handle_t usart_handle, uint32_t data_length); /***************************************************************************/ /** - * To get the TX data count of USART/UART - * This function will return the USART data transferred count. + * @brief To get the TX data count of USART/UART + * @details This function will return the USART data transferred count. * * @param[in] usart_handle Pointer to the USART/UART driver + * * @return return the no of bytes transferred ******************************************************************************/ uint32_t sl_si91x_usart_get_tx_data_count(sl_usart_handle_t usart_handle); /***************************************************************************/ /** -* To get the RX data count of USART/UART -* This function will return the USART/UART data received count +* @brief To get the RX data count of USART/UART +* @details This function will return the USART/UART data received count * * @param[in] usart_handle Pointer to the USART/UART driver +* * @return return the no of bytes received ******************************************************************************/ uint32_t sl_si91x_usart_get_rx_data_count(sl_usart_handle_t usart_handle); /***************************************************************************/ /** -* To control and configure the USART/UART module in different configurations. -* This function configure the USART in different configurations such as USART mode, +* @brief To control and configure the USART/UART module in different configurations. +* @details This function configure the USART in different configurations such as USART mode, * Data Bits, Parity , stop bits, flow control and baud rate. * * @param[in] usart_handle Pointer to the USART/UART driver +* * @param[in] control_configuration pointer to the USART configurations +* * @return status 0 if successful, else error code * - \ref SL_STATUS_BUSY (0x0004) - Busy ,already data transfer is going on * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument @@ -404,13 +405,15 @@ sl_status_t sl_si91x_usart_set_configuration(sl_usart_handle_t usart_handle, sl_si91x_usart_control_config_t *control_configuration); /******************************************************************************* -* This is internal function used to configure the different configurations of USART Interface, -* this API will not pick the configurations from USART UC. +* @brief This is internal function used to configure the different configurations of USART Interface. +* @details This API will not pick the configurations from USART UC. * Configure the USART in different configurations such as USART mode, * Data Bits, Parity , stop bits, flow control and baud rate. * * @param[in] usart_handle Pointer to the USART/UART driver +* * @param[in] control_configuration pointer to the USART configurations +* * @return status 0 if successful, else error code * - \ref SL_STATUS_BUSY (0x0004) - Busy ,already data transfer is going on * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument @@ -422,9 +425,8 @@ sl_status_t sli_si91x_usart_set_non_uc_configuration(sl_usart_handle_t usart_han sl_si91x_usart_control_config_t *control_configuration); /***************************************************************************/ /** -* To get the USART/UART status. -* This function will return USART/UART transfer and receive status -* +* @brief To get the USART/UART status. +* @details This function will return USART/UART transfer and receive status * @param[in] usart_handle Pointer to the USART/UART driver * @return usart line status * tx busy ,rx_busy, tx_underflow ,rx overflow, rx break, rx framing error @@ -433,37 +435,32 @@ sl_status_t sli_si91x_usart_set_non_uc_configuration(sl_usart_handle_t usart_han sl_usart_status_t sl_si91x_usart_get_status(sl_usart_handle_t usart_handle); /***************************************************************************/ /** -* This function will set the USART modem control line -* +* @brief This function will set the USART modem control line * @param[in] usart_handle Pointer to the USART/UART driver * @param[in] control usart modem control * @return status 0 if successful, else error code * - \ref SL_STATUS_NOT_SUPPORTED(0x000F) - Feature not supported * - \ref SL_STATUS _OK (0x000) - Success ,UART/USART initialization done properly -* ******************************************************************************/ sl_status_t sl_si91x_usart_set_modem_control(sl_usart_handle_t usart_handle, sl_usart_modem_control_t control); /***************************************************************************/ /** -* This function return USART modem control status -* +* @brief This function return USART modem control status * @param[in] usart_handle Pointer to the USART/UART driver * @return \ref usart modem status states are active or not ******************************************************************************/ sl_usart_modem_status_t sl_si91x_usart_get_modem_status(sl_usart_handle_t usart_handle); /***************************************************************************/ /** -* This function is used to know the USART version -* +* @brief This function is used to know the USART version * @param[in] none * @return \ref sl_usart_version_t type version ******************************************************************************/ sl_usart_version_t sl_si91x_usart_get_version(void); /***************************************************************************/ /** -* Get the USART configurations set in the module such as baudrate, parity bit +* @brief Get the USART configurations set in the module such as baudrate, parity bit * stop bits etc. -* * @param[in] usart_module USART peripheral type * - 0 - USART0 * - 1 - UART1 @@ -478,6 +475,74 @@ sl_status_t sl_si91x_usart_get_configurations(uint8_t usart_module, sl_si91x_usa /** @} (end addtogroup USART) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY !*********************** +/// @addtogroup USART USART +/// @{ +/// +/// @details +/// +/// +/// @n @section USART_Intro Introduction +/// +/// The USART/UART driver offers a robust set of functionalities to enable +/// seamless communication over the USART/UART interface. This driver supports various features, including DMA (Direct Memory Access) +/// for efficient data transfer, event callback mechanisms for interrupt handling, etc. +/// The driver simplifies the implementation of serial communication protocols and enhances the overall performance and reliability of the system. +/// +/// @n @section USART_Config Configuration +/// +/// To configure the USART/UART driver, user can utilize a comprehensive set of parameters and functions +/// tailored to their specific requirements. This configuration process involves setting up various aspects of the USART/UART module, +/// such as baud rate, data bits, parity, stop bits, flow control, and DMA settings if DMA is enabled. +/// Additionally, register callback functions can be used to handle events and interrupts, ensuring timely and efficient communication. +/// The driver also supports multiple USART/UART instances, allowing for versatile usage across different peripherals. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section USART_Usage Usage +/// +/// USART has to be initialized and configured first by calling the @ref sl_si91x_usart_init. The DMA (Direct Memory Access) controller in the USART driver +/// will enable efficient data transfer, thus reducing CPU overhead. Initialization of the DMA for UART/USART will also be done with the same USART init function, +/// if DMA is enabled for data transfers. The other common functions include the following: +/// +/// @li @ref sl_si91x_usart_init +/// @li @ref sl_si91x_usart_set_configuration +/// @li @ref sl_si91x_usart_register_event_callback +/// @li @ref sl_si91x_usart_multiple_instance_register_event_callback +/// @li @ref sl_si91x_usart_async_send_data +/// @li @ref sl_si91x_usart_async_receive_data +/// @li @ref sl_si91x_usart_transfer_data +/// @li @ref sl_si91x_usart_get_status +/// @li @ref sl_si91x_usart_get_tx_data_count +/// @li @ref sl_si91x_usart_get_rx_data_count +/// @li @ref sl_si91x_usart_set_modem_control +/// @li @ref sl_si91x_usart_deinit +/// +/// @li Once initialised, you can configure the module using @ref sl_si91x_usart_set_configuration. Here you can set appropriate configurations such as USART module +/// Recieve-transfer configuration (flow control), data bits, parity and baud rate. +/// +/// @li Once configured, you can register callback functions using @ref sl_si91x_usart_register_event_callback +/// and @ref sl_si91x_usart_unregister_event_callback for event handling. +/// For multiple USART instances, you can use @ref sl_si91x_usart_multiple_instance_register_event_callback and +/// @ref sl_si91x_usart_multiple_instance_unregister_event_callback for the same. +/// +/// There are a total of three instances of USART - USART, UART2, ULP UART. USART can be used synchronously as well as asynchronously. +/// For USART in synchronous mode use the function @ref sl_si91x_usart_transfer_data. Here, data transfer is done with a shared clock signal +/// between the sender and receiver. On the other hand, to use USART in asynchronous mode, for UART2, ULP UART use @ref sl_si91x_usart_async_send_data and +/// @ref sl_si91x_usart_async_receive_data to send and receive data asynchronously. Here, data transfer will happen asynchronously i.e., in non-blocking. +/// Once the data transfer is complete, user event callback function will be called. +/// +/// User can also use @ref sl_si91x_usart_get_tx_data_count and +/// @ref sl_si91x_usart_get_rx_data_count to get the number of bytes transferred and received, respectively. +/// +/// @li Additionally, You can also check the status of the module with @ref sl_si91x_usart_get_status. +/// you can control the modem lines using @ref sl_si91x_usart_set_modem_control. +/// +/// @li @ref sl_si91x_usart_deinit can be used to deinitialize the module. Similar to initialization, de-initialization of the DMA for +/// UART/USART will also be done with the USART de-init function, if DMA is enabled for data transfers. +/// +/// @} end group SYSRTC ********************************************************/ + #ifdef __cplusplus } #endif diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_watchdog_timer.h b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_watchdog_timer.h index 82a3e4451..1bd6654f1 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_watchdog_timer.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_watchdog_timer.h @@ -106,19 +106,19 @@ typedef enum { /// @brief Structure to hold the parameters of watchdog timer clock-source configurations typedef struct { - uint8_t low_freq_fsm_clock_src; ///< low frequency FSM clock source, \ref #low_freq_fsm_clock_t - uint8_t high_freq_fsm_clock_src; ///< high frequency FSM clock source, \ref #high_freq_fsm_clock_t - uint8_t bg_pmu_clock_source; ///< bg_pmu clock source, \ref #bg_pmu_clock_t + uint8_t low_freq_fsm_clock_src; ///< low frequency FSM clock source, \ref low_freq_fsm_clock_t + uint8_t high_freq_fsm_clock_src; ///< high frequency FSM clock source, \ref high_freq_fsm_clock_t + uint8_t bg_pmu_clock_source; ///< bg_pmu clock source, \ref bg_pmu_clock_t } watchdog_timer_clock_config_t; /// @brief Structure to hold the parameters of the watchdog timer configurations typedef struct { uint8_t - interrupt_time; ///< timer timeout interrupt duration, number of clock pulses = 2^(system_reset_time), \ref #time_delays_t + interrupt_time; ///< timer timeout interrupt duration, number of clock pulses = 2^(system_reset_time), \ref time_delays_t uint8_t - system_reset_time; ///< timer system-reset duration, number of clock pulses = 2^(system_reset_time), \ref #time_delays_t + system_reset_time; ///< timer system-reset duration, number of clock pulses = 2^(system_reset_time), \ref time_delays_t uint8_t - window_time; ///< timer window duration, number of clock pulses = 2^(window_time), \ref #time_delays_t, but should be less than TIME_DELAY_16 + window_time; ///< timer window duration, number of clock pulses = 2^(window_time), \ref time_delays_t, but should be less than TIME_DELAY_16 } watchdog_timer_config_t; /// @brief Structure to hold the versions of peripheral API @@ -132,46 +132,46 @@ typedef struct { // Prototypes /***************************************************************************/ /** - * Initialize the Watchdog timer by enabling the peripheral power. - * Also enables it to run during sleep mode). + * @brief This API will initialize the Watchdog timer. + * @details This API will initialize the Watchdog timer by enabling the peripheral power. + * It also enables to run watchdog-timer during sleep mode. * Also un-masks its interrupt. * - * @param[in] none - * @return none + * @param none + * @return none *******************************************************************************/ void sl_si91x_watchdog_init_timer(void); /***************************************************************************/ /** - * Enables and configures the timer clock sources. - * Configures the watchdog-timer low frequency, high frequency and bg-pmu clock sources. + * @brief This API will enable and configures the timer clock sources. + * @details Configures the watchdog-timer low frequency and bg-pmu clock sources. * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_watchdog_init_timer - * * @param[in] timer_clk_config_ptr Pointer to timer clock configuration structure * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Timer configuration structure members have invalid values, - * for members \ref #watchdog_timer_clock_config_t + * for members \ref watchdog_timer_clock_config_t * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer * - \ref SL_STATUS_OK (0x0000) - Success, timer clock-source parameters configured properly *******************************************************************************/ sl_status_t sl_si91x_watchdog_configure_clock(watchdog_timer_clock_config_t *timer_clk_config_ptr); /***************************************************************************/ /** - * Configures the watchdog timer parameters. - * Parameters are interrupt time (WDT restart time), + * @brief This API configures watchdog timer parameters. + * @details The configurable parameters are interrupt time (WDT restart time), * system reset time & window time (lower time stamp for WDT restart, if required). * System reset time should be greater than interrupt time. - * And Interrupt time should be greater than window time, else API will give error. + * And Interrupt time should be greater than window time, else API will give an error. * * @pre Pre-conditions: * - \ref sl_si91x_watchdog_init_timer * - \ref sl_si91x_watchdog_configure_clock * - * @param[in] timer_config_ptr Pointer to timer clock configuration structure + * @param[in] timer_config_ptr Pointer to timer clock configuration structure \ref watchdog_timer_config_t. * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - Timer configuration structure members have invalid values, - * for members \ref #watchdog_timer_config_t + * for members \ref watchdog_timer_config_t * - \ref SL_STATUS_INVALID_CONFIGURATION (0x0023) - Timer configuration structure member 'system_reset_time' is less than or equal to 'interrupt_time'. * It should be greater than interrupt time of timer. * - \ref SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer @@ -180,10 +180,9 @@ sl_status_t sl_si91x_watchdog_configure_clock(watchdog_timer_clock_config_t *tim sl_status_t sl_si91x_watchdog_set_configuration(watchdog_timer_config_t *timer_config_ptr); /***************************************************************************/ /** - * Registers the Watchdog timer timeout callback. - * Also enables its interrupts. - * If any callback is already registered, the user needs to unregister the - * callback first before registering the callback. + * @brief This API will register the Watchdog timer timeout callback. + * @details Registering call back also enables its interrupts. + * Before registering a callback, the user must unregister if any callbacks that are already registered. * * @param[in] on_timeout_callback (function pointer) Callback function pointer * to be called when timer timeout interrupt occurred. @@ -196,19 +195,18 @@ sl_status_t sl_si91x_watchdog_set_configuration(watchdog_timer_config_t *timer_c sl_status_t sl_si91x_watchdog_register_timeout_callback(watchdog_timer_callback_t on_timeout_callback); /***************************************************************************/ /** - * Sets the Watchdog timer interrupt time (overflow or restart time). - * This also referred as upper time-stamp for WDT restart + * @brief This API will set the Watchdog timer interrupt time (Overflow or Restart time). + * @details This also referred as upper time-stamp for WDT restart * Its maximum value is 31. - * Number of clock pulses for timer timeout = 2^(interrupt_time) - * This value should be less than system-reset time and greater than window time. + * @li Number of clock pulses for timer timeout = 2^(interrupt_time) + * @note The timeout value should be less than system-reset time and greater than window time. * * @pre Pre-conditions: * - \ref sl_si91x_watchdog_init_timer * - \ref sl_si91x_watchdog_configure_clock * - \ref sl_si91x_watchdog_set_system_reset_time - * * @param[in] interrupt_time (time_delays_t), timer timeout interrupt duration, - * Number of clock pulses = 2^(interrupt_time), \ref #time_delays_t + * Number of clock pulses = 2^(interrupt_time), \ref time_delays_t * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - 'interrupt_time' parameter has an invalid value. * - \ref SL_STATUS_INVALID_CONFIGURATION (0x0023) - 'interrupt_time' value is less than window time or greater than system reset time @@ -217,29 +215,27 @@ sl_status_t sl_si91x_watchdog_register_timeout_callback(watchdog_timer_callback_ sl_status_t sl_si91x_watchdog_set_interrupt_time(time_delays_t interrupt_time); /***************************************************************************/ /** - * Reads the Watchdog timer interrupt time set value. - * It will return interrupt time in terms of power of two. + * @brief This API will read the Watchdog timer interrupt time configured value. + * @details It will return interrupt time in terms of power of two. * * @pre Pre-conditions: * - \ref sl_si91x_watchdog_set_interrupt_time * - * @param[in] none - * @return returns interrupt time (uint8_t) value, \ref #time_delays_t + * @param none + * @return returns interrupt time (uint8_t) value, \ref time_delays_t *******************************************************************************/ uint8_t sl_si91x_watchdog_get_interrupt_time(void); /***************************************************************************/ /** - * Sets the Watchdog timer system-reset time duration. - * Its maximum value is 31. - * Number of clock pulses for system reset time = 2^(system_reset_time). + * @brief This API will set the Watchdog timer system-reset time duration. + * @details Number of clock pulses for system reset time = 2^(system_reset_time). + * Its maximum value is 31. * This value should be greater than timer interrupt time & window time. - * * @pre Pre-conditions: * - \ref sl_si91x_watchdog_init_timer * - \ref sl_si91x_watchdog_configure_clock - * * @param[in] system_reset_time (time_delays_t) timer system-reset duration, - * Number of clock pulses = 2^(system_reset_time), \ref #time_delays_t + * Number of clock pulses = 2^(system_reset_time), \ref time_delays_t * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - 'system_reset_time' parameter has an invalid value. * - \ref SL_STATUS_INVALID_CONFIGURATION (0x0023) - 'system_reset_time' value is less than window time or interrupt time @@ -248,33 +244,30 @@ uint8_t sl_si91x_watchdog_get_interrupt_time(void); sl_status_t sl_si91x_watchdog_set_system_reset_time(time_delays_t system_reset_time); /***************************************************************************/ /** - * Reads the Watchdog timer system-reset time set value - * It will return system reset time in terms of power of two. + * @brief This API will read the Watchdog timer system-reset time configured value. + * @details It will return system reset time in terms of power of two. * * @pre Pre-conditions: * - \ref sl_si91x_watchdog_set_system_reset_time * - * @param[in] none - * @return returns system-reset time (uint8_t) value, \ref #time_delays_t + * @param none + * @return returns system-reset time (uint8_t) value, \ref time_delays_t *******************************************************************************/ uint8_t sl_si91x_watchdog_get_system_reset_time(void); /***************************************************************************/ /** - * Sets the Watchdog timer window time value - * By setting this value timer becomes as Window watchdog timer, if this value is zero it act as usual WDT. - * It is also referred as lower time-stamp for WDT restart. - * Its maximum value is 15. + * @brief This API will set the Watchdog timer window time value. + * @details By setting this value timer becomes as Window watchdog timer, if this value is zero it act as regular WDT. + * It is also referred as lower time-stamp for WDT restart. Its maximum value is 15. * Number of clock pulses for window time = 2^(window_time). * This value should be less than timer interrupt time and system-reset time. - * * @pre Pre-conditions: * - \ref sl_si91x_watchdog_init_timer * - \ref sl_si91x_watchdog_configure_clock * - \ref sl_si91x_watchdog_set_system_reset_time * - \ref sl_si91x_watchdog_set_interrupt_time - * * @param[in] window_time (time_delays_t), timer window time, - * Number of clock pulses = 2^(window_time),\ref #time_delays_t + * Number of clock pulses = 2^(window_time),\ref time_delays_t * @return status 0 if successful, else error code as follows: * - \ref SL_STATUS_INVALID_PARAMETER (0x0021) - 'window_time' parameter has an invalid value. * - \ref SL_STATUS_INVALID_CONFIGURATION (0x0023) - 'window_time' value is greater than interrupt time or system reset time @@ -283,82 +276,72 @@ uint8_t sl_si91x_watchdog_get_system_reset_time(void); sl_status_t sl_si91x_watchdog_set_window_time(time_delays_t window_time); /***************************************************************************/ /** - * Reads the Watchdog timer window time set value. - * It returns time in terms of power of two. - * + * @brief This API will read the Watchdog timer window time configured value. + * @details It returns the set window time value (not current count) in terms of power of two. + * * @pre Pre-conditions: * - \ref sl_si91x_watchdog_set_window_time * - * @param[in] none - * @return returns window time (uint8_t) value, \ref #time_delays_t + * @param none + * @return returns window time (uint8_t) value, \ref time_delays_t. *******************************************************************************/ uint8_t sl_si91x_watchdog_get_window_time(void); /***************************************************************************/ /** - * Reads the Watchdog timer system-reset status. - * This will return true when watchdog-timer resets system and returns false when it is + * @brief This API will read the Watchdog timer system-reset status. + * @details This will return true when watchdog-timer resets system and returns false when it is * a power-on reset. * - * @param[in] none + * @param none * @return returns true if watchdog timer resets system, else returns false *******************************************************************************/ boolean_t sl_si91x_watchdog_get_timer_system_reset_status(void); /***************************************************************************/ /** - * De-initializes the Watchdog timer, mask its interrupt, de-power and disable timer. + * @brief This API will de-initialize the Watchdog timer. + * @details De-initializes, mask interrupts, unregisters the callback and disable timer. * @pre Pre-conditions: * - \ref sl_si91x_watchdog_init_timer * - \ref sl_si91x_watchdog_unregister_timeout_callback - * @param[in] none - * @return none + * @param none + * @return none * @note Unregisters the timer callback. *******************************************************************************/ void sl_si91x_watchdog_deinit_timer(void); /***************************************************************************/ /** - * Unregisters the Watchdog timer timeout callback. - * It will unregister the callback, i.e., clear the callback function address + * @brief This API will unregisters the Watchdog timer timeout callback. + * @details It will unregister the callback, i.e., clear the callback function address * and pass NULL value to the variable. - * - * @pre Pre-conditions: + * @pre Pre-condition: * - \ref sl_si91x_watchdog_register_timeout_callback * - * @param[in] none - * @return none + * @param none + * @return none *******************************************************************************/ void sl_si91x_watchdog_unregister_timeout_callback(void); /***************************************************************************/ /** - * Gets the Watchdog timer version. - * It returns the API version of watchdog timer. - * - * @param[in] none - * @return (sl_watchdog_version_t) type structure + * @brief This API will get the API version of the Watchdog timer. + * @details This API is used to know the API version of Watchdog timer. + * + * @param none + * @return ( \ref sl_watchdog_version_t) type structure ******************************************************************************/ sl_watchdog_timer_version_t sl_si91x_watchdog_get_version(); /***************************************************************************/ /** - * Starts and enables the Watchdog timer. - * Once WDT is started interrupt time will start incrementing as it reaches set interrupt + * @brief This API will start and enable the Watchdog timer. + * @details Once WDT is started interrupt time will start incrementing as it reaches set interrupt * time value, WDT will generate interrupt and timer will load system reset time value and * before it reaches this value WDT should be restarted (kicked) to avoid System reset. - * * @pre Pre-conditions: * - \ref sl_si91x_watchdog_init_timer * - \ref sl_si91x_watchdog_configure_clock * - \ref sl_si91x_watchdog_register_timeout_callback * - * @param[in] none - * @return none -*******************************************************************************/ -/******************************************************************************* -* @details: -* It enables the timer and sets the restart bit of the watchdog timer, by updating -* 'WWD_TIMER_ENABLE' register bits as: -* -* It updates 'wwd_timer_en'(23:16) bits of timer enable register by 0XAA, to enable -* the WDT timer. -* Also sets 'wwd_timer_rstart' bit of the register to start the timer. + * @param none + * @return none *******************************************************************************/ __STATIC_INLINE void sl_si91x_watchdog_start_timer(void) { @@ -366,48 +349,33 @@ __STATIC_INLINE void sl_si91x_watchdog_start_timer(void) } /***************************************************************************/ /** - * Stops the Watchdog timer by disabling it. - * Used to stop an already running timer. - * + * @brief This API will stop the Watchdog timer by disabling it. + * @details Used to stop an already running timer. It disables the timer by updating 'WWD_TIMER_ENABLE' register bits. + * It updates 'wwd_timer_en'(23:16) bits of timer enable register by 0xF0, to disable + * the WDT timer. * @pre Pre-conditions: * - \ref sl_si91x_watchdog_start_timer * - * @param[in] none - * @return none -*******************************************************************************/ -/******************************************************************************* -* @details: -* It disables the timer by updating 'WWD_TIMER_ENABLE' register bits. -* It updates 'wwd_timer_en'(23:16) bits of timer enable register by 0xF0, to disable -* the WDT timer. + * @param none + * @return none *******************************************************************************/ __STATIC_INLINE void sl_si91x_watchdog_stop_timer(void) { RSI_WWDT_Disable(MCU_WDT); } -/***************************************************************************/ /** - * Restarts (kick) an already running Watchdog timer. - * It should be used for already running WDT timer, not for starting a stopped timer. - * +/******************************************************************************* +* @brief This API will restart (kick) an already running Watchdog timer. +* @details It sets the restart bit of the timer when it is already enabled. +* It only sets the 'wwd_timer_rstart' bit of the register to restart an already enabled +* timer. It should be used for an already started WDT timer, not for starting a stopped timer. * @pre Pre-conditions: * - \ref sl_si91x_watchdog_init_timer * - \ref sl_si91x_watchdog_configure_clock * - \ref sl_si91x_watchdog_start_timer * - * @param[in] none - * @return none -*******************************************************************************/ -/******************************************************************************* -* @brief: Restarts or kicks the Watchdog timer. -* -* @details: -* It sets the restart bit of the timer when it is already enabled. -* -* It only sets 'wwd_timer_rstart' bit of the register to restart an already enabled -* timer. -* -* It should be used for an already started WDT timer, not for starting a stopped timer + * @param none + * @return none *******************************************************************************/ __STATIC_INLINE void sl_si91x_watchdog_restart_timer(void) { @@ -415,21 +383,15 @@ __STATIC_INLINE void sl_si91x_watchdog_restart_timer(void) } /***************************************************************************/ /** - * Enables the Watchdog timer to reset the system on processor lockup. - * + * @brief Enables the Watchdog timer to reset the system on processor lockup. + * @details It enables WDT to generate a system-reset when the processor got stuck or reached + * a lock-up state, by setting 'PROCESSOR_STUCK_RESET_EN' bit of 'WWD_ARM_STUCK_EN' + * register of WDT. * @pre Pre-conditions: * - \ref sl_si91x_watchdog_init_timer * - * @param[in] none - * @return none -*******************************************************************************/ -/******************************************************************************* -* @brief: Enables the watchdog timer to reset the system on processor lockup -* -* @details: -* It enables WDT to generate a system-reset when the processor got stuck or reached -* a lock-up state, by setting 'PROCESSOR_STUCK_RESET_EN' bit of 'WWD_ARM_STUCK_EN' -* register of WDT + * @param none + * @return none *******************************************************************************/ __STATIC_INLINE void sl_si91x_watchdog_enable_system_reset_on_processor_lockup(void) { @@ -437,27 +399,75 @@ __STATIC_INLINE void sl_si91x_watchdog_enable_system_reset_on_processor_lockup(v } /***************************************************************************/ /** - * Disables the watchdog timer to reset system on processor lockup or on processor stuck. + * @brief This API is used to disables the watchdog timer to reset system on + * processor lockup or on processor stuck. + * @details It disables the WDT to generate system-reset when processor got stuck or reached + * lock-up state, by writing '0' to 'PROCESSOR_STUCK_RESET_EN' bit of 'WWD_ARM_STUCK_EN' + * register of WDT. * * @pre Pre-conditions: * - \ref sl_si91x_watchdog_init_timer * - \ref sl_si91x_watchdog_enable_system_reset_on_processor_lockup * - * @param[in] none - * @return none -*******************************************************************************/ -/******************************************************************************* -* @details -* It disables the WDT to generate system-reset when processor got stuck or reached -* lock-up state, by writing '0' to 'PROCESSOR_STUCK_RESET_EN' bit of 'WWD_ARM_STUCK_EN' -* register of WDT. + * @param none + * @return none. *******************************************************************************/ __STATIC_INLINE void sl_si91x_watchdog_disable_system_reset_on_processor_lockup(void) { RSI_WWDT_SysRstOnProcLockDisable(MCU_WDT); } - -/** @} (end addtogroup Watchdog-Timer) */ +// ******** THE REST OF THE FILE IS DOCUMENTATION ONLY! *********************** +/// @addtogroup WATCHDOG-TIMER Watchdog Timer +/// @{ +/// +/// @details +/// +/// +/// @n @section WATCHDOG-TIMER_Intro Introduction +/// +/// The WatchDog Timer is used to generate an interrupt on timeout and a reset in case of a system failure, which +/// can be caused by an external event like ESD (Electro Static Discharge) pulse or due to a software failure. +/// The Interrupt can also be used as a Wakeup source for transitioning from SLEEP/STANDBY to ACTIVE states. +/// +/// @li **Features supported by Watchdog timer** +/// +/// @li Independent window watchdog timer. +/// @li Interrupt is generated before the system reset is applied which can be used as a wakeup source. +/// @li Individually controllable power domain for low-power applications. +/// @li APB Interface for accesses from CPU. +/// @li Able to operate when CPU is in SLEEP state during power-save applications. +/// @li Configurable timeout period. +/// @li Option to clocked using a low power internal RC (32 KHz) or external 32KHz XTAL. +/// +/// @n @section WATCHDOG-TIMER_Config Configuration +/// +/// By calling the @ref sl_si91x_watchdog_init_timer and @ref sl_si91x_watchdog_configure_clock, the +/// watchdog timer is initialized and its clocks are configured. By using @ref sl_si91x_watchdog_set_configuration +/// watchdog parameters including Interrupt time, system reset time and window time are configured. +/// +/// @li For more information on configuring available parameters refer to the respective peripheral example readme document. +/// +/// @n @section WATCHDOG-TIMER_Use Usage +/// +/// @li Below functions will initiate and configure the watchdog timer, which is the general flow for implementation: +/// 1. @ref sl_si91x_watchdog_init_timer +/// 2. @ref sl_si91x_watchdog_configure_clock +/// 3. @ref sl_si91x_watchdog_get_timer_system_reset_status (Optional, if required to check whether its a power-on reset or WDT system reset.) +/// 4. @ref sl_si91x_watchdog_set_configuration +/// 5. @ref sl_si91x_watchdog_register_timeout_callback +/// 6. @ref sl_si91x_watchdog_start_timer +/// 7. @ref sl_si91x_watchdog_restart_timer (To kick watchdog timer) +/// 8. @ref sl_si91x_watchdog_stop_timer +/// 9. @ref sl_si91x_watchdog_deinit_timer +/// +/// @li To read time values following APIs are used: +/// +/// 1. @ref sl_si91x_watchdog_get_system_reset_time to read system-reset time. +/// 2. @ref sl_si91x_watchdog_get_interrupt_time to read interrupt time. +/// 3. @ref sl_si91x_watchdog_get_window_time to read window time. +/// +/// +/** @}(end addtogroup Watchdog-Timer) */ #ifdef __cplusplus } diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/init/sl_pwm_init.c.jinja b/components/device/silabs/si91x/mcu/drivers/unified_api/init/sl_pwm_init.c.jinja index 422fed6f5..9ef4621e1 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/init/sl_pwm_init.c.jinja +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/init/sl_pwm_init.c.jinja @@ -29,6 +29,7 @@ ******************************************************************************/ #include "sl_si91x_pwm.h" +#include "sl_si91x_pwm_common_config.h" {% for inst in pwm_instances %} #include "sl_si91x_pwm_init_{{ inst }}_config.h" {% endfor %} @@ -45,7 +46,7 @@ sl_pwm_config_t sl_pwm_{{ inst }}_config = { .base_time_counter_initial_value = SL_PWM_{{ inst | upper }}_TIMER_COUNTER, .duty_cycle = SL_PWM_{{ inst | upper }}_DUTY_CYCLE, .base_timer_mode = SL_PWM_{{ inst | upper }}_TIMER_MODE, - .channel_timer_selection = SL_PWM_{{ inst | upper }}_TIMER_SELECTION, + .channel_timer_selection = SL_PWM_COMMON_TIMER_SELECTION, }; {% endfor %} @@ -77,8 +78,6 @@ void sl_pwm_init_instances(void) {% for inst in pwm_instances %} sl_si91x_pwm_init(&sl_pwm_{{ inst }}_init); - - sl_si91x_pwm_set_configuration(&sl_pwm_{{ inst }}_config); {% endfor %} } diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_calendar.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_calendar.c index 3eda13e67..0b00052d3 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_calendar.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_calendar.c @@ -113,7 +113,7 @@ sl_status_t sl_si91x_calendar_set_configuration(sl_calendar_clock_t clock_type) * if the application requires the configuration to be changed in run-time, undefined this macro * and change the peripheral configuration through the sl_si91x_calendar_set_configuration API. */ -#ifdef CALENDAR_UC +#if (CALENDAR_UC == 1) clock_type = configuration.calendar_clock_type; #endif do { diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_config_timer.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_config_timer.c index afd986713..a792d2fbd 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_config_timer.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_config_timer.c @@ -105,7 +105,7 @@ sl_status_t sl_si91x_config_timer_set_configuration(sl_config_timer_config_t *ti * if the application requires the configuration to be changed in run-time, undefined this macro * and change the peripheral configuration. */ -#ifdef CONFIG_TIMER_UC +#if (CONFIG_TIMER_UC == 1) timer_config_ptr = &ct_configuration; #endif uint32_t config_value; diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_dac.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_dac.c index 906c690a2..7faa1d2fa 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_dac.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_dac.c @@ -32,8 +32,9 @@ #include "aux_reference_volt_config.h" #include "rsi_bod.h" #include "rsi_dac.h" -#include "rsi_debug.h" - +#if defined(SL_SI91X_DMA) +#include "sl_si91x_dma.h" +#endif /******************************************************************************* *************************** DEFINES / MACROS ******************************* ******************************************************************************/ @@ -54,6 +55,8 @@ #define CHANNEL_BITMAP_28 1 // Enable DAC to dynamic mode. #define MINIMUM_DATA_LEN 1 // Minimum data length. #define MAXIMUM_DATA_LEN 1024 // Maximum data length. +#define DAC_DMA_INSTANCE 1 // DMA instance number. +#define DAC_UDMA_CHANNEL 10 // DMA channel for DAC. #define STATIC_MAX_LEN 1 // DAC static mode maximum sample length. #define DAC_RELEASE_VERSION 0 // DAC Release version #define DAC_SQA_VERSION 0 // DAC SQA version @@ -75,12 +78,17 @@ static sl_dac_callback_t user_callback = NULL; static sl_dac_operation_mode_t dac_operation_mode; static sl_channel_id_for_adc_t adc_channel; static boolean_t static_flag = false; +#if defined(SL_SI91X_DMA) +static sl_dma_xfer_t dma_transfer_tx = { 0 }; +static uint32_t dac_dma_channel = DAC_UDMA_CHANNEL + 1; +#endif /******************************************************************************* ********************* LOCAL FUNCTION PROTOTYPES *************************** ******************************************************************************/ static sl_status_t convert_rsi_to_sl_error_code(rsi_error_t error); static sl_status_t validate_dac_configuration_parameters(sl_dac_config_t dac_config); static void dac_callback_event_handler(uint8_t event); +static void dac_sample_complete_callback(uint32_t channel, void *data); /******************************************************************************* * To get the driver version * @@ -232,6 +240,14 @@ sl_status_t sl_si91x_dac_set_configuration(sl_dac_config_t dac_config, float vre if (status != SL_STATUS_OK) { break; } +#if defined(SL_SI91X_DMA) + sl_dma_init_t dma_init; + dma_init.dma_number = DAC_DMA_INSTANCE; + status = sl_si91x_dma_init(&dma_init); + if (status != SL_STATUS_OK) { + break; + } +#endif } // These parameters are taken from UC for configuring operating mode and channel. dac_operation_mode = dac_config.operating_mode; @@ -279,9 +295,52 @@ sl_status_t sl_si91x_dac_write_data(int16_t *data, uint16_t length) } } // Write data in DAC input register for Static and FIFO mode. - if (dac_operation_mode != SL_DAC_OUTPUT_REF_VOLTAGE_FOR_ADC) { + if (dac_operation_mode == SL_DAC_STATIC_MODE) { + error_status = DAC_WriteData(dac_operation_mode, data, length); + status = convert_rsi_to_sl_error_code(error_status); + } else if (dac_operation_mode == SL_DAC_FIFO_MODE) { +#ifndef SL_SI91X_DMA error_status = DAC_WriteData(dac_operation_mode, data, length); status = convert_rsi_to_sl_error_code(error_status); +#else + uint32_t dma_channel_priority = 0; + sl_dma_callback_t dac_dma_callback; + //Initialize sl_dma callback structure + dac_dma_callback.transfer_complete_cb = dac_sample_complete_callback; + //Initialize sl_dma transfer structure + dma_transfer_tx.src_addr = (uint32_t *)(data); + dma_transfer_tx.dest_addr = (uint32_t *)(DAC_INPUT_REG_ADDR); + dma_transfer_tx.src_inc = SRC_INC_16; + dma_transfer_tx.dst_inc = DST_INC_NONE; + dma_transfer_tx.xfer_size = DST_SIZE_16; + dma_transfer_tx.transfer_count = length; + dma_transfer_tx.transfer_type = SL_DMA_MEMORY_TO_PERIPHERAL; + dma_transfer_tx.dma_mode = SL_DMA_BASIC_MODE; + dma_transfer_tx.signal = 0; + + //Allocate DMA channel for Tx + status = sl_si91x_dma_allocate_channel(DAC_DMA_INSTANCE, &dac_dma_channel, dma_channel_priority); + if (status && (status != SL_STATUS_DMA_CHANNEL_ALLOCATED)) { + break; + } + //Register transfer complete and error callback + status = sl_si91x_dma_register_callbacks(DAC_DMA_INSTANCE, dac_dma_channel, &dac_dma_callback); + if (status != SL_STATUS_OK) { + break; + } + //Configure the channel for DMA transfer + status = sl_si91x_dma_transfer(DAC_DMA_INSTANCE, dac_dma_channel, &dma_transfer_tx); + if (status != SL_STATUS_OK) { + break; + } + //Change the mode as ping pong to change the value of alter structure for pong operation. + dma_transfer_tx.dma_mode = SL_DMA_PINGPONG_MODE; + //Configure the channel for DMA transfer + status = sl_si91x_dma_transfer(DAC_DMA_INSTANCE, dac_dma_channel, &dma_transfer_tx); + if (status != SL_STATUS_OK) { + break; + } +#endif } else { error_status = RSI_DAC_DynamicModeWriteData(AUX_ADC_DAC_COMP, adc_channel, (uint16_t *)data, length); status = convert_rsi_to_sl_error_code(error_status); @@ -338,8 +397,7 @@ sl_status_t sl_si91x_dac_read_data(uint16_t *dac_output_data) ******************************************************************************/ sl_status_t sl_si91x_dac_rewrite_data(int16_t *data, uint16_t length) { - sl_status_t status; - rsi_error_t error_status; + sl_status_t status = 0; do { // Validate the data is NULL or not. if (data == NULL) { @@ -351,9 +409,25 @@ sl_status_t sl_si91x_dac_rewrite_data(int16_t *data, uint16_t length) status = SL_STATUS_INVALID_RANGE; break; } +#ifndef SL_SI91X_DMA + rsi_error_t error_status; //Reconfigure the UDMA ping or pong decriptor. error_status = DAC_PingPongReconfig(data, length); status = convert_rsi_to_sl_error_code(error_status); +#else + static uint8_t ping_config = 0; + if (ping_config) { + ping_config = 0; + dma_transfer_tx.dma_mode = UDMA_MODE_BASIC; + } else { + ping_config = 1; + dma_transfer_tx.dma_mode = UDMA_MODE_PINGPONG; + } + //Configure the channel for DMA transfer + sl_si91x_dma_transfer(DAC_DMA_INSTANCE, dac_dma_channel, &dma_transfer_tx); + sl_si91x_dma_channel_enable(DAC_DMA_INSTANCE, dac_dma_channel); + sl_si91x_dma_enable(DAC_DMA_INSTANCE); +#endif } while (false); return status; } @@ -421,6 +495,12 @@ sl_status_t sl_si91x_dac_start(void) if (dac_operation_mode != SL_DAC_OUTPUT_REF_VOLTAGE_FOR_ADC) { error_status = DAC_Start(dac_operation_mode); status = convert_rsi_to_sl_error_code(error_status); +#ifdef SL_SI91X_DMA + if (dac_operation_mode == SL_DAC_FIFO_MODE) { + sl_si91x_dma_channel_enable(DAC_DMA_INSTANCE, dac_dma_channel); + sl_si91x_dma_enable(DAC_DMA_INSTANCE); + } +#endif } else { // Start the DAC operation for dynamic mode. error_status = RSI_DAC_DynamicModeStart(AUX_ADC_DAC_COMP, adc_channel, CHANNEL_BITMAP_28); status = convert_rsi_to_sl_error_code(error_status); @@ -503,6 +583,9 @@ static sl_status_t convert_rsi_to_sl_error_code(rsi_error_t error) case ERROR_PS_INVALID_STATE: status = SL_STATUS_INVALID_PARAMETER; break; + case ERROR_UDMA_INVALID_ARG: + status = SL_STATUS_INVALID_PARAMETER; + break; default: status = SL_STATUS_FAIL; break; @@ -559,3 +642,8 @@ static void dac_callback_event_handler(uint8_t event) break; } } + +static void dac_sample_complete_callback(uint32_t channel, void *data) +{ + user_callback(SL_DAC_FIFO_MODE_EVENT); +} diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_dma.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_dma.c index 0cdf3b90b..506a636cc 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_dma.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_dma.c @@ -50,8 +50,8 @@ #define EXTRACT_LSB 1 #define DMA_CHANNEL_12 12 #define DMA_CHANNEL_PRIORITY_HIGH 1 -#define VALID_CALLBACK_RANGE_LOW 1 -#define VALID_CALLBACK_RANGE_HIGH 3 +#define VALID_CALLBACK_RANGE_LOW 1 // Validation of low range callback type +#define VALID_CALLBACK_RANGE_HIGH 3 // Validation of high range callback type /******************************************************************************* ***************************  EXTERN VARIABLES  ******************************** @@ -113,7 +113,7 @@ static boolean_t channel_status(uint32_t dma_number, uint32_t channel); * * @return none ******************************************************************************/ -static void process_dma_irq(uint32_t dma_number, uint32_t channel, uint32_t irq_type); +__STATIC_INLINE void process_dma_irq(uint32_t dma_number, uint32_t channel, uint32_t irq_type); /******************************************************************************* **********************  Local Function Definition**************************** @@ -136,7 +136,7 @@ static boolean_t channel_status(uint32_t dma_number, uint32_t channel) * triggered by updating DMA descriptors. * This function calls transfer and error callback functions if registered. ******************************************************************************/ -static void process_dma_irq(uint32_t dma_number, uint32_t channel, uint32_t irq_type) +__STATIC_INLINE void process_dma_irq(uint32_t dma_number, uint32_t channel, uint32_t irq_type) { uint32_t remaining_data_size; @@ -643,7 +643,7 @@ sl_status_t sl_si91x_dma_transfer(uint32_t dma_number, uint32_t channel_no, sl_d RSI_UDMA_CHA_CONFIG_DATA_T control; RSI_UDMA_CHA_CFG_T config; - // Upadte DMA mode + // Update DMA mode if (dma_transfer_t->dma_mode == SL_DMA_BASIC_MODE) { config.altStruct = ALTERNATE_DESCRIPTOR_DISABLE; } else { @@ -672,20 +672,17 @@ sl_status_t sl_si91x_dma_transfer(uint32_t dma_number, uint32_t channel_no, sl_d config.periAck = PERIPHERAL_ACK_DISABLE; } config.dmaCh = (channel); -#if (defined(SL_SI91X_GSPI_DMA) && (SL_SI91X_GSPI_DMA == ENABLE)) +#if ((defined(SL_SI91X_GSPI_DMA) && (SL_SI91X_GSPI_DMA == ENABLE)) \ + || (defined(SL_SI91X_SSI_DMA) && (SL_SI91X_SSI_DMA == ENABLE))) config.burstReq = BURST_REQUEST_DISABLE; #else config.burstReq = BURST_REQUEST_ENABLE; #endif config.reqMask = REQUEST_MASK_DISABLE; - // Memory-meory transfer - if (dma_transfer_t->dma_mode == SL_DMA_BASIC_MODE) { - control.transferType = SL_DMA_BASIC_MODE; - } else { - control.transferType = SL_DMA_PINGPONG_MODE; - } + // Memory-memory transfer + control.transferType = dma_transfer_t->dma_mode; + control.nextBurst = NEXT_BURST_DISABLE; - control.nextBurst = NEXT_BURST_DISABLE; if (dma_transfer_t->transfer_count >= DMA_MAX_TRANSFER_COUNT) { // Transfer size is more than maximum transfer size in one DMA cycle control.totalNumOfDMATrans = (DMA_MAX_TRANSFER_COUNT - 1); @@ -716,6 +713,7 @@ sl_status_t sl_si91x_dma_transfer(uint32_t dma_number, uint32_t channel_no, sl_d udma_driver_channel_info[dma_number], udmaHandle[dma_number]); if (dma_transfer_t->transfer_type == SL_DMA_MEMORY_TO_MEMORY) { + //For memory-to-peripheral and peripheral-to-memory transfer types, below functions should be called explicitly by application // Enable DMA channel status = (sl_status_t)UDMAx_ChannelEnable((uint8_t)channel, UDMA_driver_resources[dma_number], udmaHandle[dma_number]); @@ -724,14 +722,6 @@ sl_status_t sl_si91x_dma_transfer(uint32_t dma_number, uint32_t channel_no, sl_d // Start transfer using software trigger status = (sl_status_t)RSI_UDMA_ChannelSoftwareTrigger(udmaHandle[dma_number], (uint8_t)channel); } - if (config.periphReq == PERIPHERAL_REQUEST_DISABLE) { - //For memory to peripheral and peripheral to memory transfer types, below functions should be called explicitly by application - - // Enable DMA channel - status = sl_si91x_dma_channel_enable(dma_number, channel); - // Enable DMA peripheral - status = sl_si91x_dma_enable(dma_number); - } } else { // Channel is unallocated status = SL_STATUS_DMA_CHANNEL_UNALLOCATED; @@ -910,9 +900,9 @@ sl_status_t sl_si91x_dma_enable(uint32_t dma_number) * If transfer size is greater than DMA max transfer size, process_dma_irq * will initiate the transfer again until all the bytes are transferred * *****************************************************************************/ -void DMA0_IRQ_HANDLER(void) +void __attribute__((optimize("O0"))) DMA0_IRQ_HANDLER(void) { - + // Removed optimization to support large chunk of data transfer as a temporary solution, maybe removed in future uint32_t channel; volatile uint32_t interrupt_status; volatile uint32_t error_status; @@ -942,7 +932,6 @@ void DMA0_IRQ_HANDLER(void) } } } - /******************************************************************************* * Interrupt handler for UDMA1 peripheral. * This function clears the interrupts @@ -951,14 +940,13 @@ void DMA0_IRQ_HANDLER(void) * *****************************************************************************/ void DMA1_IRQ_HANDLER(void) { - uint32_t channel; volatile uint32_t interrupt_status; volatile uint32_t error_status; uint32_t irq_type = 0; // Scan the channel which triggered interrupt - for (channel = 0; channel < DMA_CHANNEL_32; channel++) { + for (channel = 0; channel < DMA_CHANNEL_12; channel++) { irq_type = 0; // Check for transfer complete interrupt interrupt_status = UDMA_driver_resources[1]->reg->UDMA_DONE_STATUS_REG; diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_gspi.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_gspi.c index cd897a770..9a874ea7f 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_gspi.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_gspi.c @@ -280,7 +280,7 @@ sl_status_t sl_si91x_gspi_set_configuration(sl_gspi_handle_t gspi_handle, * if the application requires the configuration to be changed in run-time, undefined this macro * and change the peripheral configuration through the sl_si91x_gspi_set_configuration API. */ -#ifdef GSPI_UC +#if (GSPI_UC == 1) control_configuration = &gspi_configuration; #endif do { diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_i2c.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_i2c.c index 1d5c54ac6..994c519a6 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_i2c.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_i2c.c @@ -70,6 +70,7 @@ #define I2C_FAST_MODE_CLOCK_FREQUENCY (32000000u) // clock frequency for i2c fast mode #define I2C_FAST_PLUS_MODE_CLOCK_FREQUENCY (80000000u) // clock frequency for i2c fast plus mode #define I2C_HIGH_SPEED_MODE_CLOCK_FREQUENCY (180000000u) // clock frequency for i2c high speed mode +#define I2C_TWENTY_MHZ_CLOCK_FREQUENCY (20000000u) // clock frequency for i2c for speed modes #define ULP_PORT 4 // GPIO ULP port #define ULP_MODE 6 // ULP GPIO mode #define MAX_GPIO 64 // maximum GPIO pins @@ -98,6 +99,7 @@ typedef struct { uint32_t read_buffer_length; // read-buffer length uint32_t write_buffer_current_index; // write buffer current index uint32_t read_buffer_current_index; // read buffer current index + boolean_t repeated_start_enable; // restart status } sl_i2c_instance_state_t; /******************************************************************************* @@ -427,8 +429,12 @@ sl_i2c_status_t sl_i2c_driver_receive_data_blocking(sl_i2c_instance_t i2c_instan } // Enables the I2C peripheral. sl_si91x_i2c_enable(i2c); - // Sets the direction to read. - sl_si91x_i2c_control_direction(i2c, SL_I2C_READ_MASK); + // Sets the control direction to read. Also sets stop bit, if data length is one byte. + if ((rx_len == ONE) && (i2c_instance_state[i2c_instance].mode == SL_I2C_LEADER_MODE)) { + sl_si91x_i2c_set_read_direction_and_stop_bit(i2c); + } else { + sl_si91x_i2c_control_direction(i2c, SL_I2C_READ_MASK); + } // Configures the receive full interrupt. sl_si91x_i2c_set_interrupts(i2c, SL_I2C_EVENT_RECEIVE_FULL); // Enables the interrupt. @@ -437,8 +443,6 @@ sl_i2c_status_t sl_i2c_driver_receive_data_blocking(sl_i2c_instance_t i2c_instan while (i2c_instance_state[i2c_instance].read_buffer_current_index < i2c_instance_state[i2c_instance].read_buffer_length) ; - // to avoid unused variable warning - // (void)clear; } while (false); return i2c_status; } @@ -488,8 +492,10 @@ sl_i2c_status_t sl_i2c_driver_send_data_non_blocking(sl_i2c_instance_t i2c_insta // Setting the follower address received in parameter structure. sl_si91x_i2c_set_follower_address(i2c, address, is_10bit_addr); } - // Add stop bit to last data byte - tx_buffer[tx_len - ONE] |= (BIT_SET << STOP_BIT); + // Add stop bit to last data byte, if repeated start is not enabled + if (!(i2c_instance_state[i2c_instance].repeated_start_enable)) { + tx_buffer[tx_len - ONE] |= (BIT_SET << STOP_BIT); + } i2c_tx_last_byte_addr = (uint32_t *)(tx_buffer + (tx_len - ONE)); // Enabling transmit FIFO DMA channel and setting transmit data Level i2c_dma_tx_config(i2c); @@ -528,7 +534,9 @@ sl_i2c_status_t sl_i2c_driver_send_data_non_blocking(sl_i2c_instance_t i2c_insta break; } status = sl_si91x_dma_transfer(dma_number, channel, &dma_transfer_tx); - if (status == -1) { + if (status + == (SL_STATUS_INVALID_PARAMETER || SL_STATUS_NULL_POINTER || SL_STATUS_NOT_INITIALIZED + || SL_STATUS_DMA_CHANNEL_UNALLOCATED)) { i2c_status = SL_I2C_DMA_TRANSFER_ERROR; break; } @@ -630,14 +638,15 @@ sl_i2c_status_t sl_i2c_driver_receive_data_non_blocking(sl_i2c_instance_t i2c_in channel_priority = 0; // Initialize sl_dma transfer structure dma_transfer_tx.src_addr = (uint32_t *)((uint32_t)(write_ack)); - dma_transfer_tx.dest_addr = (uint32_t *)((uint32_t) & (i2c->IC_DATA_CMD)); //(uint32_t *)(&(i2c->IC_DATA_CMD_b)); + dma_transfer_tx.dest_addr = (uint32_t *)((uint32_t) & (i2c->IC_DATA_CMD)); dma_transfer_tx.src_inc = SL_TRANSFER_SRC_INC_NONE; dma_transfer_tx.dst_inc = SL_TRANSFER_DST_INC_NONE; dma_transfer_tx.xfer_size = SL_TRANSFER_SIZE_32; - if (i2c_instance_state[i2c_instance].operating_mode == SL_I2C_STANDARD_MODE) { + if ((i2c_instance_state[i2c_instance].operating_mode == SL_I2C_STANDARD_MODE) + || (i2c_instance_state[i2c_instance].operating_mode == SL_I2C_FAST_MODE)) { dma_transfer_tx.transfer_count = rx_len + TWO; } else { - dma_transfer_tx.transfer_count = rx_len + ONE; + dma_transfer_tx.transfer_count = rx_len; } dma_transfer_tx.transfer_type = SL_DMA_MEMORY_TO_PERIPHERAL; dma_transfer_tx.dma_mode = SL_DMA_BASIC_MODE; @@ -651,7 +660,9 @@ sl_i2c_status_t sl_i2c_driver_receive_data_non_blocking(sl_i2c_instance_t i2c_in } // Configure the channel for DMA transfer status = sl_si91x_dma_transfer(dma_number, channel, &dma_transfer_tx); - if (status == -1) { + if (status + == (SL_STATUS_INVALID_PARAMETER || SL_STATUS_NULL_POINTER || SL_STATUS_NOT_INITIALIZED + || SL_STATUS_DMA_CHANNEL_UNALLOCATED)) { i2c_status = SL_I2C_DMA_TRANSFER_ERROR; break; } @@ -720,7 +731,7 @@ sl_i2c_status_t sl_i2c_driver_leader_reconfig_on_power_mode_change(sl_i2c_power_ if (new_power_mode == SL_I2C_ULP_MODE) { if ((i2c_instance_state[ULP_I2C].operating_mode == SL_I2C_STANDARD_MODE) || (i2c_instance_state[ULP_I2C].operating_mode == SL_I2C_FAST_MODE)) { - i2c_config.freq = I2C_STANDARD_MODE_CLOCK_FREQUENCY; + i2c_config.freq = I2C_TWENTY_MHZ_CLOCK_FREQUENCY; } if (i2c_instance_state[ULP_I2C].operating_mode == SL_I2C_FAST_PLUS_MODE) { i2c_config.freq = I2C_FAST_PLUS_MODE_CLOCK_FREQUENCY; @@ -738,7 +749,7 @@ sl_i2c_status_t sl_i2c_driver_leader_reconfig_on_power_mode_change(sl_i2c_power_ RSI_CLK_SetSocPllFreq(M4CLK, I2C_STANDARD_MODE_CLOCK_FREQUENCY, REFERENCE_CLOCK_FREQUENCY); // Assigning SOC PLL clock to M4 SOC clock RSI_CLK_M4SocClkConfig(M4CLK, M4_SOCPLLCLK, 0); - i2c_config.freq = I2C_STANDARD_MODE_CLOCK_FREQUENCY; + i2c_config.freq = I2C_TWENTY_MHZ_CLOCK_FREQUENCY; } if (i2c_instance_state[ULP_I2C].operating_mode == SL_I2C_FAST_MODE) { // Changing M4SOC clock to M4_ULPREFCLK @@ -747,7 +758,7 @@ sl_i2c_status_t sl_i2c_driver_leader_reconfig_on_power_mode_change(sl_i2c_power_ RSI_CLK_SetSocPllFreq(M4CLK, I2C_FAST_MODE_CLOCK_FREQUENCY, REFERENCE_CLOCK_FREQUENCY); // Assigning SOC PLL clock to M4 SOC clock RSI_CLK_M4SocClkConfig(M4CLK, M4_SOCPLLCLK, 0); - i2c_config.freq = I2C_FAST_MODE_CLOCK_FREQUENCY; + i2c_config.freq = I2C_TWENTY_MHZ_CLOCK_FREQUENCY; } if (i2c_instance_state[ULP_I2C].operating_mode == SL_I2C_FAST_PLUS_MODE) { // Changing M4SOC clock to M4_ULPREFCLK @@ -780,6 +791,24 @@ sl_i2c_status_t sl_i2c_driver_leader_reconfig_on_power_mode_change(sl_i2c_power_ return i2c_status; } +/***************************************************************************** + * To enable or disable repeated start to enable or disable combined format transfer + * It should be called by leader application, before transferring data. + * By enabling this user can change direction of transfer, slave address, speed of transfer without releasing line. + ******************************************************************************/ +sl_i2c_status_t sl_i2c_driver_enable_repeated_start(sl_i2c_instance_t i2c_instance, boolean_t enable_rep_start) +{ + sl_i2c_status_t i2c_status; + // Validating I2C instance + if (i2c_instance >= SL_I2C_LAST) { + i2c_status = SL_I2C_INVALID_PARAMETER; + } else { + i2c_instance_state[i2c_instance].repeated_start_enable = enable_rep_start; + i2c_status = SL_I2C_SUCCESS; + } + return i2c_status; +} + /***************************************************************************** * This API deinitializes I2C peripheral instance, also unregisters callback * Also deinits clock and power down the peripheral @@ -1059,6 +1088,7 @@ static void i2c_handler(I2C_TypeDef *i2c) // Checking interrupt status status = i2c->IC_INTR_STAT; if (status & SL_I2C_EVENT_RECEIVE_FULL) { + // For leader receive if (i2c_instance_state[i2c_instance].mode == SL_I2C_LEADER_MODE) { uint32_t temp_data_cmd; if (i2c_instance_state[i2c_instance].read_buffer_current_index @@ -1071,16 +1101,20 @@ static void i2c_handler(I2C_TypeDef *i2c) sl_si91x_i2c_clear_interrupts(i2c, SL_I2C_EVENT_RECEIVE_FULL); } else { temp_data_cmd = (BIT_SET << MASK_READ_BIT); - if (i2c_instance_state[i2c_instance].read_buffer_current_index - == (i2c_instance_state[i2c_instance].read_buffer_length) - 1) { - // If the last byte is there to receive, and in leader mode, it needs - // tosend the stop byte. - temp_data_cmd |= (BIT_SET << STOP_BIT); + // Checking for last data byte and repeated start enable + if (!(i2c_instance_state[i2c_instance].repeated_start_enable)) { + if (i2c_instance_state[i2c_instance].read_buffer_current_index + == (i2c_instance_state[i2c_instance].read_buffer_length) - 1) { + // If the last byte is there to receive, and in leader mode, it needs + // tosend the stop byte. + temp_data_cmd |= (BIT_SET << STOP_BIT); + } } i2c->IC_DATA_CMD = temp_data_cmd; } } } else { + // For follower receive if (i2c_instance_state[i2c_instance].read_buffer_current_index < i2c_instance_state[i2c_instance].read_buffer_length) { i2c_instance_state[i2c_instance].read_buffer[(i2c_instance_state[i2c_instance].read_buffer_current_index++)] = @@ -1094,12 +1128,15 @@ static void i2c_handler(I2C_TypeDef *i2c) } return; } + // For leader transmit if (status & SL_I2C_EVENT_TRANSMIT_EMPTY) { if (i2c_instance_state[i2c_instance].mode == SL_I2C_LEADER_MODE) { if (i2c_instance_state[i2c_instance].write_buffer_current_index < i2c_instance_state[i2c_instance].write_buffer_length) { - if (i2c_instance_state[i2c_instance].write_buffer_current_index - == (i2c_instance_state[i2c_instance].write_buffer_length) - 1) { + // Checking for last data byte and repeated start enable + if ((i2c_instance_state[i2c_instance].write_buffer_current_index + == (i2c_instance_state[i2c_instance].write_buffer_length) - 1) + && (!(i2c_instance_state[i2c_instance].repeated_start_enable))) { i2c->IC_DATA_CMD = (BIT_SET << STOP_BIT) | i2c_instance_state[i2c_instance] .write_buffer[(i2c_instance_state[i2c_instance].write_buffer_current_index++)]; @@ -1115,6 +1152,7 @@ static void i2c_handler(I2C_TypeDef *i2c) } } } else { + // For follower transmit if (i2c_instance_state[i2c_instance].write_buffer_current_index < i2c_instance_state[i2c_instance].write_buffer_length) { sl_si91x_i2c_tx(i2c, @@ -1308,8 +1346,11 @@ static void i2c_dma_transfer_complete_callback(uint32_t channel, void *data) i2c_tx_last_byte_addr = ZERO; } if (i2c_read_ack) { - i2c_read_ack = CLEAR; - I2C0->IC_ENABLE_b.ABORT = SET; + i2c_read_ack = CLEAR; + // Disabling Stop bit if repeated start is enabled + if (!(i2c_instance_state[SL_I2C0].repeated_start_enable)) { + I2C0->IC_ENABLE_b.ABORT = SET; + } } else { i2c_callback_function_ptr[ZERO](SL_I2C0, driver_status); } @@ -1323,8 +1364,11 @@ static void i2c_dma_transfer_complete_callback(uint32_t channel, void *data) i2c_tx_last_byte_addr = 0; } if (i2c_read_ack) { - i2c_read_ack = CLEAR; - I2C1->IC_ENABLE_b.ABORT = SET; + i2c_read_ack = CLEAR; + // Disabling Stop bit if repeated start is enabled + if (!(i2c_instance_state[SL_I2C1].repeated_start_enable)) { + I2C1->IC_ENABLE_b.ABORT = SET; + } } else { i2c_callback_function_ptr[ONE](SL_I2C1, driver_status); } @@ -1333,13 +1377,16 @@ static void i2c_dma_transfer_complete_callback(uint32_t channel, void *data) i2c_callback_function_ptr[ONE](SL_I2C1, driver_status); break; case SL_I2C2_DMA_TX_CHANNEL: - if (!i2c_read_ack) { + if ((!i2c_read_ack)) { *i2c_tx_last_byte_addr &= ~((uint32_t)BIT_SET << STOP_BIT); i2c_tx_last_byte_addr = 0; } if (i2c_read_ack) { - i2c_read_ack = CLEAR; - I2C2->IC_ENABLE_b.ABORT = SET; + i2c_read_ack = CLEAR; + // Disabling Stop bit if repeated start is enabled + if (!(i2c_instance_state[SL_I2C2].repeated_start_enable)) { + I2C2->IC_ENABLE_b.ABORT = SET; + } } else { i2c_callback_function_ptr[TWO](SL_I2C2, driver_status); } diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_pwm.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_pwm.c index 7bed5fb32..799dd0656 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_pwm.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_pwm.c @@ -269,11 +269,17 @@ sl_status_t sl_si91x_pwm_start(sl_pwm_channel_t channel) // Returns invalid parameter status code if channel >=4 status = SL_STATUS_INVALID_PARAMETER; } else { + error_status = sl_si91x_pwm_reset_counter_disable(channel); + if (error_status != RSI_OK) { + status = SL_STATUS_FAIL; // Returns status error code + } else { + status = SL_STATUS_OK; // Returns status OK if no error occurs + } error_status = RSI_MCPWM_Start(MCPWM, channel); if (error_status != RSI_OK) { - status = SL_STATUS_FAIL; // Returns status OK if no error occurs + status = SL_STATUS_FAIL; // Returns status error code } else { - status = SL_STATUS_OK; // Returns status error code + status = SL_STATUS_OK; // Returns status OK if no error occurs } } return status; @@ -296,7 +302,7 @@ sl_status_t sl_si91x_pwm_stop(sl_pwm_channel_t channel) // Returns invalid parameter status code if channel >= 4 status = SL_STATUS_INVALID_PARAMETER; } else { - error_status = sl_si91x_pwm_reset_channel(channel); + error_status = sl_si91x_pwm_reset_counter(channel); if (error_status != RSI_OK) { status = SL_STATUS_FAIL; // Returns status error code } else { @@ -1128,6 +1134,58 @@ sl_status_t sl_si91x_pwm_fault_init(sl_pwm_fault_init_t *pwm_fault) return status; } +/******************************************************************************* + * This API is used to disable the reset for required channel of MCPWM. + * The actions to be performed are: + * - Initialize PWM using @ref sl_si91x_pwm_init()\n + * - Set configuration for PWM @ref sl_si91x_pwm_set_configuration()\n + * - Set base timer mode using @ref sl_si91x_pwm_set_base_timer_mode()\n + * - Start PWM using @ref sl_si91x_pwm_start()\n + ******************************************************************************/ +sl_status_t sl_si91x_pwm_reset_channel_disable(sl_pwm_channel_t channel) +{ + sl_status_t status; + rsi_error_t error_status; + if (channel >= SL_CHANNEL_LAST) { + // Returns invalid parameter status code if channel >= 4 + status = SL_STATUS_INVALID_PARAMETER; + } else { + error_status = RSI_PWM_Channel_Reset_Disable(MCPWM, channel); + if (error_status != RSI_OK) { + status = SL_STATUS_FAIL; // Returns status error code + } else { + status = SL_STATUS_OK; // Returns status OK if no error occurs + } + } + return status; +} + +/******************************************************************************* + * This API is used to disable the counter reset for required channel of MCPWM + * The actions to be performed are: + * - Initialize PWM using @ref sl_si91x_pwm_init()\n + * - Set configuration for PWM @ref sl_si91x_pwm_set_configuration()\n + * - Set base timer mode using @ref sl_si91x_pwm_set_base_timer_mode()\n + * - Start PWM using @ref sl_si91x_pwm_start()\n + ******************************************************************************/ +sl_status_t sl_si91x_pwm_reset_counter_disable(sl_pwm_channel_t channel) +{ + sl_status_t status; + rsi_error_t error_status; + if (channel >= SL_CHANNEL_LAST) { + // Returns invalid parameter status code if channel >= 4 + status = SL_STATUS_INVALID_PARAMETER; + } else { + error_status = RSI_PWM_Counter_Reset_Disable(MCPWM, channel); + if (error_status != RSI_OK) { + status = SL_STATUS_FAIL; // Returns status error code + } else { + status = SL_STATUS_OK; // Returns status OK if no error occurs + } + } + return status; +} + /******************************************************************************* * This API is used for PWM interrupt handler ******************************************************************************/ diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_sio.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_sio.c index 6f22aa0a6..a75586d08 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_sio.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_sio.c @@ -111,7 +111,7 @@ void sl_si91x_sio_deinit(void) ******************************************************************************/ sl_status_t sl_si91x_sio_spi_init(sl_sio_spi_config_t *configuration) { -#ifdef SIO_UC +#if (SIO_UC == 1) configuration = &pstcSpiConfigUc; #endif sl_status_t status; @@ -310,7 +310,7 @@ void sl_si91x_sio_spi_unregister_event_callback(void) ******************************************************************************/ sl_status_t sl_si91x_sio_spi_transfer(sl_sio_spi_xfer_config_t *xfer_config) { -#ifdef SIO_UC +#if (SIO_UC == 1) xfer_config->u8BitLen = pstcSpiConfigUc.u8BitLen; #endif sl_status_t status; @@ -453,7 +453,7 @@ sl_status_t sl_si91x_sio_uart_pin_initialization(sl_sio_uart_t *sio_uart_init) ******************************************************************************/ sl_status_t sl_si91x_sio_uart_init(sl_sio_uart_config_t *configuration) { -#ifdef SIO_UC +#if (SIO_UC == 1) configuration = &UartInitstcUc; UartInitstc = UartInitstcUc; #endif @@ -681,7 +681,7 @@ sl_status_t sl_si91x_sio_i2c_write(stc_sio_i2c_config_t *configuration, uint8_t { sl_status_t status; rsi_error_t error_status; -#ifdef SIO_UC +#if (SIO_UC == 1) configuration = &i2cConfigUc; #endif do { @@ -709,7 +709,7 @@ sl_status_t sl_si91x_sio_i2c_read(stc_sio_i2c_config_t *configuration, uint8_t a { sl_status_t status; rsi_error_t error_status; -#ifdef SIO_UC +#if (SIO_UC == 1) configuration = &i2cConfigUc; #endif do { @@ -738,7 +738,7 @@ sl_status_t sl_si91x_sio_i2c_transfer(stc_sio_i2c_config_t *configuration, uint8_t *rx_buffer, uint16_t rx_length) { -#ifdef SIO_UC +#if (SIO_UC == 1) configuration = &i2cConfigUc; #endif sl_status_t status; diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_ssi.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_ssi.c index 110bb448d..26425295d 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_ssi.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_ssi.c @@ -104,7 +104,7 @@ sl_status_t sl_si91x_ssi_configure_clock(sl_ssi_clock_config_t *clock_config) * if the application requires the configuration to be changed in run-time, undefined this macro * and change the peripheral configuration through the sl_si91x_ssi_set_configuration API. */ -#ifdef SSI_UC +#if (SSI_UC == 1) baud_rate = ssi_configuration.baud_rate; #endif @@ -135,7 +135,7 @@ sl_status_t sl_si91x_ssi_configure_clock(sl_ssi_clock_config_t *clock_config) /* The frequency of the SSI master bit-rate clock is one-half the frequency of SSI master input clock. * This allows the shift control logic to capture data on one clock edge of bit-rate clock and propagate data on the opposite edge. */ -#ifdef SSI_UC +#if (SSI_UC == 1) clock_config->soc_pll_clock = (DOUBLE * baud_rate); #endif // RSI API to set SoC pll clock is called and the status is converted to the SL error code. @@ -177,7 +177,7 @@ sl_status_t sl_si91x_ssi_init(sl_ssi_instance_t instance, sl_ssi_handle_t *ssi_h * if the application requires the configuration to be changed in run-time, undefined this macro * and change the peripheral configuration through the sl_si91x_ssi_set_configuration API. */ -#ifdef SSI_UC +#if (SSI_UC == 1) instance = ssi_configuration.device_mode; #endif do { @@ -297,7 +297,7 @@ sl_status_t sl_si91x_ssi_set_configuration(sl_ssi_handle_t ssi_handle, * if the application requires the configuration to be changed in run-time, undefined this macro * and change the peripheral configuration through the sl_si91x_ssi_set_configuration API. */ -#ifdef SSI_UC +#if (SSI_UC == 1) control_configuration = &ssi_configuration; #endif do { diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_usart.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_usart.c index 77001a84f..13cd00cd5 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_usart.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_usart.c @@ -668,7 +668,7 @@ sl_status_t sl_si91x_usart_set_configuration(sl_usart_handle_t usart_handle, * and change the peripheral configuration through the sl_si91x_usart_set_configuration API. */ do { -#ifdef USART_UC +#if (USART_UC == 1) // Get the USART Instance uart_instance = get_usart_instance(usart_handle); // if usart intance is USART_0 , update usart config from UC diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_watchdog_timer.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_watchdog_timer.c index 1c9c05c44..6f02d0d5b 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_watchdog_timer.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_watchdog_timer.c @@ -94,7 +94,7 @@ sl_status_t sl_si91x_watchdog_configure_clock(watchdog_timer_clock_config_t *tim * if the application requires the configuration to be changed in run-time, undefined this macro * and change the peripheral configuration through the sl_si91x_watchdog_configure_clock API. */ -#ifdef WDT_TIMER_UC +#if (WDT_TIMER_UC == 1) timer_clk_config_ptr = &sl_watchdog_timer_clk_config_handle; #endif do { @@ -148,7 +148,7 @@ sl_status_t sl_si91x_watchdog_set_configuration(watchdog_timer_config_t *timer_c * if the application requires the configuration to be changed in run-time, undefined this macro * and change the peripheral configuration through the sl_si91x_watchdog_set_configuration API. */ -#ifdef WDT_TIMER_UC +#if (WDT_TIMER_UC == 1) timer_config_ptr = &sl_watchdog_timer_config_handle; #endif do { @@ -305,7 +305,7 @@ sl_status_t sl_si91x_watchdog_set_window_time(time_delays_t window_time) } /******************************************************************************* -* @brief: Sets watchdog-timer system-reset time duration +* @brief: Sets watchdog-timer system-reset time duration. * * @details: * This API sets the time by which watchdog-timer resets system, by updating diff --git a/components/device/silabs/si91x/mcu/drivers/unified_peripheral_drivers/inc/sl_si91x_peripheral_i2c.h b/components/device/silabs/si91x/mcu/drivers/unified_peripheral_drivers/inc/sl_si91x_peripheral_i2c.h index 7d4975796..5d56c9371 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_peripheral_drivers/inc/sl_si91x_peripheral_i2c.h +++ b/components/device/silabs/si91x/mcu/drivers/unified_peripheral_drivers/inc/sl_si91x_peripheral_i2c.h @@ -67,6 +67,9 @@ extern "C" { #define SL_I2C_DMA_ENABLE 0x1 ///< DMA enable #define SL_I2C_DMA_DISABLE 0x0 ///< DMA disable #define SL_MAX_7_BIT_ADDRESS 127 ///< Max 7-bit address +#define SL_BIT_SET 1 // Set bit +#define SL_STOP_BIT 9 // Bit to send stop command +#define SL_MASK_READ_BIT 8 // Bit to mask read and write // I2C Interrupt Events #define SL_I2C_EVENT_RECEIVE_UNDER (1UL << 0) ///< If processor attempts to read receive buffer when buffer is empty @@ -800,6 +803,24 @@ __STATIC_INLINE void sl_si91x_i2c_send_ack(I2C_TypeDef *i2c) // not supported } +/***************************************************************************/ /** + * Sets read direction and adds stop bit for I2C interface + * It updates the register with the read mask value & adds stop bit. + * + * @pre \ref sl_si91x_i2c_enable(); + * @note I2C instance should be enabled before calling this API. + * + * @param[in] i2c (I2C_TypeDef) Pointer to the I2C instance base address. + * + * @return none + ******************************************************************************/ +__STATIC_INLINE void sl_si91x_i2c_set_read_direction_and_stop_bit(I2C_TypeDef *i2c) +{ + // Validates the I2C instance with the corresponding base address of instance. + SL_I2C_ASSERT(I2C_REF_VALID(i2c)); + // It sets the register with the read mask / write mask value. + i2c->IC_DATA_CMD = (SL_BIT_SET << SL_STOP_BIT) | (SL_BIT_SET << SL_MASK_READ_BIT); +} //---------------------------------------------------------------------------------------------- // void sl_i2c_si91x_set_tx_fifo_watermark(I2C_TypeDef *i2c,sl_i2c_tx_fifo_watermark_t tx_fifo_watermark); // sl_i2c_tx_fifo_watermark_t sl_i2c_si91x_get_tx_fifo_watermark(I2C_TypeDef *i2c); diff --git a/components/device/silabs/si91x/mcu/toolchain/linkerfile_SoC.ld.jinja b/components/device/silabs/si91x/mcu/toolchain/linkerfile_SoC.ld.jinja index e8024673b..b8cdcbcd4 100644 --- a/components/device/silabs/si91x/mcu/toolchain/linkerfile_SoC.ld.jinja +++ b/components/device/silabs/si91x/mcu/toolchain/linkerfile_SoC.ld.jinja @@ -61,7 +61,7 @@ {%- set app_flash_end = flash_addr + flash_size %} {%- endif %} {%- set app_ram_start = sram_addr %} -{%- set app_ram_end = sram_addr + sram_size %} +{%- set app_ram_end = sram_size %} {%- if psram_present %} {%- set app_psram_start = psram_addr %} @@ -84,7 +84,7 @@ {%- if udma_enable %} {%- set udma_buffer = udma_buffer | sum %} {%- set app_ram_size = app_ram_size - udma_buffer %} - {%- set udma0_start_addr = app_ram_size %} + {%- set udma0_start_addr = app_ram_size + app_ram_start %} {%- set udma1_start_addr = udma1_start_addr - udma_buffer%} {%- endif %} diff --git a/components/device/silabs/si91x/wireless/ahb_interface/inc/rsi_wisemcu_hardware_setup.h b/components/device/silabs/si91x/wireless/ahb_interface/inc/rsi_wisemcu_hardware_setup.h index 4fb733385..a209ebf79 100644 --- a/components/device/silabs/si91x/wireless/ahb_interface/inc/rsi_wisemcu_hardware_setup.h +++ b/components/device/silabs/si91x/wireless/ahb_interface/inc/rsi_wisemcu_hardware_setup.h @@ -78,6 +78,8 @@ #define FRONT_END_SWITCH_SEL3 (BIT(29) | BIT(30)) void RSI_Wireless_GPIO_Frontend_Switch_Controls(void); #endif +/*Macro used to define the PTE CRC value of the Firmware 17 Boards*/ +#define FIRMWARE_17_PTE_CRC_VALUE 0 /*Macro to be used for configuring the 'rams_retention_during_sleep' parameter in 'sl_si91x_configure_ram_retention()' function*/ #define WISEMCU_RETAIN_DEFAULT_RAM_DURING_SLEEP (1) diff --git a/components/device/silabs/si91x/wireless/ahb_interface/inc/rsi_wlan_common_config.h b/components/device/silabs/si91x/wireless/ahb_interface/inc/rsi_wlan_common_config.h index 87bbbb6d9..f290ea0f3 100644 --- a/components/device/silabs/si91x/wireless/ahb_interface/inc/rsi_wlan_common_config.h +++ b/components/device/silabs/si91x/wireless/ahb_interface/inc/rsi_wlan_common_config.h @@ -51,8 +51,8 @@ #define CONCURRENT_MODE RSI_DISABLE #endif -#ifndef RSI_FAST_FW_UP -#define RSI_FAST_FW_UP RSI_DISABLE +#ifndef SL_SI91X_FAST_FW_UP +#define SL_SI91X_FAST_FW_UP RSI_DISABLE #endif // opermode command paramaters /*=======================================================================*/ diff --git a/components/device/silabs/si91x/wireless/ahb_interface/src/rsi_hal_mcu_m4_rom.c b/components/device/silabs/si91x/wireless/ahb_interface/src/rsi_hal_mcu_m4_rom.c index cdae9572c..3990098d1 100644 --- a/components/device/silabs/si91x/wireless/ahb_interface/src/rsi_hal_mcu_m4_rom.c +++ b/components/device/silabs/si91x/wireless/ahb_interface/src/rsi_hal_mcu_m4_rom.c @@ -3,7 +3,7 @@ * @brief ******************************************************************************* * # License -* Copyright 2020 Silicon Laboratories Inc. www.silabs.com +* Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * * The licensor of this software is Silicon Laboratories Inc. Your use of this @@ -32,9 +32,6 @@ osEventFlagsId_t ta_events = NULL; #ifdef SL_SI91X_SIDE_BAND_CRYPTO #define SIDE_BAND_DONE (1 << 2) #endif -#ifdef SLI_SI91X_MCU_INTERFACE -uint8_t rx_packet_pending_flag = 0x00; -#endif /** @addtogroup SOC4 * @{ @@ -176,13 +173,9 @@ sl_status_t sli_receive_from_ta_done_isr(void) VERIFY_STATUS_AND_RETURN(status); //! Set event RX pending event to host - sl_si91x_host_set_bus_event(NCP_HOST_BUS_RX_EVENT); + sl_si91x_host_set_bus_event(SL_SI91X_NCP_HOST_BUS_RX_EVENT); #endif -#ifdef SLI_SI91X_MCU_INTERFACE - // By Setting this flag, make sure that BUS_THREAD will get a chance to read the status of Events when multiple TX Packets are being queued. - rx_packet_pending_flag = 1; -#endif return SL_STATUS_OK; } diff --git a/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform.c b/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform.c index 67c233964..dfaf4922f 100644 --- a/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform.c +++ b/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform.c @@ -86,7 +86,7 @@ sl_status_t si91x_bootup_firmware(const uint8_t select_option) rsi_update_tx_dma_desc(skip_bootload_sequence); rsi_update_rx_dma_desc(); -#if RSI_FAST_FW_UP +#if SL_SI91X_FAST_FW_UP status = rsi_set_fast_fw_up(); if (status != RSI_SUCCESS) { SL_PRINTF(SL_DEVICE_INIT_SET_FAST_FIRMWARE_UP_ERROR, COMMON, LOG_ERROR, "status: %4x", status); diff --git a/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform_wireless.c b/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform_wireless.c index 414dde2d1..3b3ddc9a7 100644 --- a/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform_wireless.c +++ b/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform_wireless.c @@ -3,7 +3,7 @@ * @brief ******************************************************************************* * # License -* Copyright 2020 Silicon Laboratories Inc. www.silabs.com +* Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * * The licensor of this software is Silicon Laboratories Inc. Your use of this @@ -269,11 +269,12 @@ void sl_si91x_trigger_sleep(SLEEP_TYPE_T sleepType, #ifdef SL_SI91X_SIDE_BAND_CRYPTO || (osMutexGetOwner(side_band_crypto_mutex) != NULL) #endif - || ((sl_si91x_host_queue_status((sl_si91x_queue_type_t)SI91X_COMMON_CMD) - | sl_si91x_host_queue_status((sl_si91x_queue_type_t)SI91X_WLAN_CMD) - | sl_si91x_host_queue_status((sl_si91x_queue_type_t)SI91X_NETWORK_CMD) - | sl_si91x_host_queue_status((sl_si91x_queue_type_t)SI91X_SOCKET_CMD) - | sl_si91x_host_queue_status((sl_si91x_queue_type_t)SI91X_BT_CMD)))) { + || ((sl_si91x_host_get_queue_packet_count((sl_si91x_queue_type_t)SI91X_COMMON_CMD) + | sl_si91x_host_get_queue_packet_count((sl_si91x_queue_type_t)SI91X_WLAN_CMD) + | sl_si91x_host_get_queue_packet_count((sl_si91x_queue_type_t)SI91X_NETWORK_CMD) + | sl_si91x_host_get_queue_packet_count((sl_si91x_queue_type_t)SI91X_SOCKET_CMD) + | sl_si91x_host_get_queue_packet_count((sl_si91x_queue_type_t)SI91X_BT_CMD) + | sl_si91x_host_get_queue_packet_count((sl_si91x_queue_type_t)SI91X_SOCKET_DATA)))) { return; } // Disabling the interrupts & clearing m4_is_active as m4 is going to sleep diff --git a/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c b/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c index ca24bee4d..30a059b62 100644 --- a/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c +++ b/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c @@ -256,34 +256,23 @@ static int sli_si91x_accept_async(int socket, const struct sockaddr *addr, sockl wait_time = (callback == NULL ? (SL_SI91X_WAIT_FOR_EVER | SL_SI91X_WAIT_FOR_RESPONSE_BIT) : SL_SI91X_RETURN_IMMEDIATELY); - // If a callback is provided, allocate memory for context and client socket. if (callback != NULL) { - context = calloc(sizeof(sl_si91x_socket_context_t), 1); - client_socket = malloc(sizeof(int)); - - // Check if memory allocation was successful - if (context == NULL || client_socket == NULL) { - SL_CLEANUP_MALLOC(context); - SL_CLEANUP_MALLOC(client_socket); - - return SL_STATUS_ALLOCATION_FAILED; - } - - *client_socket = client_socket_id; - context->user_context = callback; - context->socket_context = client_socket; - } - - status = sl_si91x_driver_send_command(RSI_WLAN_REQ_SOCKET_ACCEPT, - SI91X_SOCKET_CMD_QUEUE, - &accept_request, - sizeof(accept_request), - wait_time, - context, - &buffer); - - if (callback != NULL && status == SL_STATUS_IN_PROGRESS) { - return SL_STATUS_IN_PROGRESS; + // Set the callback and client socket ID. + sli_si91x_set_accept_callback(callback, client_socket_id); + status = sl_si91x_driver_send_async_command(RSI_WLAN_REQ_SOCKET_ACCEPT, + SI91X_SOCKET_CMD_QUEUE, + &accept_request, + sizeof(accept_request)); + SOCKET_VERIFY_STATUS_AND_RETURN(status, SL_STATUS_OK, SI91X_UNDEFINED_ERROR); + return SI91X_NO_ERROR; + } else { + status = sl_si91x_driver_send_command(RSI_WLAN_REQ_SOCKET_ACCEPT, + SI91X_SOCKET_CMD_QUEUE, + &accept_request, + sizeof(accept_request), + wait_time, + context, + &buffer); } // If the accept request fails, clean up allocated memory and return an error @@ -292,7 +281,7 @@ static int sli_si91x_accept_async(int socket, const struct sockaddr *addr, sockl SL_CLEANUP_MALLOC(context); close(client_socket_id); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); SET_ERROR_AND_RETURN(SI91X_UNDEFINED_ERROR); } @@ -302,7 +291,7 @@ static int sli_si91x_accept_async(int socket, const struct sockaddr *addr, sockl // Handle the accept response and update the client socket's state handle_accept_response(client_socket_id, ltcp); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); if (addr_len <= 0) { return client_socket_id; @@ -695,7 +684,7 @@ int sl_si91x_recvfrom(int socket, // If the command failed and a buffer was allocated, free the buffer if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } SOCKET_VERIFY_STATUS_AND_RETURN(status, SL_STATUS_OK, SI91X_UNDEFINED_ERROR) @@ -729,7 +718,7 @@ int sl_si91x_recvfrom(int socket, } } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return bytes_read; } diff --git a/components/device/silabs/si91x/wireless/ble/ble.slcc b/components/device/silabs/si91x/wireless/ble/ble.slcc index 60191150c..3b9d0b07f 100644 --- a/components/device/silabs/si91x/wireless/ble/ble.slcc +++ b/components/device/silabs/si91x/wireless/ble/ble.slcc @@ -33,7 +33,6 @@ include: - path: rsi_bt_common.h - path: rsi_common_apis.h - path: rsi_common.h - - path: rsi_timer.h - path: rsi_user.h - path: rsi_utils.h - path: sl_si91x_ble.h diff --git a/components/device/silabs/si91x/wireless/ble/inc/rsi_ble.h b/components/device/silabs/si91x/wireless/ble/inc/rsi_ble.h index fe1fa1300..3b6c55379 100644 --- a/components/device/silabs/si91x/wireless/ble/inc/rsi_ble.h +++ b/components/device/silabs/si91x/wireless/ble/inc/rsi_ble.h @@ -1554,7 +1554,6 @@ typedef struct rsi_ble_ae_extended_create_connect_s { uint8_t remote_addr[RSI_DEV_ADDR_LEN]; /** uint8_t, Initiating PHYs, this parameter indicates the PHY(s) on which the advertising packets should be received on the primary advertising physical channel and the PHYs for which connection parameters have been specified - * * Bit number Parameter Description * 0 Scan connectable advertisements on the LE 1M PHY. Connection parameters for the LE 1M PHY are provided. * 1 Connection parameters for the LE 2M PHY are provided. diff --git a/components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h b/components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h index bf834c999..bac477ee7 100644 --- a/components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h +++ b/components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h @@ -1097,15 +1097,13 @@ typedef struct rsi_ble_per_transmit_s { uint8_t payload_type; /** Transmit Power - - Transmit power value for the rf_chain parameter set to the HP chain the values for the TX power indexes are 0 - 20. + Default Value for BLE TX Power Index is 31, The range for the BLE TX Power Index is 1 to 127 (0, 32 indexes are invalid). - - Transmit power value for the rf chain parameter set to LP chain and values are: + TX power index for the BLE LP Chain : 1 to 31 (0dBm Mode), 33 to 63 ( 10dBm Mode) - - TX power for the BLE LP Chain :1 to 31 (0dBm Mode), 33 to 63 ( 10dBm Mode) + TX power index for the BLE HP Chain : 1 to 127 - - TX power for the BLE HP chain : 64 to 127 -- - @note For the LP Chain - Power index vs Outpt power in dBm + @note For the LP Chain - Power index vs Outpt power in dBm. * ----------------------------------------------------------------------------------------- * | Power Index | Output Power in dBm | @@ -1173,9 +1171,9 @@ typedef struct rsi_ble_per_transmit_s { * | 61 | 6.661428559 | * | 62 | 7.073964236 | * | 63 | 7.546029076 | - * ----------------------|------------------------------------------------------------------- + * ----------------------------------------------------------------------------------------- - - @note For the HP Chain - Power index vs Outpt power in dBm + @note For the HP Chain - Power index vs Outpt power in dBm. * ----------------------------------------------------------------------------------------- * | Power Index | Output Power in dBm | @@ -1208,7 +1206,6 @@ typedef struct rsi_ble_per_transmit_s { * | - | - | * | 127 | (Max Power Supported by Country region) | * ----------------------|------------------------------------------------------------------- - */ uint8_t tx_power; @@ -1336,13 +1333,13 @@ typedef struct rsi_ble_ae_adv_report_s { * | 3 | Scan Response | * | 4 | Legacy Advertising PDUs used | * | 5 to 6 | Data status : - * - | + * | * | | 0b00 = complete - * - | + * | * | | 0b01 = Incomplete, more data to come - * - | + * | * | | 0b10 = Incomplete, data truncated, no more to come - * -| + *| * | | 0b11 = Reserved for future use | */ uint16_t event_type; @@ -1375,7 +1372,7 @@ typedef struct rsi_ble_ae_adv_report_s { * | Value | Parameter Description | * ----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * | 0x00 to 0x0F | Value of the Advertising SID subfield in the ADI field of the PDU or, - * - for scan responses, in the ADI field of the original scannable advertisement | + * for scan responses, in the ADI field of the original scannable advertisement | * | 0xFF | No ADI field provided | * */ @@ -1555,15 +1552,15 @@ uint8_t rsi_convert_db_to_powindex(int8_t tx_power_in_dBm); * @fn int32_t rsi_ble_set_random_address(void) * @brief Request the local device to set a random address. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] void * @return The following values are returned: - * - 0 - Success - * - + * * - 0 - Success + * * Non-Zero Value - Failure - * - + * * If the return value is less than 0 - * - + * * -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ @@ -1573,17 +1570,14 @@ int32_t rsi_ble_set_random_address(void); /** * @fn int32_t rsi_ble_set_random_address_with_value(uint8_t *random_addr) * @brief Request the local device to set a given random address. This is a Blocking API - * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * @pre Pre-condition: + * - Device should be initialized before calling this API. * @param[in] random_addr - random address of the device to be set * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_set_random_address_with_value(uint8_t *random_addr); @@ -1592,23 +1586,17 @@ int32_t rsi_ble_set_random_address_with_value(uint8_t *random_addr); /** * @fn int32_t rsi_ble_start_advertising(void) * @brief Request the local device to start advertising. This is a Blocking API - * - * A received event \ref rsi_ble_on_enhance_connect_t/ \ref rsi_ble_on_connect_t indicates remote device given ble connect command and got connected - * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * @pre Pre-condition: + * Device should be initialized before calling this API. * @param[in] void * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command + * 0x4E0C - Command disallowed + * 0x4046 - Invalid Arguments * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ @@ -1618,25 +1606,18 @@ int32_t rsi_ble_start_advertising(void); /** * @fn int32_t rsi_ble_start_advertising_with_values(void *rsi_ble_adv) * @brief Request the local device to start advertising with specified values. This is a Blocking API - * - - * A received event \ref rsi_ble_on_enhance_connect_t/ \ref rsi_ble_on_connect_t indicates remote device given ble connect command and got connected - * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * A received event \ref rsi_ble_on_enhance_connect_t/ \ref rsi_ble_on_connect_t indicates remote device given ble connect command and got connected + * @pre Pre-condition: + * Device should be initialized before calling this API. * @param[in] rsi_ble_adv - This structure pointer holds the information of advertising values - * - - * This variable is the pointer of the \ref rsi_ble_req_adv_s structure - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments + * This variable is the pointer of the \ref rsi_ble_req_adv_s structure + * @return The following values are returned: + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command + * 0x4E0C - Command disallowed + * 0x4046 - Invalid Arguments * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_start_advertising_with_values(void *rsi_ble_adv); @@ -1645,21 +1626,18 @@ int32_t rsi_ble_start_advertising_with_values(void *rsi_ble_adv); /** * @fn int32_t rsi_ble_encrypt(uint8_t *key, uint8_t *data, uint8_t *resp) * @brief Encrypt the plain text data fed by the user using the key provided. - * - - * It uses the AES-128 bit block cypher a logo to generate encrypted data. Refer to Bluetooth Spec 5.0 for further details. + * It uses the AES-128 bit block cypher a logo to generate encrypted data. + * Refer to Bluetooth Spec 5.0 for further details. * @pre Pre-conditions: - * - Device should be initialized before calling this API. This is a Blocking API + * Device should be initialized before calling this API. This is a Blocking API * @param[in] key - 16 Bytes key for Encryption of data. * @param[in] data - 16 Bytes of Data request to encrypt. * @param[out] resp - Encrypted data * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_encrypt(uint8_t *key, uint8_t *data, uint8_t *resp); @@ -1669,20 +1647,15 @@ int32_t rsi_ble_encrypt(uint8_t *key, uint8_t *data, uint8_t *resp); * @fn int32_t rsi_ble_stop_advertising(void) * @brief Stop advertising. This is a Blocking API * @pre Pre-conditions: - * - Call \ref rsi_ble_start_advertising() before calling this API. + * Call \ref rsi_ble_start_advertising() before calling this API. * @param[in] void * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command + * 0x4E0C - Command disallowed + * 0x4046 - Invalid Arguments * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_stop_advertising(void); @@ -1691,23 +1664,18 @@ int32_t rsi_ble_stop_advertising(void); /** * @fn int32_t rsi_ble_set_advertise_data(uint8_t *data, uint16_t data_len) * @brief Set the advertising data. This is a Blocking API - * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * @pre Pre-condition: + * Device should be initialized before calling this API. * @param[in] data - Advertising data. * @param[in] data_len - Total length of advertising data. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * @note 1. The maximum length of advertising data payload is 31 bytes. - * - - * 2. The basic format of advertising payload record contains length and data. - * - + * @note The maximum length of advertising data payload is 31 bytes. + * @note The basic format of advertising payload record contains length and data. */ int32_t rsi_ble_set_advertise_data(uint8_t *data, uint16_t data_len); @@ -1715,19 +1683,15 @@ int32_t rsi_ble_set_advertise_data(uint8_t *data, uint16_t data_len); /** * @fn int32_t rsi_ble_set_scan_response_data(uint8_t *data, uint16_t data_len) * @brief Request the local device to set the scan response data. This is a Blocking API - * - * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] data - Data about to be sent * @param[in] data_len - Length of data, which is about to be sent * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_set_scan_response_data(uint8_t *data, uint16_t data_len); @@ -1737,21 +1701,16 @@ int32_t rsi_ble_set_scan_response_data(uint8_t *data, uint16_t data_len); * @fn int32_t rsi_ble_start_scanning(void) * @brief Start scanning. This is a Blocking API * A received event \ref rsi_ble_on_adv_report_event_t indicates advertise report of remote device received. - * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * @pre Pre-condition: + * Device should be initialized before calling this API. * @param[in] void * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command + * 0x4E0C - Command disallowed + * 0x4046 - Invalid Arguments * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_start_scanning(void); @@ -1760,20 +1719,16 @@ int32_t rsi_ble_start_scanning(void); /** * @fn int32_t rsi_ble_start_scanning_with_values(void *rsi_ble_scan_params) * @brief Start scanning with values. This is a Blocking API - * - - * A received event \ref rsi_ble_on_adv_report_event_t indicates advertise report of remote device received. - * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * A received event \ref rsi_ble_on_adv_report_event_t indicates advertise report of remote device received. + * @pre Pre-condition: + * - Device should be initialized before calling this API. * @param[in] rsi_ble_scan_params - BLE scan parameters structure * please refer rsi_ble_req_scan_s structure for more info * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments + * * - 0 - Success + * Non-Zero Value - Failure + * 0x4E0C - Command disallowed + * 0x4046 - Invalid Arguments * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_start_scanning_with_values(void *rsi_ble_scan_params); @@ -1783,17 +1738,14 @@ int32_t rsi_ble_start_scanning_with_values(void *rsi_ble_scan_params); * @fn int32_t rsi_ble_stop_scanning(void) * @brief Stop scanning. This is a Blocking API * @pre Pre-conditions: - * - \ref rsi_ble_start_scanning() API needs to be called before this API. + * - \ref rsi_ble_start_scanning() API needs to be called before this API. * @param[in] void * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * 0x4E0C - Command disallowed + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command + * 0x4E0C - Command disallowed * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_stop_scanning(void); @@ -1809,96 +1761,58 @@ int32_t rsi_ble_stop_scanning(void); * uint16_t conn_latency, * uint16_t supervision_tout) * @brief Connect to the remote BLE device with the user configured parameters. This is a blocking API. - * - - * A received event \ref rsi_ble_on_enhance_connect_t / \ref rsi_ble_on_connect_t indicates that the connection successful and - * - - * a received event \ref rsi_ble_on_disconnect_t indicates that connection failures have occurred. - * @note If a connection can't be established, for example, the remote device has gone out of range, has entered into deep sleep, or is not advertising, - * - - * the stack will try to connect forever. In this case, the application will not get an event related to the connection request. - * - - * To recover from this situation, the application can implement a timeout and call rsi_ble_connect_cancel() to cancel the connection request. - * - - * Subsequent calls of this command have to wait for the ongoing command to complete. + * A received event \ref rsi_ble_on_enhance_connect_t / \ref rsi_ble_on_connect_t indicates that the connection successful and + * a received event \ref rsi_ble_on_disconnect_t indicates that connection failures have occurred. * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] remote_dev_addr_type - AddressType - Specifies the type of the address mentioned in BD Address - * - - * 0 - Public Address - * - - * 1 - Random Address + * - 0 - Public Address + * - 1 - Random Address * @param[in] remote_dev_addr - This parameter describes the device address of remote device * @param[in] scan_interval - LE Scan Interval : N=0xXXXX - * - - * It is defined as the time interval from when the Controller - * started its last LE scan until it - * - - * begins the subsequent LE scan. - * - - * Range: 0x0004 to 0x4000 - * - - * Time = N * 0.625 msec - * - - * Time Range: 2.5 msec to 10 . 24 seconds + * - It is defined as the time interval from when the Controller started its last LE scan until it + * begins the subsequent LE scan. + * - Range: 0x0004 to 0x4000 + * - Time = N * 0.625 msec + * - Time Range: 2.5 msec to 10 . 24 seconds * @param[in] scan_window - LE Scan Window : N=0xXXXX - * - - * Amount of time for the duration of the LE scan. LE_Scan_Window + * - Amount of time for the duration of the LE scan. LE_Scan_Window * must be less than or equal to LE_Scan_Interval - * - - * Range: 0x0004 to 0x4000 - * - - * Time = N * 0.625 msec - * - - * Time Range: 2.5 msec to 10 . 24 seconds + * - Range: 0x0004 to 0x4000 + * - Time = N * 0.625 msec + * - Time Range: 2.5 msec to 10 . 24 seconds * @param[in] conn_interval_max - Max Connection Interval : N=0xXXXX - * - - * Minimum value for the connection event interval, which must - * - + * - Minimum value for the connection event interval, which must * be greater than or equal to Conn_Interval_Min. - * - - * Range: 0x0006 to 0x0C80 - * - - * Time = N * 1.25 msec - * - - * Time Range: 7.5 msec to 4 seconds. - * - - * 0x0000 - 0x0005 and 0x0C81 - 0xFFFF - Reserved for future use + * - Range: 0x0006 to 0x0C80 + * - Time = N * 1.25 msec + * - Time Range: 7.5 msec to 4 seconds. + * - 0x0000 - 0x0005 and 0x0C81 - 0xFFFF - Reserved for future use * @param[in] conn_interval_min - Min Connection Interval : N=0xXXXX - * - - * Minimum value for the connection event interval, which must + * - Minimum value for the connection event interval, which must * be greater than or equal to Conn_Interval_Max. - * - - * Range: 0x0006 to 0x0C80 - * - - * Time = N * 1.25 msec - * - - * Time Range: 7.5 msec to 4 seconds. - * - - * 0x0000 - 0x0005 and 0x0C81 - 0xFFFF - Reserved for future use + * - Range: 0x0006 to 0x0C80 + * - Time = N * 1.25 msec + * - Time Range: 7.5 msec to 4 seconds. + * - 0x0000 - 0x0005 and 0x0C81 - 0xFFFF - Reserved for future use * @param[in] conn_latency - Connection Latency : N = 0xXXXX - * - - * Peripheral latency for the connection in number of connection events. - * - - * Range: 0x0000 to 0x01F4 + * - Peripheral latency for the connection in number of connection events. + * - Range: 0x0000 to 0x01F4 * @param[in] supervision_tout - Supervision Timeout : N = 0xXXXX - * - - * Supervision timeout for the LE Link. - * - - * Range: 0x000A to 0x0C80 - * - - * Time = N * 10 msec - * - - * Time Range: 100 msec to 32 seconds - * - - * 0x0000 - 0x0009 and 0x0C81 - 0xFFFF - Reserved for future use - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments + * - Supervision timeout for the LE Link. + * - Range: 0x000A to 0x0C80 + * - Time = N * 10 msec + * - Time Range: 100 msec to 32 seconds + * - 0x0000 - 0x0009 and 0x0C81 - 0xFFFF - Reserved for future use + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E0C - Command disallowed + * - 0x4046 - Invalid Arguments + * @note If a connection can't be established, for example, the remote device has gone out of range, has entered into deep sleep, or is not advertising, + * the stack will try to connect forever. In this case, the application will not get an event related to the connection request. + * @note To recover from this situation, the application can implement a timeout and call rsi_ble_connect_cancel() to cancel the connection request. + * Subsequent calls of this command have to wait for the ongoing command to complete. * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_connect_with_params(uint8_t remote_dev_addr_type, @@ -1914,30 +1828,22 @@ int32_t rsi_ble_connect_with_params(uint8_t remote_dev_addr_type, /** * @fn int32_t rsi_ble_connect(uint8_t remote_dev_addr_type, int8_t *remote_dev_addr) * @brief Connect to the remote BLE device. This is a blocking API. - * - - * A received event \ref rsi_ble_on_enhance_connect_t/ \ref rsi_ble_on_connect_t indicates that the connection successful and - * - - * a received event \ref rsi_ble_on_disconnect_t indicates that connection failures have occurred. - * @note If a connection can't be established, for example, the remote device has gone out of range, has entered into deep sleep, or is not advertising, - * - - * the stack will try to connect forever. In this case, the application will not get an event related to the connection request. - * - - * To recover from this situation, the application can implement a timeout and call rsi_ble_connect_cancel() to cancel the connection request. - * - - * Subsequent calls of this command have to wait for the ongoing command to complete. + * A received event \ref rsi_ble_on_enhance_connect_t/ \ref rsi_ble_on_connect_t indicates that the connection successful and + * a received event \ref rsi_ble_on_disconnect_t indicates that connection failures have occurred. * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] remote_dev_addr_type - This parameter describes the address type of the remote device * @param[in] remote_dev_addr - This parameter describes the device address of the remote device * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments + * * - 0 - Success + * Non-Zero Value - Failure + * 0x4E0C - Command disallowed + * 0x4046 - Invalid Arguments * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . + * @note If a connection can't be established, for example, the remote device has gone out of range, has entered into deep sleep, or is not advertising, + * @note The stack will try to connect forever. In this case, the application will not get an event related to the connection request. + * @note To recover from this situation, the application can implement a timeout and call rsi_ble_connect_cancel() to cancel the connection request. + * @note Subsequent calls of this command have to wait for the ongoing command to complete. */ int32_t rsi_ble_connect(uint8_t remote_dev_addr_type, int8_t *remote_dev_addr); @@ -1946,21 +1852,15 @@ int32_t rsi_ble_connect(uint8_t remote_dev_addr_type, int8_t *remote_dev_addr); * @fn int32_t rsi_ble_enhance_connect_with_params(void* ble_enhance_conn_params) * @brief Connect to the remote BLE device with the user configured parameters. * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] ble_enhance_conn_params - BLE enhance connection parameter structure. See notes for the fields in this structure. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments - * - + * * - 0 - Success + * Non-Zero Value - Failure + * If the return value is less than 0 + * -4 - Buffer not available to serve the command + * 0x4E0C - Command disallowed + * 0x4046 - Invalid Arguments * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). * @note The following fields are included in the ble_enhance_conn_params parameter structure: * - dev_addr_type - Address type of the device to connect. @@ -2009,22 +1909,16 @@ int32_t rsi_ble_enhance_connect_with_params(void *ble_enhance_conn_params); /** * @fn int32_t rsi_ble_connect_cancel(int8_t *remote_dev_address) * @brief Cancel the connection to the remote BLE device. This is a blocking API. - * - - * A received event \ref rsi_ble_on_disconnect_t indicates disconnect complete. + * A received event \ref rsi_ble_on_disconnect_t indicates disconnect complete. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - This parameter describes the device address of the remote device * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments - * - - * 0x4E02 - Unknown Connection Identifier - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E0C - Command disallowed + * - 0x4046 - Invalid Arguments + * - 0x4E02 - Unknown Connection Identifier * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_connect_cancel(int8_t *remote_dev_address); @@ -2034,21 +1928,15 @@ int32_t rsi_ble_connect_cancel(int8_t *remote_dev_address); * @fn int32_t rsi_ble_disconnect(int8_t *remote_dev_address) * @brief Disconnect with the remote BLE device. This is a Blocking API * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - This parameter describes the device address of the remote device * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E0C - Command disallowed - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * 0 - Success + * Non-Zero Value - Failure + * 0x4E0C - Command disallowed + * 0x4D05 BLE socket not available + * 0x4E62 Invalid Parameters + * 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_disconnect(int8_t *remote_dev_address); @@ -2058,33 +1946,21 @@ int32_t rsi_ble_disconnect(int8_t *remote_dev_address); * @fn int32_t rsi_ble_get_device_state(uint8_t *resp) * @brief Get the local device state. This is a Blocking API. The state value is filled in "resp". * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * - Device should be initialized before calling this API. * @param[out] resp - This is an output parameter which consists of local device state. - * - - * This is a 1-byte value. The possible states are described below - * - - * BIT(0) Advertising state - * - - * BIT(1) Scanning state - * - - * BIT(2) Initiating state - * - - * BIT(3) Connected state - * - - * BIT(4) Extended Advertising state - * - - * BIT(5) Extended Scanning state - * - - * BIT(6) Extended Initiating state - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * This is a 1-byte value. The possible states are described below: + * BIT(0) Advertising state + * BIT(1) Scanning state + * BIT(2) Initiating state + * BIT(3) Connected state + * BIT(4) Extended Advertising state + * BIT(5) Extended Scanning state + * BIT(6) Extended Initiating state + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_get_device_state(uint8_t *resp); @@ -2094,18 +1970,14 @@ int32_t rsi_ble_get_device_state(uint8_t *resp); * @fn int32_t rsi_ble_set_smp_pairing_cap_data(rsi_ble_set_smp_pairing_capabilty_data_t *smp_pair_cap_data) * @brief Set the SMP Pairing Capability of local device. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] smp_pair_cap_data - This structure pointer holds the information of the SMP capability data values - * - - * please refer rsi_ble_set_smp_pairing_capabilty_data structure for more info + * please refer rsi_ble_set_smp_pairing_capabilty_data structure for more info * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_set_smp_pairing_cap_data(rsi_ble_set_smp_pairing_capabilty_data_t *smp_pair_cap_data); @@ -2115,12 +1987,11 @@ int32_t rsi_ble_set_smp_pairing_cap_data(rsi_ble_set_smp_pairing_capabilty_data_ * @fn int32_t rsi_ble_set_local_irk_value(uint8_t *l_irk) * @brief Set the IRK value to the local device. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * - Device should be initialized before calling this API. * @param[in] l_irk - l_irk Pointer to local_irk * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_set_local_irk_value(uint8_t *l_irk); @@ -2129,28 +2000,20 @@ int32_t rsi_ble_set_local_irk_value(uint8_t *l_irk); /** * @fn int32_t rsi_ble_conn_param_resp(uint8_t *remote_dev_address, uint8_t status) * @brief Give the response for the remote device connection parameter request. This is a Blocking API - * - - * A received event \ref rsi_ble_on_conn_update_complete_t indicates connection update procedure is successful. + * A received event \ref rsi_ble_on_conn_update_complete_t indicates connection update procedure is successful. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - remote device address * @param[in] status - accept or reject the connection parameters update request - * - - * 0 - ACCEPT, - * - - 1 - REJECT - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * 0x4E0C - Command disallowed - * - - * 0x4046 - Invalid Arguments - * - - * 0x4E02 - Unknown Connection Identifier + * - 0 - ACCEPT, + * - 1 - REJECT + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E0C - Command disallowed + * - 0x4046 - Invalid Arguments + * - 0x4E02 - Unknown Connection Identifier * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_conn_param_resp(uint8_t *remote_dev_address, uint8_t status); @@ -2158,44 +2021,28 @@ int32_t rsi_ble_conn_param_resp(uint8_t *remote_dev_address, uint8_t status); /** * @fn int32_t rsi_ble_smp_pair_request(uint8_t *remote_dev_address, uint8_t io_capability, uint8_t mitm_req) * @brief Request the SMP pairing process with the remote device. This is a Blocking API - * - - * A received event \ref rsi_ble_on_smp_request_t indicated remote device is given Security Request and need to respond back with \ref rsi_ble_smp_pair_request - * - - * A received event \ref rsi_ble_on_smp_response_t indicated remote device is given SMP Pair Request and need to respond back with \ref rsi_ble_smp_pair_response - * - - * A received event \ref rsi_ble_on_smp_failed_t indicated SMP procedure have failed + * - A received event \ref rsi_ble_on_smp_request_t indicated remote device is given Security Request and need to respond back with \ref rsi_ble_smp_pair_request + * - A received event \ref rsi_ble_on_smp_response_t indicated remote device is given SMP Pair Request and need to respond back with \ref rsi_ble_smp_pair_response + * - A received event \ref rsi_ble_on_smp_failed_t indicated SMP procedure have failed * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - This is the remote device address * @param[in] io_capability - This is the device input output capability - * - - * 0x00 - Display Only - * - - * 0x01 - Display Yes/No - * - - * 0x02 - Keyboard Only - * - - * 0x03 - No Input No Output + * - 0x00 - Display Only + * - 0x01 - Display Yes/No + * - 0x02 - Keyboard Only + * - 0x03 - No Input No Output * @param[in] mitm_req - MITM enable/disable - * - - * 0 - Disable - * - - * 1 - Enable + * - 0 - Disable + * - 1 - Enable * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_smp_pair_request(uint8_t *remote_dev_address, uint8_t io_capability, uint8_t mitm_req); @@ -2205,24 +2052,17 @@ int32_t rsi_ble_smp_pair_request(uint8_t *remote_dev_address, uint8_t io_capabil * @fn int32_t rsi_ble_smp_pair_failed(uint8_t *remote_dev_address, uint8_t reason) * @brief Send SMP pairing failure reason to the remote device. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - This is the remote device address * @param[in] reason - This is the reason for SMP Pairing Failure - * - - * 0x05 - Pairing Not Supported - * - - * 0x08 - Unspecified Reason - * - - * 0x09 - Repeated Attempts - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * - 0x05 - Pairing Not Supported + * - 0x08 - Unspecified Reason + * - 0x09 - Repeated Attempts + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command */ int32_t rsi_ble_smp_pair_failed(uint8_t *remote_dev_address, uint8_t reason); @@ -2231,41 +2071,25 @@ int32_t rsi_ble_smp_pair_failed(uint8_t *remote_dev_address, uint8_t reason); * @fn int32_t rsi_ble_ltk_req_reply(uint8_t *remote_dev_address, * uint8_t reply_type, uint8_t *ltk) * @brief Send the local long term key of its associated local EDIV and local Rand. This is a Blocking API - * - - * A received event \ref rsi_ble_on_encrypt_started_t indicated encrypted event is received from module - * - - * A received event \ref rsi_ble_on_smp_failed_t indicated SMP procedure have failed + * - A received event \ref rsi_ble_on_encrypt_started_t indicated encrypted event is received from module + * - A received event \ref rsi_ble_on_smp_failed_t indicated SMP procedure have failed * @param[in] remote_dev_address - remote device address * @param[in] reply_type - 0 - Negative reply - * - - * BIT(0) - Positive Reply (Encryption Enabled) - * - - BIT(1) - Un authenticated LTK or STK-based Encryption Enabled - * - - BIT(2) - Authenticated LTK or STK-based Encryption Enabled - * - - BIT(3) - Authenticated LTK with LE Secure Connections based Encryption Enabled - * - - BIT(4) to BIT(6) - Reserved for Future use - * - - BIT(7) - LE Secure Connection Enabled - * - + * - BIT(0) - Positive Reply (Encryption Enabled) + * - BIT(1) - Un authenticated LTK or STK-based Encryption Enabled + * - BIT(2) - Authenticated LTK or STK-based Encryption Enabled + * - BIT(3) - Authenticated LTK with LE Secure Connections based Encryption Enabled + * - BIT(4) to BIT(6) - Reserved for Future use + * - BIT(7) - LE Secure Connection Enabled * @param[in] ltk - Long Term Key 16 bytes * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_ltk_req_reply(uint8_t *remote_dev_address, uint8_t reply_type, uint8_t *ltk); @@ -2274,46 +2098,29 @@ int32_t rsi_ble_ltk_req_reply(uint8_t *remote_dev_address, uint8_t reply_type, u /** * @fn int32_t rsi_ble_smp_pair_response(uint8_t *remote_dev_address, uint8_t io_capability, uint8_t mitm_req) * @brief Send SMP pairing response during the process of pairing with the remote device. This is a Blocking API - * - - * A received event \ref rsi_ble_on_smp_passkey_t indicated Legacy SMP passkey is received and need to respond back with \ref rsi_ble_smp_passkey() - * - - * A received event \ref rsi_ble_on_sc_passkey_t indicated BLE SC passkey is received and need to respond back with \ref rsi_ble_smp_passkey() - * - - * A received event \ref rsi_ble_on_smp_passkey_display_t indicates SMP passkey display is received from the module - * - - * A received event \ref rsi_ble_on_smp_failed_t indicated SMP Failed event is received - * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - A received event \ref rsi_ble_on_smp_passkey_t indicated Legacy SMP passkey is received and need to respond back with \ref rsi_ble_smp_passkey() + * - A received event \ref rsi_ble_on_sc_passkey_t indicated BLE SC passkey is received and need to respond back with \ref rsi_ble_smp_passkey() + * - A received event \ref rsi_ble_on_smp_passkey_display_t indicates SMP passkey display is received from the module + * - A received event \ref rsi_ble_on_smp_failed_t indicated SMP Failed event is received + * @pre Pre-condition: + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - This is the remote device address * @param[in] io_capability - This is the device input output capability - * - - * 0x00 - Display Only - * - - * 0x01 - Display Yes/No - * - - * 0x02 - Keyboard Only - * - - * 0x03 - No Input No Output + * 0x00 - Display Only + * 0x01 - Display Yes/No + * 0x02 - Keyboard Only + * 0x03 - No Input No Output * @param[in] mitm_req - MITM Request info - * - - * 0 - Disable - * - - * 1 - Enable - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 - Disable + * - 1 - Enable + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_smp_pair_response(uint8_t *remote_dev_address, uint8_t io_capability, uint8_t mitm_req); @@ -2322,32 +2129,22 @@ int32_t rsi_ble_smp_pair_response(uint8_t *remote_dev_address, uint8_t io_capabi /** * @fn int32_t rsi_ble_smp_passkey(uint8_t *remote_dev_address, uint32_t passkey) * @brief Send SMP passkey during SMP pairing process with the remote device. This is a Blocking API - * - - * A received event \ref rsi_ble_on_encrypt_started_t indicated encrypted event is received from module - * - - * A received event \ref rsi_ble_on_le_security_keys_t indicates exchange of security keys completed after encryption - * - - * A received event \ref rsi_ble_on_smp_failed_t indicated SMP procedure have failed + * A received event \ref rsi_ble_on_encrypt_started_t indicated encrypted event is received from module + * A received event \ref rsi_ble_on_le_security_keys_t indicates exchange of security keys completed after encryption + * A received event \ref rsi_ble_on_smp_failed_t indicated SMP procedure have failed * @pre Pre-conditions: - * - Call \ref rsi_ble_smp_pair_request and \ref rsi_ble_smp_pair_response + * Call \ref rsi_ble_smp_pair_request and \ref rsi_ble_smp_pair_response * before calling this API. * @param[in] remote_dev_address - This is the remote device address * @param[in] passkey - This is the key required in pairing process * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_smp_passkey(uint8_t *remote_dev_address, uint32_t passkey); @@ -2357,26 +2154,18 @@ int32_t rsi_ble_smp_passkey(uint8_t *remote_dev_address, uint32_t passkey); * @fn int32_t rsi_ble_get_le_ping_timeout(uint8_t *remote_dev_address, uint16_t *time_out) * @brief Get the timeout value of the LE ping. This is a Blocking API * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - This is the remote device address * @param[out] time_out - This a response parameter which holds timeout value for - * - * authentication payload command. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . * @note Currently Get ping is not supported. */ @@ -2386,29 +2175,20 @@ int32_t rsi_ble_get_le_ping_timeout(uint8_t *remote_dev_address, uint16_t *time_ /** * @fn int32_t rsi_ble_set_le_ping_timeout(uint8_t *remote_dev_address, uint16_t time_out) * @brief Set the timeout value of the LE ping. This is a Blocking API - * - - * A received event of \ref rsi_ble_on_le_ping_payload_timeout_t indicates LE ping payload timeout expired + * A received event of \ref rsi_ble_on_le_ping_payload_timeout_t indicates LE ping payload timeout expired * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - This is the remote device address * @param[out] timeout - This input parameter sets timeout value for authentication - * - * payload command.(in milliseconds) * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_set_le_ping_timeout(uint8_t *remote_dev_address, uint16_t time_out); @@ -2418,16 +2198,13 @@ int32_t rsi_ble_set_le_ping_timeout(uint8_t *remote_dev_address, uint16_t time_o * @fn int32_t rsi_ble_clear_acceptlist(void) * @brief Clear all the BD address present in accept list. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] void * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_clear_acceptlist(void); @@ -2437,19 +2214,16 @@ int32_t rsi_ble_clear_acceptlist(void); * @fn int32_t rsi_ble_addto_acceptlist(int8_t *dev_address, uint8_t dev_addr_type) * @brief Add BD address to accept list. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * - Device should be initialized before calling this API. * @param[in] dev_address - Address of the device which is going to add in accept list * @param[in] dev_addr_type - address type of BD address * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command * @note Maximum number of device address that firmware can store is 10. - * - Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . + * Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_addto_acceptlist(int8_t *dev_address, uint8_t dev_addr_type); @@ -2458,22 +2232,17 @@ int32_t rsi_ble_addto_acceptlist(int8_t *dev_address, uint8_t dev_addr_type); * @fn int32_t rsi_ble_deletefrom_acceptlist(int8_t *dev_address, uint8_t dev_addr_type) * @brief Delete particular BD address from accept list. This is a Blocking API * @pre Pre-conditions: - * - \ref rsi_ble_addto_acceptlist() API needs to be called before this API. + * - \ref rsi_ble_addto_acceptlist() API needs to be called before this API. * @param[in] dev_address - Address of the device which is going to delete from accept list * @param[in] dev_addr_type - address type of BD address * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ - int32_t rsi_ble_deletefrom_acceptlist(int8_t *dev_address, uint8_t dev_addr_type); - /*==============================================*/ /** * @fn int32_t rsi_ble_resolvlist(uint8_t process_type, @@ -2483,31 +2252,22 @@ int32_t rsi_ble_deletefrom_acceptlist(int8_t *dev_address, uint8_t dev_addr_type * uint8_t *local_irk) * @brief resolvlist API used for multiple purpose based on the process type. It will be used to add/remove/clear a device to/from the list. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] process_type - Indicates which type of process this is, as follows: - * - * 1 - add a device to the resolve list - * - * 2 - remove a device from the resolve list - * - * 3 - clear the entire resolve list * @param[in] remote_dev_addr_type - typr of the remote device address * @param[in] remote_dev_address - remote device address - * - - 0 - Public identity address - * - - 1 - Random (static) identity address - * - + * 0 - Public identity address + * 1 - Random (static) identity address * @param[in] peer_irk - 16-byte IRK of the peer device * @param[in] local_irk - 16-byte IRK of the local device * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_resolvlist(uint8_t process_type, @@ -2521,88 +2281,67 @@ int32_t rsi_ble_resolvlist(uint8_t process_type, * @fn int32_t rsi_ble_get_resolving_list_size(uint8_t *resp) * @brief Request to get resolving list size. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * - Device should be initialized before calling this API. * @param[out] resp - output parameter which consists of supported resolving the list size. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 : Buffer not available to serve the command + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 : Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ - int32_t rsi_ble_get_resolving_list_size(uint8_t *resp); - /*==============================================*/ /** * @fn int32_t rsi_ble_set_addr_resolution_enable(uint8_t enable, uint16_t tout) * @brief Request to enable address resolution, and to set resolvable private address timeout. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * - Device should be initialized before calling this API. * @param[in] enable - value to enable/disable address resolution - * - - 1 - enables address resolution - * - - * 0 - disables address resolution + * - 1 - enables address resolution + * - 0 - disables address resolution * @param[in] tout - the period for changing address of our local device in seconds - * - - Value ranges from 0x0001 to 0xA1B8 (1 s to approximately 11.5 hours) + * Value ranges from 0x0001 to 0xA1B8 (1 s to approximately 11.5 hours) * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 : Buffer not available to serve the command + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 : Buffer not available to serve the command */ int32_t rsi_ble_set_addr_resolution_enable(uint8_t enable, uint16_t tout); - /*==============================================*/ /** * @fn int32_t rsi_ble_set_privacy_mode(uint8_t remote_dev_addr_type, * uint8_t *remote_dev_address, uint8_t privacy_mode) * @brief Request to set privacy mode for particular device. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] remote_dev_addr_type - type of the remote device address - * - * 0 - Public Identity Address - * - * 1 - Random (static) Identity Address * @param[in] remote_dev_address - remote device address * @param[in] privacy_mode - type of the privacy mode - * - - 0 - Network privacy mode - * - - * 1 - Device privacy mode + * 0 - Network privacy mode + * 1 - Device privacy mode * @return The following values are returned: - * - 0 - Success - * - + * 0 - Success * Non-Zero Value - Failure - * - * If the return value is less than 0 - * - * -4 : Buffer not available to serve the command * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_set_privacy_mode(uint8_t remote_dev_addr_type, uint8_t *remote_dev_address, uint8_t privacy_mode); - /*==============================================*/ /** * @fn int32_t rsi_ble_readphy(int8_t *remote_dev_address, rsi_ble_resp_read_phy_t *resp) * @brief Reads the TX and RX PHY rates of the Connection. This is a Blocking API * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - remote device address * @param[out] resp - pointer to store the response please refer \ref rsi_ble_resp_read_phy_s structure for more info. * @return The following values are returned: - * - 0 - Success - * - + * 0 - Success * Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ @@ -2613,53 +2352,31 @@ int32_t rsi_ble_readphy(int8_t *remote_dev_address, rsi_ble_resp_read_phy_t *res * @fn int32_t rsi_ble_setphy(int8_t *remote_dev_address, uint8_t tx_phy, uint8_t rx_phy, * uint16_t coded_phy) * @brief Set TX and RX PHY. This is a Blocking API - * - * A received event \ref rsi_ble_on_phy_update_complete_t indicates PHY rate update complete. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - remote device address - * - * @param[in] tx_phy - transmit PHY rate - * - - BIT(0) - Host prefers to use the LE 1M transmitter PHY (possibly among others) - * - - * BIT(1) - Host prefers to use the LE 2M transmitter PHY (possibly among others) - * - - * BIT(2) - Host prefers to use the LE Coded transmitter PHY (possibly among others) - * - - * BIT(3) - BIT(7) Reserved for future use - * - + * BIT(0) - Host prefers to use the LE 1M transmitter PHY (possibly among others) + * - BIT(1) - Host prefers to use the LE 2M transmitter PHY (possibly among others) + * - BIT(2) - Host prefers to use the LE Coded transmitter PHY (possibly among others) + * - BIT(3) - BIT(7) Reserved for future use * @param[in] rx_phy - receive PHY rate - * - - BIT(0) - Host prefers to use the LE 1M receiver PHY (possibly among others) - * - - * BIT(1) - Host prefers to use the LE 2M receiver PHY (possibly among others) - * - - * BIT(2) - Host prefers to use the LE Coded receiver PHY (possibly among others) - * - - * BIT(3) - BIT(7) Reserved for future use - * - + * BIT(0) - Host prefers to use the LE 1M receiver PHY (possibly among others) + * - BIT(1) - Host prefers to use the LE 2M receiver PHY (possibly among others) + * - BIT(2) - Host prefers to use the LE Coded receiver PHY (possibly among others) + * - BIT(3) - BIT(7) Reserved for future use * @param[in] coded_phy - TX/RX coded PHY rate - * - - 0 = Host has no preferred coding when transmitting on the LE Coded PHY - * - - * 1 = Host prefers that S=2 coding be used when transmitting on the LE Coded PHY - * - - * 2 = Host prefers that S=8 coding be used when transmitting on the LE Coded PHY - * - - * 3 = Reserved for future use - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 = Host has no preferred coding when transmitting on the LE Coded PHY + * - 1 = Host prefers that S=2 coding be used when transmitting on the LE Coded PHY + * - 2 = Host prefers that S=8 coding be used when transmitting on the LE Coded PHY + * - 3 = Reserved for future use + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_setphy(int8_t *remote_dev_address, uint8_t tx_phy, uint8_t rx_phy, uint16_t coded_phy); @@ -2672,43 +2389,29 @@ int32_t rsi_ble_setphy(int8_t *remote_dev_address, uint8_t tx_phy, uint8_t rx_ph * uint16_t latency, * uint16_t timeout) * @brief Requests the connection parameters change with the remote device. - * - * When the Silicon Labs device acts as a central, this API is used to update the connection parameters. - * - * When the Silicon Labs device acts as a peripheral, this API is used to request the central to initiate the connection update procedure. This is a Blocking API - * - - * A received event \ref rsi_ble_on_conn_update_complete_t indicates connection parameters update complete. + * A received event \ref rsi_ble_on_conn_update_complete_t indicates connection parameters update complete. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - remote device address * @param[in] min_int - minimum value for the connection interval. - * - * this shall be less than or equal to max_int . * @param[in] max_int - maximum value for the connection interval. - * - * this shall be greater than or equal to min_int. * @param[in] latency - peripheral latency for the connection in number of connection events. - * - * Ranges from 0 to 499 * @param[in] timeout - supervision timeout for the LE Link. - * - * Ranges from 10 to 3200 (Time = N * 10 ms, Time Range: 100 ms to 32 s) * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . * @note min_int and max_int values ranges from 6 to 3200 (Time = N * 1.25 ms, Time Range: 7.5 ms to 4 s) - * - latency : If latency value is greater than 32 ,Limiting the peripheral latency value to 32 - * - Max supported peripheral latency is 32 when Device is in peripheral Role. * */ @@ -2722,31 +2425,21 @@ int32_t rsi_ble_conn_params_update(uint8_t *remote_dev_address, /** * @fn int32_t rsi_ble_set_data_len(uint8_t *remote_dev_address, uint16_t tx_octets, uint16_t tx_time) * @brief Sets the TX octets and the TX time of specified link (remote device connection). This is a Blocking API. - * - * A received event \ref rsi_ble_on_data_length_update_t indicates data length update complete. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] remote_dev_address - remote device device - * - * @param[in] tx_octets - preferred maximum number of payload octets that the local Controller - * - * should include in a single Link Layer packet on this connection. * @param[in] tx_time - preferred maximum number of microseconds that the local Controller - * - * should use to transmit a single Link Layer packet on this connection. * @return The following values are returned: - * - 0 - LE_Set_Data_Length command succeeded. - * - - * Non-Zero Value - Failure - * - - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 - LE_Set_Data_Length command succeeded. + * - Non-Zero Value - Failure + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_set_data_len(uint8_t *remote_dev_address, uint16_t tx_octets, uint16_t tx_time); @@ -2755,13 +2448,12 @@ int32_t rsi_ble_set_data_len(uint8_t *remote_dev_address, uint16_t tx_octets, ui * @fn int32_t rsi_ble_read_max_data_len(rsi_ble_read_max_data_length_t *blereaddatalen) * @brief reads the max supported values of TX octets, TX time, RX octets and Rx time. This is a Blocking API * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[out] blereaddatalen - pointer to structure variable, Please refer rsi_ble_resp_read_max_data_length_s structure for more info. * @return The following values are returned: - * - 0 - command success - * - - * Non-Zero Value - Failure + * - 0 - command success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_read_max_data_len(rsi_ble_read_max_data_length_t *blereaddatalen); @@ -2777,23 +2469,16 @@ int32_t rsi_ble_read_max_data_len(rsi_ble_read_max_data_length_t *blereaddatalen * @brief Start the BLE RX test mode in controller. This is a Blocking API * @param[in] rx_channel - Channel in which packet have to be received (0 - 39) * @param[in] phy - 0x00 Reserved for future use - * - * 0x01 Receiver set to use the LE 1M PHY - * - * 0x02 Receiver set to use the LE 2M PHY - * - * 0x03 Receiver set to use the LE Coded PHY - * - * (0x04 - 0xFF) Reserved for future use. * @param[in] modulation - 0x00 Assume transmitter will have a standard standard modulation index - * - * 0x01 Assume transmitter will have a stable modulation index - * - * (0x02 - 0xFF) Reserved for future use * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_rx_test_mode(uint8_t rx_channel, uint8_t phy, uint8_t modulation); @@ -2804,41 +2489,25 @@ int32_t rsi_ble_rx_test_mode(uint8_t rx_channel, uint8_t phy, uint8_t modulation * uint8_t tx_len, uint8_t mode) * @brief Start the BLE TX test mode in controller. This is a Blocking API * @param[in] tx_channel - RF Channel (0-39). - * - * @param[in] phy - 0x00 Reserved for future use - * - - * 0x01 Transmitter set to use the LE 1M PHY - * - - * 0x02 Transmitter set to use the LE 2M PHY - * - - * 0x03 Transmitter set to use the LE Coded PHY with S=8 data coding - * - - * 0x04 Transmitter set to use the LE Coded PHY with S=2 data coding - * - - * (0x05 - 0xFF) Reserved for future use. + * - 0x01 Transmitter set to use the LE 1M PHY + * - 0x02 Transmitter set to use the LE 2M PHY + * - 0x03 Transmitter set to use the LE Coded PHY with S=8 data coding + * - 0x04 Transmitter set to use the LE Coded PHY with S=2 data coding + * - (0x05 - 0xFF) Reserved for future use. * @param[in] tx_len - Length in bytes of payload data in each packet ( 1 - 251 bytes). * @param[in] mode - 0x00 PRBS9 sequence '11111111100000111101...' - * - - * 0x01 Repeated '11110000' - * - - * 0x02 Repeated '10101010' - * - - * 0x03 PRBS15 - * - - * 0x04 Repeated '11111111' - * - - * 0x05 Repeated '00000000' - * - - * 0x06 Repeated '00001111' - * - - * 0x07 Repeated '01010101' - * - - * 0x08 - 0xFF Reserved for future use - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure + * - 0x01 Repeated '11110000' + * - 0x02 Repeated '10101010' + * - 0x03 PRBS15 + * - 0x04 Repeated '11111111' + * - 0x05 Repeated '00000000' + * - 0x06 Repeated '00001111' + * - 0x07 Repeated '01010101' + * - 0x08 - 0xFF Reserved for future use + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_tx_test_mode(uint8_t tx_channel, uint8_t phy, uint8_t tx_len, uint8_t mode); @@ -2848,11 +2517,9 @@ int32_t rsi_ble_tx_test_mode(uint8_t tx_channel, uint8_t phy, uint8_t tx_len, ui * @fn int32_t rsi_ble_end_test_mode(uint16_t *num_of_pkts) * @brief Stop the BLE TX / RX test mode in controller. This is a Blocking API * @param[out] num_of_pkts - Number of RX packets received are displayed when RX test is stopped - * - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_end_test_mode(uint16_t *num_of_pkts); @@ -2862,14 +2529,12 @@ int32_t rsi_ble_end_test_mode(uint16_t *num_of_pkts); * @fn int32_t rsi_ble_per_transmit(struct rsi_ble_per_transmit_s *rsi_ble_per_tx) * @brief Initiate the BLE transmit PER mode in the controller. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] rsi_ble_per_tx - This parameter is the buffer to hold the structure values - * - * This is a structure variable of struct \ref rsi_ble_per_transmit_s * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_per_transmit(struct rsi_ble_per_transmit_s *rsi_ble_per_tx); @@ -2879,14 +2544,12 @@ int32_t rsi_ble_per_transmit(struct rsi_ble_per_transmit_s *rsi_ble_per_tx); * @fn int32_t rsi_ble_per_receive(struct rsi_ble_per_receive_s *rsi_ble_per_rx) * @brief Initiate the BLE receive PER mode in the controller. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] rsi_ble_per_rx - This parameter is the buffer to hold the structure values - * - * This is a structure variable of struct \ref rsi_ble_per_receive_s * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_per_receive(struct rsi_ble_per_receive_s *rsi_ble_per_rx); @@ -2904,21 +2567,17 @@ int32_t rsi_ble_per_receive(struct rsi_ble_per_receive_s *rsi_ble_per_rx); * @brief Give vendor-specific command to set the acceptlist feature based on * the advertisers advertising payload. This is a Blocking API * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] enable - enable/disable * @param[in] data_compare_index - the starting index of the data to compare * @param[in] len_for_compare_data - total length of data to compare * @param[in] payload - Payload * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * 0x4E62 Invalid Parameters - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command + * - 0x4E62 Invalid Parameters * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_accept_list_using_adv_data(uint8_t enable, @@ -2931,12 +2590,12 @@ int32_t rsi_ble_accept_list_using_adv_data(uint8_t enable, * @fn void BT_LE_ADPacketExtract(uint8_t *remote_name, uint8_t *pbuf, uint8_t buf_len) * @brief Used to extract remote Bluetooth device name from the received advertising report. * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] remote_name - device name * @param[in] pbuf - advertise data packet buffer pointer * @param[in] buf_len - buffer length * @return The following values are returned: - * - void + * void */ void BT_LE_ADPacketExtract(uint8_t *remote_name, uint8_t *pbuf, uint8_t buf_len); @@ -2945,32 +2604,23 @@ void BT_LE_ADPacketExtract(uint8_t *remote_name, uint8_t *pbuf, uint8_t buf_len) * @fn int32_t rsi_ble_start_encryption(uint8_t *remote_dev_address, uint16_t ediv, * uint8_t *rand, uint8_t *ltk) * @brief Start the encryption process with the remote device. This is a Blocking API - * - * A received event \ref rsi_ble_on_encrypt_started_t indicated encrypted event is received from module - * - * A received event \ref rsi_ble_on_le_security_keys_t indicates exchange of security keys completed after encryption. - * - * A received event \ref rsi_ble_on_smp_failed_t indicated SMP procedure have failed * @pre Pre-conditions: - * - Encryption enabled event should come before calling this API for second time SMP connection. + * - Encryption enabled event should come before calling this API for second time SMP connection. * @param[in] remote_dev_address - Remote BD address in string format * @param[in] ediv - remote device ediv value. * @param[in] rand - remote device rand value. * @param[in] ltk - remote device ltk value. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - - * -4 - Buffer not available to serve the command - * 0x4D05 BLE socket not available - * - - * 0x4E62 Invalid Parameters - * - - * 0x4D04 BLE not connected - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 + * - -4 - Buffer not available to serve the command + * - 0x4D05 BLE socket not available + * - 0x4E62 Invalid Parameters + * - 0x4D04 BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). */ int32_t rsi_ble_start_encryption(uint8_t *remote_dev_address, uint16_t ediv, uint8_t *rand, uint8_t *ltk); @@ -2981,20 +2631,20 @@ int32_t rsi_ble_start_encryption(uint8_t *remote_dev_address, uint16_t ediv, uin * @brief Set TX power * @param[in] tx_power Power value * @return The following values are returned: - * - 0 - Success - * - Non-zero value - Failure - * - 0x4E02 - Unknown connection identifier - * - 0x4E01 - Unknown HCI command - * - 0x4E0C - Command disallowed - * - 0x4046 - Invalid arguments - * - 0x4D04 - BLE not connected - * - 0x4D14 - BLE parameter out of mandatory range + * - 0 - Success + * - Non-zero value - Failure + * - 0x4E02 - Unknown connection identifier + * - 0x4E01 - Unknown HCI command + * - 0x4E0C - Command disallowed + * - 0x4046 - Invalid arguments + * - 0x4D04 - BLE not connected + * - 0x4D14 - BLE parameter out of mandatory range * @note This is a Blocking API. * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). * @note The higher power will be backed off based on country region. * @note Use the following setting to indicate tx_power as an index: `#define RSI_BLE_PWR_INX_DBM 0` - * - Default value for power index is 31. - * - Valid values for power index range from 1 to 31 and 33 to 127: + * Default value for power index is 31. + * Valid values for power index range from 1 to 31 and 33 to 127: * - 1 to 31: BLE - 0dBm mode. * - 33 to 63: BLE - 10dBm mode. * - 64 to 82: BLE - 1dBm - 18dBm HP mode in the resolution of 1dBm. @@ -3123,20 +2773,17 @@ int32_t rsi_ble_set_ble_tx_power(int8_t tx_power); * Still user need to wait until the callback \ref rsi_ble_on_profiles_list_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[out] p_profile_list - profiles/services information will be filled in this structure after retrieving from the remote device, please refer rsi_ble_resp_profiles_list_s structure for more info. - * - + * * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_get_profiles(uint8_t *dev_addr, uint16_t start_handle, @@ -3153,20 +2800,17 @@ int32_t rsi_ble_get_profiles(uint8_t *dev_addr, * Still user need to wait until the callback \ref rsi_ble_on_profile_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] profile_uuid - services/profiles which are searched using profile_uuid - * - + * * @param[out] p_profile - profile / service information filled in this structure after retrieving from the remote device, please refer profile_descriptor_s structure for more info. - * - + * * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_get_profile(uint8_t *dev_addr, uuid_t profile_uuid, profile_descriptors_t *p_profile); @@ -3182,19 +2826,16 @@ int32_t rsi_ble_get_profile(uint8_t *dev_addr, uuid_t profile_uuid, profile_desc * Still user need to wait until the callback \ref rsi_ble_on_char_services_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[out] p_char_services_list - service characteristics details are filled in this structure, please refer rsi_ble_resp_char_serv_s structure for more info. - * - + * * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_get_char_services(uint8_t *dev_addr, uint16_t start_handle, @@ -3213,19 +2854,16 @@ int32_t rsi_ble_get_char_services(uint8_t *dev_addr, * Still user need to wait until the callback \ref rsi_ble_on_inc_services_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[out] p_inc_serv_list - include service characteristics details are filled in this structure, please refer rsi_ble_resp_inc_serv structure for more info. - * - + * * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_get_inc_services(uint8_t *dev_addr, uint16_t start_handle, @@ -3244,22 +2882,18 @@ int32_t rsi_ble_get_inc_services(uint8_t *dev_addr, * Still user need to wait until the callback \ref rsi_ble_on_read_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[in] char_uuid - UUID of the characteristic * @param[out] p_char_value - characteristic value is filled in this structure, please refer rsi_ble_resp_att_value_s structure for more info. - * - + * * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * If the return value is less than 0 - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - If the return value is less than 0 * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_get_char_value_by_uuid(uint8_t *dev_addr, uint16_t start_handle, @@ -3279,18 +2913,15 @@ int32_t rsi_ble_get_char_value_by_uuid(uint8_t *dev_addr, * Still user need to wait until the callback \ref rsi_ble_on_att_desc_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[out] p_att_desc - pointer to characteristic descriptor structure, Please refer rsi_ble_resp_att_descs_s structure for more info. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_get_att_descriptors(uint8_t *dev_addr, uint16_t start_handle, @@ -3305,16 +2936,13 @@ int32_t rsi_ble_get_att_descriptors(uint8_t *dev_addr, * Still user need to wait until the callback \ref rsi_ble_on_read_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - handle value of the attribute * @param[out] p_att_val - attribute value is filled in this structure, Please refer rsi_ble_resp_att_value_s structure for more info. - * - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . * */ @@ -3331,18 +2959,15 @@ int32_t rsi_ble_get_att_value(uint8_t *dev_addr, uint16_t handle, rsi_ble_resp_a * Still user need to wait until the callback \ref rsi_ble_on_read_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] num_of_handlers - number of handles in the list * @param[in] handles - list of attribute handles * @param[out] p_att_vals - attribute values filled in this structure, please refer rsi_ble_resp_att_value_s structure for more info. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_get_multiple_att_values(uint8_t *dev_addr, uint8_t num_of_handlers, @@ -3360,18 +2985,15 @@ int32_t rsi_ble_get_multiple_att_values(uint8_t *dev_addr, * Still user need to wait until the callback \ref rsi_ble_on_read_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - attribute handle * @param[in] offset - offset within the attribute value * @param[out] p_att_vals - attribute value filled in this structure, please refer rsi_ble_resp_att_value_s structure for more info. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_get_long_att_value(uint8_t *dev_addr, uint16_t handle, @@ -3387,18 +3009,15 @@ int32_t rsi_ble_get_long_att_value(uint8_t *dev_addr, * Still user need to wait until the callback \ref rsi_ble_on_write_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - attribute value handle * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_set_att_value(uint8_t *dev_addr, uint16_t handle, uint8_t data_len, uint8_t *p_data); @@ -3409,28 +3028,20 @@ int32_t rsi_ble_set_att_value(uint8_t *dev_addr, uint16_t handle, uint8_t data_l * @brief Set the attribute value without waiting for an ACK from the remote device. This is a Blocking API. * If the API returns RSI_ERROR_BLE_DEV_BUF_FULL (-31) error then wait until the \ref rsi_ble_on_le_more_data_req_t event gets received from the module. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - attribute value handle * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - - * 0x4E65 - Invalid Attribute Length When Small Buffer Mode is Configured - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available + * - 0x4E65 - Invalid Attribute Length When Small Buffer Mode is Configured * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_set_att_cmd(uint8_t *dev_addr, uint16_t handle, uint8_t data_len, uint8_t *p_data); @@ -3446,19 +3057,16 @@ int32_t rsi_ble_set_att_cmd(uint8_t *dev_addr, uint16_t handle, uint8_t data_len * Still user need to wait until the callback \ref rsi_ble_on_write_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - attribute handle * @param[in] offset - attribute value offset * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_set_long_att_value(uint8_t *dev_addr, uint16_t handle, @@ -3475,17 +3083,15 @@ int32_t rsi_ble_set_long_att_value(uint8_t *dev_addr, * Still user need to wait until the callback \ref rsi_ble_on_write_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - attribute handle * @param[in] offset - attribute value offset * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . * */ @@ -3499,21 +3105,15 @@ int32_t rsi_ble_prepare_write(uint8_t *dev_addr, uint16_t handle, uint16_t offse * Still user need to wait until the callback \ref rsi_ble_on_write_resp_t is received from the device, * to initiate further attribute related transactions on this remote device address. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] exe_flag - execute flag to write, possible values mentioned below - * - - 0 - BLE_ATT_EXECUTE_WRITE_CANCEL - * - - 1 - BLE_ATT_EXECUTE_PENDING_WRITES_IMMEDIATELY - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - BLE_ATT_EXECUTE_WRITE_CANCEL + * - 1 - BLE_ATT_EXECUTE_PENDING_WRITES_IMMEDIATELY + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_execute_write(uint8_t *dev_addr, uint8_t exe_flag); /** @} */ @@ -3530,20 +3130,15 @@ int32_t rsi_ble_execute_write(uint8_t *dev_addr, uint8_t exe_flag); * @fn int32_t rsi_ble_add_service(uuid_t service_uuid, rsi_ble_resp_add_serv_t *p_resp_serv) * @brief Add a new service to the local GATT Server. This is a Blocking API. * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * - Device should be initialized before calling this API. * @param[in] service_uuid - new service UUID value, please refer uuid_s structure for more info. * @param[out] p_resp_serv - new service handler filled in this structure, please refer rsi_ble_resp_add_serv_s structure for more info. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4046 - Invalid Arguments - * - - * 0x4D08 - Profile record full - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4046 - Invalid Arguments + * - 0x4D08 - Profile record full * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_add_service(uuid_t service_uuid, rsi_ble_resp_add_serv_t *p_resp_serv); @@ -3552,20 +3147,14 @@ int32_t rsi_ble_add_service(uuid_t service_uuid, rsi_ble_resp_add_serv_t *p_resp * @fn int32_t rsi_ble_add_attribute(rsi_ble_req_add_att_t *p_attribute) * @brief Add a new attribute to a specific service. This is a Blocking API. * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] p_attribute - add a new attribute to the service, please refer rsi_ble_req_add_att_s structure for more info. - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4046 - Invalid Arguments - * - - * 0x4D09 - Attribute record full - * - + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4046 - Invalid Arguments + * - 0x4D09 - Attribute record full * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_add_attribute(rsi_ble_req_add_att_t *p_attribute); @@ -3575,41 +3164,26 @@ int32_t rsi_ble_add_attribute(rsi_ble_req_add_att_t *p_attribute); * uint8_t *p_data) * @brief Change the local attribute value. This is a Blocking API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] handle - attribute value handle * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4046 - Invalid Arguments - * - - * 0x4D06 - Attribute record not found - * - - * 0x4E60 - Invalid Handle Range - * - - * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4046 - Invalid Arguments + * - 0x4D06 - Attribute record not found + * - 0x4E60 - Invalid Handle Range + * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . * @note This API can only be used if the service is maintained inside the firmware. - * - - * The services which are maintained by firmware must follow the below rules. - * - - * Rule 1: The attribute_data_size is less than 20 bytes during the service_creation - * - - * Rule 2: while creating the service, don't use the RSI_BLE_ATT_MAINTAIN_IN_HOST bit - * - + * @note The services which are maintained by firmware must follow the below rules. + * @note Rule 1: The attribute_data_size is less than 20 bytes during the service_creation + * @note Rule 2: while creating the service, don't use the RSI_BLE_ATT_MAINTAIN_IN_HOST bit * in the RSI_BLE_ATT_CONFIG_BITMAP macro. - * - - * Rule 3: The data_len must be less than or equal to the dat_length mentioned while - * - + * @note Rule 3: The data_len must be less than or equal to the dat_length mentioned while * creating the service/attribute - * - - * Rule 4: If the services are maintained in the Application/Host, - * - - * then need to use \ref rsi_ble_notify_value() API to send the notifications to the remote devices. - * - + * @note Rule 4: If the services are maintained in the Application/Host, + * then need to use \ref rsi_ble_notify_value() API to send the notifications to the remote devices. */ int32_t rsi_ble_set_local_att_value(uint16_t handle, uint16_t data_len, uint8_t *p_data); @@ -3620,39 +3194,24 @@ int32_t rsi_ble_set_local_att_value(uint16_t handle, uint16_t data_len, uint8_t * @brief Configure the buf mode for Notify and WO response commands for the remote device. This is a Blocking API. * @param[in] dev_addr - remote device address * @param[in] buf_mode - buffer mode configuration - * - - 0 - BLE_SMALL_BUFF_MODE - * - - 1 - BLE_BIG_BUFF_MODE - * - + * - 0 - BLE_SMALL_BUFF_MODE + * - 1 - BLE_BIG_BUFF_MODE * @param[in] buf_count - no of buffers to be configured - * - - only value 1 and 2 are supported in BLE_SMALL_BUFF_MODE - * - - + * only value 1 and 2 are supported in BLE_SMALL_BUFF_MODE in BLE_BIG_BUFF_MODE, buffers allocated based on the below notations. intial available_buf_cnt = RSI_BLE_NUM_CONN_EVENTS, a) When connection 1 is formed, the possible range of buffers is (available_buf_cnt - remaining possible number of connections) b) After allocating X buffers using \ref rsi_ble_set_wo_resp_notify_buf_info to the 1st connection remaining available_buf_cnt = (available_buf_cnt - X ) - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * 0x4046 - Invalid Arguments - * - - * 0x4D05 - BLE socket not available - * - - * 0x4D06 - Attribute record not found - * - - * 0x4E60 - Invalid Handle Range - * - - * 0x4E63 - BLE Buffer Count Exceeded - * - - * 0x4E64 - BLE Buffer already in use - * - + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4046 - Invalid Arguments + * - 0x4D05 - BLE socket not available + * - 0x4D06 - Attribute record not found + * - 0x4E60 - Invalid Handle Range + * - 0x4E63 - BLE Buffer Count Exceeded + * - 0x4E64 - BLE Buffer already in use * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_set_wo_resp_notify_buf_info(uint8_t *dev_addr, uint8_t buf_mode, uint8_t buf_cnt); @@ -3663,35 +3222,23 @@ int32_t rsi_ble_set_wo_resp_notify_buf_info(uint8_t *dev_addr, uint8_t buf_mode, * @brief Notify the local value to the remote device. This is a Blocking API. * If the API returns RSI_ERROR_BLE_DEV_BUF_FULL (-31) error then wait until the \ref rsi_ble_on_le_more_data_req_t event gets received from the module. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - local attribute handle * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4046 - Invalid Arguments - * - - * 0x4A0D - Invalid attribute value length - * - - * 0x4D05 - BLE socket not available - * - - * 0x4D06 - Attribute record not found - * - - * 0x4E60 - Invalid Handle Range - * - - * 0x4E65 - Invalid Attribute Length When Small Buffer Mode is Configured - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4046 - Invalid Arguments + * - 0x4A0D - Invalid attribute value length + * - 0x4D05 - BLE socket not available + * - 0x4D06 - Attribute record not found + * - 0x4E60 - Invalid Handle Range + * - 0x4E65 - Invalid Attribute Length When Small Buffer Mode is Configured * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - - * * @note If the services are maintained in the Application/Host, - * - * then need to use \ref rsi_ble_notify_value() API instead of using \ref rsi_ble_set_local_att_value() API - * - * to send the notifications to the remote devices. */ int32_t rsi_ble_notify_value(uint8_t *dev_addr, uint16_t handle, uint16_t data_len, uint8_t *p_data); @@ -3703,23 +3250,17 @@ int32_t rsi_ble_notify_value(uint8_t *dev_addr, uint16_t handle, uint16_t data_l * @brief Indicate the local value to the remote device. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_indicate_confirmation_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - local attribute handle * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4D05 - BLE socket not available - * - - * 0x4E60 - Invalid Handle Range - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D05 - BLE socket not available + * - 0x4E60 - Invalid Handle Range * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - - * */ int32_t rsi_ble_indicate_value(uint8_t *dev_addr, uint16_t handle, uint16_t data_len, uint8_t *p_data); /** @} */ @@ -3733,28 +3274,22 @@ int32_t rsi_ble_indicate_value(uint8_t *dev_addr, uint16_t handle, uint16_t data * @fn int32_t rsi_ble_indicate_value_sync(uint8_t *dev_addr, uint16_t handle, * uint16_t data_len, uint8_t *p_data) * @brief Indicate the local value to the remote device. This is a blocking API. - * - + * * This will not send any confirmation event to the application instead - * - + * * send the status as success on receiving confirmation from remote side. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - local attribute handle * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4D05 - BLE socket not available - * - - * 0x4E60 - Invalid Handle Range - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D05 - BLE socket not available + * - 0x4E60 - Invalid Handle Range * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - - * */ int32_t rsi_ble_indicate_value_sync(uint8_t *dev_addr, uint16_t handle, uint16_t data_len, uint8_t *p_data); @@ -3763,17 +3298,13 @@ int32_t rsi_ble_indicate_value_sync(uint8_t *dev_addr, uint16_t handle, uint16_t * @fn int32_t rsi_ble_indicate_confirm(uint8_t *dev_addr) * @brief Send indicate confirmation to the remote device. This is a blocking API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * 0x4D05 - BLE socket not available - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D05 - BLE socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - - * */ int32_t rsi_ble_indicate_confirm(uint8_t *dev_addr); /** @} */ @@ -3788,27 +3319,19 @@ int32_t rsi_ble_indicate_confirm(uint8_t *dev_addr); * rsi_ble_resp_local_att_value_t *p_resp_local_att_val) * @brief Get the local attribute value. This is a Blocking API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] handle - local attribute handle * @param[out] p_resp_local_att_val - local attribute value filled in this structure, see rsi_ble_resp_local_att_value_s structure for more info. * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4046 - Invalid Arguments - * - - * 0x4D06 - Attribute record not found - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4046 - Invalid Arguments + * - 0x4D06 - Attribute record not found * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - - * @note This API can only be used if the service is maintained inside the firmware. The services which are maintained by firmware must - * follow the below rules. - * - - * Rule 1: The attribute_data_size is less than 20 bytes during the service_creation - * - - * Rule 2: While creating the service, don't use the RSI_BLE_ATT_MAINTAIN_IN_HOST bit in the RSI_BLE_ATT_CONFIG_BITMAP macro. - * + * @note This API can only be used if the service is maintained inside the firmware. The services which are maintained by firmware must + * follow the below rules. + * @note Rule 1: The attribute_data_size is less than 20 bytes during the service_creation + * @note Rule 2: While creating the service, don't use the RSI_BLE_ATT_MAINTAIN_IN_HOST bit in the RSI_BLE_ATT_CONFIG_BITMAP macro. */ int32_t rsi_ble_get_local_att_value(uint16_t handle, rsi_ble_resp_local_att_value_t *p_resp_local_att_val); @@ -3822,26 +3345,20 @@ int32_t rsi_ble_get_local_att_value(uint16_t handle, rsi_ble_resp_local_att_valu * uint8_t *p_data) * @brief Send the response for the read request received from the remote device. This is a Blocking API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device Address * @param[in] read_type - read value type - * - - 0 - Read response - * - - 1 - Read blob response + * - 0 - Read response + * - 1 - Read blob response * @param[in] handle - attribute value handle * @param[in] offset - attribute value offset * @param[in] length - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4D04 - BLE not connected - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D04 - BLE not connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - */ int32_t rsi_ble_gatt_read_response(uint8_t *dev_addr, uint8_t read_type, @@ -3855,17 +3372,13 @@ int32_t rsi_ble_gatt_read_response(uint8_t *dev_addr, * @fn int32_t rsi_ble_remove_gatt_service(uint32_t service_handler) * @brief Remove the GATT service record. This is a Blocking API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] service_handle - GATT service record handle * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4D0A - BLE profile not found (profile handler invalid) - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D0A - BLE profile not found (profile handler invalid) * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - */ int32_t rsi_ble_remove_gatt_service(uint32_t service_handler); @@ -3874,18 +3387,14 @@ int32_t rsi_ble_remove_gatt_service(uint32_t service_handler); * @fn int32_t rsi_ble_remove_gatt_attibute(uint32_t service_handler, uint16_t att_hndl) * @brief Remove the GATT attribute record. This is a Blocking API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] service_handle - GATT service record handle * @param[in] att_hndl - attribute handle * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4D06 - Attribute record not found - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D06 - Attribute record not found * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - */ int32_t rsi_ble_remove_gatt_attibute(uint32_t service_handler, uint16_t att_hndl); @@ -3895,21 +3404,17 @@ int32_t rsi_ble_remove_gatt_attibute(uint32_t service_handler, uint16_t att_hndl * uint8_t opcode, uint8_t err) * @brief Send attribute error response for any of the att request. This is a Blocking API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - attribute handle * @param[in] opcode - error response opcode * @param[in] error_code - specific error related Gatt * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * 0x4D04 - BLE not Connected - * - - * 0x4E62 - Invalid Parameters - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D04 - BLE not Connected + * - 0x4E62 - Invalid Parameters * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - */ int32_t rsi_ble_att_error_response(uint8_t *dev_addr, uint16_t handle, uint8_t opcode, uint8_t err); /** @} */ @@ -3922,22 +3427,17 @@ int32_t rsi_ble_att_error_response(uint8_t *dev_addr, uint16_t handle, uint8_t o /** * @fn int32_t rsi_ble_mtu_exchange_event(uint8_t *dev_addr, uint8_t mtu_size) * @brief Initiates the MTU exchange request with the remote device. - * - * This is a Blocking API and will receive a callback event \ref rsi_ble_on_mtu_event_t as the response for this API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] mtu_size - requested MTU value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * 0x4D04 - BLE not Connected - * - - * 0x4E62 - Invalid Parameters - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D04 - BLE not Connected + * - 0x4E62 - Invalid Parameters * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - */ int32_t rsi_ble_mtu_exchange_event(uint8_t *dev_addr, uint8_t mtu_size); @@ -3946,17 +3446,15 @@ int32_t rsi_ble_mtu_exchange_event(uint8_t *dev_addr, uint8_t mtu_size); * @fn int32_t rsi_ble_mtu_exchange_resp(uint8_t *dev_addr, uint8_t mtu_size) * @brief This function (Exchange MTU Response) is sent in reply to a received Exchange MTU Request. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - Remote Device Address * @param[in] mtu_size - requested MTU value * @return The following values are returned: - * - 0 - Success - * - - * 0x4D0C - When RSI_BLE_MTU_EXCHANGE_FROM_HOST BIT is not SET. - * 0x4D05 - BLE Socket Not Available. - * Non-Zero Value - Failure - * Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * + * - 0 - Success + * - 0x4D0C - When RSI_BLE_MTU_EXCHANGE_FROM_HOST BIT is not SET. + * - 0x4D05 - BLE Socket Not Available. + * - Non-Zero Value - Failure + * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) */ int32_t rsi_ble_mtu_exchange_resp(uint8_t *dev_addr, uint8_t mtu_size); /** @} */ @@ -3970,23 +3468,17 @@ int32_t rsi_ble_mtu_exchange_resp(uint8_t *dev_addr, uint8_t mtu_size); * @fn int32_t rsi_ble_gatt_write_response(uint8_t *dev_addr, uint8_t type) * @brief Send the response to the write request received from the remote device. This is a Blocking API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] type - response type - * - - 0 - write response, - * - - 1 - execute write response. - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * 0x4046 - Invalid Arguments - * - - * 0x4D04 - BLE not Connected - * - + * - 0 - write response, + * - 1 - execute write response. + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4046 - Invalid Arguments + * - 0x4D04 - BLE not Connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - */ int32_t rsi_ble_gatt_write_response(uint8_t *dev_addr, uint8_t type); @@ -3999,22 +3491,18 @@ int32_t rsi_ble_gatt_write_response(uint8_t *dev_addr, uint8_t type); * uint8_t *data) * @brief Send the response for the prepare write requests received from the remote device. This is a Blocking API. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - attribute value handle * @param[in] offset - attribute value offset * @param[in] data_len - attribute value length * @param[in] data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * 0x4046 - Invalid Arguments - * - - * 0x4D04 - BLE not Connected - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4046 - Invalid Arguments + * - 0x4D04 - BLE not Connected * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) - * - */ int32_t rsi_ble_gatt_prepare_write_response(uint8_t *dev_addr, uint16_t handle, @@ -4031,11 +3519,10 @@ int32_t rsi_ble_gatt_prepare_write_response(uint8_t *dev_addr, * @brief Get maximum advertising data length * @param[out] resp Maximum supported advertising data length returned by the controller. Possible values range from 0x001F to 0x0672. * @return The following values are returned: - * - 0 = success + * - 0 = success * @return The following values are returned: - * - !0 = failure - * @note - * This function requests the controller to return the maximum supported advertising data length. + * - !0 = failure + * @note This function requests the controller to return the maximum supported advertising data length. */ int32_t rsi_ble_get_max_adv_data_len(uint8_t *resp); @@ -4045,13 +3532,11 @@ int32_t rsi_ble_get_max_adv_data_len(uint8_t *resp); * @brief Get maximum number of advertising sets * @param[out] resp Number of supported advertising sets returned by the controller. Possible values range from 0x01 to 0xF0. * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure - * @note - * This function requests the controller to return the maximum number of supporting advertising sets. - * @note - * The number of supported advertising sets can be configured through the operating modes. + * !0 = failure + * @note This function requests the controller to return the maximum number of supporting advertising sets. + * @note The number of supported advertising sets can be configured through the operating modes. */ int32_t rsi_ble_get_max_no_of_supp_adv_sets(uint8_t *resp); @@ -4062,9 +3547,9 @@ int32_t rsi_ble_get_max_no_of_supp_adv_sets(uint8_t *resp); * @param[in] handle The advertising handle used to identify an advertising set * @param[in] rand_addr Random device address set to either a static or private address * @return The following values are returned: - * - 0 = success + * - 0 = success * @return The following values are returned: - * - !0 = failure + * - !0 = failure */ int32_t rsi_ble_set_ae_set_random_address(uint8_t handle, uint8_t *rand_addr); @@ -4074,12 +3559,11 @@ int32_t rsi_ble_set_ae_set_random_address(uint8_t handle, uint8_t *rand_addr); * @brief Update AE advertiser data * @param[in] ble_ae_data Extended Advertising data to be updated * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure - * @note - * This function sets the AE advertiser data used in advertising PDUs. - * @note Refer to Bluetooth specification 5.3 for possible combinations ae_adv/scanresp data can be set for . + * !0 = failure + * @note This function sets the AE advertiser data used in advertising PDUs. + * @note Refer to Bluetooth specification 5.3 for possible combinations ae_adv/scanresp data can be set for . */ int32_t rsi_ble_set_ae_data(void *ble_ae_data); @@ -4090,9 +3574,9 @@ int32_t rsi_ble_set_ae_data(void *ble_ae_data); * @param[in] ble_ae_params Extended Advertising parameters to be updated * @param[out] sel_tx_power Output transmit power in dBm, ranging from -127 to +20. * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure */ int32_t rsi_ble_set_ae_params(void *ble_ae_params, int8_t *sel_tx_pwr); @@ -4102,9 +3586,9 @@ int32_t rsi_ble_set_ae_params(void *ble_ae_params, int8_t *sel_tx_pwr); * @brief Enable or disable AE advertising * @param[in] adv_enable Parameters to enable or disable specific advertising sets identified by advertising handle * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure */ int32_t rsi_ble_start_ae_advertising(void *adv_enable); @@ -4115,9 +3599,9 @@ int32_t rsi_ble_start_ae_advertising(void *adv_enable); * @param[in] type Set to 1 to clear, or 2 to remove an advertising set * @param[in] handle Advertising handle identifying the advertising set to remove or clear. Possible values range from 0x00 to 0xEF. * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure */ int32_t rsi_ble_app_adv_set_clear_or_remove(uint8_t type, uint8_t handle); @@ -4127,9 +3611,9 @@ int32_t rsi_ble_app_adv_set_clear_or_remove(uint8_t type, uint8_t handle); * @brief Update periodic AE parameters * @param[in] periodic_adv_params Periodic advertising parameters to be updated * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure */ int32_t rsi_ble_app_set_periodic_ae_params(void *periodic_adv_params); @@ -4140,9 +3624,9 @@ int32_t rsi_ble_app_set_periodic_ae_params(void *periodic_adv_params); * @param[in] enable Set to 0 to enable, or 1 to include the ADI field in AUX_SYNC_IND PDUs * @param[in] handle Advertising handle of the advertising set to enable or disable * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure * @note * This function requests the controller to enable or disable periodic advertising for the specified advertising set. */ @@ -4154,9 +3638,9 @@ int32_t rsi_ble_app_set_periodic_ae_enable(uint8_t enable, uint8_t handle); * @brief Update AE scan parameters * @param[in] ae_scan_params Extended scan parameters to be updated * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure * @note * This function sets the extended scan parameters to be used on the physical advertising channels. */ @@ -4168,9 +3652,9 @@ int32_t rsi_ble_ae_set_scan_params(void *ae_scan_params); * @brief Enable or disable legacy and extended scanning * @param[in] ae_scan_enable Parameters specify whether to enable or disable both legacy and extended advertising PDUs * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure */ int32_t rsi_ble_ae_set_scan_enable(void *ae_scan_enable); @@ -4181,11 +3665,11 @@ int32_t rsi_ble_ae_set_scan_enable(void *ae_scan_enable); * @param[in] type Set to 1 to begin, 2 to cancel, or 3 to terminate the periodic advertising sync * @param[in] periodic_sync_data Parameters for starting a perodic advertising sync operation * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - 0x4E42 = unknown advertising identifier + * 0x4E42 = unknown advertising identifier * @return The following values are returned: - * - 0x4E0C = command not permitted + * 0x4E0C = command not permitted * @note * This function performs an operation to synchronize with a periodic advertising train from an advertiser and begin receiving periodic advertising packets. * @note @@ -4199,9 +3683,9 @@ int32_t rsi_ble_ae_set_periodic_sync(uint8_t type, void *periodic_sync_data); * @brief Manage a device in the periodic advertiser list * @param[in] dev_to_list Details of a device to be added to the periodic advertiser list * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure * @note * This function adds, removes, or clears a device from the periodic advertiser list. */ @@ -4213,9 +3697,9 @@ int32_t rsi_ble_ae_dev_to_periodic_list(void *dev_to_list); * @brief Get periodic advertiser list size * @param[out] resp Periodic advertiser list size returned by the controller * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure */ int32_t rsi_ble_ae_read_periodic_adv_list_size(uint8_t *resp); @@ -4225,9 +3709,9 @@ int32_t rsi_ble_ae_read_periodic_adv_list_size(uint8_t *resp); * @brief Establish ACL connection to advertiser * @param[in] ble_extended_conn_params Connection parameters * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure * @note * This function establishes an ACL connection to an advertiser, with the local device in the BLE central role. */ @@ -4239,9 +3723,9 @@ int32_t rsi_ble_extended_connect_with_params(void *ext_create_conn); * @brief Get supported transmit power range * @param[out] resp Minimum and maximum supported transmit power, returned by the controller. Power ranges from -127 dBm to +20 dBm. * @return The following values are returned: - * - 0 = success + * 0 = success * @return The following values are returned: - * - !0 = failure + * !0 = failure * @note * This function requests the controller to return the minimum and maximum supported transmit power. */ @@ -4270,28 +3754,22 @@ int32_t rsi_ble_read_transmit_power(void *resp); * called after the profiles list event is received. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_profiles_list_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[out] p_profile_list - profiles/services information will be filled in this structure after retrieving from the remote device, please refer rsi_ble_resp_profiles_list_s structure for more info. - * - + * * @note p_prof_list structure should be passed as NULL because nothing will be filled in this structure - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - - * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . * + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available + * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_get_profiles_async(uint8_t *dev_addr, @@ -4308,28 +3786,19 @@ int32_t rsi_ble_get_profiles_async(uint8_t *dev_addr, * the service characteristics response is received. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_one_event_profile_by_uuid_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] profile_uuid - services/profiles which are searched using profile_uuid - * - * @param[out] p_profile - profile / service information filled in this structure after retrieving from the remote device, - please refer profile_descriptor_s structure for more info. - * - + * please refer profile_descriptor_s structure for more info. * @note p_profile structure should be passed as NULL because nothing will be filled in this structure - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . - * */ int32_t rsi_ble_get_profile_async(uint8_t *dev_addr, uuid_t profile_uuid, profile_descriptors_t *p_profile); @@ -4344,29 +3813,22 @@ int32_t rsi_ble_get_profile_async(uint8_t *dev_addr, uuid_t profile_uuid, profil * the included service characteristics response is received. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_read_by_char_services_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[out] p_char_services_list - service characteristics details are filled in this structure, please refer rsi_ble_resp_char_serv_s structure for more info. - * - - * @note p_char_services_list structure should be passed as NULL because nothing will be filled in this structure - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - - * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . * + * @note p_char_services_list structure should be passed as NULL because nothing will be filled in this structure + * + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available + * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_get_char_services_async(uint8_t *dev_addr, uint16_t start_handle, @@ -4384,27 +3846,20 @@ int32_t rsi_ble_get_char_services_async(uint8_t *dev_addr, * the service characteristics response is received. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_read_by_inc_services_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[out] p_inc_serv_list - include service characteristics details are filled in this structure, please refer rsi_ble_resp_inc_serv structure for more info. - * - - * @note p_inc_serv_list structure should be passed as NULL because nothing will be filled in this structure - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - + * + * @note p_inc_serv_list structure should be passed as NULL because nothing will be filled in this structure + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_get_inc_services_async(uint8_t *dev_addr, @@ -4424,28 +3879,20 @@ int32_t rsi_ble_get_inc_services_async(uint8_t *dev_addr, * after the attribute value is received. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_read_att_value_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * - \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[in] char_uuid - UUID of the characteristic * @param[out] p_char_value - characteristic value is filled in this structure, please refer rsi_ble_resp_att_value_s structure for more info. - * - - * @note p_char_value structure should be passed as NULL because nothing will be filled in this structure - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - + * @note p_char_value structure should be passed as NULL because nothing will be filled in this structure + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_get_char_value_by_uuid_async(uint8_t *dev_addr, @@ -4464,26 +3911,21 @@ int32_t rsi_ble_get_char_value_by_uuid_async(uint8_t *dev_addr, * callback function is called after the attribute descriptors response is received. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_gatt_desc_val_event_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] start_handle - start handle (index) of the remote device's service records * @param[in] end_handle - end handle (index) of the remote device's service records * @param[out] p_att_desc - pointer to characteristic descriptor structure, Please refer rsi_ble_resp_att_descs_s strcuture for more info. - * - + * * @note p_att_desc structure should be passed as NULL because nothing will be filled in this structure - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - + * + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_get_att_descriptors_async(uint8_t *dev_addr, @@ -4499,26 +3941,18 @@ int32_t rsi_ble_get_att_descriptors_async(uint8_t *dev_addr, * \ref rsi_ble_on_event_read_resp_t callback function is called upon receiving the attribute value. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_read_resp_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - handle value of the attribute * @param[out] p_att_val - attribute value is filled in this structure, Please refer rsi_ble_resp_att_value_s structure for more info. - * - - * @note p_att_val structure should be passed as NULL because nothing will be filled in this structure - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - + * @note p_att_val structure should be passed as NULL because nothing will be filled in this structure + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_get_att_value_async(uint8_t *dev_addr, uint16_t handle, rsi_ble_resp_att_value_t *p_att_val); @@ -4533,26 +3967,18 @@ int32_t rsi_ble_get_att_value_async(uint8_t *dev_addr, uint16_t handle, rsi_ble_ * \ref rsi_ble_on_event_read_resp_t callback function is called after the attribute value is received. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_read_resp_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] num_of_handlers - number of handles in the list * @param[in] handles - list of attribute handles * @param[out] p_att_vals - attribute values filled in this structure, please refer rsi_ble_resp_att_value_s structure for more info. - * - - * @note p_att_vals structure should be passed as NULL because nothing will be filled in this structure - * - - - * @return The following values are returned: - * - 0 - Success - * - - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - + * @note p_att_vals structure should be passed as NULL because nothing will be filled in this structure + * @return The following values are returned: + * - 0 - Success + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_get_multiple_att_values_async(uint8_t *dev_addr, @@ -4570,27 +3996,19 @@ int32_t rsi_ble_get_multiple_att_values_async(uint8_t *dev_addr, * \ref rsi_ble_on_event_read_resp_t callback function is called after the attribute value is received. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_read_resp_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - attribute handle * @param[in] offset - offset within the attribute value * @param[out] p_att_vals - attribute value filled in this structure, please refer rsi_ble_resp_att_value_s structure for more info. - * - - * @note p_att_vals structure should be passed as NULL because nothing will be filled in this structure - * - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - + * @note p_att_vals structure should be passed as NULL because nothing will be filled in this structure + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_get_long_att_value_async(uint8_t *dev_addr, @@ -4606,24 +4024,18 @@ int32_t rsi_ble_get_long_att_value_async(uint8_t *dev_addr, * callback function is called after the attribute set action is completed. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_write_resp_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] handle - attribute value handle * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_set_att_value_async(uint8_t *dev_addr, uint16_t handle, uint8_t data_len, uint8_t *p_data); @@ -4639,23 +4051,18 @@ int32_t rsi_ble_set_att_value_async(uint8_t *dev_addr, uint16_t handle, uint8_t * callback function is called after the prepare attribute write action is completed. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_prepare_write_resp_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API + * \ref rsi_ble_connect() API needs to be called before this API * @param[in] dev_addr - remote device address * @param[in] handle - attribute handle * @param[in] offset - attribute value offset * @param[in] data_len - attribute value length * @param[in] p_data - attribute value * @return The following values are returned: - * - 0 - Success - * - - * 0x4E60 - Invalid Handle range - * - - * 0x4E62 - Invalid Parameters - * - - * 0x4D04 - BLE not connected - * - - * 0x4D05 - BLE Socket not available - * - + * - 0 - Success + * - 0x4E60 - Invalid Handle range + * - 0x4E62 - Invalid Parameters + * - 0x4D04 - BLE not connected + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_prepare_write_async(uint8_t *dev_addr, @@ -4671,22 +4078,15 @@ int32_t rsi_ble_prepare_write_async(uint8_t *dev_addr, * callback function is called after the execute attribute write action is completed. This is a blocking API and can unblock the application * on the reception of the callback functions either \ref rsi_ble_on_event_write_resp_t or \ref rsi_ble_on_gatt_error_resp_t. * @pre Pre-conditions: - * - \ref rsi_ble_connect() API needs to be called before this API. + * \ref rsi_ble_connect() API needs to be called before this API. * @param[in] dev_addr - remote device address * @param[in] exe_flag - execute flag to write, possible values mentioned below - * - - 0 - BLE_ATT_EXECUTE_WRITE_CANCEL - * - - 1 - BLE_ATT_EXECUTE_PENDING_WRITES_IMMEDIATELY - * - - - * @return The following values are returned: - * - 0 - Success - * - - * Non-Zero Value - Failure - * - - * 0x4D05 - BLE Socket not available - * - + * - 0 - BLE_ATT_EXECUTE_WRITE_CANCEL + * - 1 - BLE_ATT_EXECUTE_PENDING_WRITES_IMMEDIATELY + * @return The following values are returned: + * - 0 - Success + * - Non-Zero Value - Failure + * - 0x4D05 - BLE Socket not available * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_ble_execute_write_async(uint8_t *dev_addr, uint8_t exe_flag); @@ -4727,10 +4127,10 @@ uint32_t rsi_ble_cbfc_disconnect(uint8_t *dev_addr, uint16_t lcid); * @brief The callback function will be called if advertise report event is received * @param[out] rsi_ble_event_adv contains the advertise report information. Please refer rsi_ble_event_adv_report_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the advertise event report is received from the module - * - + * * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_adv_report_event_t)(rsi_ble_event_adv_report_t *rsi_ble_event_adv); @@ -4740,10 +4140,9 @@ typedef void (*rsi_ble_on_adv_report_event_t)(rsi_ble_event_adv_report_t *rsi_bl * @brief The callback function will be called if BLE connection status is received * @param[out] rsi_ble_event_conn contains the BLE connection status. Please refer rsi_ble_event_conn_status_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the BLE connection status is received from the module. For BLE 4.1 and lower version this callback will be called - * - * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_connect_t)(rsi_ble_event_conn_status_t *rsi_ble_event_conn); @@ -4753,10 +4152,9 @@ typedef void (*rsi_ble_on_connect_t)(rsi_ble_event_conn_status_t *rsi_ble_event_ * @brief The callback function will be called if BLE connection status is received * @param[out] rsi_ble_event_conn contains the BLE connection status. Please refer rsi_ble_event_enhance_conn_status_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the BLE connection status is received from the module. For BLE 4.2 and above version this callback will be called - * - * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_enhance_connect_t)(rsi_ble_event_enhance_conn_status_t *rsi_ble_event_enhance_conn); @@ -4766,25 +4164,17 @@ typedef void (*rsi_ble_on_enhance_connect_t)(rsi_ble_event_enhance_conn_status_t * @brief The callback function will be called if disconnect event is received * @param[out] rsi_ble_event_disconnect contains the disconnect status. Please refer rsi_ble_event_disconnect_s for more info. * @param[out] reason contains reason for failure. - * - * @note Few reason for failure are given below - * - * 0x4E13 Remote user terminated connection - * - * 0x4E14 Remote device terminated connection due to low resources - * - * 0x4E15 Remote device terminated connection due to power off - * - * 0x4E3D Connection terminated due to MIC failure - * - * 0x4E3E Connection Failed to be Established - * - * 0x4E60 Invalid Handle Range * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the disconnect status event is received from the module - * - * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_disconnect_t)(rsi_ble_event_disconnect_t *rsi_ble_event_disconnect, uint16_t reason); @@ -4794,10 +4184,9 @@ typedef void (*rsi_ble_on_disconnect_t)(rsi_ble_event_disconnect_t *rsi_ble_even * @brief The callback function will be called if le ping payload timeout expired event is received * @param[out] rsi_ble_event_disconnect contains the disconnect status. Please refer rsi_ble_event_le_ping_time_expired_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the le ping time expired event is received from the module - * - * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_le_ping_payload_timeout_t)( @@ -4808,10 +4197,9 @@ typedef void (*rsi_ble_on_le_ping_payload_timeout_t)( * @brief The callback function will be called if LE LTK request event is received * @param[out] rsi_ble_event_le_ltk_request contains the LTK request info. Please refer rsi_bt_event_le_ltk_request_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if LE LTK request event is received from the module - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_le_ltk_req_event_t)(rsi_bt_event_le_ltk_request_t *rsi_ble_event_le_ltk_request); @@ -4821,10 +4209,9 @@ typedef void (*rsi_ble_on_le_ltk_req_event_t)(rsi_bt_event_le_ltk_request_t *rsi * @brief The callback function will be called if LE security keys event is received * @param[out] rsi_bt_event_le_security_keys_t contains security keys. Please refer rsi_bt_event_le_security_keys_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if LE security keys event is received from the module - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_le_security_keys_t)(rsi_bt_event_le_security_keys_t *rsi_ble_event_le_security_keys); @@ -4842,10 +4229,9 @@ typedef void (*rsi_ble_on_le_security_keys_t)(rsi_bt_event_le_security_keys_t *r * @param[out] resp_status contains the response status (Success or Error code) * @param[out] remote_dev_address contains the smp requested device address. Please refer rsi_bt_event_smp_req_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the smp request is received from the remote device - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_smp_request_t)(rsi_bt_event_smp_req_t *remote_dev_address); @@ -4856,10 +4242,9 @@ typedef void (*rsi_ble_on_smp_request_t)(rsi_bt_event_smp_req_t *remote_dev_addr * @brief The callback function will be called if smp request is received in peripheral mode * @param[out] remote_dev_address contains the smp resp information. please refer rsi_bt_event_smp_resp_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the smp request is received from the remote device - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_smp_response_t)(rsi_bt_event_smp_resp_t *remote_dev_address); @@ -4871,10 +4256,9 @@ typedef void (*rsi_ble_on_smp_response_t)(rsi_bt_event_smp_resp_t *remote_dev_ad * @param[out] resp_status, contains the response status (Success or Error code) * @param[out] remote_dev_address contains the remote device address. please refer rsi_bt_event_smp_passkey_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the smp passkey is received from the module - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_smp_passkey_t)(rsi_bt_event_smp_passkey_t *remote_dev_address); @@ -4886,10 +4270,9 @@ typedef void (*rsi_ble_on_smp_passkey_t)(rsi_bt_event_smp_passkey_t *remote_dev_ * @param[out] resp_status contains the response status (Success or Error code) * @param[out] smp_passkey_display contains the smp passkey display information. Please refer rsi_bt_event_smp_passkey_display_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the smp passkey display is received from the module - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_smp_passkey_display_t)(rsi_bt_event_smp_passkey_display_t *smp_passkey_display); @@ -4899,36 +4282,23 @@ typedef void (*rsi_ble_on_smp_passkey_display_t)(rsi_bt_event_smp_passkey_displa * @typedef void (*rsi_ble_on_smp_failed_t)(uint16_t resp_status, rsi_bt_event_smp_failed_t *remote_dev_address); * @brief The callback function will be called if smp failed event is received from module * @param[out] resp_status contains the response status (Success or Error code) - * - - * @note Error codes for SMP FAILED are given below - * - + * @note Error codes for SMP FAILED are given below: * 0x4B01 SMP Passkey entry failed - * - * 0x4B02 SMP OOB not available - * - * 0x4B03 SMP Authentication Requirements - * - * 0x4B04 SMP confirm value failed - * - * 0x4B05 SMP Pairing not supported - * - * 0x4B06 SMP Encryption key size insufficient - * - * 0x4B07 SMP command not supported - * - * 0x4B08 SMP Unspecified Reason - * - * 0x4B09 SMP repeated attempts - * - * 0x4B0C SMP Numeric Comparison Failed - * - * 0x4B0B DHKEY Check Failed * @param[out] remote_dev_address contains the remote device address. Please refer rsi_bt_event_smp_failed_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the smp process is failed with remote device - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_smp_failed_t)(uint16_t resp_status, rsi_bt_event_smp_failed_t *remote_dev_address); @@ -4939,10 +4309,9 @@ typedef void (*rsi_ble_on_smp_failed_t)(uint16_t resp_status, rsi_bt_event_smp_f * @brief The callback function will be called if security method event is received from module * @param[out] scmethod contains Security Method 1 means Just works or 2 means Passkey. Please refer rsi_bt_event_sc_method_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the SC method is done with remote device - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_sc_method_t)(rsi_bt_event_sc_method_t *scmethod); @@ -4954,10 +4323,9 @@ typedef void (*rsi_ble_on_sc_method_t)(rsi_bt_event_sc_method_t *scmethod); * @param[out] resp_status contains the response status (Success or Error code) * @param[out] enc_enabled contains encryption information. Please refer rsi_bt_event_encryption_enabled_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the encryption process is started with remote device - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_encrypt_started_t)(uint16_t resp_status, rsi_bt_event_encryption_enabled_t *enc_enabled); @@ -4968,10 +4336,9 @@ typedef void (*rsi_ble_on_encrypt_started_t)(uint16_t resp_status, rsi_bt_event_ * @brief The callback function will be called if BLE Secure connection passkey event received from module * @param[out] sc_passkey contains LE SC Passkey information. Please refer rsi_bt_event_encryption_enabled_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the BLE Secure connection passkey event received - * - * This callback has to be registered using rsi_ble_smp_register_callbacks API */ typedef void (*rsi_ble_on_sc_passkey_t)(rsi_bt_event_sc_passkey_t *sc_passkey); @@ -4981,10 +4348,9 @@ typedef void (*rsi_ble_on_sc_passkey_t)(rsi_bt_event_sc_passkey_t *sc_passkey); * @brief The callback function will be called when PHY update complete event is received * @param[out] rsi_ble_event_phy_update_complete contains the controller support PHY information. Please refer rsi_ble_event_phy_update_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when PHY update complete event is received - * - * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_phy_update_complete_t)(rsi_ble_event_phy_update_t *rsi_ble_event_phy_update_complete); @@ -4996,10 +4362,9 @@ typedef void (*rsi_ble_on_phy_update_complete_t)(rsi_ble_event_phy_update_t *rsi * @param[out] rsi_ble_event_conn_update_complete contains the controller support conn information. Please refer rsi_ble_event_conn_update_s for more info. * @param[out] resp_status contains the response status (Success or Error code) * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when conn update complete event is received - * - * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_conn_update_complete_t)(rsi_ble_event_conn_update_t *rsi_ble_event_conn_update_complete, @@ -5012,10 +4377,9 @@ typedef void (*rsi_ble_on_conn_update_complete_t)(rsi_ble_event_conn_update_t *r * @param[out] resp_status contains the response status (Success or Error code) * @param[out] rsi_ble_event_remote_features contains the remote device supported features. Please refer rsi_ble_event_remote_features_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when remote conn params request is received - * - * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_remote_conn_params_request_t)( @@ -5027,10 +4391,9 @@ typedef void (*rsi_ble_on_remote_conn_params_request_t)( * @brief Callback function to peer device supported features. * @param[out] rsi_ble_event_remote_features contains the remote device supported features. Please refer rsi_ble_event_remote_features_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when conn update complete event is received - * - * This callback has to be registered using rsi_ble_gap_extended_register_callbacks API */ typedef void (*rsi_ble_on_remote_features_t)(rsi_ble_event_remote_features_t *rsi_ble_event_remote_features); @@ -5040,10 +4403,9 @@ typedef void (*rsi_ble_on_remote_features_t)(rsi_ble_event_remote_features_t *rs * @brief Callback function to LE more data request * @param[out] rsi_ble_more_data_evt contains the LE Device Buffer Indication information. Please refer rsi_ble_event_le_dev_buf_ind_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when LE more data event is received - * - * This callback has to be registered using rsi_ble_gap_extended_register_callbacks API */ typedef void (*rsi_ble_on_le_more_data_req_t)(rsi_ble_event_le_dev_buf_ind_t *rsi_ble_more_data_evt); @@ -5054,10 +4416,9 @@ typedef void (*rsi_ble_on_le_more_data_req_t)(rsi_ble_event_le_dev_buf_ind_t *rs * @brief This event is raised when data length is update in controller * @param[out] remote_dev_address contains the controller support TX and RX length information. Please refer rsi_ble_event_data_length_update_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when data length update complete event is received - * - * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_data_length_update_t)(rsi_ble_event_data_length_update_t *remote_dev_address); @@ -5067,10 +4428,9 @@ typedef void (*rsi_ble_on_data_length_update_t)(rsi_ble_event_data_length_update * @brief The callback function will be called if directed advertise report event is received * @param[in] rsi_ble_event_directed, contains the advertise report information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the advertise event report is received from the module - * - * This callback has to be registered using rsi_ble_gap_register_callbacks API */ typedef void (*rsi_ble_on_directed_adv_report_event_t)(rsi_ble_event_directedadv_report_t *rsi_ble_event_directed); @@ -5093,7 +4453,7 @@ typedef void (*rsi_ble_on_directed_adv_report_event_t)(rsi_ble_event_directedadv * @param[in] ble_on_conn_update_complete_event - Callback function for conn update complete events * @param[in] ble_on_remote_conn_params_request_event - Callback function to remote conn params request events * @return The following values are returned: - * - void + * void */ void rsi_ble_gap_register_callbacks(rsi_ble_on_adv_report_event_t ble_on_adv_report_event, rsi_ble_on_connect_t ble_on_conn_status_event, @@ -5110,12 +4470,12 @@ void rsi_ble_gap_register_callbacks(rsi_ble_on_adv_report_event_t ble_on_adv_rep /** * @brief Register GAP Extended responses/events callbacks. * @pre Pre-conditions: - * - Device should be initialized before calling this API. + * Device should be initialized before calling this API. * @param[in] ble_on_remote_features_event - Call back function for Remote feature request * @param[in] ble_on_le_more_data_req_event - Call back function for LE More data request * @note For more information about each callback, please refer to GAP Extended callbacks description section. * @return The following values are returned: - * - void + * void */ void rsi_ble_gap_extended_register_callbacks(rsi_ble_on_remote_features_t ble_on_remote_features_event, @@ -5146,7 +4506,7 @@ int32_t rsi_ble_adv_ext_events_register_callbacks(uint16_t callback_id, * @param[in] ble_on_le_security_keys_event - This is the SMP security keys callback * @param[in] ble_on_sc_method_event - sc method display callback * @return The following values are returned: - * - void + * void */ void rsi_ble_smp_register_callbacks(rsi_ble_on_smp_request_t ble_on_smp_request_event, rsi_ble_on_smp_response_t ble_on_smp_response_event, @@ -5172,39 +4532,24 @@ void rsi_ble_smp_register_callbacks(rsi_ble_on_smp_request_t ble_on_smp_request_ * @typedef void (*rsi_ble_on_gatt_error_resp_t)(uint16_t event_status, rsi_ble_event_error_resp_t *rsi_ble_gatt_error); * @brief The callback function will be called if GATT error event is received * @param[out] event_status contains the error response - * - * Non-Zero Value - Failure - * - - * @note Attribute protocol error codes - * - + * Attribute protocol error codes * 0x4A01 - Invalid Handle - * - * 0x4A06 - Request not supported - * - * 0x4A0A - Attribute not found - * - * 0x4A05 - Insufficient authentication - * - * 0x4A08 - Insufficient authorization - * - * 0x4A0C - Insufficient encryption key size - * - * 0x4A0F - Insufficient encryption - * - - * 0x4A02 - Read not permitted - * - + * 0x4A02 - Read not permitted * 0x4A03 - Write not permitted - * - * 0x4A07 - Invalid offset - * - * 0x4A0B - Attribute not Long - * - * @param[out] rsi_ble_gatt_error contains the GATT error information. Please refer rsi_ble_event_error_resp_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the GATT error event is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_gatt_error_resp_t)(uint16_t event_status, rsi_ble_event_error_resp_t *rsi_ble_gatt_error); @@ -5213,17 +4558,14 @@ typedef void (*rsi_ble_on_gatt_error_resp_t)(uint16_t event_status, rsi_ble_even rsi_ble_event_gatt_desc_t *rsi_ble_gatt_desc_val); * @brief The callback function will be called if attribute descriptors event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure + * * @param[out] rsi_ble_gatt_desc_val contains the profiles list event information. Please refer rsi_ble_event_gatt_desc_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the attribute descriptors event is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_gatt_desc_val_event_t)(uint16_t event_status, @@ -5234,17 +4576,15 @@ typedef void (*rsi_ble_on_gatt_desc_val_event_t)(uint16_t event_status, rsi_ble_event_profiles_list_t *rsi_ble_event_profiles); * @brief The callback function will be called if profiles list event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure + * * @param[out] rsi_ble_event_profiles contains the profiles list event information. Please refer rsi_ble_event_profiles_list_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the profiles list response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_event_profiles_list_t)(uint16_t event_status, @@ -5255,17 +4595,15 @@ typedef void (*rsi_ble_on_event_profiles_list_t)(uint16_t event_status, rsi_ble_event_profile_by_uuid_t *rsi_ble_event_profile); * @brief The callback function will be called if profile event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure + * * @param[out] rsi_ble_event_profile contains the profile response information. Please refer rsi_ble_event_profile_by_uuid_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the profile response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_event_profile_by_uuid_t)(uint16_t event_status, @@ -5275,17 +4613,15 @@ typedef void (*rsi_ble_on_event_profile_by_uuid_t)(uint16_t event_status, rsi_ble_event_read_by_type1_t *rsi_ble_event_read_type1); * @brief The callback function will be called if characteristic services list event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure * @param[out] rsi_ble_event_read_type1 contains the char services event information. Please refer rsi_ble_event_read_by_type1_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the characteristic services list response is received from the module - * - + * * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_event_read_by_char_services_t)(uint16_t event_status, @@ -5296,17 +4632,15 @@ typedef void (*rsi_ble_on_event_read_by_char_services_t)(uint16_t event_status, rsi_ble_event_read_by_type2_t *rsi_ble_event_read_type2); * @brief The callback function will be called if include services list event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure * @param[out] rsi_ble_event_read_type2 contains the inc services information. Please refer rsi_ble_event_read_by_type2_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the include services list response is received from the module - * - + * * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_event_read_by_inc_services_t)(uint16_t event_status, @@ -5316,17 +4650,14 @@ typedef void (*rsi_ble_on_event_read_by_inc_services_t)(uint16_t event_status, rsi_ble_event_read_by_type3_t *rsi_ble_event_read_type3); * @brief The callback function will be called if attribute value event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure * @param[out] rsi_ble_event_read_type3 contains the char services event information. Please refer rsi_ble_event_read_by_type3_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the attribute value response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_event_read_att_value_t)(uint16_t event_status, @@ -5336,17 +4667,14 @@ typedef void (*rsi_ble_on_event_read_att_value_t)(uint16_t event_status, * @typedef void (*rsi_ble_on_event_read_resp_t)(uint16_t event_status, rsi_ble_event_att_value_t *rsi_ble_event_att_val); * @brief The callback function will be called if attribute value event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure * @param[out] rsi_ble_event_att_val contains the profile response information. Please refer rsi_ble_event_att_value_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the attribute value is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_event_read_resp_t)(uint16_t event_status, rsi_ble_event_att_value_t *rsi_ble_event_att_val); @@ -5355,17 +4683,15 @@ typedef void (*rsi_ble_on_event_read_resp_t)(uint16_t event_status, rsi_ble_even * @typedef void (*rsi_ble_on_event_write_resp_t)(uint16_t event_status, rsi_ble_set_att_resp_t *rsi_ble_event_set_att_rsp); * @brief The callback function will be called if GATT write event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure + * * @param[out] rsi_ble_event_set_att_rsp contains the profile response information. Please refer rsi_ble_set_att_resp_t for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the GATT write response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_event_write_resp_t)(uint16_t event_status, rsi_ble_set_att_resp_t *rsi_ble_event_set_att_rsp); @@ -5374,17 +4700,14 @@ typedef void (*rsi_ble_on_event_write_resp_t)(uint16_t event_status, rsi_ble_set rsi_ble_set_att_resp_t *rsi_ble_event_set_att_rsp); * @brief Callback function to be called if indication confirmation event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure * @param[out] rsi_ble_event_set_att_rsp contains the profile response information. Please refer rsi_ble_set_att_resp_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the indication confirmation response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_event_indicate_confirmation_t)(uint16_t event_status, @@ -5394,17 +4717,13 @@ typedef void (*rsi_ble_on_event_indicate_confirmation_t)(uint16_t event_status, rsi_ble_prepare_write_resp_t *rsi_ble_event_prepare_write); * @brief The callback function will be called if indication confirmation event is received * @param[out] event_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @param[out] rsi_ble_event_prepare_write contains the char services event information. Please refer rsi_ble_prepare_write_resp_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the GATT prepare response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_event_prepare_write_resp_t)(uint16_t event_status, @@ -5415,23 +4734,16 @@ typedef void (*rsi_ble_on_event_prepare_write_resp_t)(uint16_t event_status, rsi_ble_resp_profiles_list_t *rsi_ble_resp_profiles); * @brief The callback function will be called if profiles list response is received * @param[out] resp_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Attribute protocol error codes - * - * 0x4A01 - Invalid Handle - * - * 0x4A0A - Attribute not found - * - * @param[out] rsi_ble_resp_profiles contains the profiles list response information. Please refer rsi_ble_resp_profiles_list_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the profiles list response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_profiles_list_resp_t)(uint16_t resp_status, @@ -5441,25 +4753,17 @@ typedef void (*rsi_ble_on_profiles_list_resp_t)(uint16_t resp_status, * @typedef void (*rsi_ble_on_profile_resp_t)(uint16_t resp_status, profile_descriptors_t *rsi_ble_resp_profile); * @brief The callback function will be called if profile response is received * @param[out] resp_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Attribute protocol error codes - * - * 0x4A01 - Invalid Handle - * - * 0x4A06 - Request not supported - * - * 0x4A0A - Attribute not found - * - * @param[out] rsi_ble_resp_profile contains the profile response information. Please refer profile_descriptors_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the profile response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_profile_resp_t)(uint16_t resp_status, profile_descriptors_t *rsi_ble_resp_profile); @@ -5469,35 +4773,23 @@ typedef void (*rsi_ble_on_profile_resp_t)(uint16_t resp_status, profile_descript rsi_ble_resp_char_services_t *rsi_ble_resp_char_serv); * @brief The callback function will be called if service characteristics response is received * @param[out] resp_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure * @note Attribute protocol error codes - * - * 0x4A01 - Invalid Handle - * - * 0x4A06 - Request not supported - * - * 0x4A0A - Attribute not found - * - * 0x4A05 - Insufficient authentication - * - * 0x4A08 - Insufficient authorization - * - * 0x4A0C - Insufficient encryption key size - * - * 0x4A0F - Insufficient encryption - * - - * 0x4A02 - Read not permitted - * - + * 0x4A02 - Read not permitted * @param[out] rsi_ble_resp_char_serv contains the service characteristics response information. Please refer rsi_ble_resp_char_services_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the service characteristics response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_char_services_resp_t)(uint16_t resp_status, @@ -5508,35 +4800,23 @@ typedef void (*rsi_ble_on_char_services_resp_t)(uint16_t resp_status, rsi_ble_resp_inc_services_t *rsi_ble_resp_inc_serv); * @brief The callback function will be called if include services response is received * @param[out] resp_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure * @note Attribute protocol error codes - * - * 0x4A01 - Invalid Handle - * - * 0x4A06 - Request not supported - * - * 0x4A0A - Attribute not found - * - * 0x4A05 - Insufficient authentication - * - * 0x4A08 - Insufficient authorization - * - * 0x4A0C - Insufficient encryption key size - * - * 0x4A0F - Insufficient encryption - * - - * 0x4A02 - Read not permitted - * - + * 0x4A02 - Read not permitted * @param[out] rsi_ble_resp_inc_serv contains the include services response information. Please refer rsi_ble_resp_inc_services_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the include service response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_inc_services_resp_t)(uint16_t resp_status, @@ -5546,33 +4826,21 @@ typedef void (*rsi_ble_on_inc_services_resp_t)(uint16_t resp_status, * @typedef void (*rsi_ble_on_att_desc_resp_t)(uint16_t resp_status, rsi_ble_resp_att_descs_t *rsi_ble_resp_att_desc); * @brief The callback function will be called if attribute descriptors response is received * @param[out] resp_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Attribute protocol error codes - * - * 0x4A01 - Invalid Handle - * - * 0x4A0A - Attribute not found - * - * 0x4A05 - Insufficient authentication - * - * 0x4A08 - Insufficient authorization - * - * 0x4A0C - Insufficient encryption key size - * - * 0x4A0F - Insufficient encryption - * - - * 0x4A02 - Read not permitted - * - + * 0x4A02 - Read not permitted * @param[out] rsi_ble_resp_att_desc contains the attribute descriptors response information. Please refer rsi_ble_resp_att_descs_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the attribute descriptors response is received from the module - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_att_desc_resp_t)(uint16_t resp_status, rsi_ble_resp_att_descs_t *rsi_ble_resp_att_desc); @@ -5583,41 +4851,26 @@ typedef void (*rsi_ble_on_att_desc_resp_t)(uint16_t resp_status, rsi_ble_resp_at rsi_ble_resp_att_value_t *rsi_ble_resp_att_val); * @brief The callback function will be called upon receiving the attribute value * @param[out] resp_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * - 0 - Success + * - Non-Zero Value - Failure * @note Attribute protocol error codes - * - * 0x4A01 - Invalid Handle - * - * 0x4A0A - Attribute not found - * - * 0x4A05 - Insufficient authentication - * - * 0x4A08 - Insufficient authorization - * - * 0x4A0C - Insufficient encryption key size - * - * 0x4A0F - Insufficient encryption - * - - * 0x4A02 - Read not permitted - * - + * 0x4A02 - Read not permitted * 0x4A06 - Request not supported - * - * 0x4A07 - Invalid offset - * - * 0x4A0B - Attribute not Long - * - * @param[out] resp_id contains the response id because of which, this callback is called * response ids: (RSI_BLE_RSP_READ_VAL, RSI_BLE_RSP_READ_BY_UUID, RSI_BLE_RSP_LONG_READ, RSI_BLE_RSP_MULTIPLE_READ) * @param[out] rsi_ble_resp_att_val contains the attribute value. Please refer rsi_ble_resp_att_value_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called upon receiving the attribute value - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_read_resp_t)(uint16_t resp_status, @@ -5628,38 +4881,25 @@ typedef void (*rsi_ble_on_read_resp_t)(uint16_t resp_status, * @typedef void (*rsi_ble_on_write_resp_t)(uint16_t resp_status, uint16_t resp_id); * @brief The callback function will be called if the attribute set/prepare/execute action is completed * @param[out] resp_status contains the response status - * - - * 0 - Success - * - - * Non-Zero Value - Failure - * - + * + * - 0 - Success + * - Non-Zero Value - Failure * @note Attribute protocol error codes - * - - * 0x4A01 - Invalid Handle - * - + * 0x4A01 - Invalid Handle * 0x4A0A - Attribute not found - * - * 0x4A05 - Insufficient authentication - * - * 0x4A08 - Insufficient authorization - * - * 0x4A0C - Insufficient encryption key size - * - * 0x4A0F - Insufficient encryption - * - - * 0x4A03 - Write not permitted - * - + * 0x4A03 - Write not permitted * 0x4A07 - Invalid offset - * - * 0x4A0D - Invalid attribute value length - * - * @param[out] resp_id contains the response id because of which, this callback is called * response ids: (RSI_BLE_RSP_WRITE, RSI_BLE_RSP_WRITE_NO_ACK, RSI_BLE_RSP_LONG_WRITE, RSI_BLE_RSP_EXECUTE_WRITE) * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the attribute set/prepare/execute action is completed - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_write_resp_t)(uint16_t resp_status, uint16_t resp_id); @@ -5675,13 +4915,11 @@ typedef void (*rsi_ble_on_write_resp_t)(uint16_t resp_status, uint16_t resp_id); * @typedef void (*rsi_ble_on_gatt_write_event_t)(uint16_t event_id, rsi_ble_event_write_t *rsi_ble_write); * @brief The callback function will be called if the GATT write/notify/indicate events are received * @param[out] event_id contains the gatt_write event id (RSI_BLE_EVENT_GATT_WRITE) - * - * @param[out] rsi_ble_write contains the GATT event information. Please refer rsi_ble_event_write_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the GATT write/notify/indicate events are received - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_gatt_write_event_t)(uint16_t event_id, rsi_ble_event_write_t *rsi_ble_write); @@ -5690,13 +4928,11 @@ typedef void (*rsi_ble_on_gatt_write_event_t)(uint16_t event_id, rsi_ble_event_w * @typedef void (*rsi_ble_on_gatt_prepare_write_event_t)(uint16_t event_id, rsi_ble_event_prepare_write_t *rsi_ble_write); * @brief The callback function will be called if the GATT prepare events are received * @param[out] event_id contains the gatt_prepare_write event id (RSI_BLE_EVENT_PREPARE_WRITE) - * - * @param[out] rsi_ble_write contains the GATT prepare event information. Please refer rsi_ble_event_prepare_write_s for more info * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the GATT prepare event is received - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_gatt_prepare_write_event_t)(uint16_t event_id, rsi_ble_event_prepare_write_t *rsi_ble_write); @@ -5705,13 +4941,12 @@ typedef void (*rsi_ble_on_gatt_prepare_write_event_t)(uint16_t event_id, rsi_ble * @typedef void (*rsi_ble_on_execute_write_event_t)(uint16_t event_id, rsi_ble_execute_write_t *rsi_ble_execute_write); * @brief The callback function will be called if the GATT execute events are received * @param[out] event_id contains the gatt_execute_write event id (RSI_BLE_EVENT_EXECUTE_WRITE) - * - + * * @param[out] rsi_ble_write contains the GATT event information. Please refer rsi_ble_execute_write_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the GATT execute event is received - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_execute_write_event_t)(uint16_t event_id, rsi_ble_execute_write_t *rsi_ble_execute_write); @@ -5720,13 +4955,11 @@ typedef void (*rsi_ble_on_execute_write_event_t)(uint16_t event_id, rsi_ble_exec * @typedef void (*rsi_ble_on_read_req_event_t)(uint16_t event_id, rsi_ble_read_req_t *rsi_ble_read_req); * @brief The callback function will be called if the GATT read request events are received * @param[out] event_id contains the gatt_read_req_event id (RSI_BLE_EVENT_READ_REQ) - * - * @param[out] rsi_ble_write contains the GATT event information. Please refer rsi_ble_read_req_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called if the GATT read request event is received - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_read_req_event_t)(uint16_t event_id, rsi_ble_read_req_t *rsi_ble_read_req); @@ -5736,10 +4969,9 @@ typedef void (*rsi_ble_on_read_req_event_t)(uint16_t event_id, rsi_ble_read_req_ * @brief The callback function will be called if MTU size request is received. * @param[out] rsi_ble_event_mtu contains the MTU size information. Please refer rsi_ble_event_mtu_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when connected to indicate MTU size - * - * This callback has to be registered using rsi_ble_gatt_register_callbacks API */ typedef void (*rsi_ble_on_mtu_event_t)(rsi_ble_event_mtu_t *rsi_ble_event_mtu); @@ -5749,10 +4981,9 @@ typedef void (*rsi_ble_on_mtu_event_t)(rsi_ble_event_mtu_t *rsi_ble_event_mtu); * @brief Callback function to indicate MTU size and who initiated MTU Exchange Request * @param[out] rsi_ble_event_mtu_exchange_info contains the MTU exchange information. Please refer rsi_ble_event_mtu_exchange_information_s for more info. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when connected, this event will contain MTU Exchange Information - * - * This callback has to be registered using rsi_ble_gatt_extended_register_callbacks API */ typedef void (*rsi_ble_on_mtu_exchange_info_t)( @@ -5762,14 +4993,12 @@ typedef void (*rsi_ble_on_mtu_exchange_info_t)( * @callback rsi_ble_on_remote_device_info_t * @brief Callback function to peer device information. * @param[out] resp_status, contains the response status (Success or Error code) - * - - * 0 - SUCCESS - * - - * Non-Zero Value - ErrorCodes + * - 0 - SUCCESS + * - Non-Zero Value - ErrorCodes * @note Refer Bluetooth Generic Error Codes section up to 0x4FF8 from \ref error-codes. * @param[out] resp_buffer, contains the remote device version information. * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when conn update complete event is received * This callback has to be registered using rsi_ble_enhanced_gap_extended_register_callbacks API @@ -5789,7 +5018,7 @@ typedef void (*rsi_ble_on_rcp_resp_rcvd_t)(uint16_t status, rsi_ble_event_rcp_rc * @param[in] * @param[in] rsi_ble_cbfc_conn_req, contains the connection request information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when connected to indicate connection request * This callback has to be registered using rsi_ble_l2cap_cbfc_callbacks API @@ -5803,7 +5032,7 @@ typedef void (*rsi_ble_on_cbfc_conn_req_event_t)(rsi_ble_event_cbfc_conn_req_t * * @param[in] * @param[in] rsi_ble_cbfc_conn_complete, contains the connection completed information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when connected to indicate connection complete status * This callback has to be registered using rsi_ble_l2cap_cbfc_callbacks API @@ -5817,7 +5046,7 @@ typedef void (*rsi_ble_on_cbfc_conn_complete_event_t)(rsi_ble_event_cbfc_conn_co * @param[in] * @param[in] rsi_ble_cbfc_rx_data, contains the received data information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when connected to indicate received data * This callback has to be registered using rsi_ble_l2cap_cbfc_callbacks API @@ -5830,7 +5059,7 @@ typedef void (*rsi_ble_on_cbfc_rx_data_event_t)(rsi_ble_event_cbfc_rx_data_t *rs * @param[in] * @param[in] rsi_ble_cbfc_disconn, contains the disconnect device information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when connected to indicate disconnect l2cap connection * This callback has to be registered using rsi_ble_l2cap_cbfc_callbacks API @@ -5853,7 +5082,7 @@ typedef void (*chip_ble_buffers_stats_handler_t)(chip_ble_buffers_stats_t *chip_ * @brief Callback function to report the AE Advertisements * @param[out] rsi_ble_event_ae_report, contains the controller support AE Adv packets information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when AE adv report event is received * This callback has to be registered using rsi_ble_ae_events_register_callbacks API @@ -5865,7 +5094,7 @@ typedef void (*rsi_ble_ae_report_complete_t)(uint16_t resp_status, rsi_ble_ae_ad * @brief Callback function to report the AE periodic sync established event * @param[out] rsi_ble_event_per_adv_sync_estbl, contains the controller support AE periodic sync established information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when AE periodic sync established event is received * This callback has to be registered using rsi_ble_ae_events_register_callbacks API @@ -5878,7 +5107,7 @@ typedef void (*rsi_ble_ae_per_adv_sync_estbl_t)(uint16_t resp_status, * @brief Callback function to report the AE periodic advertisement event * @param[out] rsi_ble_event_per_adv_report, contains the controller support AE periodic advertisement information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when AE periodic advertisement event is received * This callback has to be registered using rsi_ble_ae_events_register_callbacks API @@ -5891,7 +5120,7 @@ typedef void (*rsi_ble_ae_per_adv_report_t)(uint16_t resp_status, * @brief Callback function to report the AE periodic sync lost event * @param[out] rsi_ble_event_per_adv_sync_lost, contains the controller support AE periodic sync lost information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when AE periodic sync lost event is received * This callback has to be registered using rsi_ble_ae_events_register_callbacks API @@ -5904,7 +5133,7 @@ typedef void (*rsi_ble_ae_per_adv_sync_lost_t)(uint16_t resp_status, * @brief Callback function to report the AE scan timeout event * @param[out] rsi_ble_event_scan_timeout, contains the controller support AE scan timeout information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when AE scan timeout is received * This callback has to be registered using rsi_ble_ae_events_register_callbacks API @@ -5916,7 +5145,7 @@ typedef void (*rsi_ble_ae_scan_timeout_t)(uint16_t resp_status, rsi_ble_scan_tim * @brief Callback function to report the AE advertising set terminated event * @param[out] rsi_ble_event_adv_set_terminated, contains the controller support AE advertising set terminated information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when AE advertising set terminated is received * This callback has to be registered using rsi_ble_ae_events_register_callbacks API @@ -5929,7 +5158,7 @@ typedef void (*rsi_ble_ae_adv_set_terminated_t)(uint16_t resp_status, * @brief Callback function to report the AE scan request received event * @param[out] rsi_ble_event_scan_req_recvd, contains the controller support AE scan request received information * @return The following values are returned: - * - void + * void * @section description * This callback function will be called when AE scan request received is received * This callback has to be registered using rsi_ble_ae_events_register_callbacks API @@ -5966,7 +5195,7 @@ typedef void (*rsi_ble_ae_scan_req_recvd_t)(uint16_t resp_status, * @param[in] rsi_ble_on_event_indicate_confirmation_t ble_on_indicate_confirmation_event- Callback function for indicate confirmation event * @param[in] rsi_ble_on_event_prepare_write_resp_t ble_on_prepare_write_resp_event - Callback function for prepare write event * @return The following values are returned: - * - void + * void * */ void rsi_ble_gatt_register_callbacks(rsi_ble_on_profiles_list_resp_t ble_on_profiles_list_resp, @@ -5998,7 +5227,7 @@ void rsi_ble_gatt_register_callbacks(rsi_ble_on_profiles_list_resp_t ble_on_prof * @brief Register the GATT Extended responses/events callbacks. * @param[in] rsi_ble_on_mtu_exchange_info_t ble_on_mtu_exchange_info_event - Call back function for MTU Exchange information Event * @return The following values are returned: - * - void + * void * */ void rsi_ble_gatt_extended_register_callbacks(rsi_ble_on_mtu_exchange_info_t ble_on_mtu_exchange_info_event); diff --git a/components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h b/components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h index 450a354c5..3a8729467 100644 --- a/components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h +++ b/components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h @@ -63,16 +63,13 @@ extern "C" { * @fn int32_t rsi_bt_set_bd_addr(uint8_t *dev_addr) * @brief Set the device BD address. This is a blocking API. * @pre Pre-conditions: - * - needs to be called immediately after device initialization. + * - needs to be called immediately after device initialization. * @param[in] dev_addr - public address of the device to be set -* * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure -*- - * -3 - Command is given in wrong state(i.e not immediate after opermode) - * @note -This is a blocking API.Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . + * - 0 - Success + * - Non-Zero Value - Failure + * - 3 - Command is given in wrong state (i.e., not immediate after opermode) + * @note This is a blocking API. Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors) . */ int32_t rsi_bt_set_bd_addr(uint8_t *dev_addr); @@ -85,11 +82,9 @@ int32_t rsi_bt_set_bd_addr(uint8_t *dev_addr); * @param[in] local_name - Name to be set to the local device. * @note For BLE alone Opermode : When the name of the local device is set to a value with length more than 16 bytes then error is returned with an error code 0x4E66. * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). - * */ int32_t rsi_bt_set_local_name(uint8_t *local_name); @@ -103,27 +98,17 @@ int32_t rsi_bt_set_local_name(uint8_t *local_name); * @param[in] payload_len - Length of the payload. * @param[in] payload - Payload containing table data of gain table offset/max power * @param[in] req_type - Update gain table request type - * - - * 0 - Max power update - * - - * 1 - Max power offset update - * - - * 2 - LP_Chain 0dBm offset update - * - - * 3 - LP_chain 10dBm offset update. + * - 0 - Max power update + * - 1 - Max power offset update + * - 2 - LP_Chain 0dBm offset update + * - 3 - LP_chain 10dBm offset update. * @return The following values are returned: - * - 0 - Success -*- - * 0x4F01 - Invalid gain table payload length -*- - * 0x4F02 - Invalid region. -*- - * 0x4F03 - Invalid gain table offset request type -*- - * 0x4F04 - Invalid node id. -* + * - 0 - Success + * - 0x4F01 - Invalid gain table payload length + * - 0x4F02 - Invalid region. + * - 0x4F03 - Invalid gain table offset request type + * - 0x4F04 - Invalid node id. * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). - * */ int32_t rsi_bt_cmd_update_gain_table_offset_or_max_pwr(uint8_t node_id, uint8_t payload_len, @@ -138,9 +123,8 @@ int32_t rsi_bt_cmd_update_gain_table_offset_or_max_pwr(uint8_t node_id, * - Device should be initialized before calling this API. * @param[out] bt_resp_get_local_name - This parameter is the response buffer to hold the response of this API. Please refer rsi_bt_resp_get_local_name_s structure for more info. * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). */ int32_t rsi_bt_get_local_name(rsi_bt_resp_get_local_name_t *bt_resp_get_local_name); @@ -154,9 +138,8 @@ int32_t rsi_bt_get_local_name(rsi_bt_resp_get_local_name_t *bt_resp_get_local_na * @param[in] dev_addr - Remote device address. * @param[out] resp - Parameter to hold the response of this API, RSSI is filled in this resp parameter. * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). */ int32_t rsi_bt_get_rssi(uint8_t *dev_addr, int8_t *resp); @@ -169,9 +152,8 @@ int32_t rsi_bt_get_rssi(uint8_t *dev_addr, int8_t *resp); * - Device should be initialized before calling this API. * @param[out] resp - Parameter to hold the response of this API, local bd_addr is filled in this resp parameter. * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). */ int32_t rsi_bt_get_local_device_address(uint8_t *resp); @@ -182,9 +164,8 @@ int32_t rsi_bt_get_local_device_address(uint8_t *resp); * @brief Get the BT stack version. This is a blocking API. * @param[out] bt_resp_get_bt_stack_version - Response buffer to hold the response of this API. Please refer rsi_bt_resp_get_bt_stack_version_s structure for more info * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). */ int32_t rsi_bt_get_bt_stack_version(rsi_bt_resp_get_bt_stack_version_t *bt_resp_get_bt_stack_version); @@ -194,14 +175,12 @@ int32_t rsi_bt_get_bt_stack_version(rsi_bt_resp_get_bt_stack_version_t *bt_resp_ * @fn int32_t rsi_bt_init(void) * @brief Initialize the BT device. This is a blocking API. * @pre Pre-conditions: - * - Device should be initialized before calling this API. -* - * If the device is in powersave, get back the device to ACTIVE MODE by using \ref rsi_bt_power_save_profile() + * - Device should be initialized before calling this API. + * - If the device is in powersave, get back the device to ACTIVE MODE by using \ref rsi_bt_power_save_profile() * @param None * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). */ int32_t rsi_bt_init(void); @@ -212,12 +191,10 @@ int32_t rsi_bt_init(void); * @brief Deinitialize the BT device. This is a blocking API. * @pre Pre-conditions: * - \ref Device should be initialized before this API. -* * @param None * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). */ int32_t rsi_bt_deinit(void); @@ -229,14 +206,11 @@ int32_t rsi_bt_deinit(void); * @pre Pre-conditions: * - Device should be initialized before calling this API. * @param[in] antenna_value - Parameter is used to select either internal or external antenna. Possible values: -*- - * 0x00 RSI_SEL_INTERNAL_ANTENNA -*- - * 0x01 RSI_SEL_EXTERNAL_ANTENNA + * - 0x00 RSI_SEL_INTERNAL_ANTENNA + * - 0x01 RSI_SEL_EXTERNAL_ANTENNA * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). */ int32_t rsi_bt_set_antenna(uint8_t antenna_value); @@ -248,47 +222,27 @@ int32_t rsi_bt_set_antenna(uint8_t antenna_value); * @pre Pre-conditions: * - Device should be initialized before calling this API * @param[in] psp_mode Following psp_mode is defined. -*- - * 0 - RSI_ACTIVE. In this mode module is active and power save is disabled. -*- - * 1 - RSI_SLEEP_MODE_1. On mode. In this sleep mode, SoC will never turn off, therefore no -*- + * - 0 - RSI_ACTIVE. In this mode module is active and power save is disabled. + * - 1 - RSI_SLEEP_MODE_1. On mode. In this sleep mode, SoC will never turn off, therefore no * handshake is required before sending data to the module. BT/BLE does not support this mode. -*- - * 2 - RSI_SLEEP_MODE_2. Connected sleep mode. In this sleep mode, SoC will go to sleep based -*- + * - 2 - RSI_SLEEP_MODE_2. Connected sleep mode. In this sleep mode, SoC will go to sleep based * on GPIO or Message, therefore handshake is required before sending data to the module. -*- - * 8 - RSI_SLEEP_MODE_8 :Deep sleep mode with RAM RETENTION. -*- - * 10- RSI_SLEEP_MODE_10 : Deep sleep mode without RAM RETENTION. -*- + * - 8 - RSI_SLEEP_MODE_8 :Deep sleep mode with RAM RETENTION. + * - 10- RSI_SLEEP_MODE_10 : Deep sleep mode without RAM RETENTION. * In this sleep mode, module will turn off the -*- * SoC. Since SoC is turn off, therefore handshake is required before sending data to the module. -*- * @param[in] psp_type Following psp_type is defined. -*- - * 0 - RSI_MAX_PSP. This psp_type will be used for max power saving -*- - * 1 - Fast PSP -*- + * - 0 - RSI_MAX_PSP. This psp_type will be used for max power saving + * - 1 - Fast PSP * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure -* + * - 0 - Success + * - Non-Zero Value - Failure * @note If the user wants to enable power save in CoEx mode (WLAN + BT LE) mode - It is mandatory to enable WLAN power save along with BT LE power save. -*- * @note The device will enter into power save if and only if both protocol (WLAN, BLE) power save modes are enabled. -*- * @note Refer to the Status Codes section for the above error codes at [additional-status-codes](../wiseconnect-api-reference-guide-err-codes/sl-additional-status-errors). * @note psp_type is only valid in psp_mode 2. -*- - * BT/BLE does not support in RSI_SLEEP_MODE_1. -*- - * BT/BLE supports only RSI_MAX_PSP mode. Remaining modes are not supported. - * + * - BT/BLE does not support in RSI_SLEEP_MODE_1. + * - BT/BLE supports only RSI_MAX_PSP mode. Remaining modes are not supported. */ int32_t rsi_bt_power_save_profile(uint8_t psp_mode, uint8_t psp_type); @@ -299,17 +253,13 @@ int32_t rsi_bt_power_save_profile(uint8_t psp_mode, uint8_t psp_type); * @pre Pre-conditions: * - Call \ref rsi_bt_per_tx() or rsi_bt_per_rx() before calling this API. * @param[in] cmd_type - Parameter to define the command id type for PER operation. -*- - * BT_PER_STATS_CMD_ID (0x08) - Command id enables PER statistics -*- - * BT_TRANSMIT_CMD_ID (0x15) - Command id enables PER transmit -*- - * BT_RECEIVE_CMD_ID (0x16) - Command id enables PER receive + * - BT_PER_STATS_CMD_ID (0x08) - Command id enables PER statistics + * - BT_TRANSMIT_CMD_ID (0x15) - Command id enables PER transmit + * - BT_RECEIVE_CMD_ID (0x16) - Command id enables PER receive * @param[in] rsi_bt_per_stats - reference to the response structure. Please refer to rsi_bt_per_stats_s structure for more info. * @return The following values are returned: - * - 0 - Success -*- - * Non-Zero Value - Failure + * - 0 - Success + * - Non-Zero Value - Failure * @note Refer Error Codes section for common error codes \ref error-codes . */ int32_t rsi_bt_per_stats(uint8_t cmd_type, struct rsi_bt_per_stats_s *per_stats); diff --git a/components/device/silabs/si91x/wireless/ble/inc/rsi_common.h b/components/device/silabs/si91x/wireless/ble/inc/rsi_common.h index f0efe4594..e2f995e2c 100644 --- a/components/device/silabs/si91x/wireless/ble/inc/rsi_common.h +++ b/components/device/silabs/si91x/wireless/ble/inc/rsi_common.h @@ -20,8 +20,6 @@ #include "sl_constants.h" -#include "rsi_timer.h" - #include "cmsis_os2.h" #include "sl_si91x_status.h" @@ -71,9 +69,7 @@ #endif #define RSI_BLE_CMD_LEN (300 + SIZE_OF_HEADROOM) -#define RSI_DRIVER_POOL_SIZE \ - sizeof(uint32_t) + ((((uint32_t)(sizeof(rsi_driver_cb_t))) + 3) & ~3) \ - + ((((uint32_t)(sizeof(rsi_driver_cb_non_rom_t))) + 3) & ~3) +#define RSI_DRIVER_POOL_SIZE sizeof(uint32_t) + ((((uint32_t)(sizeof(rsi_driver_cb_t))) + 3) & ~3) #define RSI_WAIT_TIME RSI_WAIT_FOREVER @@ -279,41 +275,18 @@ typedef enum rsi_device_state_e { typedef struct rsi_driver_cb_s { uint8_t endian; - void (*rsi_tx_done_handler)(sl_si91x_packet_t *); - rsi_bt_global_cb_t *bt_global_cb; rsi_bt_cb_t *bt_common_cb; rsi_bt_cb_t *ble_cb; - void (*unregistered_event_callback)(uint32_t event_num); - -#ifdef FW_LOGGING_ENABLE - sl_fw_log_cb_t *fw_log_cb; -#endif -} rsi_driver_cb_t; - -typedef struct rsi_driver_cb_non_rom { - osMutexId_t tx_mutex; -#if defined(SL_SI91X_PRINT_DBG_LOG) || defined(FW_LOGGING_ENABLE) +#if defined(SL_SI91X_PRINT_DBG_LOG) osMutexId_t debug_prints_mutex; #endif - osSemaphoreId_t common_cmd_sem; - osSemaphoreId_t common_cmd_send_sem; - uint8_t bt_wait_bitmap; - uint8_t bt_cmd_wait_bitmap; - - volatile uint32_t driver_timer_start; - rsi_timer_instance_t timer_start; volatile rsi_device_state_t device_state; -#ifndef RSI_WAIT_TIMEOUT_EVENT_HANDLE_TIMER_DISABLE - //error response handler pointer - void (*rsi_wait_timeout_handler_error_cb)(int32_t status, uint32_t cmd_type); -#endif -} rsi_driver_cb_non_rom_t; +} rsi_driver_cb_t; -extern rsi_driver_cb_non_rom_t *rsi_driver_cb_non_rom; extern rsi_driver_cb_t *rsi_driver_cb; /****************************************************** diff --git a/components/device/silabs/si91x/wireless/ble/inc/rsi_common_apis.h b/components/device/silabs/si91x/wireless/ble/inc/rsi_common_apis.h index 3a06a3221..0fb99f6a0 100644 --- a/components/device/silabs/si91x/wireless/ble/inc/rsi_common_apis.h +++ b/components/device/silabs/si91x/wireless/ble/inc/rsi_common_apis.h @@ -29,11 +29,11 @@ * ******************************************************/ #if !(defined(FRDM_K28F) || defined(MXRT_595s)) #if defined(SL_SI91X_PRINT_DBG_LOG) -#define LOG_PRINT(...) \ - { \ - osMutexAcquire(rsi_driver_cb_non_rom->debug_prints_mutex, 0xFFFFFFFFUL); \ - printf(__VA_ARGS__); \ - osMutexRelease(rsi_driver_cb_non_rom->debug_prints_mutex); \ +#define LOG_PRINT(...) \ + { \ + osMutexAcquire(rsi_driver_cb->debug_prints_mutex, 0xFFFFFFFFUL); \ + printf(__VA_ARGS__); \ + osMutexRelease(rsi_driver_cb->debug_prints_mutex); \ } #elif defined(DEBUGOUT) #define LOG_PRINT(...) DEBUGOUT(__VA_ARGS__) diff --git a/components/device/silabs/si91x/wireless/ble/inc/rsi_timer.h b/components/device/silabs/si91x/wireless/ble/inc/rsi_timer.h deleted file mode 100644 index 8a7103142..000000000 --- a/components/device/silabs/si91x/wireless/ble/inc/rsi_timer.h +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* -* @file rsi_timer.h -* @brief -******************************************************************************* -* # License -* Copyright 2020 Silicon Laboratories Inc. www.silabs.com -******************************************************************************* -* -* The licensor of this software is Silicon Laboratories Inc. Your use of this -* software is governed by the terms of Silicon Labs Master Software License -* Agreement (MSLA) available at -* www.silabs.com/about-us/legal/master-software-license-agreement. This -* software is distributed to you in Source Code format and is governed by the -* sections of the MSLA applicable to Source Code. -* -******************************************************************************/ - -#ifndef RSI_TIMER_H -#define RSI_TIMER_H -/****************************************************** - * * Macros - * ******************************************************/ -#define RSI_TIMER_NODE_0 0 -/****************************************************** - * * Constants - * ******************************************************/ -/****************************************************** - * * Enumerations - * ******************************************************/ -/****************************************************** - * * Type Definitions - * ******************************************************/ -typedef struct rsi_timer_instance_s { - uint32_t start_time; - uint32_t timeout; -} rsi_timer_instance_t; -/****************************************************** - * * Structures - * ******************************************************/ -/****************************************************** - * * Global Variables - * ******************************************************/ -/****************************************************** - * * Function Declarations - * ******************************************************/ -void rsi_timer_expiry_interrupt_handler(void); -uint32_t rsi_timer_read_counter(void); -uint32_t rsi_hal_gettickcount(void); -void rsi_init_timer(rsi_timer_instance_t *rsi_timer, uint32_t duration); -int32_t rsi_timer_expired(rsi_timer_instance_t *timer); -uint32_t rsi_timer_left(rsi_timer_instance_t *timer); - -#endif diff --git a/components/device/silabs/si91x/wireless/ble/src/rsi_bt_ble.c b/components/device/silabs/si91x/wireless/ble/src/rsi_bt_ble.c index cda100ee0..f8a36d6f7 100644 --- a/components/device/silabs/si91x/wireless/ble/src/rsi_bt_ble.c +++ b/components/device/silabs/si91x/wireless/ble/src/rsi_bt_ble.c @@ -26,8 +26,6 @@ sl_status_t sl_si91x_allocate_command_buffer(sl_wifi_buffer_t **host_buffer, void **buffer, uint32_t requested_buffer_size, uint32_t wait_duration_ms); -void rsi_bt_clear_wait_bitmap(uint16_t protocol_type, uint8_t sem_type); -void rsi_bt_set_wait_bitmap(uint16_t protocol_type, uint8_t sem_type); uint32_t rsi_get_bt_state(rsi_bt_cb_t *bt_cb); /* Include files @@ -41,83 +39,6 @@ uint32_t rsi_get_bt_state(rsi_bt_cb_t *bt_cb); #include "sl_si91x_host_interface.h" -/** @addtogroup DRIVER14 -* @{ -*/ -/** - * @brief Clear the Bluetooth wait bitmap - * @param[in] protocol_type - Protocol type - * @param[in] sem_type - Type - * @return void - * - */ - -void rsi_bt_clear_wait_bitmap(uint16_t protocol_type, uint8_t sem_type) -{ - - SL_PRINTF(SL_RSI_BT_CLEAR_WAIT_BITMAP_TRIGGER, - BLUETOOTH, - LOG_INFO, - "PROTOCOL_TYPE: %2x, SEM_TYPE: %1x", - protocol_type, - sem_type); -#ifndef RSI_BT_SEM_BITMAP - if (sem_type == BT_SEM) { - if (protocol_type == RSI_PROTO_BT_COMMON) { - rsi_driver_cb_non_rom->bt_wait_bitmap &= ~BIT(1); - } else if (protocol_type == RSI_PROTO_BT_CLASSIC) { - rsi_driver_cb_non_rom->bt_wait_bitmap &= ~BIT(2); - } else if (protocol_type == RSI_PROTO_BLE) { - rsi_driver_cb_non_rom->bt_wait_bitmap &= ~BIT(3); - } - } else if (sem_type == BT_CMD_SEM) { - if (protocol_type == RSI_PROTO_BT_COMMON) { - rsi_driver_cb_non_rom->bt_cmd_wait_bitmap &= ~BIT(1); - } else if (protocol_type == RSI_PROTO_BT_CLASSIC) { - rsi_driver_cb_non_rom->bt_cmd_wait_bitmap &= ~BIT(2); - } else if (protocol_type == RSI_PROTO_BLE) { - rsi_driver_cb_non_rom->bt_cmd_wait_bitmap &= ~BIT(3); - } - } -#endif -} -/** - * @brief Set the bt wait bitmap - * @param[in] protocol_type - Protocol - * @param[in] sem_type - Type - * @return void - * - */ -void rsi_bt_set_wait_bitmap(uint16_t protocol_type, uint8_t sem_type) -{ - - SL_PRINTF(SL_RSI_BT_SET_WAIT_BITMAP_TRIGGER, - BLUETOOTH, - LOG_INFO, - "PROTOCOL_TYPE: %2x, SEM_TYPE: %1x", - protocol_type, - sem_type); -#ifndef RSI_BT_SEM_BITMAP - if (sem_type == BT_SEM) { - if (protocol_type == RSI_PROTO_BT_COMMON) { - rsi_driver_cb_non_rom->bt_wait_bitmap |= BIT(1); - } else if (protocol_type == RSI_PROTO_BT_CLASSIC) { - rsi_driver_cb_non_rom->bt_wait_bitmap |= BIT(2); - } else if (protocol_type == RSI_PROTO_BLE) { - rsi_driver_cb_non_rom->bt_wait_bitmap |= BIT(3); - } - } else if (sem_type == BT_CMD_SEM) { - if (protocol_type == RSI_PROTO_BT_COMMON) { - rsi_driver_cb_non_rom->bt_cmd_wait_bitmap |= BIT(1); - } else if (protocol_type == RSI_PROTO_BT_CLASSIC) { - rsi_driver_cb_non_rom->bt_cmd_wait_bitmap |= BIT(2); - } else if (protocol_type == RSI_PROTO_BLE) { - rsi_driver_cb_non_rom->bt_cmd_wait_bitmap |= BIT(3); - } - } -#endif -} -/** @} */ /* * Global Variables * */ @@ -312,7 +233,6 @@ void rsi_bt_common_tx_done(sl_si91x_packet_t *pkt) // Set bt_common status as success rsi_bt_set_status(bt_cb, RSI_SUCCESS); - rsi_bt_clear_wait_bitmap(protocol_type, BT_SEM); // Post the semaphore which is waiting on driver_send API osSemaphoreRelease(bt_cb->bt_sem); } @@ -473,6 +393,7 @@ int32_t rsi_driver_process_bt_resp( void (*rsi_bt_async_callback_handler)(rsi_bt_cb_t *cb, uint16_t type, uint8_t *data, uint16_t length), uint16_t protocol_type) { + UNUSED_PARAMETER(protocol_type); SL_PRINTF(SL_RSI_DRIVER_PROCESS_BT_RESPONSE_TRIGGER, BLUETOOTH, LOG_INFO, "PROTOCOL_TYPE: %2x", protocol_type); uint16_t rsp_type = 0; @@ -548,7 +469,6 @@ int32_t rsi_driver_process_bt_resp( bt_cb->remote_ble_index = 0; /* assigning value to 0 after successful response */ } } - rsi_bt_clear_wait_bitmap(protocol_type, BT_SEM); // Signal the bt semaphore osSemaphoreRelease(bt_cb->bt_sem); } else { @@ -634,6 +554,7 @@ uint16_t rsi_driver_process_bt_resp_handler(void *rx_pkt) int8_t rsi_bt_cb_init(rsi_bt_cb_t *bt_cb, uint16_t protocol_type) { + UNUSED_PARAMETER(protocol_type); SL_PRINTF(SL_RSI_BT_CB_INIT_TRIGGER, BLUETOOTH, LOG_INFO, "PROTOCOL_TYPE: %2x", protocol_type); @@ -664,7 +585,6 @@ int8_t rsi_bt_cb_init(rsi_bt_cb_t *bt_cb, uint16_t protocol_type) retval = RSI_ERROR_SEMAPHORE_CREATE_FAILED; } - rsi_bt_clear_wait_bitmap(protocol_type, BT_CMD_SEM); osSemaphoreRelease(bt_cb->bt_cmd_sem); bt_cb->app_buffer = 0; @@ -708,7 +628,6 @@ void rsi_bt_common_init(void) // Get bt_common_cb structure pointer rsi_bt_cb_t *bt_common_cb = rsi_driver_cb->bt_common_cb; - rsi_bt_set_wait_bitmap(RSI_PROTO_BT_COMMON, BT_SEM); // Save expected response type bt_common_cb->expected_response_type = RSI_BT_EVENT_CARD_READY; bt_common_cb->sync_rsp = 1; @@ -2225,7 +2144,6 @@ int32_t rsi_bt_driver_send_cmd(uint16_t cmd, void *cmd_struct, void *resp) } // Get timeout based on cmd calculate_timeout_ms = rsi_bt_get_timeout(cmd, protocol_type); - rsi_bt_set_wait_bitmap(protocol_type, BT_CMD_SEM); if (bt_cb->bt_cmd_sem == NULL || (osSemaphoreAcquire(bt_cb->bt_cmd_sem, calculate_timeout_ms) != osOK)) { // LOG_PRINT("%s: Command ID:0x%x Command timed-out with:%d\n",__func__, cmd, calculate_timeout_ms); SL_PRINTF(SL_RSI_ERROR_BT_BLE_CMD_IN_PROGRESS, @@ -2238,19 +2156,6 @@ int32_t rsi_bt_driver_send_cmd(uint16_t cmd, void *cmd_struct, void *resp) return RSI_ERROR_BT_BLE_CMD_IN_PROGRESS; } -#ifdef BT_STACK_IN_HOST - // If allocation of packet fails - if (!bt_stack_buf_avail) { - rsi_bt_clear_wait_bitmap(protocol_type, BT_CMD_SEM); - osSemaphoreRelease(bt_cb->bt_cmd_sem); - - // Return packet allocation failure error - - SL_PRINTF(SL_RSI_ERROR_PKT_ALLOCATION_FAILURE, BLUETOOTH, LOG_ERROR, "COMMAND: %2x", cmd); - return RSI_ERROR_PKT_ALLOCATION_FAILURE; - } -#endif - // Allocate command buffer from ble pool status = sl_si91x_allocate_command_buffer(&buffer, (void **)&pkt, @@ -2258,7 +2163,6 @@ int32_t rsi_bt_driver_send_cmd(uint16_t cmd, void *cmd_struct, void *resp) calculate_timeout_ms); // If allocation of packet fails if (pkt == NULL) { - rsi_bt_clear_wait_bitmap(protocol_type, BT_CMD_SEM); osSemaphoreRelease(bt_cb->bt_cmd_sem); // Return packet allocation failure error @@ -2290,7 +2194,7 @@ int32_t rsi_bt_driver_send_cmd(uint16_t cmd, void *cmd_struct, void *resp) } if (bt_cb->buf_status || bt_cb->cmd_status || (bt_cb->state & RSI_BLE_CHECK_CMD)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); if (bt_cb->buf_status == SI_LE_BUFFER_IN_PROGRESS) { status = RSI_ERROR_BLE_DEV_BUF_IS_IN_PROGRESS; @@ -2310,7 +2214,6 @@ int32_t rsi_bt_driver_send_cmd(uint16_t cmd, void *cmd_struct, void *resp) bt_cb->buf_status = SI_LE_BUFFER_AVL; bt_cb->cmd_status = 0; - rsi_bt_clear_wait_bitmap(protocol_type, BT_CMD_SEM); osSemaphoreRelease(bt_cb->bt_cmd_sem); SL_PRINTF(SL_RSI_BLE_ERROR, BLUETOOTH, LOG_ERROR, "Status: %4x", status); @@ -2337,7 +2240,6 @@ int32_t rsi_bt_driver_send_cmd(uint16_t cmd, void *cmd_struct, void *resp) sl_si91x_driver_send_bt_command(cmd, SI91X_BT_CMD_QUEUE, buffer, bt_cb->sync_rsp); - rsi_bt_set_wait_bitmap(protocol_type, BT_SEM); if (bt_cb->bt_sem == NULL || (osSemaphoreAcquire(bt_cb->bt_sem, calculate_timeout_ms) != osOK)) { rsi_bt_set_status(bt_cb, RSI_ERROR_RESPONSE_TIMEOUT); SL_PRINTF(SL_RSI_SEMAPHORE_TIMEOUT, @@ -2346,13 +2248,6 @@ int32_t rsi_bt_driver_send_cmd(uint16_t cmd, void *cmd_struct, void *resp) " Command: %2x , Calculate_timeout_ms: %4x", cmd, calculate_timeout_ms); - -#ifndef RSI_WAIT_TIMEOUT_EVENT_HANDLE_TIMER_DISABLE - if (rsi_driver_cb_non_rom->rsi_wait_timeout_handler_error_cb != NULL) { - rsi_driver_cb_non_rom->rsi_wait_timeout_handler_error_cb(RSI_ERROR_RESPONSE_TIMEOUT, BT_CMD); - } -#endif - //LOG_PRINT("%s: Command ID:0x%x response timed-out with:%d\n",__func__, cmd, calculate_timeout_ms); } // Get command response status status = rsi_bt_get_status(bt_cb); @@ -2361,7 +2256,6 @@ int32_t rsi_bt_driver_send_cmd(uint16_t cmd, void *cmd_struct, void *resp) // Clear sync rsp variable bt_cb->sync_rsp = 0; - rsi_bt_clear_wait_bitmap(protocol_type, BT_CMD_SEM); // Post the semaphore which is waiting on driver_send API osSemaphoreRelease(bt_cb->bt_cmd_sem); diff --git a/components/device/silabs/si91x/wireless/ble/src/rsi_common_apis.c b/components/device/silabs/si91x/wireless/ble/src/rsi_common_apis.c index e4dff1dd6..0fabf6ef6 100644 --- a/components/device/silabs/si91x/wireless/ble/src/rsi_common_apis.c +++ b/components/device/silabs/si91x/wireless/ble/src/rsi_common_apis.c @@ -16,7 +16,6 @@ ******************************************************************************/ #include "rsi_common.h" -#include "rsi_timer.h" #include "rsi_ble.h" @@ -29,8 +28,6 @@ rsi_driver_cb_t *rsi_driver_cb = NULL; int32_t rsi_driver_memory_estimate(void); -rsi_driver_cb_non_rom_t *rsi_driver_cb_non_rom = NULL; - /** @addtogroup COMMON * @{ */ @@ -106,13 +103,9 @@ int32_t rsi_ble_driver_init(uint8_t *buffer, uint32_t length) rsi_driver_cb->endian = IS_BIG_ENDIAN; #endif - // Designate memory for common_cb - rsi_driver_cb_non_rom = (rsi_driver_cb_non_rom_t *)buffer; - buffer += sizeof(rsi_driver_cb_non_rom_t); - -#if defined(SL_SI91X_PRINT_DBG_LOG) || defined(FW_LOGGING_ENABLE) +#if defined(SL_SI91X_PRINT_DBG_LOG) // Creates debug prints mutex - rsi_driver_cb_non_rom->debug_prints_mutex = osMutexNew(NULL); + rsi_driver_cb->debug_prints_mutex = osMutexNew(NULL); #endif // Designate memory for bt_common_cb @@ -146,7 +139,7 @@ int32_t rsi_ble_driver_init(uint8_t *buffer, uint32_t length) } // Update state - rsi_driver_cb_non_rom->device_state = RSI_DRIVER_INIT_DONE; + rsi_driver_cb->device_state = RSI_DRIVER_INIT_DONE; SL_PRINTF(SL_DRIVER_INIT_EXIT, COMMON, LOG_INFO, "actual_length=%4x", actual_length); return actual_length; @@ -170,7 +163,7 @@ int32_t rsi_ble_driver_deinit(void) SL_PRINTF(SL_DRIVER_DEINIT_ENTRY, COMMON, LOG_INFO); uint32_t actual_length = 0; - if ((rsi_driver_cb_non_rom->device_state < RSI_DRIVER_INIT_DONE)) { + if ((rsi_driver_cb->device_state < RSI_DRIVER_INIT_DONE)) { // Command given in wrong state return RSI_ERROR_COMMAND_GIVEN_IN_WRONG_STATE; } @@ -180,28 +173,13 @@ int32_t rsi_ble_driver_deinit(void) return RSI_FAILURE; } - if (rsi_driver_cb_non_rom->tx_mutex) { - osMutexDelete(rsi_driver_cb_non_rom->tx_mutex); - } - -#ifdef FW_LOGGING_ENABLE - sl_fw_log_deinit(); -#endif -#if defined(SL_SI91X_PRINT_DBG_LOG) || defined(FW_LOGGING_ENABLE) - if (rsi_driver_cb_non_rom->debug_prints_mutex) { - osMutexDelete(rsi_driver_cb_non_rom->debug_prints_mutex); +#if defined(SL_SI91X_PRINT_DBG_LOG) + if (rsi_driver_cb->debug_prints_mutex) { + osMutexDelete(rsi_driver_cb->debug_prints_mutex); } #endif - if (rsi_driver_cb_non_rom->common_cmd_send_sem) { - osSemaphoreDelete(rsi_driver_cb_non_rom->common_cmd_send_sem); - } - - if (rsi_driver_cb_non_rom->common_cmd_sem) { - osSemaphoreDelete(rsi_driver_cb_non_rom->common_cmd_sem); - } - - // Create BT semaphore + // Delete BT semaphore if (rsi_driver_cb->bt_common_cb->bt_cmd_sem) { osSemaphoreDelete(rsi_driver_cb->bt_common_cb->bt_cmd_sem); } @@ -217,9 +195,8 @@ int32_t rsi_ble_driver_deinit(void) if (rsi_driver_cb->ble_cb->bt_sem) { osSemaphoreDelete(rsi_driver_cb->ble_cb->bt_sem); } - // rsi_vport_exit_critical(); - rsi_driver_cb_non_rom->device_state = RSI_DEVICE_STATE_NONE; + rsi_driver_cb->device_state = RSI_DEVICE_STATE_NONE; SL_PRINTF(SL_DRIVER_DEINIT_SEMAPHORE_DESTROY_FAILED_26, COMMON, LOG_INFO); return RSI_SUCCESS; } diff --git a/components/device/silabs/si91x/wireless/crypto/aead/sl_si91x_psa_aead.slcc b/components/device/silabs/si91x/wireless/crypto/aead/sl_si91x_psa_aead.slcc index 5e6501205..4b6377df7 100644 --- a/components/device/silabs/si91x/wireless/crypto/aead/sl_si91x_psa_aead.slcc +++ b/components/device/silabs/si91x/wireless/crypto/aead/sl_si91x_psa_aead.slcc @@ -13,6 +13,7 @@ source: define: - name: SLI_AEAD_DEVICE_SI91X requires: +- name: sl_si91x_psa_crypto - condition: ["psa_crypto_ccm"] name: sl_si91x_ccm - condition: ["psa_crypto_gcm"] diff --git a/components/device/silabs/si91x/wireless/crypto/aes/src/sl_si91x_aes.c b/components/device/silabs/si91x/wireless/crypto/aes/src/sl_si91x_aes.c index 298490533..f9324c91c 100644 --- a/components/device/silabs/si91x/wireless/crypto/aes/src/sl_si91x_aes.c +++ b/components/device/silabs/si91x/wireless/crypto/aes/src/sl_si91x_aes.c @@ -87,13 +87,13 @@ static sl_status_t sli_si91x_aes_pending(sl_si91x_aes_config_t *config, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); memcpy(output, packet->data, packet->length); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); free(request); return status; } @@ -113,9 +113,9 @@ static sl_status_t sli_si91x_aes_side_band(sl_si91x_aes_config_t *config, uint8_ request->total_msg_length = config->msg_length; request->encrypt_decryption = config->encrypt_decrypt; if (config->iv != NULL) { - request->IV = config->iv; + request->IV = (uint8_t *)config->iv; } - request->msg = config->msg; + request->msg = (uint8_t *)config->msg; request->output = output; request->key_info.key_type = config->key_config.b0.key_type; @@ -155,6 +155,11 @@ sl_status_t sl_si91x_aes(sl_si91x_aes_config_t *config, uint8_t *output) uint16_t total_length = config->msg_length; #ifdef SL_SI91X_SIDE_BAND_CRYPTO + (void)chunk_len; + (void)offset; + (void)aes_flags; + (void)total_length; + status = sli_si91x_aes_side_band(config, output); return status; #else diff --git a/components/device/silabs/si91x/wireless/crypto/attestation/src/sl_si91x_attestation.c b/components/device/silabs/si91x/wireless/crypto/attestation/src/sl_si91x_attestation.c index 40cc37fd5..af401c0c1 100644 --- a/components/device/silabs/si91x/wireless/crypto/attestation/src/sl_si91x_attestation.c +++ b/components/device/silabs/si91x/wireless/crypto/attestation/src/sl_si91x_attestation.c @@ -99,7 +99,7 @@ sl_status_t sl_si91x_attestation_get_token(uint8_t *token, uint16_t length, uint if (status != SL_STATUS_OK) { free(attest); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); #else @@ -113,7 +113,7 @@ sl_status_t sl_si91x_attestation_get_token(uint8_t *token, uint16_t length, uint if (status != SL_STATUS_OK) { free(attest); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_attestation_mutex); #endif @@ -124,7 +124,7 @@ sl_status_t sl_si91x_attestation_get_token(uint8_t *token, uint16_t length, uint memcpy(token, packet->data, packet->length); #endif - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); free(attest); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) diff --git a/components/device/silabs/si91x/wireless/crypto/ccm/src/sl_si91x_ccm.c b/components/device/silabs/si91x/wireless/crypto/ccm/src/sl_si91x_ccm.c index a7f570061..c7509acac 100644 --- a/components/device/silabs/si91x/wireless/crypto/ccm/src/sl_si91x_ccm.c +++ b/components/device/silabs/si91x/wireless/crypto/ccm/src/sl_si91x_ccm.c @@ -113,7 +113,7 @@ static sl_status_t sli_si91x_ccm_pending(sl_si91x_ccm_config_t *config, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -124,7 +124,7 @@ static sl_status_t sli_si91x_ccm_pending(sl_si91x_ccm_config_t *config, == config->msg_length + ((config->encrypt_decrypt == SL_SI91X_CCM_DECRYPT) ? 0 : config->tag_length)); memcpy(output, packet->data, packet->length); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); free(request); return status; } @@ -159,12 +159,12 @@ static sl_status_t sli_si91x_ccm_side_band(sl_si91x_ccm_config_t *config, uint8_ request->nonce_length = config->nonce_length; if (config->ad_length > 0) { - request->ad = config->ad; + request->ad = (uint8_t *)config->ad; } - if (chunk_length > 0) { - request->msg = config->msg; + if (config->msg_length > 0) { + request->msg = (uint8_t *)config->msg; } - request->nonce = config->nonce; + request->nonce = (uint8_t *)config->nonce; request->tag = config->tag; request->key_info.key_type = config->key_config.b0.key_type; @@ -193,10 +193,13 @@ static sl_status_t sli_si91x_ccm_side_band(sl_si91x_ccm_config_t *config, uint8_ sl_status_t sl_si91x_ccm(sl_si91x_ccm_config_t *config, uint8_t *output) { - uint16_t chunk_len = 0; - uint16_t offset = 0; - uint8_t ccm_flags = 0; sl_status_t status = SL_STATUS_FAIL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO + uint16_t chunk_len = 0; + uint16_t offset = 0; + uint8_t ccm_flags = 0; + uint16_t total_length = 0; +#endif SL_VERIFY_POINTER_OR_RETURN(config->msg, SL_STATUS_NULL_POINTER); @@ -209,12 +212,11 @@ sl_status_t sl_si91x_ccm(sl_si91x_ccm_config_t *config, uint8_t *output) status = SL_STATUS_INVALID_PARAMETER; } - uint16_t total_length = config->msg_length; - #ifdef SL_SI91X_SIDE_BAND_CRYPTO status = sli_si91x_ccm_side_band(config, output); - return status + return status; #else + total_length = config->msg_length; #if defined(SLI_MULTITHREAD_DEVICE_SI91X) if (crypto_ccm_mutex == NULL) { crypto_ccm_mutex = sl_si91x_crypto_threadsafety_init(crypto_ccm_mutex); diff --git a/components/device/silabs/si91x/wireless/crypto/chachapoly/src/sl_si91x_chachapoly.c b/components/device/silabs/si91x/wireless/crypto/chachapoly/src/sl_si91x_chachapoly.c index cdf0a5162..47a6c5b34 100644 --- a/components/device/silabs/si91x/wireless/crypto/chachapoly/src/sl_si91x_chachapoly.c +++ b/components/device/silabs/si91x/wireless/crypto/chachapoly/src/sl_si91x_chachapoly.c @@ -130,7 +130,7 @@ static sl_status_t sli_si91x_chachapoly_pending(sl_si91x_chachapoly_config_t *co &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -138,7 +138,7 @@ static sl_status_t sli_si91x_chachapoly_pending(sl_si91x_chachapoly_config_t *co memcpy(output, packet->data, packet->length); free(request); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -163,9 +163,7 @@ static sl_status_t sli_si91x_chachapoly_side_band(sl_si91x_chachapoly_config_t * if (config->chachapoly_mode > 3) return SL_STATUS_INVALID_PARAMETER; - if (config->key_config.b0.key_buffer == NULL) { - return SL_STATUS_INVALID_PARAMETER; - } + SL_VERIFY_POINTER_OR_RETURN(config->key_config.b0.key_buffer, SL_STATUS_NULL_POINTER); memset(request, 0, sizeof(sl_si91x_chachapoly_request_t)); @@ -176,16 +174,16 @@ static sl_status_t sli_si91x_chachapoly_side_band(sl_si91x_chachapoly_config_t * request->total_msg_length = config->msg_length; request->header_length = config->ad_length; - request->header_input = config->ad; - request->msg = config->msg; - request->output = config->output; + request->header_input = (uint8_t *)config->ad; + request->msg = (uint8_t *)config->msg; + request->output = output; request->key_info.key_type = config->key_config.b0.key_type; request->key_info.key_detail.key_size = config->key_config.b0.key_size; request->key_info.key_detail.key_spec.key_slot = config->key_config.b0.key_slot; request->key_info.key_detail.key_spec.wrap_iv_mode = config->key_config.b0.wrap_iv_mode; request->key_info.reserved = config->key_config.b0.reserved; - memcpy(request->nonce, config->nonce, SL_SI91X_IV_SIZE); + request->nonce = (uint8_t *)config->nonce; if (config->key_config.b0.wrap_iv_mode) { memcpy(request->key_info.key_detail.key_spec.wrap_iv, config->key_config.b0.wrap_iv, SL_SI91X_IV_SIZE); } @@ -206,20 +204,22 @@ static sl_status_t sli_si91x_chachapoly_side_band(sl_si91x_chachapoly_config_t * sl_status_t sl_si91x_chachapoly(sl_si91x_chachapoly_config_t *config, uint8_t *output) { + sl_status_t status = SL_STATUS_FAIL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO uint16_t chunk_len = 0; uint16_t offset = 0; uint8_t chachapoly_flags = 0; - sl_status_t status = SL_STATUS_FAIL; + uint16_t total_length = 0; +#endif SL_VERIFY_POINTER_OR_RETURN(config->msg, SL_STATUS_NULL_POINTER); - uint16_t total_length = config->msg_length; - #ifdef SL_SI91X_SIDE_BAND_CRYPTO status = sli_si91x_chachapoly_side_band(config, output); return status; -#endif +#else + total_length = config->msg_length; #if defined(SLI_MULTITHREAD_DEVICE_SI91X) if (crypto_chachapoly_mutex == NULL) { crypto_chachapoly_mutex = sl_si91x_crypto_threadsafety_init(crypto_chachapoly_mutex); @@ -269,4 +269,5 @@ sl_status_t sl_si91x_chachapoly(sl_si91x_chachapoly_config_t *config, uint8_t *o #endif return status; +#endif } diff --git a/components/device/silabs/si91x/wireless/crypto/ecdh/sl_si91x_psa_ecdh.slcc b/components/device/silabs/si91x/wireless/crypto/ecdh/sl_si91x_psa_ecdh.slcc index 7d357e7d5..3281267be 100644 --- a/components/device/silabs/si91x/wireless/crypto/ecdh/sl_si91x_psa_ecdh.slcc +++ b/components/device/silabs/si91x/wireless/crypto/ecdh/sl_si91x_psa_ecdh.slcc @@ -14,6 +14,7 @@ define: - name: SLI_ECDH_DEVICE_SI91X requires: - name: sl_si91x_ecdh +- name: sl_si91x_psa_crypto include: - path: inc diff --git a/components/device/silabs/si91x/wireless/crypto/ecdh/src/sl_si91x_ecdh.c b/components/device/silabs/si91x/wireless/crypto/ecdh/src/sl_si91x_ecdh.c index ddd14b487..8eab6e118 100644 --- a/components/device/silabs/si91x/wireless/crypto/ecdh/src/sl_si91x_ecdh.c +++ b/components/device/silabs/si91x/wireless/crypto/ecdh/src/sl_si91x_ecdh.c @@ -69,12 +69,14 @@ static sl_status_t sli_si91x_ecdh_add_sub(sl_si91x_ecdh_mode_t ecdh_mode, uint8_t *ry, uint8_t *rz) { - uint8_t size = 0; - uint16_t offset = 0; - sl_status_t status = SL_STATUS_FAIL; + uint8_t size = 0; + sl_status_t status = SL_STATUS_FAIL; + sl_wifi_buffer_t *buffer = NULL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO uint8_t *result = NULL; - sl_wifi_buffer_t *buffer = NULL; + uint16_t offset = 0; sl_si91x_packet_t *packet = NULL; +#endif SL_VERIFY_POINTER_OR_RETURN(sx, SL_STATUS_NULL_POINTER); SL_VERIFY_POINTER_OR_RETURN(sy, SL_STATUS_NULL_POINTER); @@ -102,7 +104,6 @@ static sl_status_t sli_si91x_ecdh_add_sub(sl_si91x_ecdh_mode_t ecdh_mode, request->ecdh_mode = ecdh_mode; request->ecdh_sub_mode = ecdh_sub_mode; #ifdef SL_SI91X_SIDE_BAND_CRYPTO - request->sx = sx; request->sy = sy; request->sz = sz; @@ -136,7 +137,7 @@ static sl_status_t sli_si91x_ecdh_add_sub(sl_si91x_ecdh_mode_t ecdh_mode, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); #else @@ -150,7 +151,7 @@ static sl_status_t sli_si91x_ecdh_add_sub(sl_si91x_ecdh_mode_t ecdh_mode, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdh_mutex); #endif @@ -166,7 +167,7 @@ static sl_status_t sli_si91x_ecdh_add_sub(sl_si91x_ecdh_mode_t ecdh_mode, memcpy(rz, (result + offset), SL_SI91X_ECDH_MAX_VECTOR_SIZE); #endif - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); free(request); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdh_mutex); @@ -213,12 +214,15 @@ sl_status_t sl_si91x_ecdh_point_multiplication(sl_si91x_ecdh_mode_t ecdh_mode, uint8_t *rz, uint8_t reverse) { - uint8_t size = 0; - uint16_t offset = 0; - sl_status_t status = SL_STATUS_FAIL; + + uint8_t size = 0; + sl_status_t status = SL_STATUS_FAIL; + sl_wifi_buffer_t *buffer = NULL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO uint8_t *result = NULL; - sl_wifi_buffer_t *buffer = NULL; + uint16_t offset = 0; sl_si91x_packet_t *packet = NULL; +#endif SL_VERIFY_POINTER_OR_RETURN(d, SL_STATUS_NULL_POINTER); SL_VERIFY_POINTER_OR_RETURN(sx, SL_STATUS_NULL_POINTER); @@ -280,7 +284,7 @@ sl_status_t sl_si91x_ecdh_point_multiplication(sl_si91x_ecdh_mode_t ecdh_mode, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); #else @@ -294,7 +298,7 @@ sl_status_t sl_si91x_ecdh_point_multiplication(sl_si91x_ecdh_mode_t ecdh_mode, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdh_mutex); #endif @@ -316,7 +320,7 @@ sl_status_t sl_si91x_ecdh_point_multiplication(sl_si91x_ecdh_mode_t ecdh_mode, reverse_digits(rz, size); } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); free(request); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdh_mutex); @@ -332,12 +336,14 @@ sl_status_t sl_si91x_ecdh_point_double(sl_si91x_ecdh_mode_t ecdh_mode, uint8_t *ry, uint8_t *rz) { - uint8_t size = 0; - uint16_t offset = 0; - sl_status_t status = SL_STATUS_FAIL; + uint8_t size = 0; + sl_status_t status = SL_STATUS_FAIL; + sl_wifi_buffer_t *buffer = NULL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO uint8_t *result = NULL; - sl_wifi_buffer_t *buffer = NULL; + uint16_t offset = 0; sl_si91x_packet_t *packet = NULL; +#endif SL_VERIFY_POINTER_OR_RETURN(sx, SL_STATUS_NULL_POINTER); SL_VERIFY_POINTER_OR_RETURN(sy, SL_STATUS_NULL_POINTER); @@ -391,7 +397,7 @@ sl_status_t sl_si91x_ecdh_point_double(sl_si91x_ecdh_mode_t ecdh_mode, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); #else @@ -405,7 +411,7 @@ sl_status_t sl_si91x_ecdh_point_double(sl_si91x_ecdh_mode_t ecdh_mode, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdh_mutex); #endif @@ -421,7 +427,7 @@ sl_status_t sl_si91x_ecdh_point_double(sl_si91x_ecdh_mode_t ecdh_mode, memcpy(rz, (result + offset), SL_SI91X_ECDH_MAX_VECTOR_SIZE); #endif - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); free(request); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdh_mutex); @@ -437,12 +443,14 @@ sl_status_t sl_si91x_ecdh_point_affine(sl_si91x_ecdh_mode_t ecdh_mode, uint8_t *ry, uint8_t *rz) { - uint8_t size = 0; - uint16_t offset = 0; - sl_status_t status = SL_STATUS_FAIL; + uint8_t size = 0; + sl_status_t status = SL_STATUS_FAIL; + sl_wifi_buffer_t *buffer = NULL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO uint8_t *result = NULL; - sl_wifi_buffer_t *buffer = NULL; + uint16_t offset = 0; sl_si91x_packet_t *packet = NULL; +#endif SL_VERIFY_POINTER_OR_RETURN(sx, SL_STATUS_NULL_POINTER); SL_VERIFY_POINTER_OR_RETURN(sy, SL_STATUS_NULL_POINTER); @@ -498,7 +506,7 @@ sl_status_t sl_si91x_ecdh_point_affine(sl_si91x_ecdh_mode_t ecdh_mode, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); #else @@ -512,7 +520,7 @@ sl_status_t sl_si91x_ecdh_point_affine(sl_si91x_ecdh_mode_t ecdh_mode, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdh_mutex); #endif @@ -528,7 +536,7 @@ sl_status_t sl_si91x_ecdh_point_affine(sl_si91x_ecdh_mode_t ecdh_mode, memcpy(rz, (result + offset), SL_SI91X_ECDH_MAX_VECTOR_SIZE); #endif - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); free(request); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdh_mutex); diff --git a/components/device/silabs/si91x/wireless/crypto/ecdsa/inc/sl_si91x_ecdsa.h b/components/device/silabs/si91x/wireless/crypto/ecdsa/inc/sl_si91x_ecdsa.h new file mode 100644 index 000000000..47a56fee5 --- /dev/null +++ b/components/device/silabs/si91x/wireless/crypto/ecdsa/inc/sl_si91x_ecdsa.h @@ -0,0 +1,135 @@ +/***************************************************************************/ /** + * @file + * @brief SL SI91X ECDSA Header file + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#pragma once +#include "sl_si91x_crypto.h" +#include "sl_status.h" + +/****************************************************** + * Constants + ******************************************************/ +/** + * @addtogroup CRYPTO_ECDSA_CONSTANTS + * @{ + */ + +typedef enum { + SL_SI91X_ECDSA_PRIV_KEY_SIZE_224 = 28, ///< private key size of 224 bits + SL_SI91X_ECDSA_PRIV_KEY_SIZE_256 = 32, ///< private key size of 256 bits + SL_SI91X_ECDSA_PUB_KEY_SIZE_224 = 57, ///< public key size of 57 bytes + SL_SI91X_ECDSA_PUB_KEY_SIZE_256 = 65 ///< public key size of 65 bytes +} sl_si91x_ecdsa_key_size_t; + +typedef enum { + SL_SI91X_GENERATE_ECC_KEY_PAIR = 1, ///< Generate ECC private public key pair + SL_SI91X_ECDSA_GENERATE_SIGN, ///< Generate signature + SL_SI91X_ECDSA_VERIFY_SIGN ///< Verify signature +} sl_si91x_crypto_ecdsa_mode_t; + +typedef enum { + SL_SI91X_ECDSA_SIGN_HALF_SIZE_P224R1 = 28, ///< signature size of 224 bits divided by 2 + SL_SI91X_ECDSA_SIGN_HALF_SIZE_P256R1 = 32, ///< signature size of 256 bits divided by 2 + SL_SI91X_ECDSA_SIGN_MAX_SIZE = 128, ///< maximum signature size supported +} sl_si91x_ecdsa_signature_size_t; + +typedef enum { + SL_SI91X_ECC_SECP224R1 = 14, ///< Values as provided by firmware + SL_SI91X_ECC_SECP256R1 = 7 +} sl_si91x_crypto_ecc_curve_t; + +typedef enum { + SL_SI91X_ECDSA_SHA_256 = 1, + SL_SI91X_ECDSA_SHA_384, + SL_SI91X_ECDSA_SHA_512, +} sl_si91x_crypto_ecdsa_sha_mode_t; + +/** @} */ + +/****************************************************** + * Type Definitions + ******************************************************/ +/** + * @addtogroup CRYPTO_ECDSA_TYPES + * @{ + */ + +typedef struct { + sl_si91x_crypto_key_type_t key_type; ///< Key type - wrapped or plain + sl_si91x_ecdsa_key_size_t key_size; ///< ecc key size + sl_si91x_crypto_key_slot_t key_slot; ///< Key slot + sl_si91x_crypto_wrap_mode_t wrap_iv_mode; ///< Wrap mode - ECB or CBC + uint8_t wrap_iv[SL_SI91X_IV_SIZE]; ///< IV used in SL_SI91X_AES_CBC and SL_SI91X_AES_CTR modes + uint32_t reserved; ///< Reserved for future use +} sl_si91x_ecdsa_key_config_b0_t; + +typedef struct { + uint16_t key_length; ///< Length of the key +} sl_si91x_ecdsa_key_config_a0_t; + +typedef union { + sl_si91x_ecdsa_key_config_a0_t a0; ///< Key configuration for non-B0 chip versions + sl_si91x_ecdsa_key_config_b0_t b0; ///< Key configuration for B0 chip versions +} sl_si91x_ecdsa_key_config_t; + +typedef struct { + sl_si91x_crypto_ecdsa_mode_t ecdsa_operation; ///< genereate ecc key pair, sign or verify + sl_si91x_crypto_ecc_curve_t curve_id; ///< curve ID for ecdsa + sl_si91x_crypto_ecdsa_sha_mode_t sha_mode; ///Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ + +#ifndef SL_SI91X_PSA_ECDSA_H +#define SL_SI91X_PSA_ECDSA_H + +#include "sli_si91x_crypto_driver_functions.h" +#include "string.h" +#include "sl_status.h" +#include "sl_si91x_crypto.h" + +/** + * \brief Generate a signature with input message using ECC private key + * + * \note The signature of this function is that of a PSA driver + * sign_message entry point. This function behaves as a sign_message + * entry point as defined in the PSA driver interface specification for + * transparent drivers. + * + * \param[in] attributes The attributes of the key to use for the + * operation. + * \param[in] key_buffer The buffer containing the key context. + * \param key_buffer_size Size of the \p key_buffer buffer in bytes. + * \param alg The ECDSA algorithm to compute. + * \param[in] input Data that will be encryted and authenticated. + * \param input_length Size of input in bytes. + * \param[out] signature Output buffer for the generated signature. + * \param signature_size Size of the signature buffer in bytes. This + * must be appropriate for the selected algorithm + * and key: + * - A sufficient output size is + * PSA_SIGN_OUTPUT_SIZE(key_type, key_bits, alg) + * where key_type is the type + * of asymmetric key. + * - PSA_VENDOR_ECDSA_SIGNATURE_MAX_SIZE + * evaluates to the maximum + * signature size of any supported curve. + * \param[out] signature_length On success, the size of the output in the + * signature buffer. + * + * \return + * psa_status_t. See https://docs.silabs.com/gecko-platform/4.1/service/api/group-error for details. + * \retval #PSA_SUCCESS Success. + * \retval #PSA_ERROR_NOT_SUPPORTED + * \p alg is not supported. + * \retval #PSA_ERROR_INSUFFICIENT_MEMORY + * \retval #PSA_ERROR_BUFFER_TOO_SMALL + * signature buffer is too small. + * \retval #PSA_ERROR_CORRUPTION_DETECTED + */ + +psa_status_t sli_si91x_crypto_sign_message(const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, + size_t key_buffer_size, + psa_algorithm_t alg, + const uint8_t *input, + size_t input_length, + uint8_t *signature, + size_t signature_size, + size_t *signature_length); + +/** + * \brief * Verify a signature with input message using ECC public key. + * + * \note The signature of this function is that of a PSA driver + * verify_message entry point. This function behaves as a verify_message + * entry point as defined in the PSA driver interface specification for + * transparent drivers. + * + * \param[in] attributes The attributes of the key to use for the + * operation. + * \param[in] key_buffer The buffer containing the key context. + * \param key_buffer_size Size of the \p key_buffer buffer in bytes. + * \param alg The ECDSA algorithm to compute. + * \param[in] input Data that will be authenticated. + * \param input_length Size of input in bytes. + * \param[in] signature The buffer containing signature. + + * \param[in] signature_length The size of the signature buffer. + * + * \return + * psa_status_t. See https://docs.silabs.com/gecko-platform/4.1/service/api/group-error for details. + * \retval #PSA_SUCCESS Success. + * \retval #PSA_ERROR_INVALID_SIGNATURE + * Failure, The signature is invald. + * \retval #PSA_ERROR_NOT_SUPPORTED + * \p alg is not supported. + * \retval #PSA_ERROR_INSUFFICIENT_MEMORY + * \retval #PSA_ERROR_CORRUPTION_DETECTED + */ + +psa_status_t sli_si91x_crypto_verify_message(const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, + size_t key_buffer_size, + psa_algorithm_t alg, + const uint8_t *input, + size_t input_length, + const uint8_t *signature, + size_t signature_length); + +#endif /* SL_SI91X_PSA_ECDSA_H */ \ No newline at end of file diff --git a/components/device/silabs/si91x/wireless/crypto/ecdsa/sl_si91x_ecdsa.slcc b/components/device/silabs/si91x/wireless/crypto/ecdsa/sl_si91x_ecdsa.slcc new file mode 100644 index 000000000..cf46376a5 --- /dev/null +++ b/components/device/silabs/si91x/wireless/crypto/ecdsa/sl_si91x_ecdsa.slcc @@ -0,0 +1,20 @@ +id: sl_si91x_ecdsa +package: wiseconnect3_sdk +description: > + Implementation of the ECDSA APIs +label: ECDSA +category: Device|Si91x|Wireless|Crypto +quality: production +component_root_path: ./components/device/silabs/si91x/wireless/crypto/ecdsa +provides: +- name: sl_si91x_ecdsa +source: +- path: src/sl_si91x_ecdsa.c +requires: +- name: sl_si91x_crypto + +include: +- path: inc + file_list: + - path: sl_si91x_ecdsa.h + diff --git a/components/device/silabs/si91x/wireless/crypto/ecdsa/sl_si91x_psa_ecdsa.slcc b/components/device/silabs/si91x/wireless/crypto/ecdsa/sl_si91x_psa_ecdsa.slcc new file mode 100644 index 000000000..a8c02083d --- /dev/null +++ b/components/device/silabs/si91x/wireless/crypto/ecdsa/sl_si91x_psa_ecdsa.slcc @@ -0,0 +1,23 @@ +id: sl_si91x_psa_ecdsa +package: wiseconnect3_sdk +description: > + Implementation of mbedTls PSA crypto ECDSA API +label: PSA ECDSA +category: Device|Si91x|Wireless|PSA Crypto +quality: production +component_root_path: ./components/device/silabs/si91x/wireless/crypto/ecdsa +provides: +- name: sl_si91x_psa_ecdsa +source: +- path: src/sl_si91x_psa_ecdsa.c +define: +- name: SLI_ECDSA_DEVICE_SI91X +requires: +- name: sl_si91x_ecdsa +- name: sl_si91x_psa_crypto + +include: +- path: inc + file_list: + - path: sl_si91x_psa_ecdsa.h + diff --git a/components/device/silabs/si91x/wireless/crypto/ecdsa/src/sl_si91x_ecdsa.c b/components/device/silabs/si91x/wireless/crypto/ecdsa/src/sl_si91x_ecdsa.c new file mode 100644 index 000000000..672efffe5 --- /dev/null +++ b/components/device/silabs/si91x/wireless/crypto/ecdsa/src/sl_si91x_ecdsa.c @@ -0,0 +1,222 @@ +/***************************************************************************/ /** + * @file + * @brief SL SI91X ECDSA source file + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#include "sl_si91x_ecdsa.h" +#include "sl_si91x_crypto.h" +#include "sl_status.h" +#include "sl_constants.h" +#include "sl_si91x_protocol_types.h" +#include "sl_si91x_driver.h" +#if defined(SLI_MULTITHREAD_DEVICE_SI91X) +#include "sl_si91x_crypto_thread.h" +#endif +#include + +static sl_status_t sl_si91x_ecdsa_pending(sl_si91x_ecdsa_config_t *config, + uint16_t chunk_length, + uint8_t ecdsa_flags, + uint8_t *output) +{ + sl_status_t status = SL_STATUS_FAIL; + sl_wifi_buffer_t *buffer = NULL; + sl_si91x_packet_t *packet = NULL; + sl_si91x_ecdsa_request_t *request = (sl_si91x_ecdsa_request_t *)malloc(sizeof(sl_si91x_ecdsa_request_t)); + + SL_VERIFY_POINTER_OR_RETURN(request, SL_STATUS_ALLOCATION_FAILED); + + memset(request, 0, sizeof(sl_si91x_ecdsa_request_t)); + + request->algorithm_type = ECDSA; + request->algorithm_sub_type = config->ecdsa_operation; + request->ecdsa_flags = ecdsa_flags; + request->sha_mode = config->sha_mode; + request->curve_id = config->curve_id; + request->private_key_length = config->private_key_length; + request->public_key_length = config->public_key_length; + request->signature_length = config->signature_length; + request->msg_len = config->msg_length; + request->current_chunk_length = chunk_length; + + if (config->private_key_length > 0) { + memcpy(request->private_key, config->private_key, config->private_key_length); + } + + if (request->public_key_length > 0) { + memcpy(request->public_key, config->public_key, config->public_key_length); + } + + if (chunk_length > 0) { + memcpy(request->msg, config->msg, chunk_length); + } + + if (config->signature_length > 0) { + memcpy(request->signature, config->signature, config->signature_length); + } + +#ifdef SLI_SI917B0 + request->key_info.key_type = config->key_config.b0.key_type; + request->key_info.key_detail.key_size = config->key_config.b0.key_size; + request->key_info.key_detail.key_spec.key_slot = config->key_config.b0.key_slot; + request->key_info.key_detail.key_spec.wrap_iv_mode = config->key_config.b0.wrap_iv_mode; + request->key_info.reserved = config->key_config.b0.reserved; + if (config->key_config.b0.wrap_iv_mode) { + memcpy(request->key_info.key_detail.key_spec.wrap_iv, config->key_config.b0.wrap_iv, SL_SI91X_IV_SIZE); + } +#else + request->key_length = config->key_config.a0.key_length; +#endif + + status = sl_si91x_driver_send_command( + RSI_COMMON_REQ_ENCRYPT_CRYPTO, + SI91X_COMMON_CMD_QUEUE, + request, + (sizeof(sl_si91x_ecdsa_request_t) - SL_SI91X_MAX_DATA_SIZE_IN_BYTES_FOR_ECDSA + chunk_length), + SL_SI91X_WAIT_FOR_RESPONSE(32000), + NULL, + &buffer); + + if (status != SL_STATUS_OK) { + free(request); + if (buffer != NULL) + sl_si91x_host_free_buffer(buffer); + } + + VERIFY_STATUS_AND_RETURN(status); + + packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); + + if (config->ecdsa_operation == SL_SI91X_GENERATE_ECC_KEY_PAIR) { + // Verify the length from the firmware against the expected length + SL_ASSERT(packet->length == (config->public_key_length)); + } + + if (config->ecdsa_operation == SL_SI91X_ECDSA_GENERATE_SIGN) { + config->signature_length = packet->length; + } + + memcpy(output, packet->data, packet->length); + if (buffer != NULL) + sl_si91x_host_free_buffer(buffer); + free(request); + + return status; +} + +sl_status_t sl_si91x_ecdsa(sl_si91x_ecdsa_config_t *config, uint8_t *output) +{ + uint16_t chunk_len = 0; + uint16_t offset = 0; + uint8_t ecdsa_flags = 0; + sl_status_t status = SL_STATUS_FAIL; + + if (config->curve_id == 0) { + return SL_STATUS_INVALID_PARAMETER; + } + + if (config->ecdsa_operation != SL_SI91X_GENERATE_ECC_KEY_PAIR) { + SL_VERIFY_POINTER_OR_RETURN(config->msg, SL_STATUS_NULL_POINTER); + } + + if (config->ecdsa_operation == SL_SI91X_ECDSA_GENERATE_SIGN && config->private_key == NULL) { + return SL_STATUS_INVALID_PARAMETER; + } + + if (config->ecdsa_operation == SL_SI91X_ECDSA_VERIFY_SIGN + && (config->public_key == NULL || config->signature == NULL)) { + return SL_STATUS_INVALID_PARAMETER; + } + + uint16_t total_length = config->msg_length; + +#if defined(SLI_MULTITHREAD_DEVICE_SI91X) + if (crypto_ecdsa_mutex == NULL) { + crypto_ecdsa_mutex = sl_si91x_crypto_threadsafety_init(crypto_ecdsa_mutex); + } + mutex_result = sl_si91x_crypto_mutex_acquire(crypto_ecdsa_mutex); +#endif + + if (total_length != 0) { + while (total_length) { + // Check total length + if (total_length > SL_SI91X_MAX_DATA_SIZE_IN_BYTES_FOR_ECDSA) { + chunk_len = SL_SI91X_MAX_DATA_SIZE_IN_BYTES_FOR_ECDSA; + if (offset == 0) { + // Make ecdsa_flags as first chunk + ecdsa_flags |= FIRST_CHUNK; + } else { + // Make ecdsa_flags as middle chunk + ecdsa_flags = MIDDLE_CHUNK; + } + } else { + chunk_len = total_length; + ecdsa_flags = LAST_CHUNK; + if (offset == 0) { + // If the total length is less than 1000 and offset is zero, make ecdsa_flags as both first chunk as well as last chunk + ecdsa_flags |= FIRST_CHUNK; + } + } + + // Send the current chunk length message + status = sl_si91x_ecdsa_pending(config, chunk_len, ecdsa_flags, output); + if (status != SL_STATUS_OK) { +#if defined(SLI_MULTITHREAD_DEVICE_SI91X) + mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdsa_mutex); +#endif + return status; + } + + // Increment the offset value + offset += chunk_len; + config->msg += chunk_len; + + // Decrement the total message length + total_length -= chunk_len; + } + } else { + chunk_len = total_length; + ecdsa_flags = LAST_CHUNK; + ecdsa_flags |= FIRST_CHUNK; + + // Send the current chunk length message + status = sl_si91x_ecdsa_pending(config, chunk_len, ecdsa_flags, output); + if (status != SL_STATUS_OK) { +#if defined(SLI_MULTITHREAD_DEVICE_SI91X) + mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdsa_mutex); +#endif + return status; + } + } + +#if defined(SLI_MULTITHREAD_DEVICE_SI91X) + mutex_result = sl_si91x_crypto_mutex_release(crypto_ecdsa_mutex); +#endif + + return status; +} diff --git a/components/device/silabs/si91x/wireless/crypto/ecdsa/src/sl_si91x_psa_ecdsa.c b/components/device/silabs/si91x/wireless/crypto/ecdsa/src/sl_si91x_psa_ecdsa.c new file mode 100644 index 000000000..86e49dcfa --- /dev/null +++ b/components/device/silabs/si91x/wireless/crypto/ecdsa/src/sl_si91x_psa_ecdsa.c @@ -0,0 +1,417 @@ +/******************************************************************************* + * @file sl_si91x_psa_ecdsa.c + * @brief + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ + +// ----------------------------------------------------------------------------- +// Includes +// ----------------------------------------------------------------------------- + +#include "sli_si91x_crypto_driver_functions.h" +#if defined(SLI_SECURE_KEY_STORAGE_DEVICE_SI91X) +#include "sl_si91x_psa_wrap.h" +#endif +#include "sl_si91x_ecdsa.h" +#include "sl_si91x_crypto.h" +#include "sl_status.h" +#include "sl_constants.h" +#include "sl_si91x_protocol_types.h" +#include "sl_si91x_driver.h" +#include + +// ----------------------------------------------------------------------------- +// Global Variables +// ----------------------------------------------------------------------------- +uint8_t r_size = 0; +uint8_t s_size = 0; +uint8_t r_bit = 0; +uint8_t s_bit = 0; + +/** + * \brief Validate that the curve and algorithm combination is supported by hardware + * + * \param[in] attributes The attributes of the key to use for the + * operation. + * \param[in] alg The signature algorithm to compute. + + * + * \retval #PSA_SUCCESS Success. + * \retval #PSA_ERROR_NOT_SUPPORTED + * \p alg is not supported. + * \retval #PSA_ERROR_INVALID_ARGUMENT + */ + +static psa_status_t check_curve_availability(const psa_key_attributes_t *attributes, psa_algorithm_t alg) +{ + psa_key_type_t key_type = psa_get_key_type(attributes); + + if (PSA_ALG_IS_RSA_PSS(alg) || PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg)) { + // We shouldn't have a RSA-type alg for a ECC key. + return PSA_ERROR_INVALID_ARGUMENT; + } + +#if defined(SLI_PSA_DRIVER_FEATURE_ECDSA) + psa_ecc_family_t curvetype = PSA_KEY_TYPE_ECC_GET_FAMILY(key_type); + + if (curvetype == PSA_ECC_FAMILY_SECP_R1) { + switch (psa_get_key_bits(attributes)) { +#if defined(SLI_PSA_DRIVER_FEATURE_P256R1) + case 224: // Intentional +#endif +#if defined(SLI_PSA_DRIVER_FEATURE_P256R1) + case 256: // Intentional +#endif + // Only randomized ECDSA is supported on secp-r1 curves + if (!PSA_ALG_IS_RANDOMIZED_ECDSA(alg)) { + return PSA_ERROR_NOT_SUPPORTED; + } + break; // This break catches all the supported curves + default: + return PSA_ERROR_NOT_SUPPORTED; + } + } else if (curvetype == PSA_ECC_FAMILY_SECP_K1) { + // Only randomized ECDSA is supported on secp-k1 curves + if (!PSA_ALG_IS_RANDOMIZED_ECDSA(alg)) { + return PSA_ERROR_NOT_SUPPORTED; + } + return PSA_ERROR_NOT_SUPPORTED; + } else +#endif // SLI_PSA_DRIVER_FEATURE_ECDSA + { + return PSA_ERROR_NOT_SUPPORTED; + } + + return PSA_SUCCESS; +} + +/***************************************************************************** +* Generate a signature with input message using ECC private key. +*****************************************************************************/ + +psa_status_t sli_si91x_crypto_sign_message(const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, + size_t key_buffer_size, + psa_algorithm_t alg, + const uint8_t *input, + size_t input_length, + uint8_t *signature, + size_t signature_size, + size_t *signature_length) +{ + psa_status_t status = PSA_ERROR_GENERIC_ERROR; + + // Input check + if (attributes == NULL || key_buffer == NULL || key_buffer_size == 0 || (input == NULL && input_length > 0) + || signature == NULL || signature_size == 0 || signature_length == NULL) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + // Check the requested algorithm is supported + if (PSA_KEY_TYPE_IS_ECC_KEY_PAIR(psa_get_key_type(attributes))) { + status = check_curve_availability(attributes, alg); + if (status != PSA_SUCCESS) { + return status; + } + } else { + // Not able to sign using non-ECC keys, or using public keys + return PSA_ERROR_INVALID_ARGUMENT; + } + + if (PSA_ALG_SIGN_GET_HASH(alg) != PSA_ALG_SHA_256 && PSA_ALG_SIGN_GET_HASH(alg) != PSA_ALG_SHA_384 + && PSA_ALG_SIGN_GET_HASH(alg) != PSA_ALG_SHA_512) { + return PSA_ERROR_NOT_SUPPORTED; + } + + // Validate that the output buffer can contain the full signature. + if (signature_size < PSA_ECDSA_SIGNATURE_SIZE(psa_get_key_bits(attributes))) { + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + if (key_buffer_size != SL_SI91X_ECDSA_PRIV_KEY_SIZE_224 && key_buffer_size != SL_SI91X_ECDSA_PRIV_KEY_SIZE_256) { + return PSA_ERROR_NOT_SUPPORTED; + } + + *signature_length = 0; + +#if defined(SLI_PSA_DRIVER_FEATURE_ECDSA) + sl_status_t si91x_status; + + sl_si91x_ecdsa_config_t config = { 0 }; + config.ecdsa_operation = SL_SI91X_ECDSA_GENERATE_SIGN; + + if (key_buffer_size == SL_SI91X_ECDSA_PRIV_KEY_SIZE_224) + config.curve_id = SL_SI91X_ECC_SECP224R1; + else if (key_buffer_size == SL_SI91X_ECDSA_PRIV_KEY_SIZE_256) + config.curve_id = SL_SI91X_ECC_SECP256R1; + + if (PSA_ALG_SIGN_GET_HASH(alg) == PSA_ALG_SHA_256) + config.sha_mode = SL_SI91X_ECDSA_SHA_256; + else if (PSA_ALG_SIGN_GET_HASH(alg) == PSA_ALG_SHA_384) + config.sha_mode = SL_SI91X_ECDSA_SHA_384; + else if (PSA_ALG_SIGN_GET_HASH(alg) == PSA_ALG_SHA_512) + config.sha_mode = SL_SI91X_ECDSA_SHA_512; + + config.msg = input; + config.msg_length = input_length; + config.private_key = key_buffer; + config.private_key_length = key_buffer_size; + config.public_key = NULL; + config.public_key_length = 0; + config.signature_length = 0; + +#ifdef SLI_SI917B0 + /* Fetch key type from attributes */ + psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION(psa_get_key_lifetime(attributes)); + if (location == 0) { + config.key_config.b0.key_type = SL_SI91X_TRANSPARENT_KEY; + } else { + config.key_config.b0.key_type = SL_SI91X_WRAPPED_KEY; + config.private_key_length = SL_SI91X_ECDSA_PRIV_KEY_SIZE_256; // wrapped key is of fixed output size 32 + } + config.key_config.b0.key_slot = 0; + config.key_config.b0.key_size = 0; + config.key_config.b0.reserved = 0; + config.key_config.b0.wrap_iv_mode = SL_SI91X_WRAP_IV_CBC_MODE; + if (config.key_config.b0.wrap_iv_mode == SL_SI91X_WRAP_IV_CBC_MODE) { + memcpy(config.key_config.b0.wrap_iv, WRAP_IV, SL_SI91X_IV_SIZE); + } +#else + config.key_config.a0.key_length = key_buffer_size; +#endif + + uint8_t *sign_buf = (uint8_t *)malloc(SL_SI91X_ECDSA_SIGN_MAX_SIZE * sizeof(uint8_t)); + + /* Calling sl_si91x_ecdsa() for signature generation */ + si91x_status = sl_si91x_ecdsa(&config, sign_buf); + + if (sign_buf[0] != 0x30) + status = SL_STATUS_INVALID_SIGNATURE; + + /* Convert DER format signature to compact format */ + r_size = sign_buf[3]; + s_size = sign_buf[5 + r_size]; + + uint8_t r_index = 4; + uint8_t s_index = 6 + r_size; + + if (key_buffer_size == SL_SI91X_ECDSA_PRIV_KEY_SIZE_224) { + if (r_size == SL_SI91X_ECDSA_SIGN_HALF_SIZE_P224R1 + 1) + r_bit = 1; + if (s_size == SL_SI91X_ECDSA_SIGN_HALF_SIZE_P224R1 + 1) + s_bit = 1; + memcpy(signature, &sign_buf[r_index + r_bit], SL_SI91X_ECDSA_SIGN_HALF_SIZE_P224R1); + memcpy(&signature[SL_SI91X_ECDSA_SIGN_HALF_SIZE_P224R1], + &sign_buf[s_index + s_bit], + SL_SI91X_ECDSA_SIGN_HALF_SIZE_P224R1); + + } else if (key_buffer_size == SL_SI91X_ECDSA_PRIV_KEY_SIZE_256) { + if (r_size == SL_SI91X_ECDSA_SIGN_HALF_SIZE_P256R1 + 1) + r_bit = 1; + if (s_size == SL_SI91X_ECDSA_SIGN_HALF_SIZE_P256R1 + 1) + s_bit = 1; + memcpy(signature, &sign_buf[r_index + r_bit], SL_SI91X_ECDSA_SIGN_HALF_SIZE_P256R1); + memcpy(&signature[SL_SI91X_ECDSA_SIGN_HALF_SIZE_P256R1], + &sign_buf[s_index + s_bit], + SL_SI91X_ECDSA_SIGN_HALF_SIZE_P256R1); + } + + /* gets the si91x error codes and returns its equivalent psa_status codes */ + status = convert_si91x_error_code_to_psa_status(si91x_status); + + free(sign_buf); + *signature_length = signature_size; + + return status; + +#else //SLI_PSA_DRIVER_FEATURE_ECDSA + + (void)attributes; + (void)key_buffer; + (void)key_buffer_size; + (void)alg; + (void)input; + (void)input_length; + (void)signature; + (void)signature_size; + (void)signature_length; + + return (PSA_ERROR_NOT_SUPPORTED); + +#endif //SLI_PSA_DRIVER_FEATURE_ECDSA +}; + +/***************************************************************************** +* Verify a signature with input message using ECC public key. +*****************************************************************************/ + +psa_status_t sli_si91x_crypto_verify_message(const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, + size_t key_buffer_size, + psa_algorithm_t alg, + const uint8_t *input, + size_t input_length, + const uint8_t *signature, + size_t signature_length) +{ + + psa_status_t status = PSA_ERROR_GENERIC_ERROR; + + // Input check. + if (attributes == NULL || key_buffer == NULL || key_buffer_size == 0 || (input == NULL && input_length > 0) + || signature == NULL) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + // Verify can happen with only public key, private key verification not supported + if (PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY(psa_get_key_type(attributes))) { + // Check the requested algorithm is supported and matches the key type + status = check_curve_availability(attributes, alg); + if (status != PSA_SUCCESS) { + return status; + } + } else { + return PSA_ERROR_NOT_SUPPORTED; + } + + if (PSA_KEY_TYPE_IS_ECC_KEY_PAIR(psa_get_key_type(attributes))) { + return PSA_ERROR_NOT_SUPPORTED; + } + + if (signature_length == 0) { + return PSA_ERROR_INVALID_SIGNATURE; + } + + if (key_buffer_size != SL_SI91X_ECDSA_PUB_KEY_SIZE_224 && key_buffer_size != SL_SI91X_ECDSA_PUB_KEY_SIZE_256) { + return PSA_ERROR_NOT_SUPPORTED; + } + + if (key_buffer[0] != 0x04) /* To check uncompressed public keys format */ + return PSA_ERROR_INVALID_ARGUMENT; + + // Validate that the signature input is of the expected length. + if (signature_length < PSA_ECDSA_SIGNATURE_SIZE(psa_get_key_bits(attributes))) { + return PSA_ERROR_INVALID_SIGNATURE; + } + +#if defined(SLI_PSA_DRIVER_FEATURE_ECDSA) + sl_status_t si91x_status; + + sl_si91x_ecdsa_config_t config = { 0 }; + config.ecdsa_operation = SL_SI91X_ECDSA_VERIFY_SIGN; + + if (key_buffer_size == SL_SI91X_ECDSA_PUB_KEY_SIZE_224) + config.curve_id = SL_SI91X_ECC_SECP224R1; + else if (key_buffer_size == SL_SI91X_ECDSA_PUB_KEY_SIZE_256) + config.curve_id = SL_SI91X_ECC_SECP256R1; + + if (PSA_ALG_SIGN_GET_HASH(alg) == PSA_ALG_SHA_256) + config.sha_mode = SL_SI91X_ECDSA_SHA_256; + else if (PSA_ALG_SIGN_GET_HASH(alg) == PSA_ALG_SHA_384) + config.sha_mode = SL_SI91X_ECDSA_SHA_384; + else if (PSA_ALG_SIGN_GET_HASH(alg) == PSA_ALG_SHA_512) + config.sha_mode = SL_SI91X_ECDSA_SHA_512; + + config.msg = input; + config.msg_length = input_length; + config.private_key = NULL; + config.private_key_length = 0; + config.public_key = key_buffer; + config.public_key_length = key_buffer_size; + +#ifdef SLI_SI917B0 + /* Fetch key type from attributes */ + psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION(psa_get_key_lifetime(attributes)); + if (location == 0) { + config.key_config.b0.key_type = SL_SI91X_TRANSPARENT_KEY; + } else { + config.key_config.b0.key_type = SL_SI91X_WRAPPED_KEY; + } + config.key_config.b0.key_slot = 0; + config.key_config.b0.key_size = 0; + config.key_config.b0.reserved = 0; + config.key_config.b0.wrap_iv_mode = SL_SI91X_WRAP_IV_CBC_MODE; + if (config.key_config.b0.wrap_iv_mode == SL_SI91X_WRAP_IV_CBC_MODE) { + memcpy(config.key_config.b0.wrap_iv, WRAP_IV, SL_SI91X_IV_SIZE); + } +#else + config.key_config.a0.key_length = key_buffer_size; +#endif + + /* Convert compact format signature to DER format */ + + uint8_t sign_size = r_size + s_size + 4; + uint8_t total_size = sign_size + 2; + uint8_t s_index = r_size + 6; + uint8_t r_index = 4; + + uint8_t *sign_buf = (uint8_t *)malloc(total_size * sizeof(uint8_t)); + + sign_buf[0] = 0x30; + sign_buf[1] = sign_size; + + sign_buf[2] = sign_buf[s_index - 2] = 0x02; + sign_buf[3] = r_size; + sign_buf[s_index - 1] = s_size; + + sign_buf[r_index] = 0; + sign_buf[s_index] = 0; + + if (key_buffer_size == SL_SI91X_ECDSA_PUB_KEY_SIZE_224) { + memcpy(&sign_buf[r_index + r_bit], &signature[0], SL_SI91X_ECDSA_SIGN_HALF_SIZE_P224R1); + memcpy(&sign_buf[s_index + s_bit], + &signature[SL_SI91X_ECDSA_SIGN_HALF_SIZE_P224R1], + SL_SI91X_ECDSA_SIGN_HALF_SIZE_P224R1); + } + + else if (key_buffer_size == SL_SI91X_ECDSA_PUB_KEY_SIZE_256) { + memcpy(&sign_buf[r_index + r_bit], &signature[0], SL_SI91X_ECDSA_SIGN_HALF_SIZE_P256R1); + memcpy(&sign_buf[s_index + s_bit], + &signature[SL_SI91X_ECDSA_SIGN_HALF_SIZE_P256R1], + SL_SI91X_ECDSA_SIGN_HALF_SIZE_P256R1); + } + + uint8_t *output = (uint8_t *)malloc(sizeof(uint8_t)); + + config.signature = sign_buf; + config.signature_length = total_size; + + /* Calling sl_si91x_ecdsa() for signature verification */ + si91x_status = sl_si91x_ecdsa(&config, output); + /* gets the si91x error codes and returns its equivalent psa_status codes */ + status = convert_si91x_error_code_to_psa_status(si91x_status); + + if (*output != 1 && status == 0) { + return PSA_ERROR_INVALID_SIGNATURE; + } + + free(sign_buf); + free(output); + return status; + +#else //SLI_PSA_DRIVER_FEATURE_ECDSA + + (void)attributes; + (void)key_buffer; + (void)key_buffer_size; + (void)alg; + (void)input; + (void)input_length; + (void)signature; + (void)signature_length; + + return PSA_ERROR_NOT_SUPPORTED; + +#endif //SLI_PSA_DRIVER_FEATURE_ECDSA +}; diff --git a/components/device/silabs/si91x/wireless/crypto/gcm/src/sl_si91x_gcm.c b/components/device/silabs/si91x/wireless/crypto/gcm/src/sl_si91x_gcm.c index 1cc4a889a..555596fb5 100644 --- a/components/device/silabs/si91x/wireless/crypto/gcm/src/sl_si91x_gcm.c +++ b/components/device/silabs/si91x/wireless/crypto/gcm/src/sl_si91x_gcm.c @@ -114,7 +114,7 @@ static sl_status_t sli_si91x_gcm_pending(sl_si91x_gcm_config_t *config, if ((status != SL_STATUS_OK)) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -128,7 +128,7 @@ static sl_status_t sli_si91x_gcm_pending(sl_si91x_gcm_config_t *config, } free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -160,9 +160,9 @@ static sl_status_t sli_si91x_gcm_side_band(sl_si91x_gcm_config_t *config, uint8_ request->encrypt_decryption = config->encrypt_decrypt; request->ad_length = config->ad_length; - request->ad = config->ad; - request->nonce = config->nonce; - request->msg = config->msg; + request->ad = (uint8_t *)config->ad; + request->nonce = (uint8_t *)config->nonce; + request->msg = (uint8_t *)config->msg; request->output = output; request->gcm_mode = config->gcm_mode; @@ -191,10 +191,13 @@ static sl_status_t sli_si91x_gcm_side_band(sl_si91x_gcm_config_t *config, uint8_ sl_status_t sl_si91x_gcm(sl_si91x_gcm_config_t *config, uint8_t *output) { - uint16_t chunk_len = 0; - uint16_t offset = 0; - uint8_t gcm_flags = 0; sl_status_t status = SL_STATUS_FAIL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO + uint16_t chunk_len = 0; + uint16_t offset = 0; + uint8_t gcm_flags = 0; + uint16_t total_length = 0; +#endif SL_VERIFY_POINTER_OR_RETURN(config->msg, SL_STATUS_NULL_POINTER); @@ -208,12 +211,11 @@ sl_status_t sl_si91x_gcm(sl_si91x_gcm_config_t *config, uint8_t *output) status = SL_STATUS_INVALID_PARAMETER; } - uint16_t total_length = config->msg_length; - #ifdef SL_SI91X_SIDE_BAND_CRYPTO status = sli_si91x_gcm_side_band(config, output); return status; #else + total_length = config->msg_length; #if defined(SLI_MULTITHREAD_DEVICE_SI91X) if (crypto_gcm_mutex == NULL) { crypto_gcm_mutex = sl_si91x_crypto_threadsafety_init(crypto_gcm_mutex); diff --git a/components/device/silabs/si91x/wireless/crypto/hmac/sl_si91x_psa_hmac.slcc b/components/device/silabs/si91x/wireless/crypto/hmac/sl_si91x_psa_hmac.slcc index d09dc0f4e..7c0d30b60 100644 --- a/components/device/silabs/si91x/wireless/crypto/hmac/sl_si91x_psa_hmac.slcc +++ b/components/device/silabs/si91x/wireless/crypto/hmac/sl_si91x_psa_hmac.slcc @@ -13,7 +13,7 @@ define: - name: SLI_MAC_DEVICE_SI91X requires: - name: sl_si91x_hmac -- name: sl_si91x_psa_mac +- name: sl_si91x_psa_crypto include: - path: inc diff --git a/components/device/silabs/si91x/wireless/crypto/hmac/src/sl_si91x_hmac.c b/components/device/silabs/si91x/wireless/crypto/hmac/src/sl_si91x_hmac.c index 0680a7e43..e02da0de6 100644 --- a/components/device/silabs/si91x/wireless/crypto/hmac/src/sl_si91x_hmac.c +++ b/components/device/silabs/si91x/wireless/crypto/hmac/src/sl_si91x_hmac.c @@ -87,14 +87,14 @@ static sl_status_t sli_si91x_hmac_pending(sl_si91x_hmac_config_t *config, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); memcpy(output, packet->data, packet->length); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); free(request); return status; } diff --git a/components/device/silabs/si91x/wireless/crypto/inc/sl_si91x_crypto.h b/components/device/silabs/si91x/wireless/crypto/inc/sl_si91x_crypto.h index d226044cf..117358ee8 100644 --- a/components/device/silabs/si91x/wireless/crypto/inc/sl_si91x_crypto.h +++ b/components/device/silabs/si91x/wireless/crypto/inc/sl_si91x_crypto.h @@ -41,6 +41,8 @@ #define SL_SI91X_IV_SIZE 16 ///< Length of the initialization vector in bytes #define SL_SI91X_KEY_BUFFER_SIZE 32 ///< Key size in bytes #define SL_SI91X_WRAP_KEY_BUFFER_SIZE 1400 ///< Wrap Key size in bytes +#define SL_SI91X_MAX_DATA_SIZE_IN_BYTES_FOR_ECDSA \ + 1000 ///< Maximum length of the ECDSA message in bytes that can be handled in one go /// Flags to determine the chunk being handled in the API #define FIRST_CHUNK BIT(0) @@ -84,5 +86,6 @@ typedef enum { GCM = 18, ///< GCM WRAP = 20, ///< WRAP TRNG = 21, ///< TRNG - CCM = 31 ///< CCM + CCM = 31, ///< CCM + ECDSA = 32 ///< ECDSA } sl_si91x_crypto_algorithm_type_t; diff --git a/components/device/silabs/si91x/wireless/crypto/inc/sli_si91x_crypto_driver_functions.h b/components/device/silabs/si91x/wireless/crypto/inc/sli_si91x_crypto_driver_functions.h index a41e1a6f1..34a512ee9 100644 --- a/components/device/silabs/si91x/wireless/crypto/inc/sli_si91x_crypto_driver_functions.h +++ b/components/device/silabs/si91x/wireless/crypto/inc/sli_si91x_crypto_driver_functions.h @@ -51,6 +51,10 @@ #include "sl_si91x_psa_ecdh.h" #endif +#ifdef SLI_ECDSA_DEVICE_SI91X +#include "sl_si91x_psa_ecdsa.h" +#endif + #ifdef SLI_MAC_DEVICE_SI91X #include "sl_si91x_psa_mac.h" #endif diff --git a/components/device/silabs/si91x/wireless/crypto/multithread/inc/sl_si91x_crypto_thread.h b/components/device/silabs/si91x/wireless/crypto/multithread/inc/sl_si91x_crypto_thread.h index 5fdf0b6cd..b626a365f 100644 --- a/components/device/silabs/si91x/wireless/crypto/multithread/inc/sl_si91x_crypto_thread.h +++ b/components/device/silabs/si91x/wireless/crypto/multithread/inc/sl_si91x_crypto_thread.h @@ -37,6 +37,7 @@ extern osSemaphoreId_t crypto_gcm_mutex; extern osSemaphoreId_t crypto_chachapoly_mutex; extern osSemaphoreId_t crypto_attestation_mutex; extern osSemaphoreId_t crypto_ecdh_mutex; +extern osSemaphoreId_t crypto_ecdsa_mutex; extern osSemaphoreId_t crypto_hmac_mutex; extern osSemaphoreId_t crypto_trng_mutex; extern osStatus_t mutex_result; diff --git a/components/device/silabs/si91x/wireless/crypto/multithread/src/sl_si91x_crypto_thread.c b/components/device/silabs/si91x/wireless/crypto/multithread/src/sl_si91x_crypto_thread.c index 284cb77a9..dec75c690 100644 --- a/components/device/silabs/si91x/wireless/crypto/multithread/src/sl_si91x_crypto_thread.c +++ b/components/device/silabs/si91x/wireless/crypto/multithread/src/sl_si91x_crypto_thread.c @@ -28,6 +28,7 @@ osSemaphoreId_t crypto_gcm_mutex = 0; osSemaphoreId_t crypto_chachapoly_mutex = 0; osSemaphoreId_t crypto_attestation_mutex = 0; osSemaphoreId_t crypto_ecdh_mutex = 0; +osSemaphoreId_t crypto_ecdsa_mutex = 0; osSemaphoreId_t crypto_hmac_mutex = 0; osSemaphoreId_t crypto_trng_mutex = 0; osStatus_t mutex_result = osOK; diff --git a/components/device/silabs/si91x/wireless/crypto/sha/inc/sl_si91x_sha.h b/components/device/silabs/si91x/wireless/crypto/sha/inc/sl_si91x_sha.h index 84bca426e..e8e6e134c 100644 --- a/components/device/silabs/si91x/wireless/crypto/sha/inc/sl_si91x_sha.h +++ b/components/device/silabs/si91x/wireless/crypto/sha/inc/sl_si91x_sha.h @@ -45,7 +45,7 @@ typedef enum { SL_SI91x_SHA_224 } sl_si91x_crypto_sha_mode_t; -/// SHA mode lenghts +/// SHA mode lengths typedef enum { SL_SI91x_SHA_1_DIGEST_LEN = 20, SL_SI91x_SHA_256_DIGEST_LEN = 32, diff --git a/components/device/silabs/si91x/wireless/crypto/sha/sl_si91x_psa_sha.slcc b/components/device/silabs/si91x/wireless/crypto/sha/sl_si91x_psa_sha.slcc index bc8d48d4b..3376246e6 100644 --- a/components/device/silabs/si91x/wireless/crypto/sha/sl_si91x_psa_sha.slcc +++ b/components/device/silabs/si91x/wireless/crypto/sha/sl_si91x_psa_sha.slcc @@ -14,6 +14,7 @@ define: - name: SLI_SHA_DEVICE_SI91X requires: - name: sl_si91x_sha +- name: sl_si91x_psa_crypto include: - path: inc diff --git a/components/device/silabs/si91x/wireless/crypto/sha/src/sl_si91x_sha.c b/components/device/silabs/si91x/wireless/crypto/sha/src/sl_si91x_sha.c index 89879bfbe..08db445ca 100644 --- a/components/device/silabs/si91x/wireless/crypto/sha/src/sl_si91x_sha.c +++ b/components/device/silabs/si91x/wireless/crypto/sha/src/sl_si91x_sha.c @@ -88,7 +88,7 @@ static sl_status_t sli_si91x_sha_pending(uint8_t sha_mode, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -99,7 +99,7 @@ static sl_status_t sli_si91x_sha_pending(uint8_t sha_mode, free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } diff --git a/components/device/silabs/si91x/wireless/crypto/trng/src/sl_si91x_trng.c b/components/device/silabs/si91x/wireless/crypto/trng/src/sl_si91x_trng.c index 292ff35c0..7102eb5bd 100644 --- a/components/device/silabs/si91x/wireless/crypto/trng/src/sl_si91x_trng.c +++ b/components/device/silabs/si91x/wireless/crypto/trng/src/sl_si91x_trng.c @@ -33,8 +33,10 @@ uint32_t trng_key[TRNG_KEY_SIZE] = { 0x16157E2B, 0xA6D2AE28, 0x8815F7AB, 0x3C4FC sl_status_t sl_si91x_trng_init(sl_si91x_trng_config_t *config, uint32_t *output) { - sl_wifi_buffer_t *buffer; - sl_si91x_packet_t *packet; + sl_wifi_buffer_t *buffer = NULL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO + sl_si91x_packet_t *packet = NULL; +#endif sl_status_t status = SL_STATUS_OK; if ((config->trng_key == NULL) || (config->input_length == 0) || (output == NULL)) { @@ -52,9 +54,9 @@ sl_status_t sl_si91x_trng_init(sl_si91x_trng_config_t *config, uint32_t *output) request->total_msg_length = config->input_length; #ifdef SL_SI91X_SIDE_BAND_CRYPTO - request->trng_key = config->trng_key; - request->msg = config->trng_test_data; - request->output = output; + request->trng_key = (uint8_t *)config->trng_key; + request->msg = (uint8_t *)config->trng_test_data; + request->output = (uint8_t *)output; status = sl_si91x_driver_send_side_band_crypto(RSI_COMMON_REQ_ENCRYPT_CRYPTO, request, (sizeof(sl_si91x_trng_request_t)), @@ -80,7 +82,7 @@ sl_status_t sl_si91x_trng_init(sl_si91x_trng_config_t *config, uint32_t *output) if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_trng_mutex); #endif @@ -92,7 +94,7 @@ sl_status_t sl_si91x_trng_init(sl_si91x_trng_config_t *config, uint32_t *output) free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_trng_mutex); #endif @@ -142,8 +144,10 @@ sl_status_t sl_si91x_trng_entropy(void) sl_status_t sl_si91x_trng_program_key(uint32_t *trng_key, uint16_t key_length) { sl_status_t status; - sl_wifi_buffer_t *buffer; - sl_si91x_packet_t *packet; + sl_wifi_buffer_t *buffer = NULL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO + sl_si91x_packet_t *packet = NULL; +#endif if ((trng_key == NULL) || (key_length != TRNG_KEY_SIZE)) { return SL_STATUS_INVALID_PARAMETER; @@ -159,8 +163,8 @@ sl_status_t sl_si91x_trng_program_key(uint32_t *trng_key, uint16_t key_length) request->algorithm_sub_type = TRNG_KEY; #ifdef SL_SI91X_SIDE_BAND_CRYPTO - request->trng_key = trng_key; - request->output = trng_key; + request->trng_key = (uint8_t *)trng_key; + request->output = (uint8_t *)trng_key; status = sl_si91x_driver_send_side_band_crypto(RSI_COMMON_REQ_ENCRYPT_CRYPTO, request, (sizeof(sl_si91x_trng_request_t)), @@ -185,7 +189,7 @@ sl_status_t sl_si91x_trng_program_key(uint32_t *trng_key, uint16_t key_length) if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_trng_mutex); #endif @@ -198,7 +202,7 @@ sl_status_t sl_si91x_trng_program_key(uint32_t *trng_key, uint16_t key_length) free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_trng_mutex); #endif @@ -208,8 +212,8 @@ sl_status_t sl_si91x_trng_program_key(uint32_t *trng_key, uint16_t key_length) sl_status_t sl_si91x_trng_get_random_num(uint32_t *random_number, uint16_t length) { sl_status_t status; - sl_wifi_buffer_t *buffer; - sl_si91x_packet_t *packet; + sl_wifi_buffer_t *buffer = NULL; + sl_si91x_packet_t *packet = NULL; if ((random_number == NULL) || (length == 0) || (length > 1024)) { return SL_STATUS_INVALID_PARAMETER; @@ -232,7 +236,7 @@ sl_status_t sl_si91x_trng_get_random_num(uint32_t *random_number, uint16_t lengt mutex_result = sl_si91x_crypto_mutex_acquire(crypto_trng_mutex); #endif #ifdef SL_SI91X_SIDE_BAND_CRYPTO - request->output = random_number; + request->output = (uint8_t *)random_number; status = sl_si91x_driver_send_side_band_crypto(RSI_COMMON_REQ_ENCRYPT_CRYPTO, request, (sizeof(sl_si91x_trng_request_t)), @@ -249,7 +253,7 @@ sl_status_t sl_si91x_trng_get_random_num(uint32_t *random_number, uint16_t lengt if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_trng_mutex); #endif @@ -266,11 +270,12 @@ sl_status_t sl_si91x_trng_get_random_num(uint32_t *random_number, uint16_t lengt #endif #if SLI_SI91X_TRNG_DUPLICATE_CHECK //! Check for any duplicate elements - status = sl_si91x_duplicate_element((uint32_t *)packet->data, length / sizeof(uint32_t)); + if (packet != NULL) + status = sl_si91x_duplicate_element((uint32_t *)packet->data, length / sizeof(uint32_t)); #endif // SLI_SI91X_TRNG_DUPLICATE_CHECK free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #if defined(SLI_MULTITHREAD_DEVICE_SI91X) mutex_result = sl_si91x_crypto_mutex_release(crypto_trng_mutex); #endif diff --git a/components/device/silabs/si91x/wireless/crypto/wrap/inc/sl_si91x_wrap.h b/components/device/silabs/si91x/wireless/crypto/wrap/inc/sl_si91x_wrap.h index e1edc8ae4..1df435e4f 100644 --- a/components/device/silabs/si91x/wireless/crypto/wrap/inc/sl_si91x_wrap.h +++ b/components/device/silabs/si91x/wireless/crypto/wrap/inc/sl_si91x_wrap.h @@ -60,9 +60,9 @@ typedef struct { /***************************************************************************/ /** * @brief * This API is used to get wrap version of the plain key. - * @param config + * @param[in] config * Configuration object of type @ref sl_si91x_wrap_config_t - * @param output + * @param[out] output * Buffer to store the output. * @return * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. diff --git a/components/device/silabs/si91x/wireless/crypto/wrap/sl_si91x_psa_wrap.slcc b/components/device/silabs/si91x/wireless/crypto/wrap/sl_si91x_psa_wrap.slcc index 59fb5ecea..ab60125c0 100644 --- a/components/device/silabs/si91x/wireless/crypto/wrap/sl_si91x_psa_wrap.slcc +++ b/components/device/silabs/si91x/wireless/crypto/wrap/sl_si91x_psa_wrap.slcc @@ -14,6 +14,7 @@ define: - name: SLI_SECURE_KEY_STORAGE_DEVICE_SI91X requires: - name: sl_si91x_wrap +- name: sl_si91x_psa_crypto include: - path: inc diff --git a/components/device/silabs/si91x/wireless/crypto/wrap/src/sl_si91x_psa_wrap.c b/components/device/silabs/si91x/wireless/crypto/wrap/src/sl_si91x_psa_wrap.c index de2b55e65..0b817626f 100644 --- a/components/device/silabs/si91x/wireless/crypto/wrap/src/sl_si91x_psa_wrap.c +++ b/components/device/silabs/si91x/wireless/crypto/wrap/src/sl_si91x_psa_wrap.c @@ -54,9 +54,9 @@ psa_status_t sli_si91x_crypto_wrap_key(uint8_t *key_buffer, status = convert_si91x_error_code_to_psa_status(si91x_status); if (status == PSA_SUCCESS) { - printf("\n Wrap success \n"); + printf("\r\nWrap success\r\n"); } else { - printf("\n Wrap failed, Error Code : %ld \n", status); + printf("\r\nWrap failed, Error Code : %ld \r\n", status); } return status; diff --git a/components/device/silabs/si91x/wireless/crypto/wrap/src/sl_si91x_wrap.c b/components/device/silabs/si91x/wireless/crypto/wrap/src/sl_si91x_wrap.c index 75fac6e40..8f1331f17 100644 --- a/components/device/silabs/si91x/wireless/crypto/wrap/src/sl_si91x_wrap.c +++ b/components/device/silabs/si91x/wireless/crypto/wrap/src/sl_si91x_wrap.c @@ -75,7 +75,7 @@ static sl_status_t sli_si91x_wrap_pending(sl_si91x_wrap_config_t *config, if (status != SL_STATUS_OK) { free(request); if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -85,7 +85,7 @@ static sl_status_t sli_si91x_wrap_pending(sl_si91x_wrap_config_t *config, output_size = (config->key_size + 15) & (~15); memcpy(output, packet->data, output_size); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); free(request); return status; } @@ -124,20 +124,22 @@ static sl_status_t sli_si91x_wrap_side_band(sl_si91x_wrap_config_t *config, uint sl_status_t sl_si91x_wrap(sl_si91x_wrap_config_t *config, uint8_t *output) { - sl_status_t status = SL_STATUS_FAIL; + sl_status_t status = SL_STATUS_FAIL; +#ifndef SL_SI91X_SIDE_BAND_CRYPTO uint16_t chunk_len = 0; uint16_t offset = 0; uint8_t wrap_flags = 0; uint32_t total_length = config->key_size; + uint8_t *key_buffer = NULL; +#endif SL_VERIFY_POINTER_OR_RETURN(config->key_buffer, SL_STATUS_NULL_POINTER); - uint8_t *key_buffer = config->key_buffer; #ifdef SL_SI91X_SIDE_BAND_CRYPTO status = sli_si91x_wrap_side_band(config, output); return status; #else - + key_buffer = config->key_buffer; while (total_length) { // Check total length if (total_length > SL_SI91X_MAX_DATA_SIZE_IN_BYTES) { diff --git a/components/device/silabs/si91x/wireless/doxygen-si91x-driver.cfg b/components/device/silabs/si91x/wireless/doxygen-si91x-driver.cfg index fdb4ad964..de05b7107 100644 --- a/components/device/silabs/si91x/wireless/doxygen-si91x-driver.cfg +++ b/components/device/silabs/si91x/wireless/doxygen-si91x-driver.cfg @@ -30,4 +30,4 @@ QUIET = YES JAVADOC_AUTOBRIEF = YES SEARCHENGINE = NO COMPACT_LATEX = NO -#ENABLED_SECTIONS = SL_SI91X_WIFI_BTR_MODE +#ENABLED_SECTIONS = WIFI_TRANSCEIVER_MODE diff --git a/components/device/silabs/si91x/wireless/firmware_upgrade/firmware_upgradation.c b/components/device/silabs/si91x/wireless/firmware_upgrade/firmware_upgradation.c index b97846bfb..abe0fadbe 100644 --- a/components/device/silabs/si91x/wireless/firmware_upgrade/firmware_upgradation.c +++ b/components/device/silabs/si91x/wireless/firmware_upgrade/firmware_upgradation.c @@ -22,9 +22,24 @@ #include "sl_si91x_driver.h" #include #include "firmware_upgradation.h" +#include + +/****************************************************** + * Macros + ******************************************************/ +// Macro to check if malloc failed +#define VERIFY_MALLOC_AND_RETURN(ptr) \ + { \ + if (ptr == NULL) { \ + return SL_STATUS_ALLOCATION_FAILED; \ + } \ + } #define MIN(a, b) ((a) < (b) ? (a) : (b)) +/****************************************************** + * Global Variables + ******************************************************/ extern bool device_initialized; /***************************************************************************/ /** @@ -95,12 +110,15 @@ sl_status_t sl_si91x_http_otaf(uint8_t type, uint8_t *post_data, uint32_t post_data_length) { - sl_status_t status = SL_STATUS_FAIL; - sl_si91x_http_client_request_t http_client = { 0 }; - uint32_t send_size = 0; - uint16_t http_length = 0; - uint16_t length = 0; - uint8_t https_enable = 0; + sl_status_t status = SL_STATUS_FAIL; + sl_si91x_http_client_request_t http_client = { 0 }; + uint32_t send_size = 0; + uint16_t http_length = 0; + uint16_t length = 0; + uint8_t https_enable = 0; + uint8_t packet_identifier = 0; + sl_si91x_http_client_request_t *packet_buffer = NULL; + uint16_t offset = 0, rem_length = 0, chunk_size = 0; if (!device_initialized) { return SL_STATUS_NOT_INITIALIZED; @@ -182,16 +200,62 @@ sl_status_t sl_si91x_http_otaf(uint8_t type, http_length += (post_data_length + 1); } + // Check if request buffer is overflowed or resource length is overflowed + if (http_length > SI91X_HTTP_BUFFER_LEN + || sl_strnlen(((char *)resource), SI91X_MAX_HTTP_URL_SIZE + 1) > SI91X_MAX_HTTP_URL_SIZE) + return SL_STATUS_HAS_OVERFLOWED; + send_size = sizeof(sl_si91x_http_client_request_t) - SI91X_HTTP_BUFFER_LEN + http_length; send_size &= 0xFFF; - status = sl_si91x_driver_send_command(RSI_WLAN_REQ_HTTP_OTAF, - SI91X_WLAN_CMD_QUEUE, - &http_client, - send_size, - SL_SI91X_WAIT_FOR_RESPONSE(600000), - NULL, - NULL); + rem_length = http_length; + if (http_length <= SI91X_MAX_HTTP_CHUNK_SIZE) { + status = sl_si91x_driver_send_command(RSI_WLAN_REQ_HTTP_OTAF, + SI91X_WLAN_CMD_QUEUE, + &http_client, + send_size, + SL_SI91X_WAIT_FOR_RESPONSE(600000), + NULL, + NULL); + } else { + packet_buffer = malloc(sizeof(sl_si91x_http_client_request_t)); + VERIFY_MALLOC_AND_RETURN(packet_buffer); + + while (rem_length) { + if (rem_length > SI91X_MAX_HTTP_CHUNK_SIZE) { + packet_identifier = (offset == 0) ? HTTP_GET_FIRST_PKT : HTTP_GET_MIDDLE_PKT; + chunk_size = SI91X_MAX_HTTP_CHUNK_SIZE; + } else { + packet_identifier = HTTP_GET_LAST_PKT; + chunk_size = rem_length; + } + + packet_buffer->ip_version = http_client.ip_version; + packet_buffer->https_enable = http_client.https_enable; + packet_buffer->port_number = http_client.port_number; + + memcpy(packet_buffer->buffer, (http_client.buffer + offset), chunk_size); + + status = sl_si91x_custom_driver_send_command( + RSI_WLAN_REQ_HTTP_OTAF, + SI91X_WLAN_CMD_QUEUE, + packet_buffer, + (sizeof(sl_si91x_http_client_request_t) - SI91X_HTTP_BUFFER_LEN + chunk_size), + (rem_length == chunk_size) ? SL_SI91X_WAIT_FOR_RESPONSE(600000) : SL_SI91X_WAIT_FOR_COMMAND_RESPONSE, + NULL, + NULL, + packet_identifier); + + if ((status != SL_STATUS_OK) && (status != SL_STATUS_SI91X_HTTP_GET_CMD_IN_PROGRESS)) + break; + + offset += chunk_size; + rem_length -= chunk_size; + } + + // Free packet buffer structure memory + free(packet_buffer); + } VERIFY_STATUS_AND_RETURN(status); return status; } diff --git a/components/device/silabs/si91x/wireless/host_mcu/efr32fg25/efx32_ncp_host.c b/components/device/silabs/si91x/wireless/host_mcu/efr32fg25/efx32_ncp_host.c new file mode 100644 index 000000000..24a862c1d --- /dev/null +++ b/components/device/silabs/si91x/wireless/host_mcu/efr32fg25/efx32_ncp_host.c @@ -0,0 +1,275 @@ +/******************************************************************************* + * @file efx32_ncp_host.c + * @brief + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ + +#include "sl_wifi_constants.h" +#include "sl_si91x_host_interface.h" +#include "sl_board_configuration.h" +#include "sl_status.h" +#include "em_eusart.h" +#include "em_cmu.h" +#include "em_gpio.h" +#include "cmsis_os2.h" +#include "dmadrv.h" +#include "gpiointerrupt.h" +#include "sl_si91x_status.h" +#include "sl_rsi_utility.h" +#include "sl_constants.h" +#include +#include +#include "FreeRTOS.h" + +#define LDMA_MAX_TRANSFER_LENGTH 4096 +#define LDMA_DESCRIPTOR_ARRAY_LENGTH (LDMA_MAX_TRANSFER_LENGTH / 2048) + +static bool dma_callback(unsigned int channel, unsigned int sequenceNo, void *userParam); + +unsigned int rx_ldma_channel; +unsigned int tx_ldma_channel; +osMutexId_t spi_transfer_mutex = 0; + +static uint32_t dummy_buffer; +static uint8_t host_initialized = 0; + +uint8_t dummy_buffer_test[2500]; +// LDMA descriptor and transfer configuration structures for EUSART TX channel +LDMA_Descriptor_t ldmaTXDescriptor[LDMA_DESCRIPTOR_ARRAY_LENGTH]; +LDMA_TransferCfg_t ldmaTXConfig; + +// LDMA descriptor and transfer configuration structures for EUSART RX channel +LDMA_Descriptor_t ldmaRXDescriptor[LDMA_DESCRIPTOR_ARRAY_LENGTH]; +LDMA_TransferCfg_t ldmaRXConfig; + +static osSemaphoreId_t transfer_done_semaphore = NULL; + +static bool dma_callback(unsigned int channel, unsigned int sequenceNo, void *userParam) +{ + UNUSED_PARAMETER(channel); + UNUSED_PARAMETER(sequenceNo); + UNUSED_PARAMETER(userParam); + osSemaphoreRelease(transfer_done_semaphore); + return false; +} + +static void gpio_interrupt(uint8_t interrupt_number) +{ + UNUSED_PARAMETER(interrupt_number); + sl_si91x_host_set_bus_event(SL_SI91X_NCP_HOST_BUS_RX_EVENT); + // GPIO_IntClear(0xAAAA); +} + +void sl_si91x_host_set_sleep_indicator(void) +{ + GPIO_PinOutSet(SLEEP_CONFIRM_PIN.port, SLEEP_CONFIRM_PIN.pin); +} + +void sl_si91x_host_clear_sleep_indicator(void) +{ + GPIO_PinOutClear(SLEEP_CONFIRM_PIN.port, SLEEP_CONFIRM_PIN.pin); +} + +uint32_t sl_si91x_host_get_wake_indicator(void) +{ + return GPIO_PinInGet(WAKE_INDICATOR_PIN.port, WAKE_INDICATOR_PIN.pin); +} + +sl_status_t sl_si91x_host_init(sl_si91x_host_init_configuration *config) +{ + UNUSED_PARAMETER(config); + if (!host_initialized) { + // Enable clock (not needed on xG21) + CMU_ClockEnable(cmuClock_GPIO, true); + + // Configure SPI bus pins + GPIO_PinModeSet(SPI_MISO_PIN.port, SPI_MISO_PIN.pin, gpioModeInput, 0); + GPIO_PinModeSet(SPI_MOSI_PIN.port, SPI_MOSI_PIN.pin, gpioModePushPull, 0); + GPIO_PinModeSet(SPI_CLOCK_PIN.port, SPI_CLOCK_PIN.pin, gpioModePushPullAlternate, 0); + GPIO_PinModeSet(SPI_CS_PIN.port, SPI_CS_PIN.pin, gpioModePushPull, 1); + // Enable clock (not needed on xG21) + CMU_ClockEnable(SPI_EUSART_CMU_CLOCK, true); + + // Default asynchronous initializer (master mode, 1 Mbps, 8-bit data) + EUSART_SpiAdvancedInit_TypeDef adv = EUSART_SPI_ADVANCED_INIT_DEFAULT; + + adv.msbFirst = true; // SPI standard MSB first + + EUSART_SpiInit_TypeDef init = EUSART_SPI_MASTER_INIT_DEFAULT_HF; + + init.bitRate = 10000000; // 10 MHz shift clock + init.advancedSettings = &adv; // Advanced settings structure + + /* + * Route EUSART RX, TX, and CLK to the specified pins. Note that CS is + * not controlled by EUSART so there is no write to the corresponding + * USARTROUTE register to do this. + */ + GPIO->EUSARTROUTE[SPI_EUSART_ROUTE_INDEX].RXROUTE = (SPI_MISO_PIN.port << _GPIO_EUSART_RXROUTE_PORT_SHIFT) + | (SPI_MISO_PIN.pin << _GPIO_EUSART_RXROUTE_PIN_SHIFT); + GPIO->EUSARTROUTE[SPI_EUSART_ROUTE_INDEX].TXROUTE = (SPI_MOSI_PIN.port << _GPIO_EUSART_TXROUTE_PORT_SHIFT) + | (SPI_MOSI_PIN.pin << _GPIO_EUSART_TXROUTE_PIN_SHIFT); + GPIO->EUSARTROUTE[SPI_EUSART_ROUTE_INDEX].SCLKROUTE = (SPI_CLOCK_PIN.port << _GPIO_EUSART_SCLKROUTE_PORT_SHIFT) + | (SPI_CLOCK_PIN.pin << _GPIO_EUSART_SCLKROUTE_PIN_SHIFT); + GPIO->EUSARTROUTE[SPI_EUSART_ROUTE_INDEX].CSROUTE = (SPI_CS_PIN.port << _GPIO_EUSART_CSROUTE_PORT_SHIFT) + | (SPI_CS_PIN.pin << _GPIO_EUSART_CSROUTE_PIN_SHIFT); + + // Enable USART interface pins + GPIO->EUSARTROUTE[SPI_EUSART_ROUTE_INDEX].ROUTEEN = GPIO_EUSART_ROUTEEN_RXPEN | // MISO + GPIO_EUSART_ROUTEEN_TXPEN | // MOSI + GPIO_EUSART_ROUTEEN_SCLKPEN | GPIO_EUSART_ROUTEEN_CSPEN; + + // Set slew rate for alternate usage pins + GPIO_SlewrateSet(SPI_CLOCK_PIN.port, 7, 7); + + EUSART1->TIMINGCFG |= /*USART_TIMING_TXDELAY_ONE | USART_TIMING_CSSETUP_ONE |*/ EUSART_TIMINGCFG_CSHOLD_ONE; + + EUSART_SpiInit(SPI_EUSART, &init); + + if (transfer_done_semaphore == NULL) { + transfer_done_semaphore = osSemaphoreNew(1, 0, NULL); + } + + if (spi_transfer_mutex == 0) { + spi_transfer_mutex = osMutexNew(NULL); + } + + DMADRV_Init(); + DMADRV_AllocateChannel(&rx_ldma_channel, NULL); + DMADRV_AllocateChannel(&tx_ldma_channel, NULL); + + // Start reset line low + GPIO_PinModeSet(RESET_PIN.port, RESET_PIN.pin, gpioModePushPull, 0); + + // configure packet pending interrupt priority + NVIC_SetPriority(GPIO_ODD_IRQn, PACKET_PENDING_INT_PRI); + + // Configure interrupt, sleep and wake confirmation pins + GPIOINT_CallbackRegister(INTERRUPT_PIN.pin, gpio_interrupt); + GPIO_PinModeSet(INTERRUPT_PIN.port, INTERRUPT_PIN.pin, gpioModeInputPullFilter, 0); + GPIO_ExtIntConfig(INTERRUPT_PIN.port, INTERRUPT_PIN.pin, INTERRUPT_PIN.pin, true, false, true); + GPIO_PinModeSet(SLEEP_CONFIRM_PIN.port, SLEEP_CONFIRM_PIN.pin, gpioModeWiredOrPullDown, 1); + GPIO_PinModeSet(WAKE_INDICATOR_PIN.port, WAKE_INDICATOR_PIN.pin, gpioModeWiredOrPullDown, 0); + host_initialized = 1; + } + return SL_STATUS_OK; +} + +sl_status_t sl_si91x_host_deinit(void) +{ + return SL_STATUS_OK; +} + +void sl_si91x_host_enable_high_speed_bus() +{ +} + +/*==================================================================*/ +/** + * @fn sl_status_t sl_si91x_host_spi_transfer(const void *tx_buffer, void *rx_buffer, uint16_t buffer_length) + * @param[in] uint8_t *tx_buff, pointer to the buffer with the data to be transferred + * @param[in] uint8_t *rx_buff, pointer to the buffer to store the data received + * @param[in] uint16_t transfer_length, Number of bytes to send and receive + * @param[in] uint8_t mode, To indicate mode 8 BIT/32 BIT mode transfers. + * @param[out] None + * @return 0, 0=success + * @section description + * This API is used to transfer/receive data to the Wi-Fi module through the SPI interface. + */ +sl_status_t sl_si91x_host_spi_transfer(const void *tx_buffer, void *rx_buffer, uint16_t buffer_length) +{ + int i; + osMutexAcquire(spi_transfer_mutex, 0xFFFFFFFFUL); + + if (buffer_length <= 2048) { + if (tx_buffer == NULL) { + dummy_buffer = 0; + ldmaTXDescriptor[0] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2P_BYTE(&dummy_buffer, &(SPI_EUSART->TXDATA), buffer_length); + } else { + ldmaTXDescriptor[0] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_M2P_BYTE(tx_buffer, &(SPI_EUSART->TXDATA), buffer_length); + } + if (rx_buffer == NULL) { + ldmaRXDescriptor[0] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2P_BYTE(&(SPI_EUSART->RXDATA), &dummy_buffer, buffer_length); + } else { + ldmaRXDescriptor[0] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2M_BYTE(&(SPI_EUSART->RXDATA), rx_buffer, buffer_length); + } + } else { + if (tx_buffer == NULL) { + tx_buffer = (uint8_t *)&dummy_buffer_test; + } else if (rx_buffer == NULL) { + rx_buffer = (uint8_t *)&dummy_buffer_test; + } + //Transfer length is more than 2048 bytes. Initialize multiple LDMA Tx descriptor. + for (i = 0; i < (LDMA_DESCRIPTOR_ARRAY_LENGTH - 1); i++) { + ldmaRXDescriptor[i] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_LINKREL_P2M_BYTE(&(SPI_EUSART->RXDATA), (rx_buffer + (2048 * i)), 2048, 1); + ldmaTXDescriptor[i] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_LINKREL_M2P_BYTE((tx_buffer + (2048 * i)), &(SPI_EUSART->TXDATA), 2048, 1); + } + ldmaRXDescriptor[i] = (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2M_BYTE(&(SPI_EUSART->RXDATA), + (rx_buffer + (2048 * i)), + (buffer_length - (2048 * i))); + ldmaTXDescriptor[i] = (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_M2P_BYTE((tx_buffer + (2048 * i)), + &(SPI_EUSART->TXDATA), + (buffer_length - (2048 * i))); + } + + // Transfer a byte on free space in the USART buffer + ldmaTXConfig = (LDMA_TransferCfg_t)LDMA_TRANSFER_CFG_PERIPHERAL(SPI_EUSART_LDMA_TX); + + // Transfer a byte on receive data valid + ldmaRXConfig = (LDMA_TransferCfg_t)LDMA_TRANSFER_CFG_PERIPHERAL(SPI_EUSART_LDMA_RX); + + // Start both channels + DMADRV_LdmaStartTransfer(rx_ldma_channel, &ldmaRXConfig, ldmaRXDescriptor, dma_callback, NULL); + DMADRV_LdmaStartTransfer(tx_ldma_channel, &ldmaTXConfig, ldmaTXDescriptor, NULL, NULL); + + if (osSemaphoreAcquire(transfer_done_semaphore, 1000) != osOK) { + BREAKPOINT(); + } + + osMutexRelease(spi_transfer_mutex); + + return SL_STATUS_OK; +} + +void sl_si91x_host_hold_in_reset(void) +{ + GPIO_PinModeSet(RESET_PIN.port, RESET_PIN.pin, gpioModePushPull, 1); + GPIO_PinOutClear(RESET_PIN.port, RESET_PIN.pin); +} + +void sl_si91x_host_release_from_reset(void) +{ + GPIO_PinModeSet(RESET_PIN.port, RESET_PIN.pin, gpioModeWiredOrPullDown, 1); +} + +void sl_si91x_host_enable_bus_interrupt(void) +{ + NVIC_EnableIRQ(GPIO_ODD_IRQn); +} + +void sl_si91x_host_disable_bus_interrupt(void) +{ + NVIC_DisableIRQ(GPIO_ODD_IRQn); +} + +bool sl_si91x_host_is_in_irq_context(void) +{ + return (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0U; +} diff --git a/components/device/silabs/si91x/wireless/host_mcu/efx32/efx32_ncp_host.c b/components/device/silabs/si91x/wireless/host_mcu/efx32/efx32_ncp_host.c index 9cadbbf2b..b07eed3f0 100644 --- a/components/device/silabs/si91x/wireless/host_mcu/efx32/efx32_ncp_host.c +++ b/components/device/silabs/si91x/wireless/host_mcu/efx32/efx32_ncp_host.c @@ -33,6 +33,9 @@ #include #include "FreeRTOS.h" +#define LDMA_MAX_TRANSFER_LENGTH 4096 +#define LDMA_DESCRIPTOR_ARRAY_LENGTH (LDMA_MAX_TRANSFER_LENGTH / 2048) + static bool dma_callback(unsigned int channel, unsigned int sequenceNo, void *userParam); unsigned int rx_ldma_channel; @@ -42,12 +45,14 @@ osMutexId_t ncp_transfer_mutex = 0; static uint32_t dummy_buffer; static sl_si91x_host_init_configuration init_config = { 0 }; +uint8_t dummy_buffer_test[2500]; + // LDMA descriptor and transfer configuration structures for USART TX channel -LDMA_Descriptor_t ldmaTXDescriptor; +LDMA_Descriptor_t ldmaTXDescriptor[LDMA_DESCRIPTOR_ARRAY_LENGTH]; LDMA_TransferCfg_t ldmaTXConfig; // LDMA descriptor and transfer configuration structures for USART RX channel -LDMA_Descriptor_t ldmaRXDescriptor; +LDMA_Descriptor_t ldmaRXDescriptor[LDMA_DESCRIPTOR_ARRAY_LENGTH]; LDMA_TransferCfg_t ldmaRXConfig; static osSemaphoreId_t transfer_done_semaphore = NULL; @@ -91,7 +96,7 @@ static void efx32_ncp_uart_init(void) CMU_ClockEnable(NCP_USART_CMU_CLOCK, true); // UART Rx - GPIO_PinModeSet(NCP_UART_RX_PIN.port, NCP_UART_RX_PIN.pin, gpioModeInput, 0); + GPIO_PinModeSet(NCP_UART_RX_PIN.port, NCP_UART_RX_PIN.pin, gpioModeWiredAndPullUp, 0); // UART Tx GPIO_PinModeSet(NCP_UART_TX_PIN.port, NCP_UART_TX_PIN.pin, gpioModePushPull, 1); @@ -262,6 +267,7 @@ void sl_si91x_host_enable_high_speed_bus() */ sl_status_t sl_si91x_host_spi_transfer(const void *tx_buffer, void *rx_buffer, uint16_t buffer_length) { + int i; osMutexAcquire(ncp_transfer_mutex, 0xFFFFFFFFUL); if (buffer_length < 16) { @@ -283,23 +289,44 @@ sl_status_t sl_si91x_host_spi_transfer(const void *tx_buffer, void *rx_buffer, u buffer_length--; } } else { - if (tx_buffer == NULL) { - dummy_buffer = 0; - ldmaTXDescriptor = - (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2P_BYTE(&dummy_buffer, &(SPI_USART->TXDATA), buffer_length); - } else { - ldmaTXDescriptor = - (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_M2P_BYTE(tx_buffer, &(SPI_USART->TXDATA), buffer_length); + if (buffer_length <= 2048) { + if (tx_buffer == NULL) { + dummy_buffer = 0; + ldmaTXDescriptor[0] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2P_BYTE(&dummy_buffer, &(SPI_USART->TXDATA), buffer_length); + } else { + ldmaTXDescriptor[0] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_M2P_BYTE(tx_buffer, &(SPI_USART->TXDATA), buffer_length); + } + if (rx_buffer == NULL) { + ldmaRXDescriptor[0] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2P_BYTE(&(SPI_USART->RXDATA), &dummy_buffer, buffer_length); + } else { + ldmaRXDescriptor[0] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2M_BYTE(&(SPI_USART->RXDATA), rx_buffer, buffer_length); + } } - if (rx_buffer == NULL) { - ldmaRXDescriptor = - (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2P_BYTE(&(SPI_USART->RXDATA), &dummy_buffer, buffer_length); - } else { - ldmaRXDescriptor = - (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2M_BYTE(&(SPI_USART->RXDATA), rx_buffer, buffer_length); + else { + if (tx_buffer == NULL) { + tx_buffer = (uint8_t *)&dummy_buffer_test; + } else if (rx_buffer == NULL) { + rx_buffer = (uint8_t *)&dummy_buffer_test; + } + //Transfer length is more than 2048 bytes. Initialize multiple LDMA Tx descriptor. + for (i = 0; i < (LDMA_DESCRIPTOR_ARRAY_LENGTH - 1); i++) { + ldmaRXDescriptor[i] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_LINKREL_P2M_BYTE(&(SPI_USART->RXDATA), (rx_buffer + (2048 * i)), 2048, 1); + ldmaTXDescriptor[i] = + (LDMA_Descriptor_t)LDMA_DESCRIPTOR_LINKREL_M2P_BYTE((tx_buffer + (2048 * i)), &(SPI_USART->TXDATA), 2048, 1); + } + ldmaRXDescriptor[i] = (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_P2M_BYTE(&(SPI_USART->RXDATA), + (rx_buffer + (2048 * i)), + (buffer_length - (2048 * i))); + ldmaTXDescriptor[i] = (LDMA_Descriptor_t)LDMA_DESCRIPTOR_SINGLE_M2P_BYTE((tx_buffer + (2048 * i)), + &(SPI_USART->TXDATA), + (buffer_length - (2048 * i))); } - // Transfer a byte on free space in the USART buffer ldmaTXConfig = (LDMA_TransferCfg_t)LDMA_TRANSFER_CFG_PERIPHERAL(SPI_USART_LDMA_TX); @@ -307,8 +334,8 @@ sl_status_t sl_si91x_host_spi_transfer(const void *tx_buffer, void *rx_buffer, u ldmaRXConfig = (LDMA_TransferCfg_t)LDMA_TRANSFER_CFG_PERIPHERAL(SPI_USART_LDMA_RX); // Start both channels - DMADRV_LdmaStartTransfer(rx_ldma_channel, &ldmaRXConfig, &ldmaRXDescriptor, dma_callback, NULL); - DMADRV_LdmaStartTransfer(tx_ldma_channel, &ldmaTXConfig, &ldmaTXDescriptor, NULL, NULL); + DMADRV_LdmaStartTransfer(rx_ldma_channel, &ldmaRXConfig, ldmaRXDescriptor, dma_callback, NULL); + DMADRV_LdmaStartTransfer(tx_ldma_channel, &ldmaTXConfig, ldmaTXDescriptor, NULL, NULL); if (osSemaphoreAcquire(transfer_done_semaphore, 1000) != osOK) { BREAKPOINT(); @@ -387,4 +414,4 @@ void sl_si91x_host_disable_bus_interrupt(void) bool sl_si91x_host_is_in_irq_context(void) { return (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0U; -} \ No newline at end of file +} diff --git a/components/device/silabs/si91x/wireless/host_mcu/stm32/stm32_ncp_host.c b/components/device/silabs/si91x/wireless/host_mcu/stm32/stm32_ncp_host.c index 327a96111..c50f44c6f 100644 --- a/components/device/silabs/si91x/wireless/host_mcu/stm32/stm32_ncp_host.c +++ b/components/device/silabs/si91x/wireless/host_mcu/stm32/stm32_ncp_host.c @@ -123,7 +123,7 @@ static void MX_GPIO_Init(void) /*Configure GPIO pin : PC7 */ /* RESET Pin */ GPIO_InitStruct.Pin = GPIO_PIN_7; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); @@ -259,7 +259,7 @@ void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi) void gpio_interrupt(void) { // Trigger SiWx91x BUS Event - sl_si91x_host_set_bus_event(NCP_HOST_BUS_RX_EVENT); + sl_si91x_host_set_bus_event(SL_SI91X_NCP_HOST_BUS_RX_EVENT); } bool sl_si91x_host_is_in_irq_context(void) { diff --git a/components/device/silabs/si91x/wireless/inc/sl_rsi_utility.h b/components/device/silabs/si91x/wireless/inc/sl_rsi_utility.h index fbf5945de..e42bb502f 100644 --- a/components/device/silabs/si91x/wireless/inc/sl_rsi_utility.h +++ b/components/device/silabs/si91x/wireless/inc/sl_rsi_utility.h @@ -3,7 +3,7 @@ * @brief ******************************************************************************* * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * * SPDX-License-Identifier: Zlib @@ -45,8 +45,6 @@ #include "sl_wifi_device.h" #include "sl_si91x_types.h" -#define NCP_HOST_DATA_TX_EVENT (1 << 1) // Notify there is something to transmit -#define NCP_HOST_BUS_RX_EVENT (1 << 2) // Triggered by IRQ to indicate something to read #define NCP_HOST_COMMON_RESPONSE_EVENT (1 << 3) // Indicates RX response received for COMMON command type #define NCP_HOST_WLAN_RESPONSE_EVENT (1 << 4) // Indicates synchronous RX response received for WLAN command type #define NCP_HOST_WLAN_NOTIFICATION_EVENT (1 << 5) // Indicates asynchronous RX response received for WLAN command type @@ -279,7 +277,7 @@ uint32_t si91x_host_clear_events(uint32_t event_mask); /*Function used to uint32_t si91x_host_clear_bus_events(uint32_t event_mask); /*Function used to clear flags for specific event*/ uint32_t si91x_host_clear_async_events(uint32_t event_mask); /*Function used to clear flags for specific event*/ -sl_status_t sl_si91x_host_init_buffer_manager(void); +sl_status_t sl_si91x_host_init_buffer_manager(const sl_wifi_buffer_configuration_t *config); sl_status_t sl_si91x_host_deinit_buffer_manager(void); sl_status_t sl_si91x_host_allocate_buffer(sl_wifi_buffer_t **buffer, sl_wifi_buffer_type_t type, @@ -290,8 +288,7 @@ void *sl_si91x_host_get_buffer_data( uint16_t offset, uint16_t *data_length); /*Function used to obtain pointer to a specified location in the buffer*/ void sl_si91x_host_free_buffer( - sl_wifi_buffer_t *buffer, - sl_wifi_buffer_type_t type); /*Function used to deallocate the memory associated with buffer*/ + sl_wifi_buffer_t *buffer); /*Function used to deallocate the memory associated with buffer*/ // --------------- sl_status_t sl_si91x_host_add_to_queue( @@ -323,6 +320,9 @@ sl_status_t sl_si91x_flush_queue_based_on_type(sl_si91x_queue_type_t queue, uint32_t sl_si91x_host_queue_status( sl_si91x_queue_type_t queue); /*Function used to check whether queue is empty or not*/ +uint32_t sl_si91x_host_get_queue_packet_count( + sl_si91x_queue_type_t queue); /*Function used to get the number of packets in the queue*/ + // These aren't host APIs. These should go into a wifi bus API header sl_status_t sl_si91x_bus_read_memory( uint32_t addr, @@ -353,14 +353,12 @@ void sl_si91x_bus_rx_done_handler(void); /*Function used to check the bus * @param[in] uint8 type, type of the insruction to perform * @param[in] uint32 *data, pointer to data which is to be read/write * @param[out] none - * @return errCode - * < 0 = Command issued failure/Invalid command - * 0 = SUCCESS - * > 0 = Read value + * @return + * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. * @section description * This API is used to send boot instructions to WiFi module. **************************************************/ -int16_t sl_si91x_boot_instruction(uint8_t type, uint16_t *data); +sl_status_t sl_si91x_boot_instruction(uint8_t type, uint16_t *data); /***************************************************************************/ /** * @brief @@ -384,7 +382,7 @@ void sl_si91x_ulp_wakeup_init(void); /*Function used to initialize SPI interface * @brief * Function used to obtain wifi credential type like EsAP,PMK,etc.. * @param id - * Credential ID as identified by [sl_wifi_credential_id_t](../wwiseconnect-api-reference-guide-wi-fi/sl-wifi-types#sl-wifi-credential-id-t). + * Credential ID as identified by [sl_wifi_credential_id_t](../wiseconnect-api-reference-guide-wi-fi/sl-wifi-types#sl-wifi-credential-id-t). * @param type * It specifies type of credential. * @param cred diff --git a/components/device/silabs/si91x/wireless/inc/sl_si91x_constants.h b/components/device/silabs/si91x/wireless/inc/sl_si91x_constants.h index 36153bc72..b306983f1 100644 --- a/components/device/silabs/si91x/wireless/inc/sl_si91x_constants.h +++ b/components/device/silabs/si91x/wireless/inc/sl_si91x_constants.h @@ -144,7 +144,7 @@ #define RSI_ASSERT_INTR 0x80 //Bootloader defines -#define SL_SI91X_SAFE_UPGRADE_ADDR 0x1d408 +#define SL_SI91X_SAFE_UPGRADE_ADDR 0x55408 #define SL_SI91X_SAFE_UPGRADE BIT(12) #define SL_SI91X_FW_START_OF_FILE BIT(0) #define SL_SI91X_FW_END_OF_FILE BIT(1) @@ -195,6 +195,12 @@ #define SL_SI91X_CHACHAPOLY_IV_SIZE 12 #define SL_SI91X_CHACHAPOLY_MSG_MAX_SIZE 1200 +//ECDSA defines +#define SL_SI91X_PRIVATE_KEY_MAX_SIZE 64 +#define SL_SI91X_PUBLIC_KEY_MAX_SIZE 136 +#define SL_SI91X_SIGNATURE_MAX_SIZE 128 +#define SL_SI91X_ECDSA_MSG_MAX_SIZE 1000 + //***************************** Macros for Crypto End **********************************/ typedef struct { @@ -524,34 +530,34 @@ typedef enum { #ifndef SLI_SI91X_MCU_INTERFACE RSI_WLAN_REQ_CERT_VALID = 0xBC, #endif - RSI_WLAN_REQ_FREQ_OFFSET = 0xF3, - RSI_WLAN_REQ_DYNAMIC_POOL = 0xC7, - RSI_WLAN_REQ_MDNSD = 0xDB, - RSI_WLAN_REQ_GET_DPD_DATA = 0xDC, - RSI_WLAN_REQ_FTP = 0xE2, - RSI_WLAN_REQ_FTP_FILE_WRITE = 0xE3, - RSI_WLAN_REQ_SMTP_CLIENT = 0xE6, - RSI_WLAN_REQ_OTA_FWUP = 0xEF, - RSI_WLAN_REQ_WEBPAGE_LOAD = 0x50, - RSI_WLAN_REQ_JSON_LOAD = 0x9c, - RSI_WLAN_REQ_WEBPAGE_ERASE = 0x9A, - RSI_WLAN_REQ_JSON_OBJECT_ERASE = 0x9B, - RSI_WLAN_REQ_WEBPAGE_CLEAR_ALL = 0x7F, - RSI_WLAN_REQ_HOST_WEBPAGE_SEND = 0x56, - RSI_WLAN_REQ_GET_RANDOM = 0xF8, - RSI_WLAN_REQ_POP3_CLIENT = 0xE7, - RSI_WLAN_REQ_DHCP_USER_CLASS = 0xEC, - RSI_WLAN_REQ_TIMEOUT = 0xEA, - RSI_WLAN_REQ_GET_STATS = 0xF1, - RSI_WLAN_REQ_UPDATE_TCP_WINDOW = 0xF5, - RSI_WLAN_REQ_DNS_UPDATE = 0xED, - RSI_WLAN_REQ_DNS_SERVER_ADD = 0x55, - RSI_WLAN_REQ_TSF = 0x65, - SL_SI91X_WIFI_BTR_REQ_SET_CHANNEL = 0x7A, - SL_SI91X_WIFI_BTR_REQ_PEER_LIST_UPDATE = 0x8B, - SL_SI91X_WIFI_BTR_REQ_CONFIG_PARAMS = 0x8C, - SL_SI91X_WIFI_BTR_REQ_SET_MCAST_FILTER = 0x8D, - SL_SI91X_WIFI_BTR_REQ_FLUSH_DATA_Q = 0x8E, + RSI_WLAN_REQ_FREQ_OFFSET = 0xF3, + RSI_WLAN_REQ_DYNAMIC_POOL = 0xC7, + RSI_WLAN_REQ_MDNSD = 0xDB, + RSI_WLAN_REQ_GET_DPD_DATA = 0xDC, + RSI_WLAN_REQ_FTP = 0xE2, + RSI_WLAN_REQ_FTP_FILE_WRITE = 0xE3, + RSI_WLAN_REQ_SMTP_CLIENT = 0xE6, + RSI_WLAN_REQ_OTA_FWUP = 0xEF, + RSI_WLAN_REQ_WEBPAGE_LOAD = 0x50, + RSI_WLAN_REQ_JSON_LOAD = 0x9c, + RSI_WLAN_REQ_WEBPAGE_ERASE = 0x9A, + RSI_WLAN_REQ_JSON_OBJECT_ERASE = 0x9B, + RSI_WLAN_REQ_WEBPAGE_CLEAR_ALL = 0x7F, + RSI_WLAN_REQ_HOST_WEBPAGE_SEND = 0x56, + RSI_WLAN_REQ_GET_RANDOM = 0xF8, + RSI_WLAN_REQ_POP3_CLIENT = 0xE7, + RSI_WLAN_REQ_DHCP_USER_CLASS = 0xEC, + RSI_WLAN_REQ_TIMEOUT = 0xEA, + RSI_WLAN_REQ_GET_STATS = 0xF1, + RSI_WLAN_REQ_UPDATE_TCP_WINDOW = 0xF5, + RSI_WLAN_REQ_DNS_UPDATE = 0xED, + RSI_WLAN_REQ_DNS_SERVER_ADD = 0x55, + RSI_WLAN_REQ_TSF = 0x65, + RSI_WLAN_REQ_SET_TRANSCEIVER_CHANNEL = 0x7A, + RSI_WLAN_REQ_TRANSCEIVER_PEER_LIST_UPDATE = 0x8B, + RSI_WLAN_REQ_TRANSCEIVER_CONFIG_PARAMS = 0x8C, + RSI_WLAN_REQ_SET_TRANSCEIVER_MCAST_FILTER = 0x8D, + RSI_WLAN_REQ_TRANSCEIVER_FLUSH_DATA_Q = 0x8E, } rsi_wlan_cmd_request_t; // enumeration for WLAN command response codes @@ -657,46 +663,46 @@ typedef enum { #ifndef SLI_SI91X_MCU_INTERFACE RSI_WLAN_RSP_CERT_VALID = 0xBC, #endif - RSI_WLAN_RSP_CLIENT_CONNECTED = 0xC2, - RSI_WLAN_RSP_CLIENT_DISCONNECTED = 0xC3, - RSI_WLAN_RSP_FREQ_OFFSET = 0xF3, - RSI_WLAN_RSP_CALIB_WRITE = 0xCA, - RSI_WLAN_RSP_DYNAMIC_POOL = 0xC7, - RSI_WLAN_RSP_EMB_MQTT_PUBLISH_PKT = 0xCC, - RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE = 0xF0, - RSI_WLAN_RSP_MDNSD = 0xDB, - RSI_WLAN_RSP_GET_DPD_DATA = 0xDC, - RSI_WLAN_RSP_FTP = 0xE2, - RSI_WLAN_RSP_FTP_FILE_WRITE = 0xE3, - RSI_WLAN_RSP_SNTP_SERVER = 0xE5, - RSI_WLAN_RSP_SMTP_CLIENT = 0xE6, - RSI_WLAN_RSP_OTA_FWUP = 0xEF, - RSI_WLAN_RSP_WEBPAGE_LOAD = 0x50, - RSI_WLAN_RSP_JSON_LOAD = 0x9c, - RSI_WLAN_RSP_WEBPAGE_ERASE = 0x9A, - RSI_WLAN_RSP_JSON_OBJECT_ERASE = 0x9B, - RSI_WLAN_RSP_WEBPAGE_CLEAR_ALL = 0x7F, - RSI_WLAN_RSP_HOST_WEBPAGE_SEND = 0x56, - RSI_WLAN_RSP_JSON_UPDATE = 0x9D, - RSI_WLAN_RSP_GET_RANDOM = 0xF8, - RSI_WLAN_RSP_ASYNCHRONOUS = 0xFF, - RSI_WLAN_RSP_JSON_EVENT = 0xEE, - RSI_WLAN_RSP_POP3_CLIENT = 0xE7, - RSI_WLAN_RSP_POP3_CLIENT_TERMINATE = 0xE8, - RSI_WLAN_RSP_DHCP_USER_CLASS = 0xEC, - RSI_WLAN_RSP_TIMEOUT = 0xEA, - RSI_WLAN_RSP_URL_REQUEST = 0x64, - RSI_WLAN_RSP_MODULE_STATE = 0x70, - RSI_WLAN_RSP_TWT_ASYNC = 0x71, - RSI_WLAN_RSP_UPDATE_TCP_WINDOW = 0xF5, - RSI_WLAN_RSP_TSF = 0x65, - SL_SI91X_WIFI_BTR_RSP_SET_CHANNEL = 0x7A, - SL_SI91X_WIFI_BTR_RSP_PEER_LIST_UPDATE = 0x8B, - SL_SI91X_WIFI_BTR_RSP_CONFIG_PARAMS = 0x8C, - SL_SI91X_WIFI_BTR_RSP_SET_MCAST_FILTER = 0x8D, - SL_SI91X_WIFI_BTR_RSP_FLUSH_DATA_Q = 0x8E, - SL_SI91X_WIFI_BTR_TX_DATA_STATUS = 0x3D, - SL_SI91X_WIFI_RX_DOT11_DATA = 0x03, + RSI_WLAN_RSP_CLIENT_CONNECTED = 0xC2, + RSI_WLAN_RSP_CLIENT_DISCONNECTED = 0xC3, + RSI_WLAN_RSP_FREQ_OFFSET = 0xF3, + RSI_WLAN_RSP_CALIB_WRITE = 0xCA, + RSI_WLAN_RSP_DYNAMIC_POOL = 0xC7, + RSI_WLAN_RSP_EMB_MQTT_PUBLISH_PKT = 0xCC, + RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE = 0xF0, + RSI_WLAN_RSP_MDNSD = 0xDB, + RSI_WLAN_RSP_GET_DPD_DATA = 0xDC, + RSI_WLAN_RSP_FTP = 0xE2, + RSI_WLAN_RSP_FTP_FILE_WRITE = 0xE3, + RSI_WLAN_RSP_SNTP_SERVER = 0xE5, + RSI_WLAN_RSP_SMTP_CLIENT = 0xE6, + RSI_WLAN_RSP_OTA_FWUP = 0xEF, + RSI_WLAN_RSP_WEBPAGE_LOAD = 0x50, + RSI_WLAN_RSP_JSON_LOAD = 0x9c, + RSI_WLAN_RSP_WEBPAGE_ERASE = 0x9A, + RSI_WLAN_RSP_JSON_OBJECT_ERASE = 0x9B, + RSI_WLAN_RSP_WEBPAGE_CLEAR_ALL = 0x7F, + RSI_WLAN_RSP_HOST_WEBPAGE_SEND = 0x56, + RSI_WLAN_RSP_JSON_UPDATE = 0x9D, + RSI_WLAN_RSP_GET_RANDOM = 0xF8, + RSI_WLAN_RSP_ASYNCHRONOUS = 0xFF, + RSI_WLAN_RSP_JSON_EVENT = 0xEE, + RSI_WLAN_RSP_POP3_CLIENT = 0xE7, + RSI_WLAN_RSP_POP3_CLIENT_TERMINATE = 0xE8, + RSI_WLAN_RSP_DHCP_USER_CLASS = 0xEC, + RSI_WLAN_RSP_TIMEOUT = 0xEA, + RSI_WLAN_RSP_URL_REQUEST = 0x64, + RSI_WLAN_RSP_MODULE_STATE = 0x70, + RSI_WLAN_RSP_TWT_ASYNC = 0x71, + RSI_WLAN_RSP_UPDATE_TCP_WINDOW = 0xF5, + RSI_WLAN_RSP_TSF = 0x65, + RSI_WLAN_RSP_TRANSCEIVER_SET_CHANNEL = 0x7A, + RSI_WLAN_RSP_TRANSCEIVER_PEER_LIST_UPDATE = 0x8B, + RSI_WLAN_RSP_TRANSCEIVER_CONFIG_PARAMS = 0x8C, + RSI_WLAN_RSP_TRANSCEIVER_SET_MCAST_FILTER = 0x8D, + RSI_WLAN_RSP_TRANSCEIVER_FLUSH_DATA_Q = 0x8E, + RSI_WLAN_RSP_TRANSCEIVER_TX_DATA_STATUS = 0x3D, + SL_SI91X_WIFI_RX_DOT11_DATA = 0x03, // Unimplemented commands after 22Q2 RSI_WLAN_RATE_RSP_STATS = 0x88 } rsi_wlan_cmd_response_t; diff --git a/components/device/silabs/si91x/wireless/inc/sl_si91x_core_utilities.h b/components/device/silabs/si91x/wireless/inc/sl_si91x_core_utilities.h index 34d6edc3d..ae13c6ae3 100644 --- a/components/device/silabs/si91x/wireless/inc/sl_si91x_core_utilities.h +++ b/components/device/silabs/si91x/wireless/inc/sl_si91x_core_utilities.h @@ -138,3 +138,25 @@ static inline sl_status_t convert_si91x_status_to_sl_status(si91x_status_t si91x return SL_STATUS_FAIL; } } + +/****************************************************************************** + * @brief + * Atomically append given buffer to the end of a buffer queue + * @param[in] queue + * Destination buffer queue + * @param[in] buffer + * Buffer + *****************************************************************************/ +void sli_si91x_append_to_buffer_queue(sl_si91x_buffer_queue_t *queue, sl_wifi_buffer_t *buffer); + +/****************************************************************************** + * @brief + * Atomically remove the head from a buffer queue + * @param[in] queue + * Source buffer queue + * @param[in] buffer + * Destination buffer + * @return + * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. + *****************************************************************************/ +sl_status_t sli_si91x_pop_from_buffer_queue(sl_si91x_buffer_queue_t *queue, sl_wifi_buffer_t **buffer); diff --git a/components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h b/components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h index fa942d769..6aaabb818 100644 --- a/components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h +++ b/components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h @@ -43,6 +43,30 @@ return s; \ } while (0); +/** + * All flags used in bus event mask + * There are three main groups of flags, each with SL_SI91X_COMMAND_TYPE_COUNT number of unique flags + * + */ +#define SL_SI91X_TX_PENDING_FLAG(x) (1 << (x)) +#define SL_SI91X_RESPONSE_FLAG(x) (1 << (x)) + +//! Tx Flags +#define SL_SI91X_COMMON_TX_PENDING_EVENT SL_SI91X_TX_PENDING_FLAG(SI91X_COMMON_CMD) +#define SL_SI91X_WLAN_TX_PENDING_EVENT SL_SI91X_TX_PENDING_FLAG(SI91X_WLAN_CMD) +#define SL_SI91X_NETWORK_TX_PENDING_EVENT SL_SI91X_TX_PENDING_FLAG(SI91X_NETWORK_CMD) +#define SL_SI91X_BT_TX_PENDING_EVENT SL_SI91X_TX_PENDING_FLAG(SI91X_BT_CMD) +#define SL_SI91X_SOCKET_TX_PENDING_EVENT SL_SI91X_TX_PENDING_FLAG(SI91X_SOCKET_CMD) +#define SL_SI91X_SOCKET_DATA_TX_PENDING_EVENT SL_SI91X_TX_PENDING_FLAG(SI91X_SOCKET_DATA) + +//! Rx Flags +#define SL_SI91X_NCP_HOST_BUS_RX_EVENT \ + SL_SI91X_RESPONSE_FLAG(SI91X_CMD_MAX) //Triggered by IRQ to indicate something to read + +#define SL_SI91X_ALL_TX_PENDING_COMMAND_EVENTS \ + (SL_SI91X_COMMON_TX_PENDING_EVENT | SL_SI91X_WLAN_TX_PENDING_EVENT | SL_SI91X_NETWORK_TX_PENDING_EVENT \ + | SL_SI91X_BT_TX_PENDING_EVENT | SL_SI91X_SOCKET_TX_PENDING_EVENT) + typedef enum { SL_NCP_NORMAL_POWER_MODE, SL_NCP_LOW_POWER_MODE, SL_NCP_ULTRA_LOW_POWER_MODE } sl_si91x_power_mode_t; typedef struct sl_si91x_power_configuration sl_si91x_power_configuration_t; @@ -757,20 +781,20 @@ sl_status_t sl_si91x_get_ram_log(uint32_t address, uint32_t length); /** @} */ -/*! @cond SL_SI91X_WIFI_BTR_MODE */ +/*! @cond WIFI_TRANSCEIVER_MODE */ /***************************************************************************/ /** - * @brief Si91X specific Wi-Fi BTR mode driver function to send Tx data - * @param[in] data_ctrlblk - Meta data for the payload. + * @brief Si91X specific Wi-Fi transceiver mode driver function to send Tx data + * @param[in] control - Meta data for the payload. * @param[in] payload - Pointer to payload to be sent to LMAC. * @param[in] payload_len - Length of the payload. * @param[in] wait_time - Wait time for the command response. * @return sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. *******************************************************************************/ -sl_status_t sl_si91x_driver_btr_send_data(sl_wifi_btr_data_ctrlblk_t *data_ctrlblk, - uint8_t *payload, - uint16_t payload_len, - uint32_t wait_time); -/*! @endcond SL_SI91X_WIFI_BTR_MODE */ +sl_status_t sl_si91x_driver_send_transceiver_data(sl_wifi_transceiver_tx_data_control_t *control, + uint8_t *payload, + uint16_t payload_len, + uint32_t wait_time); +/*! @endcond WIFI_TRANSCEIVER_MODE */ /***************************************************************************/ /** * @brief @@ -821,11 +845,10 @@ sl_status_t sl_si91x_custom_driver_send_command(uint32_t command, * 0 = Middle of file * 1 = Start of file * 2 = End of file - * @return errCode - * 1 = Command issue failed - * 0 = Success + * @return + * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. ******************************************************************************/ -int16_t sl_si91x_bl_upgrade_firmware(uint8_t *firmware_image, uint32_t fw_image_size, uint8_t flags); +sl_status_t sl_si91x_bl_upgrade_firmware(uint8_t *firmware_image, uint32_t fw_image_size, uint8_t flags); /***************************************************************************/ /** * @brief diff --git a/components/device/silabs/si91x/wireless/inc/sl_si91x_protocol_types.h b/components/device/silabs/si91x/wireless/inc/sl_si91x_protocol_types.h index abbd899c6..ef9c118d4 100644 --- a/components/device/silabs/si91x/wireless/inc/sl_si91x_protocol_types.h +++ b/components/device/silabs/si91x/wireless/inc/sl_si91x_protocol_types.h @@ -1085,7 +1085,8 @@ typedef struct { } sl_si91x_socket_connect_or_listen_parameters_t; typedef struct { - uint8_t pll_mode; + uint8_t + pll_mode; ///< PLL Mode. 0 - less than 120Mhz TA SoC clock; 1 - greater than 120Mhz TA SoC clock (Mode 1 is not currently supported for coex) uint8_t rf_type; uint8_t wireless_mode; uint8_t enable_ppp; @@ -2089,6 +2090,28 @@ typedef struct { uint8_t msg[SL_SI91X_CHACHAPOLY_MSG_MAX_SIZE]; } sl_si91x_chachapoly_request_t; +typedef struct { + uint8_t algorithm_type; + uint8_t algorithm_sub_type; + uint8_t ecdsa_flags; + uint8_t curve_id; + uint8_t sha_mode; + uint8_t private_key_length; + uint8_t public_key_length; + uint8_t signature_length; + uint16_t current_chunk_length; + uint16_t msg_len; +#ifdef SLI_SI917B0 + sl_si91x_key_descriptor_t key_info; +#else + uint32_t key_length; +#endif + uint8_t private_key[SL_SI91X_PRIVATE_KEY_MAX_SIZE]; + uint8_t public_key[SL_SI91X_PUBLIC_KEY_MAX_SIZE]; + uint8_t signature[SL_SI91X_SIGNATURE_MAX_SIZE]; + uint8_t msg[SL_SI91X_ECDSA_MSG_MAX_SIZE]; +} sl_si91x_ecdsa_request_t; + typedef struct { uint8_t algorithm_type; uint8_t ecdh_mode; diff --git a/components/device/silabs/si91x/wireless/inc/sl_si91x_status.h b/components/device/silabs/si91x/wireless/inc/sl_si91x_status.h index 7d293e857..19804bacf 100644 --- a/components/device/silabs/si91x/wireless/inc/sl_si91x_status.h +++ b/components/device/silabs/si91x/wireless/inc/sl_si91x_status.h @@ -85,10 +85,5 @@ typedef enum { RSI_ERROR_BLE_INVALID_CALLBACK_CNT = -53, RSI_ERROR_BLE_ADV_EXT_COMMAND_NOT_ALLOWED = -54, RSI_ERROR_BLE_LEGACY_COMMAND_NOT_ALLOWED = -55, - RSI_ERROR_TRNG_DUPLICATE_ENTROPY = -56, - RSI_ERROR_INVALID_MAC_ADDRESS = -58, - RSI_ERROR_INVALID_QOS_PRIORITY = -59, - RSI_ERROR_INVALID_CHANNEL = -60, - RSI_ERROR_INVALID_DATA_RATE = -61, - RSI_ERROR_INVALID_BTR_CONFIG = -62 + RSI_ERROR_TRNG_DUPLICATE_ENTROPY = -56 } si91x_status_t; diff --git a/components/device/silabs/si91x/wireless/inc/sl_si91x_types.h b/components/device/silabs/si91x/wireless/inc/sl_si91x_types.h index 616158e74..9d77da116 100644 --- a/components/device/silabs/si91x/wireless/inc/sl_si91x_types.h +++ b/components/device/silabs/si91x/wireless/inc/sl_si91x_types.h @@ -51,6 +51,7 @@ typedef enum { SI91X_NETWORK_CMD = 2, ///< SI91X Network Command SI91X_SOCKET_CMD = 3, ///< SI91X Socket Command SI91X_BT_CMD = 4, ///< SI91X Bluetooth Command + SI91X_SOCKET_DATA = 5, ///< SI91X Socket Data Command SI91X_CMD_MAX ///< SI91X Maximum Command value } sl_si91x_command_type_t; @@ -64,23 +65,24 @@ typedef enum { SI91X_NETWORK_CMD_QUEUE = 2, ///< SI91X Network Command queue SI91X_SOCKET_CMD_QUEUE = 3, ///< SI91X Socket Command queue SI91X_BT_CMD_QUEUE = 4, ///< SI91X Bluetooth Command queue + SI91X_SOCKET_DATA_QUEUE = 5, ///< SI91X Socket Command queue // SI91X response queue types - SI91X_COMMON_RESPONSE_QUEUE = 5, ///< SI91X common Command response queue - SI91X_WLAN_RESPONSE_QUEUE = 6, ///< SI91X Wireless LAN Command response queue - SI91X_NETWORK_RESPONSE_QUEUE = 7, ///< SI91X Network Command response queue - SI91X_SOCKET_RESPONSE_QUEUE = 8, ///< SI91X Socket Command response queue - SI91X_BT_RESPONSE_QUEUE = 9, ///< SI91X Bluetooth Command response queue + SI91X_COMMON_RESPONSE_QUEUE = 6, ///< SI91X common Command response queue + SI91X_WLAN_RESPONSE_QUEUE = 7, ///< SI91X Wireless LAN Command response queue + SI91X_NETWORK_RESPONSE_QUEUE = 8, ///< SI91X Network Command response queue + SI91X_SOCKET_RESPONSE_QUEUE = 9, ///< SI91X Socket Command response queue + SI91X_BT_RESPONSE_QUEUE = 10, ///< SI91X Bluetooth Command response queue // All SI91X WLAN Async Events use this queue - SI91X_WLAN_EVENT_QUEUE = 10, ///< SI91X Wireless LAN Asynchronous response queue + SI91X_WLAN_EVENT_QUEUE = 11, ///< SI91X Wireless LAN Asynchronous response queue // All SI91X Network Async Events use this queue - SI91X_NETWORK_EVENT_QUEUE = 11, ///< SI91X Network Asynchronous response queue + SI91X_NETWORK_EVENT_QUEUE = 12, ///< SI91X Network Asynchronous response queue - SI91X_SOCKET_EVENT_QUEUE = 12, ///< SI91X Asynchronous Sockets events queue + SI91X_SOCKET_EVENT_QUEUE = 13, ///< SI91X Asynchronous Sockets events queue // ALL SOC rx packets use this queue - CCP_M4_TA_RX_QUEUE = 13, ///< SI91X M4 Receive queue + CCP_M4_TA_RX_QUEUE = 14, ///< SI91X M4 Receive queue SI91X_QUEUE_MAX ///< SI91X Maximum queue type } sl_si91x_queue_type_t; @@ -197,6 +199,11 @@ typedef struct { sl_si91x_socket_id; ///< socket_id, used only for SI91X_SOCKET_CMD queue to update socket_id in command trace of bus thread. } sl_si91x_queue_packet_t; +typedef struct { + sl_wifi_buffer_t *head; + sl_wifi_buffer_t *tail; +} sl_si91x_buffer_queue_t; + /// TA buffer allocation command parameters /// The summation of the all three ratios should max 10 and the ratio should be in decimal value typedef struct { diff --git a/components/device/silabs/si91x/wireless/inc/sl_wifi_device.h b/components/device/silabs/si91x/wireless/inc/sl_wifi_device.h index 4e5ab82a9..04fd18c49 100644 --- a/components/device/silabs/si91x/wireless/inc/sl_wifi_device.h +++ b/components/device/silabs/si91x/wireless/inc/sl_wifi_device.h @@ -97,12 +97,20 @@ #define SL_SI91X_FEAT_SSL_HIGH_STREAMING_BIT BIT(10) ///To enable support for long sized ICMP packets. Max 1472 Bytes for IPv4 and Max 1452 Bytes for IPv6. -/// @note bit 11 & bits 13 - 29 are reserved +/// @note bit 11 & bits 16 - 29 are reserved #define SL_SI91X_FEAT_LONG_ICMP_PACKET BIT(12) +/*! @cond WIFI_TRANSCEIVER_MODE */ +/// Enable support to store peer information in the MAC layer. +#define SL_SI91X_FEAT_TRANSCEIVER_MAC_PEER_DS_SUPPORT BIT(13) +/*! @endcond WIFI_TRANSCEIVER_MODE */ + /// To enable support for the Long HTTP GET URL. Maximum URL supported is 2048 bytes. #define SL_SI91X_FEAT_LONG_HTTP_URL BIT(14) +/// To disable 11ax connections, i.e. force connection in 11ac or lower +#define SL_SI91X_FEAT_DISABLE_11AX_SUPPORT BIT(15) + /// Secure Attestation /// @note bit 31 is reserved #define SL_SI91X_FEAT_SECURE_ATTESTATION BIT(30) @@ -855,7 +863,7 @@ typedef enum { SL_SI91X_CLIENT_MODE = 0, ///< WiFi personal client mode SL_SI91X_ENTERPRISE_CLIENT_MODE = 2, ///< WiFi enterprise client mode SL_SI91X_ACCESS_POINT_MODE = 6, ///< WiFi access point mode - SL_SI91X_WLAN_BTR_MODE = 7, ///< WiFi basic transceiver mode + SL_SI91X_TRANSCEIVER_MODE = 7, ///< WiFi transceiver mode SL_SI91X_TRANSMIT_TEST_MODE = 8, ///< WiFi transit test mode SL_SI91X_CONCURRENT_MODE = 9, ///< WiFi concurrent mode __FORCE_OPERATION_ENUM_16BIT = 0xFFFF @@ -1136,16 +1144,16 @@ static const sl_wifi_device_configuration_t sl_wifi_default_transmit_test_config .config_feature_bit_map = SL_SI91X_FEAT_SLEEP_GPIO_SEL_BITMAP } }; -/*! @cond SL_SI91X_WIFI_BTR_MODE */ -static const sl_wifi_device_configuration_t sl_wifi_default_btr_configuration = { +/*! @cond WIFI_TRANSCEIVER_MODE */ +static const sl_wifi_device_configuration_t sl_wifi_default_transceiver_configuration = { .boot_option = LOAD_NWP_FW, .mac_address = NULL, .band = SL_SI91X_WIFI_BAND_2_4GHZ, .region_code = JP, - .boot_config = { .oper_mode = SL_SI91X_WLAN_BTR_MODE, + .boot_config = { .oper_mode = SL_SI91X_TRANSCEIVER_MODE, .coex_mode = SL_SI91X_WLAN_ONLY_MODE, -#if MAC_PEER_DS_SUPPORT - .feature_bit_map = (FEAT_BTR_MAC_PEER_DS_SUPPORT | SL_SI91X_FEAT_SECURITY_OPEN), +#ifdef TRANSCEIVER_MAC_PEER_DS_SUPPORT + .feature_bit_map = (SL_SI91X_FEAT_TRANSCEIVER_MAC_PEER_DS_SUPPORT | SL_SI91X_FEAT_SECURITY_OPEN), #else .feature_bit_map = SL_SI91X_FEAT_SECURITY_OPEN, #endif @@ -1163,6 +1171,6 @@ static const sl_wifi_device_configuration_t sl_wifi_default_btr_configuration = .ble_ext_feature_bit_map = 0, .config_feature_bit_map = 0 } }; -/*! @endcond SL_SI91X_WIFI_BTR_MODE */ +/*! @endcond WIFI_TRANSCEIVER_MODE */ /** @} */ diff --git a/components/device/silabs/si91x/wireless/memory/lwip_buffers.c b/components/device/silabs/si91x/wireless/memory/lwip_buffers.c index 2c0b25c47..c8e96f0d0 100644 --- a/components/device/silabs/si91x/wireless/memory/lwip_buffers.c +++ b/components/device/silabs/si91x/wireless/memory/lwip_buffers.c @@ -45,7 +45,7 @@ void *sl_si91x_host_get_buffer_data(sl_wifi_buffer_t *buffer, uint16_t offset, u { } -void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer, sl_si91x_buffer_type_t type) +void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer) { pbuf_free((struct pbuf *)buffer); } diff --git a/components/device/silabs/si91x/wireless/memory/malloc_buffers.c b/components/device/silabs/si91x/wireless/memory/malloc_buffers.c index 3de9b899e..4ecceda8b 100644 --- a/components/device/silabs/si91x/wireless/memory/malloc_buffers.c +++ b/components/device/silabs/si91x/wireless/memory/malloc_buffers.c @@ -41,7 +41,7 @@ sl_status_t sl_si91x_host_allocate_buffer(sl_wifi_buffer_t **buffer, uint32_t buffer_size, uint32_t wait_duration_ms); void *sl_si91x_host_get_buffer_data(sl_wifi_buffer_t *buffer, uint16_t offset, uint16_t *data_length); -void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer, sl_wifi_buffer_type_t type); +void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer); sl_status_t sl_si91x_host_init_buffer_manager(void) { @@ -97,9 +97,8 @@ void *sl_si91x_host_get_buffer_data(sl_wifi_buffer_t *buffer, uint16_t offset, u return (void *)&temp->data[offset]; } -void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer, sl_wifi_buffer_type_t type) +void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer) { - (void)type; osMutexAcquire(malloc_free_mutex, 0xFFFFFFFFUL); free((void *)buffer); osMutexRelease(malloc_free_mutex); diff --git a/components/device/silabs/si91x/wireless/memory/mem_pool_buffer_quota.c b/components/device/silabs/si91x/wireless/memory/mem_pool_buffer_quota.c new file mode 100644 index 000000000..e29831d57 --- /dev/null +++ b/components/device/silabs/si91x/wireless/memory/mem_pool_buffer_quota.c @@ -0,0 +1,214 @@ +/***************************************************************************/ /** + * @file + * @brief + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ +#include "sli_mem_pool.h" +#include "sl_status.h" +#include "sl_wifi_host_interface.h" +#include "sl_si91x_host_interface.h" +#include "sl_constants.h" +#include "cmsis_os2.h" +#include "em_core.h" +#include + +#define BUFFER_TYPE 4 +#define WATERMARKLEVEL 10 +static sli_mem_pool_handle_t mem_pool; +static const sl_wifi_buffer_configuration_t *configuration; +void *allocated_wifi_buffer = NULL; +static uint8_t buffer_allocation[BUFFER_TYPE] = { 0, 0, 0, 0 }; +static uint8_t quota[BUFFER_TYPE]; + +/*---------------Static Function Declaration---------------------------------------*/ +static void sl_si91x_convert_config_structure_to_array(const sl_wifi_buffer_configuration_t *config); +static sl_status_t sl_si91x_check_for_valid_config(const sl_wifi_buffer_configuration_t *config); +static void sl_si91x_buffer_type_deallocation(sl_wifi_buffer_type_t type); +static void sl_si91x_buffer_type_allocation(sl_wifi_buffer_type_t type); +static sl_status_t sl_si91x_check_for_buffer_availability(sl_wifi_buffer_type_t type); +static bool sl_si91x_check_for_buffer_empty(void); +/*---------------------------------------------------------------------------------*/ + +sl_status_t sl_si91x_host_init_buffer_manager(const sl_wifi_buffer_configuration_t *config) +{ + SL_VERIFY_POINTER_OR_RETURN(config, SL_STATUS_NULL_POINTER); + sl_si91x_convert_config_structure_to_array(config); + // Checking for correctness in configuration + sl_status_t result = sl_si91x_check_for_valid_config(config); + VERIFY_STATUS_AND_RETURN(result); + configuration = config; + void *pool_buffer = configuration->buffer_memory; + uint8_t block_count = + configuration->tx_buffer_quota + configuration->rx_buffer_quota + configuration->control_buffer_quota; + uint32_t buffer_size = configuration->block_size * block_count; + if (configuration->buffer_memory == NULL) { + allocated_wifi_buffer = malloc(buffer_size); + if (allocated_wifi_buffer == NULL) { + return SL_STATUS_ALLOCATION_FAILED; + } + pool_buffer = allocated_wifi_buffer; + } + + sli_mem_pool_create(&mem_pool, configuration->block_size, block_count, pool_buffer, buffer_size); + return SL_STATUS_OK; +} + +sl_status_t sl_si91x_host_deinit_buffer_manager(void) +{ + // Ensuring that there are no buffers left to be deallocated from any buffer type + bool result = sl_si91x_check_for_buffer_empty(); + if (!result) { + SL_DEBUG_LOG("\r\n Invalid operation some buffers are not freed"); + return SL_STATUS_FAIL; + } + if (allocated_wifi_buffer != NULL) { + free(allocated_wifi_buffer); + allocated_wifi_buffer = NULL; + } + memset(&mem_pool, 0, sizeof(mem_pool)); + return SL_STATUS_OK; +} + +sl_status_t sl_si91x_host_allocate_buffer(sl_wifi_buffer_t **buffer, + sl_wifi_buffer_type_t type, + uint32_t buffer_size, + uint32_t wait_duration_ms) +{ + + UNUSED_PARAMETER(buffer_size); + sl_status_t result; + do { + // Ensuring that buffers are allocated as per the quota set. + result = sl_si91x_check_for_buffer_availability(type); + } while (result == SL_STATUS_FULL); + uint32_t start = osKernelGetTickCount(); + do { + *buffer = sli_mem_pool_alloc(&mem_pool); + if (*buffer != NULL) { + break; + } else { + osDelay(1); + } + } while ((osKernelGetTickCount() - start) < wait_duration_ms); + + if (*buffer == NULL) { + return SL_STATUS_ALLOCATION_FAILED; + } + (*buffer)->type = type; + // Increasing the count of current allocation of a buffer type + sl_si91x_buffer_type_allocation(type); + (*buffer)->node.node = NULL; + (*buffer)->length = configuration->block_size - sizeof(sl_wifi_buffer_t); + return SL_STATUS_OK; +} + +void *sl_si91x_host_get_buffer_data(sl_wifi_buffer_t *buffer, uint16_t offset, uint16_t *data_length) +{ + + if (offset >= buffer->length) { + *data_length = 0; + return NULL; + } + *data_length = buffer->length - offset; + return &buffer->data[offset]; +} + +void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer) +{ + sli_mem_pool_free(&mem_pool, buffer); + // Decreasing the count of the current allocation of the buffer type + sl_si91x_buffer_type_deallocation(buffer->type); +} + +static void sl_si91x_convert_config_structure_to_array(const sl_wifi_buffer_configuration_t *config) +{ + + quota[SL_WIFI_CONTROL_BUFFER] = config->control_buffer_quota; + quota[SL_WIFI_RX_FRAME_BUFFER] = config->rx_buffer_quota; + quota[SL_WIFI_TX_FRAME_BUFFER] = config->tx_buffer_quota; + return; +} + +//This functions checks whether buffers are available as per quota !! + +static sl_status_t sl_si91x_check_for_buffer_availability(sl_wifi_buffer_type_t type) +{ + CORE_DECLARE_IRQ_STATE; + CORE_ENTER_CRITICAL(); + if (buffer_allocation[type] < quota[type]) { + CORE_EXIT_ATOMIC(); + return SL_STATUS_OK; + } + CORE_EXIT_ATOMIC(); + return SL_STATUS_FULL; +} + +static sl_status_t sl_si91x_check_for_valid_config(const sl_wifi_buffer_configuration_t *config) +{ + CORE_DECLARE_IRQ_STATE; + CORE_ENTER_CRITICAL(); + if (config->control_buffer_quota < WATERMARKLEVEL || config->rx_buffer_quota < WATERMARKLEVEL + || config->tx_buffer_quota < WATERMARKLEVEL) { + CORE_EXIT_ATOMIC(); + SL_DEBUG_LOG("Quota for buffer types should be atleast 10"); + return SL_STATUS_INVALID_PARAMETER; + } + CORE_EXIT_ATOMIC(); + return SL_STATUS_OK; +} + +static void sl_si91x_buffer_type_allocation(sl_wifi_buffer_type_t type) +{ + CORE_DECLARE_IRQ_STATE; + CORE_ENTER_CRITICAL(); + buffer_allocation[type]++; + CORE_EXIT_ATOMIC(); + return; +} + +static void sl_si91x_buffer_type_deallocation(sl_wifi_buffer_type_t type) +{ + CORE_DECLARE_IRQ_STATE; + CORE_ENTER_CRITICAL(); + buffer_allocation[type]--; + CORE_EXIT_ATOMIC(); + return; +} + +static bool sl_si91x_check_for_buffer_empty(void) +{ + CORE_DECLARE_IRQ_STATE; + CORE_ENTER_CRITICAL(); + for (int i = 0; i < BUFFER_TYPE; i++) { + if (buffer_allocation[i] != 0) { + CORE_EXIT_ATOMIC(); + return false; + } + } + CORE_EXIT_ATOMIC(); + return true; +} \ No newline at end of file diff --git a/components/device/silabs/si91x/wireless/memory/mem_pool_buffers.c b/components/device/silabs/si91x/wireless/memory/mem_pool_buffers.c index ba5b1d081..3b992cd7c 100644 --- a/components/device/silabs/si91x/wireless/memory/mem_pool_buffers.c +++ b/components/device/silabs/si91x/wireless/memory/mem_pool_buffers.c @@ -103,9 +103,8 @@ void *sl_si91x_host_get_buffer_data(sl_wifi_buffer_t *buffer, uint16_t offset, u return &buffer->data[offset]; } -void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer, sl_wifi_buffer_type_t type) +void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer) { - UNUSED_PARAMETER(type); ++freed_buffers; sli_mem_pool_free(&mem_pool, buffer); -} +} \ No newline at end of file diff --git a/components/device/silabs/si91x/wireless/memory/static_buffer.c b/components/device/silabs/si91x/wireless/memory/static_buffer.c index f6015b393..283765088 100644 --- a/components/device/silabs/si91x/wireless/memory/static_buffer.c +++ b/components/device/silabs/si91x/wireless/memory/static_buffer.c @@ -46,7 +46,7 @@ void *sl_si91x_host_get_buffer_data(sl_wifi_buffer_t *buffer, uint16_t offset, u { } -void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer, sl_si91x_buffer_type_t type) +void sl_si91x_host_free_buffer(sl_wifi_buffer_t *buffer) { pbuf_free((struct pbuf *)buffer); } diff --git a/components/device/silabs/si91x/wireless/ncp_interface/sl_si91x_ncp_driver.c b/components/device/silabs/si91x/wireless/ncp_interface/sl_si91x_ncp_driver.c index 68591ad93..b0a4888d6 100644 --- a/components/device/silabs/si91x/wireless/ncp_interface/sl_si91x_ncp_driver.c +++ b/components/device/silabs/si91x/wireless/ncp_interface/sl_si91x_ncp_driver.c @@ -109,11 +109,10 @@ void sli_submit_rx_buffer(void) { } -int16_t sl_si91x_boot_instruction(uint8_t type, uint16_t *data) +sl_status_t sl_si91x_boot_instruction(uint8_t type, uint16_t *data) { sl_status_t retval = 0; uint16_t local = 0; - uint32_t j = 0; uint32_t cmd = 0; uint16_t read_data = 0; volatile int32_t loop_counter = 0; @@ -132,26 +131,27 @@ int16_t sl_si91x_boot_instruction(uint8_t type, uint16_t *data) break; case RSI_PING_WRITE: + // To Do: Recheck the number bytes to written into memory + retval = sl_si91x_bus_write_memory(0x51400, 2048, (uint8_t *)((uint32_t)data)); + VERIFY_STATUS_AND_RETURN(retval); - for (j = 0; j < 2048; j++) { - retval = sl_si91x_bus_write_memory(0x51400 + (j * 2), 2, (uint8_t *)((uint32_t)data + (j * 2))); - if (retval == SL_STATUS_FAIL) { - return retval; - } - } + // To Do: Recheck the number bytes to written into memory + retval = sl_si91x_bus_write_memory(0x51400 + 2048, 2048, (uint8_t *)((uint32_t)data + 2048)); + VERIFY_STATUS_AND_RETURN(retval); local = (RSI_PING_AVAIL | RSI_HOST_INTERACT_REG_VALID); retval = sl_si91x_bus_write_memory(RSI_HOST_INTF_REG_IN, 2, (uint8_t *)&local); break; case RSI_PONG_WRITE: + // To Do: Recheck the number bytes to written into memory + retval = sl_si91x_bus_write_memory(0x52400, 2048, (uint8_t *)((uint32_t)data)); + VERIFY_STATUS_AND_RETURN(retval); + + // To Do: Recheck the number bytes to written into memory + retval = sl_si91x_bus_write_memory(0x52400 + 2048, 2048, (uint8_t *)((uint32_t)data + 2048)); + VERIFY_STATUS_AND_RETURN(retval); - for (j = 0; j < 2048; j++) { - retval = sl_si91x_bus_write_memory(0x52400 + (j * 2), 2, (uint8_t *)((uint32_t)data + (j * 2))); - if (retval == SL_STATUS_FAIL) { - return retval; - } - } // Perform the write operation local = (RSI_PONG_AVAIL | RSI_HOST_INTERACT_REG_VALID); retval = sl_si91x_bus_write_memory(RSI_HOST_INTF_REG_IN, 2, (uint8_t *)&local); @@ -160,17 +160,13 @@ int16_t sl_si91x_boot_instruction(uint8_t type, uint16_t *data) case BURN_NWP_FW: cmd = BURN_NWP_FW | RSI_HOST_INTERACT_REG_VALID; retval = sl_si91x_bus_write_memory(RSI_HOST_INTF_REG_IN, 2, (uint8_t *)&cmd); - if (retval == SL_STATUS_FAIL) { - return retval; - } + VERIFY_STATUS_AND_RETURN(retval); SL_SI91X_RESET_LOOP_COUNTER(loop_counter); SL_SI91X_WHILE_LOOP(loop_counter, SL_SI91X_LOOP_COUNT_UPGRADE_IMAGE) { retval = sl_si91x_bus_read_memory(RSI_HOST_INTF_REG_OUT, 2, (uint8_t *)&read_data); - if (retval == SL_STATUS_FAIL) { - return retval; - } + VERIFY_STATUS_AND_RETURN(retval); if (read_data == (uint16_t)(RSI_SEND_RPS_FILE | RSI_HOST_INTERACT_REG_VALID)) { break; } diff --git a/components/device/silabs/si91x/wireless/ncp_interface/spi/sl_si91x_spi.c b/components/device/silabs/si91x/wireless/ncp_interface/spi/sl_si91x_spi.c index afabbd0ff..135c2aafb 100644 --- a/components/device/silabs/si91x/wireless/ncp_interface/spi/sl_si91x_spi.c +++ b/components/device/silabs/si91x/wireless/ncp_interface/spi/sl_si91x_spi.c @@ -419,7 +419,7 @@ sl_status_t si91x_bootup_firmware(const uint8_t select_option) } VERIFY_STATUS_AND_RETURN(status); -#if RSI_FAST_FW_UP +#if SL_SI91X_FAST_FW_UP status = sl_si91x_set_fast_fw_up(); VERIFY_STATUS_AND_RETURN(status); #endif @@ -432,7 +432,7 @@ sl_status_t si91x_bootup_firmware(const uint8_t select_option) sl_status_t sl_si91x_bus_rx_irq_handler(void) { - sl_si91x_host_set_bus_event(NCP_HOST_BUS_RX_EVENT); + sl_si91x_host_set_bus_event(SL_SI91X_NCP_HOST_BUS_RX_EVENT); return SL_STATUS_OK; } diff --git a/components/device/silabs/si91x/wireless/ncp_interface/uart/sl_si91x_uart.c b/components/device/silabs/si91x/wireless/ncp_interface/uart/sl_si91x_uart.c index 3f83a47a6..066895a07 100644 --- a/components/device/silabs/si91x/wireless/ncp_interface/uart/sl_si91x_uart.c +++ b/components/device/silabs/si91x/wireless/ncp_interface/uart/sl_si91x_uart.c @@ -253,7 +253,7 @@ sl_status_t sl_si91x_bus_rx_irq_handler(void) BREAKPOINT(); } - sl_si91x_host_set_bus_event(NCP_HOST_BUS_RX_EVENT); + sl_si91x_host_set_bus_event(SL_SI91X_NCP_HOST_BUS_RX_EVENT); return SL_STATUS_OK; } @@ -271,7 +271,7 @@ void sl_si91x_bus_rx_done_handler(void) BREAKPOINT(); } - sl_si91x_host_set_bus_event(NCP_HOST_BUS_RX_EVENT); + sl_si91x_host_set_bus_event(SL_SI91X_NCP_HOST_BUS_RX_EVENT); sl_si91x_host_enable_bus_interrupt(); } return; diff --git a/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_integration_handler.c b/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_integration_handler.c index a6a53c1c3..5dfa3c6d3 100644 --- a/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_integration_handler.c +++ b/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_integration_handler.c @@ -64,7 +64,7 @@ static void handle_mqtt_client_asynch_events(sl_si91x_queue_packet_t *mqtt_asyn_ // Since these responses are unsolicited, We need to create a context for them. if (raw_rx_packet->command == RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE - || raw_rx_packet->command == RSI_WLAN_RSP_EMB_MQTT_PUBLISH_PKT) { + || raw_rx_packet->command == RSI_WLAN_RSP_EMB_MQTT_PUBLISH_PKT || raw_rx_packet->command == RSI_WLAN_RSP_JOIN) { sli_si91x_get_mqtt_client(&mqtt_client); @@ -74,15 +74,23 @@ static void handle_mqtt_client_asynch_events(sl_si91x_queue_packet_t *mqtt_asyn_ return; } + if (mqtt_client->state == SL_MQTT_CLIENT_DISCONNECTED) { + // Drop MQTT client event disconnect, if the client is already in disconnected + // This can happen if MQTT client is already disconnected state and TA sends a rejoin failure event. + SL_DEBUG_LOG("Dropping mqtt disconnect event: %hu", raw_rx_packet->command); + return; + } + // Build MQTT SDK context for asynchronous MQTT events - sli_si91x_build_mqtt_sdk_context_if_async(raw_rx_packet->command == RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE - ? SL_MQTT_CLIENT_DISCONNECTED_EVENT - : SL_MQTT_CLIENT_MESSAGED_RECEIVED_EVENT, - mqtt_client, - NULL, - NULL, - 0, - (sl_si91x_mqtt_client_context_t **)&mqtt_asyn_packet->sdk_context); + sli_si91x_build_mqtt_sdk_context_if_async( + (raw_rx_packet->command == RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE || raw_rx_packet->command == RSI_WLAN_RSP_JOIN) + ? SL_MQTT_CLIENT_DISCONNECTED_EVENT + : SL_MQTT_CLIENT_MESSAGED_RECEIVED_EVENT, + mqtt_client, + NULL, + NULL, + 0, + (sl_si91x_mqtt_client_context_t **)&mqtt_asyn_packet->sdk_context); } sl_si91x_mqtt_client_context_t *sdk_context = (sl_si91x_mqtt_client_context_t *)mqtt_asyn_packet->sdk_context; @@ -103,7 +111,7 @@ static void handle_mqtt_client_asynch_events(sl_si91x_queue_packet_t *mqtt_asyn_ static void si91x_node_free_function(sl_wifi_buffer_t *buffer) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); } void sl_net_si91x_event_dispatch_handler(sl_si91x_queue_packet_t *data, sl_si91x_packet_t *packet) @@ -119,9 +127,12 @@ void sl_net_si91x_event_dispatch_handler(sl_si91x_queue_packet_t *data, sl_si91x if (packet->command == RSI_WLAN_REQ_EMB_MQTT_CLIENT || packet->command == RSI_WLAN_RSP_EMB_MQTT_PUBLISH_PKT || packet->command == RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE) { handle_mqtt_client_asynch_events(data); - return; } + + if (packet->command == RSI_WLAN_RSP_JOIN) { + handle_mqtt_client_asynch_events(data); + } #endif #ifdef SLI_SI91X_INTERNAL_SNTP_CLIENT @@ -146,7 +157,8 @@ void sl_net_si91x_event_dispatch_handler(sl_si91x_queue_packet_t *data, sl_si91x #endif if (packet->command == RSI_WLAN_RSP_JOIN || packet->command == RSI_WLAN_RSP_IPV4_CHANGE - || packet->command == RSI_WLAN_RSP_IPCONFV4 || packet->command == RSI_WLAN_RSP_IPCONFV6) { + || packet->command == RSI_WLAN_RSP_IPCONFV4 + || ((packet->command == RSI_WLAN_RSP_IPCONFV6) && (data->frame_status))) { // free all TX queues except BT for (int queue_id = 0; queue_id < SI91X_BT_CMD; queue_id++) { sl_si91x_flush_queue_based_on_type(queue_id, si91x_node_free_function); diff --git a/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_internal_stack.c b/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_internal_stack.c index db445fb6f..03f9b1e24 100644 --- a/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_internal_stack.c +++ b/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_internal_stack.c @@ -101,11 +101,11 @@ sl_status_t sl_si91x_ota_firmware_upgradation(sl_ip_address_t server_ip, // Check if the command was synchronous and free the buffer if it was allocated if (asynchronous == false) { if (status != SL_STATUS_OK && buffer != NULL) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -162,7 +162,7 @@ sl_status_t sl_si91x_configure_ip_address(sl_net_ip_configuration_t *address, ui // Check if the command failed and free the buffer if it was allocated if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } // Verify the status and return it @@ -178,7 +178,7 @@ sl_status_t sl_si91x_configure_ip_address(sl_net_ip_configuration_t *address, ui } // Free the buffer and return success status - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } else if (SL_IPV6 == address->type) { // Initialize the IPv6 request structure memset(&ipv6_request, 0, sizeof(ipv6_request)); @@ -207,7 +207,7 @@ sl_status_t sl_si91x_configure_ip_address(sl_net_ip_configuration_t *address, ui // Check if the command failed and free the buffer if it was allocated if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -224,7 +224,7 @@ sl_status_t sl_si91x_configure_ip_address(sl_net_ip_configuration_t *address, ui memcpy(&address->ip.v6.gateway, ipv6_response->gateway_address, sizeof(ipv6_response->gateway_address)); // Free the buffer and return success status - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } else { return SL_STATUS_INVALID_PARAMETER; diff --git a/components/device/silabs/si91x/wireless/sl_si91x_mem_pool_buffers_with_quota.slcc b/components/device/silabs/si91x/wireless/sl_si91x_mem_pool_buffers_with_quota.slcc new file mode 100644 index 000000000..59049403a --- /dev/null +++ b/components/device/silabs/si91x/wireless/sl_si91x_mem_pool_buffers_with_quota.slcc @@ -0,0 +1,18 @@ +id: sl_si91x_mem_pool_buffers_with_quota +package: wiseconnect3_sdk +description: > + Si91x Memory Pool based buffer system with quota based allocation and deallocation +label: Memory Pool buffers With Quota +category: Device|Si91x|Wireless|Buffer Manager +quality: production +component_root_path: ./components/device/silabs/si91x/wireless +provides: +- name: sl_si91x_mem_pool_buffers_with_quota +- name: sl_si91x_buffer_management +source: +- path: memory/mem_pool_buffer_quota.c +include: +requires: +- name: mem_pool +- name: sl_si91x_wireless + diff --git a/components/device/silabs/si91x/wireless/sl_si91x_wireless.slcc b/components/device/silabs/si91x/wireless/sl_si91x_wireless.slcc index 87a71bf1c..f9fb26104 100644 --- a/components/device/silabs/si91x/wireless/sl_si91x_wireless.slcc +++ b/components/device/silabs/si91x/wireless/sl_si91x_wireless.slcc @@ -9,6 +9,8 @@ component_root_path: ./components/device/silabs/si91x/wireless provides: - name: sl_si91x_wireless - name: wifi_driver +- condition: ["brd4271a"] + name: efx_ncp_custom_host_mcu source: - path: src/sl_si91x_driver.c - path: src/sl_rsi_utility.c @@ -39,6 +41,8 @@ source: - path: host_mcu/efx32/efx32_ncp_host.c condition: ["device_efx"] unless: ["efx_ncp_custom_host_mcu"] +- path: host_mcu/efr32fg25/efx32_ncp_host.c + condition: ["brd4271a"] define: - name: SLI_SI917 - {"condition":["device_si91x"],"name":"SLI_SI91X_MCU_INTERFACE"} @@ -71,6 +75,7 @@ requires: - condition: ["device_efx"] name: sl_si91x_ncp_bus - name: sl_si91x_errno +- name: emlib_core recommends: - id: "%extension-wiseconnect3_sdk%sl_si91x_internal_stack" diff --git a/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_constants.h b/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_constants.h index 20c8f8e1b..3dafd36f1 100644 --- a/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_constants.h +++ b/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_constants.h @@ -35,7 +35,7 @@ #define SI91X_HOST_WAIT_FOR_SELECT_RSP 1000 -#define TCP_RX_WINDOW_SIZE 10 +#define TCP_RX_WINDOW_SIZE 10 #define DEFAULT_STREAM_MSS_SIZE 1460 #define DEFAULT_DATAGRAM_MSS_SIZE 1472 @@ -79,8 +79,8 @@ #define SL_SI91X_SO_SOCK_VAP_ID 25 /* To Configure the socket VAP iD */ #define SL_SI91X_SO_TLS_SNI 47 /* To Configure the TLS SNI extension */ -#define SHUTDOWN_BY_ID 0 -#define SHUTDOWN_BY_PORT 1 +#define SHUTDOWN_BY_ID 0 +#define SHUTDOWN_BY_PORT 1 /****************************************************** * SSL features ******************************************************/ diff --git a/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h b/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h index b4249cd60..141efcc47 100644 --- a/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h +++ b/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h @@ -43,16 +43,16 @@ typedef enum { #pragma pack() typedef struct { - uint8_t buffer[SI91X_MAX_SIZE_OF_EXTENSION_DATA]; - uint16_t total_extensions; - uint16_t current_size_of_extensions; + uint8_t buffer[SI91X_MAX_SIZE_OF_EXTENSION_DATA]; + uint16_t total_extensions; + uint16_t current_size_of_extensions; } si91x_server_name_indication_extensions_t; #pragma pack() typedef struct { - uint16_t type; - uint16_t length; - uint8_t value[]; + uint16_t type; + uint16_t length; + uint8_t value[]; } si91x_socket_type_length_value_t; typedef struct { diff --git a/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_utility.h b/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_utility.h index 61b3ada74..d6d834d86 100644 --- a/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_utility.h +++ b/components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_utility.h @@ -20,6 +20,7 @@ #include "sl_si91x_types.h" #include "sl_si91x_socket_types.h" #include "sl_si91x_protocol_types.h" +#include "sl_si91x_socket_constants.h" #include "errno.h" #include @@ -59,15 +60,14 @@ } \ } while (0); \ } -#define SLI_SI91X_NULL_SAFE_FD_ZERO(fd_set) \ -{ \ - do { \ - if (NULL != fd_set) { \ - FD_ZERO(fd_set); \ - } \ - } while(0); \ -} - +#define SLI_SI91X_NULL_SAFE_FD_ZERO(fd_set) \ + { \ + do { \ + if (NULL != fd_set) { \ + FD_ZERO(fd_set); \ + } \ + } while (0); \ + } #define GET_SAFE_MEMCPY_LENGTH(destination_size, source_size) \ source_size > destination_size ? destination_size : source_size @@ -85,7 +85,7 @@ sl_status_t sl_si91x_vap_shutdown(uint8_t vap_id); /***************************************************************************/ /** * @brief * Si917 specific socket configuration. - * @pre Pre-conditions: + * @pre Pre-conditions: * - * This API to be called before calling @ref sl_si91x_socket_async. * @param[in] socket_config @@ -123,7 +123,8 @@ si91x_socket_t *get_si91x_socket(int socket_id); */ bool is_port_available(uint16_t port_number); -sl_status_t add_server_name_indication_extension(si91x_server_name_indication_extensions_t* socket_sni_extensions, const si91x_socket_type_length_value_t* sni_extension); +sl_status_t add_server_name_indication_extension(si91x_server_name_indication_extensions_t *socket_sni_extensions, + const si91x_socket_type_length_value_t *sni_extension); sl_status_t create_and_send_socket_request(int socketIdIndex, int type, int *backlog); @@ -137,6 +138,8 @@ int handle_select_response(sl_si91x_socket_select_rsp_t *response, void set_select_callback(select_callback callback); +void sli_si91x_set_accept_callback(accept_callback callback, int32_t client_socket_id); + void sli_si91x_set_remote_socket_termination_callback(remote_socket_termination_callback callback); /** diff --git a/components/device/silabs/si91x/wireless/socket/src/sl_si91x_socket_utility.c b/components/device/silabs/si91x/wireless/socket/src/sl_si91x_socket_utility.c index 70b6f3543..9a5ad8e01 100644 --- a/components/device/silabs/si91x/wireless/socket/src/sl_si91x_socket_utility.c +++ b/components/device/silabs/si91x/wireless/socket/src/sl_si91x_socket_utility.c @@ -30,10 +30,14 @@ /****************************************************** * Variable Definitions ******************************************************/ -static si91x_socket_t sockets[NUMBER_OF_SOCKETS]; +si91x_socket_t *sli_si91x_sockets[NUMBER_OF_SOCKETS]; static select_callback user_select_callback = NULL; +static accept_callback user_accept_callback = NULL; + +static int32_t client_socket_accept_id = -1; + static remote_socket_termination_callback user_remote_socket_termination_callback = NULL; static bool is_configured = false; @@ -111,6 +115,13 @@ void set_select_callback(select_callback callback) user_select_callback = callback; } +void sli_si91x_set_accept_callback(accept_callback callback, int32_t client_socket_id) +{ + // Set the user-defined accept callback function and the client socket ID + user_accept_callback = callback; + client_socket_accept_id = client_socket_id; +} + void sli_si91x_set_remote_socket_termination_callback(remote_socket_termination_callback callback) { user_remote_socket_termination_callback = callback; @@ -129,7 +140,7 @@ sl_status_t sl_si91x_vap_shutdown(uint8_t vap_id) // Iterate through all BSD sockets and reset those associated with the given VAP ID for (uint8_t socket_index = 0; socket_index < NUMBER_OF_BSD_SOCKETS; socket_index++) { - if ((sockets[socket_index].vap_id == vap_id)) { + if ((sli_si91x_sockets[socket_index] != NULL) && (sli_si91x_sockets[socket_index]->vap_id == vap_id)) { reset_socket_state(socket_index); } } @@ -158,13 +169,16 @@ sl_status_t sl_si91x_config_socket(sl_si91x_socket_config_t socket_config) void reset_socket_state(int socket) { - memset(&sockets[socket], 0, sizeof(si91x_socket_t)); + if (sli_si91x_sockets[socket] != NULL) { + free(sli_si91x_sockets[socket]); + sli_si91x_sockets[socket] = NULL; + } } // Get the SI91X socket with the specified index, if it is valid and not in RESET state si91x_socket_t *get_si91x_socket(int socket) { - return (((socket >= 0) && (socket < NUMBER_OF_SOCKETS)) && sockets[socket].state != RESET) ? &sockets[socket] : NULL; + return sli_si91x_sockets[socket]; } // Find and return an available socket and its index @@ -184,13 +198,21 @@ void get_free_socket(si91x_socket_t **socket, int *socket_fd) // Iterate through all available sockets to find a free one for (uint8_t socket_index = 0; socket_index < NUMBER_OF_SOCKETS; socket_index++) { - // If the socket's state is not RESET, it is in use, so skip it - if (sockets[socket_index].state != RESET) { + // If the socket is in use skip it + if (sli_si91x_sockets[socket_index] != NULL) { continue; } + // Allocate new socket + sli_si91x_sockets[socket_index] = malloc(sizeof(si91x_socket_t)); + if (sli_si91x_sockets[socket_index] == NULL) { + return; + } + memset(sli_si91x_sockets[socket_index], 0, sizeof(si91x_socket_t)); + sli_si91x_sockets[socket_index]->id = -1; + // If a free socket is found, set the socket pointer to point to it - *socket = &sockets[socket_index]; + *socket = sli_si91x_sockets[socket_index]; // Set the socket_fd to the index of the free socket, which can be used as a file descriptor *socket_fd = socket_index; // Exit the loop because a free socket has been found. @@ -202,7 +224,8 @@ bool is_port_available(uint16_t port_number) { // Check whether local port is already used or not for (uint8_t socket_index = 0; socket_index < NUMBER_OF_SOCKETS; socket_index++) { - if (sockets[socket_index].local_address.sin6_port == port_number) { + if (sli_si91x_sockets[socket_index] != NULL + && sli_si91x_sockets[socket_index]->local_address.sin6_port == port_number) { return false; } } @@ -260,7 +283,7 @@ static uint16_t get_socket_id_from_socket_command(sl_si91x_packet_t *packet) static void si91x_socket_node_free_function(sl_wifi_buffer_t *buffer) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); } static uint8_t si91x_socket_identification_function(sl_wifi_buffer_t *buffer, void *user_data) @@ -428,7 +451,7 @@ sl_status_t create_and_send_socket_request(int socketIdIndex, int type, int *bac // If the status is not OK and there's a buffer, free the buffer if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); // Extract socket creation response information @@ -448,7 +471,7 @@ sl_status_t create_and_send_socket_request(int socketIdIndex, int type, int *bac // If socket is already bound to an local address and port, there is no need to copy it again. if (si91x_bsd_socket->state == BOUND) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } @@ -464,7 +487,7 @@ sl_status_t create_and_send_socket_request(int socketIdIndex, int type, int *bac } // Free the buffer - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } @@ -514,12 +537,12 @@ int sli_si91x_shutdown(int socket, int how) // If the status is not OK and there's a buffer, free the buffer if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } SOCKET_VERIFY_STATUS_AND_RETURN(status, SL_STATUS_OK, SI91X_UNDEFINED_ERROR); if (close_request_type == SHUTDOWN_BY_ID && si91x_socket->id == socket_close_response->socket_id) { reset_socket_state(socket); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SI91X_NO_ERROR; } // Reset sockets that match the close request @@ -536,7 +559,7 @@ int sli_si91x_shutdown(int socket, int how) } } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SI91X_NO_ERROR; } @@ -550,23 +573,17 @@ sl_status_t si91x_socket_event_handler(sl_status_t status, // Handle connection establishment response if (rx_packet->command == RSI_WLAN_RSP_CONN_ESTABLISH) { sl_si91x_rsp_ltcp_est_t *accept_response = (sl_si91x_rsp_ltcp_est_t *)rx_packet->data; - int *client_socket_id = (int *)sdk_context->socket_context; + int32_t *client_socket_id = &client_socket_accept_id; handle_accept_response(*client_socket_id, accept_response); - accept_callback callback = (accept_callback)sdk_context->user_context; - si91x_socket_t *client_socket = get_si91x_socket(*client_socket_id); //Verifying socket existence if (client_socket == NULL) { - SL_CLEANUP_MALLOC(sdk_context); return -1; } // Call the accept callback function with relevant socket information - callback(*client_socket_id, (struct sockaddr *)&client_socket->remote_address, client_socket->type); - - free(sdk_context->socket_context); - + user_accept_callback(*client_socket_id, (struct sockaddr *)&client_socket->remote_address, client_socket->type); } // Handle remote socket termination response else if (rx_packet->command == RSI_WLAN_RSP_REMOTE_TERMINATE) { @@ -598,11 +615,12 @@ sl_status_t si91x_socket_event_handler(sl_status_t status, si91x_rsp_socket_recv_t *firmware_socket_response = (si91x_rsp_socket_recv_t *)rx_packet->data; uint8_t *data = (uint8_t *)(rx_packet->data + firmware_socket_response->offset); - uint8_t host_socket = 0; + int8_t host_socket = -1; // Find the host socket corresponding to the received data for (uint8_t host_socket_index = 0; host_socket_index < NUMBER_OF_SOCKETS; host_socket_index++) { - if (firmware_socket_response->socket_id == sockets[host_socket_index].id) { + if ((sli_si91x_sockets[host_socket_index] != NULL) + && (firmware_socket_response->socket_id == sli_si91x_sockets[host_socket_index]->id)) { host_socket = host_socket_index; } } @@ -630,11 +648,12 @@ sl_status_t si91x_socket_event_handler(sl_status_t status, sl_si91x_rsp_tcp_ack_t *tcp_ack = (sl_si91x_rsp_tcp_ack_t *)rx_packet->data; // Initialize a variable to store the host socket ID - uint8_t host_socket = 0; + int8_t host_socket = -1; // Iterate through all host sockets to find a matching socket ID for (uint8_t host_socket_index = 0; host_socket_index < NUMBER_OF_SOCKETS; host_socket_index++) { - if (tcp_ack->socket_id == sockets[host_socket_index].id) { + if ((sli_si91x_sockets[host_socket_index] != NULL) + && (tcp_ack->socket_id == sli_si91x_sockets[host_socket_index]->id)) { host_socket = host_socket_index; break; } @@ -724,7 +743,7 @@ sl_status_t sl_si91x_get_socket_info(sl_si91x_socket_info_response_t *socket_inf &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -739,6 +758,6 @@ sl_status_t sl_si91x_get_socket_info(sl_si91x_socket_info_response_t *socket_inf response->socket_info, (sizeof(sl_si91x_sock_info_query_t) * socket_info_response->number_of_opened_sockets)); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } diff --git a/components/device/silabs/si91x/wireless/src/sl_rsi_utility.c b/components/device/silabs/si91x/wireless/src/sl_rsi_utility.c index 11d64d791..c88ac6107 100644 --- a/components/device/silabs/si91x/wireless/src/sl_rsi_utility.c +++ b/components/device/silabs/si91x/wireless/src/sl_rsi_utility.c @@ -3,7 +3,7 @@ * @brief ******************************************************************************* * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * * SPDX-License-Identifier: Zlib @@ -344,10 +344,10 @@ sl_wifi_event_t convert_si91x_event_to_sl_wifi_event(rsi_wlan_cmd_response_t com default: return SL_WIFI_TWT_RESPONSE_EVENT | (frame_status << 16); } - case SL_SI91X_WIFI_BTR_TX_DATA_STATUS: - return SL_WIFI_BTR_TX_DATA_STATUS_CB | fail_indication; + case RSI_WLAN_RSP_TRANSCEIVER_TX_DATA_STATUS: + return SL_WIFI_TRANSCEIVER_TX_DATA_STATUS_CB | fail_indication; case SL_SI91X_WIFI_RX_DOT11_DATA: - return SL_WIFI_BTR_RX_DATA_RECEIVE_CB | fail_indication; + return SL_WIFI_TRANSCEIVER_RX_DATA_RECEIVE_CB | fail_indication; default: return SL_WIFI_INVALID_EVENT; } @@ -564,7 +564,7 @@ sl_status_t sl_si91x_send_power_save_request(sl_si91x_performance_profile_t prof SI91X_COMMON_CMD_QUEUE, &power_save_request, sizeof(sl_si91x_power_save_request_t), - SL_SI91X_WAIT_FOR_COMMAND_SUCCESS, + SL_SI91X_WAIT_FOR_RESPONSE(3000), NULL, NULL); VERIFY_STATUS_AND_RETURN(status); @@ -619,7 +619,7 @@ sl_status_t sl_si91x_platform_init(void) .name = "si91x_bus", .priority = osPriorityRealtime, .stack_mem = 0, - .stack_size = 1536, + .stack_size = 1636, .cb_mem = 0, .cb_size = 0, .attr_bits = 0u, @@ -756,7 +756,7 @@ sl_status_t sl_si91x_host_add_to_queue(sl_si91x_queue_type_t queue, sl_wifi_buff cmd_queues[queue].tail->node.node = (sl_slist_node_t *)packet; cmd_queues[queue].tail = packet; } - + cmd_queues[queue].queued_packet_count++; osMutexRelease(cmd_queues[queue].mutex); return SL_STATUS_OK; } @@ -1019,6 +1019,11 @@ uint32_t sl_si91x_host_queue_status(sl_si91x_queue_type_t queue) return status; } +uint32_t sl_si91x_host_get_queue_packet_count(sl_si91x_queue_type_t queue) +{ + return (uint32_t)(cmd_queues[queue].queued_packet_count); +} + uint32_t si91x_host_wait_for_event(uint32_t event_mask, uint32_t timeout) { uint32_t result = osEventFlagsWait(si91x_events, event_mask, (osFlagsWaitAny | osFlagsNoClear), timeout); @@ -1033,9 +1038,7 @@ uint32_t si91x_host_wait_for_event(uint32_t event_mask, uint32_t timeout) uint32_t si91x_host_wait_for_bus_event(uint32_t event_mask, uint32_t timeout) { - uint32_t result = osEventFlagsWait(si91x_bus_events, event_mask, (osFlagsWaitAny | osFlagsNoClear), timeout); - // Clear the received event flags - osEventFlagsClear(si91x_bus_events, event_mask); + uint32_t result = osEventFlagsWait(si91x_bus_events, event_mask, (osFlagsWaitAny), timeout); if (result == (uint32_t)osErrorTimeout || result == (uint32_t)osErrorResource) { return 0; } @@ -1091,3 +1094,53 @@ sl_status_t sl_si91x_host_power_cycle(void) return SL_STATUS_OK; } + +void print_80211_packet(uint8_t *packet, uint32_t packet_length, uint16_t max_payload_length) +{ + uint32_t dump_bytes = 0; + uint32_t header_length = MAC80211_HDR_MIN_LEN; + + header_length += (packet[0] & BIT(7)) ? 2 : 0; /* 2 bytes QoS control */ + header_length += ((packet[1] & BIT(0)) && (packet[1] & BIT(1))) ? 6 : 0; /* 6 byte Addr4 */ + + printf("%02x %02x | ", packet[0], packet[1]); /* FC */ + printf("%02x %02x | ", packet[2], packet[3]); /* Dur */ + printf("%02x:%02x:%02x:%02x:%02x:%02x | ", + packet[4], + packet[5], + packet[6], + packet[7], + packet[8], + packet[9]); /* Addr1/RA */ + printf("%02x:%02x:%02x:%02x:%02x:%02x | ", + packet[10], + packet[11], + packet[12], + packet[13], + packet[14], + packet[15]); /* Addr2/TA */ + printf("%02x:%02x:%02x:%02x:%02x:%02x | ", + packet[16], + packet[17], + packet[18], + packet[19], + packet[20], + packet[21]); /* Addr3/DA */ + printf("%02x %02x | ", packet[22], packet[23]); /* Seq control */ + if ((packet[1] & BIT(0)) && (packet[1] & BIT(1))) { /* Addr4 */ + printf("%02x:%02x:%02x:%02x:%02x:%02x | ", packet[24], packet[25], packet[26], packet[27], packet[28], packet[29]); + } + if (packet[0] & BIT(7)) { + printf("%02x %02x | ", packet[30], packet[31]); /* QoS control */ + } + + // Determine number of payload bytes to print + dump_bytes = packet_length - header_length; + dump_bytes = max_payload_length > dump_bytes ? dump_bytes : max_payload_length; + + for (uint32_t i = header_length; i < header_length + dump_bytes; i++) { + printf("%02x ", packet[i]); + } + + printf("|\r\n"); +} diff --git a/components/device/silabs/si91x/wireless/src/sl_si91x_driver.c b/components/device/silabs/si91x/wireless/src/sl_si91x_driver.c index 399fbe37f..f6b140cda 100644 --- a/components/device/silabs/si91x/wireless/src/sl_si91x_driver.c +++ b/components/device/silabs/si91x/wireless/src/sl_si91x_driver.c @@ -3,7 +3,7 @@ * @brief ******************************************************************************* * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * * SPDX-License-Identifier: Zlib @@ -39,8 +39,10 @@ #include "cmsis_os2.h" #include #include +#include #include "sl_si91x_core_utilities.h" #ifdef SLI_SI91X_MCU_INTERFACE +#include "em_core.h" #include "sli_siwx917_soc.h" #include "rsi_rom_clks.h" #include "rsi_m4.h" @@ -154,13 +156,8 @@ sl_status_t sli_verify_device_boot(uint32_t *rom_version); sl_status_t sl_si91x_enable_radio(void); sl_status_t sli_wifi_select_option(const uint8_t configuration); sl_status_t si91x_bootup_firmware(const uint8_t select_option); -int32_t encapsulate_tx_data_packet(sl_wifi_btr_data_ctrlblk_t *data_ctrlblk, uint8_t *pkt_data, uint32_t mac_hdr_len); sl_status_t sl_si91x_host_power_cycle(void); -#ifndef MAC_PEER_DS_SUPPORT -uint16_t get_seq_ctrl(uint8_t is_qos); -#endif - //static void convert_sl_wifi_to_si91x_security_type( sl_wifi_security_t security_type, uint8_t* security, uint8_t* encryption ); // This variable stores the frame status of response packet in case of API executed being failed. @@ -173,6 +170,7 @@ bool device_initialized = false; bool interface_is_up[SL_WIFI_MAX_INTERFACE_INDEX] = { false, false, false, false, false }; bool bg_enabled = false; uint32_t frontend_switch_control = 0; +static uint32_t feature_bit_map = 0; static uint16_t packet_id[SI91X_CMD_MAX] = { 0 }; static uint8_t ap_join_feature_bitmap = SL_SI91X_JOIN_FEAT_LISTEN_INTERVAL_VALID; static uint8_t client_join_feature_bitmap = SL_SI91X_JOIN_FEAT_LISTEN_INTERVAL_VALID; @@ -205,7 +203,16 @@ const sl_wifi_scan_configuration_t default_wifi_scan_configuration = { .type = 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF } }; + // clang-format on +const sl_wifi_buffer_configuration_t default_buffer_configuration = { + .control_buffer_quota = 10, + .tx_buffer_quota = 10, + .rx_buffer_quota = 10, + .block_size = 1616, + .buffer_memory = NULL, +}; + const sl_wifi_ap_configuration_t default_wifi_ap_configuration = { .ssid = { .value = "SILICON_LABS_AP", .length = sizeof("SILICON_LABS_AP") - 1 }, .security = SL_WIFI_WPA2, @@ -323,6 +330,9 @@ const sl_si91x_set_region_ap_request_t default_SG_region_5GHZ_configurations = { [SI91X_SOCKET_CMD] = NCP_HOST_SOCKET_RESPONSE_EVENT, [SI91X_BT_CMD] = NCP_HOST_BT_RESPONSE_EVENT }; // clang-format on +#ifdef SLI_SI91X_MCU_INTERFACE +extern sl_wifi_buffer_t *rx_pkt_buffer; +#endif void sl_si91x_get_efuse_data(sl_si91x_efuse_data_t *efuse_data) { @@ -458,7 +468,7 @@ sl_status_t sl_si91x_driver_init(const sl_wifi_device_configuration_t *config, s #endif // Initialize the buffer manager - status = sl_si91x_host_init_buffer_manager(); + status = sl_si91x_host_init_buffer_manager(&default_buffer_configuration); if (status != SL_STATUS_OK) { return status; } @@ -545,6 +555,8 @@ sl_status_t sl_si91x_driver_init(const sl_wifi_device_configuration_t *config, s NULL); VERIFY_STATUS_AND_RETURN(status); + feature_bit_map = config->boot_config.feature_bit_map; + #ifdef SLI_SI91X_ENABLE_BLE if (config->boot_config.coex_mode == SL_SI91X_BLE_MODE || config->boot_config.coex_mode == SL_SI91X_WLAN_BLE_MODE) { // Wait for BT card ready @@ -570,7 +582,7 @@ sl_status_t sl_si91x_driver_init(const sl_wifi_device_configuration_t *config, s .feature_enables = FEATURE_ENABLES }; // Setting PLL mode to 1 in case of high clock frequency - //pll.mode 1 is not supported in coex mode + //pll_mode 1 is not supported in coex mode if ((!config->boot_config.coex_mode) && (config->boot_config.custom_feature_bit_map & (SL_SI91X_CUSTOM_FEAT_SOC_CLK_CONFIG_160MHZ | SL_SI91X_CUSTOM_FEAT_SOC_CLK_CONFIG_120MHZ))) { @@ -578,10 +590,10 @@ sl_status_t sl_si91x_driver_init(const sl_wifi_device_configuration_t *config, s } // For the transmit test mode we need to disable BIT 0, 4, 5. These bitmaps are only required in powersave. - // To receive broadcast data packets in BTR opermode, we need to enable BIT 1. + // To receive broadcast data packets in transceiver opermode, we need to enable BIT 1. feature_frame_request.feature_enables = (config->boot_config.oper_mode == SL_SI91X_TRANSMIT_TEST_MODE) ? feature_frame_request.feature_enables & ~(FEATURE_ENABLES) - : (config->boot_config.oper_mode == SL_SI91X_WLAN_BTR_MODE) + : (config->boot_config.oper_mode == SL_SI91X_TRANSCEIVER_MODE) ? feature_frame_request.feature_enables | SI91X_FEAT_FRAME_PERMIT_UNDESTINED_PACKETS : feature_frame_request.feature_enables; @@ -602,7 +614,8 @@ sl_status_t sl_si91x_driver_init(const sl_wifi_device_configuration_t *config, s // Set the MAC address if provided in the configuration if (config->mac_address != NULL) { - sl_wifi_set_mac_address(default_interface, config->mac_address); + status = sl_wifi_set_mac_address(default_interface, config->mac_address); + VERIFY_STATUS_AND_RETURN(status); } // Initialize the WiFi radio if the coexistence mode is not BLE @@ -688,6 +701,18 @@ sl_status_t sl_si91x_driver_deinit(void) status = sl_si91x_host_deinit(); VERIFY_STATUS_AND_RETURN(status); +#ifdef SLI_SI91X_MCU_INTERFACE + // Check the RX buffer valid bit is set or not. + if (M4SS_P2P_INTR_SET_REG & RX_BUFFER_VALID) { + + // Clear the RX buffer valid bit. + M4SS_P2P_INTR_CLR_REG = (RX_BUFFER_VALID); + + // Clear the RX buffer. + sl_si91x_host_free_buffer(rx_pkt_buffer); + } +#endif + // Deinitialize the buffer manager status = sl_si91x_host_deinit_buffer_manager(); VERIFY_STATUS_AND_RETURN(status); @@ -726,7 +751,7 @@ sl_status_t sl_si91x_get_flash_efuse_data(sl_si91x_efuse_data_t *efuse_data, uin NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -743,7 +768,7 @@ sl_status_t sl_si91x_get_flash_efuse_data(sl_si91x_efuse_data_t *efuse_data, uin break; } } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } @@ -752,15 +777,16 @@ sl_status_t sl_si91x_driver_raw_send_command(uint8_t command, uint32_t data_length, uint32_t wait_time) { + UNUSED_PARAMETER(wait_time); sl_wifi_buffer_t *buffer; sl_si91x_packet_t *packet; sl_status_t status = SL_STATUS_OK; - // Allocate a command buffer with space for the command data and metadata - status = sl_si91x_allocate_command_buffer(&buffer, - (void **)&packet, - sizeof(sl_si91x_packet_t) + data_length, - SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME); + // Allocate a data buffer with space for the data and metadata + status = sl_si91x_allocate_data_buffer(&buffer, + (void **)&packet, + sizeof(sl_si91x_packet_t) + data_length, + SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME); VERIFY_STATUS_AND_RETURN(status); // If the packet is not allocated successfully, return an allocation failed error @@ -776,14 +802,40 @@ sl_status_t sl_si91x_driver_raw_send_command(uint8_t command, packet->length = data_length & 0xFFF; packet->command = command; - // Send command packet to the SI91x WLAN queue and await a response - return sl_si91x_driver_send_data_packet(SI91X_WLAN_CMD_QUEUE, buffer, wait_time); + //! Enter Critical Section + __disable_irq(); + + // Adding the packet to the queue with atomic action + sl_si91x_host_add_to_queue_with_atomic_action(SI91X_SOCKET_DATA_QUEUE, buffer, NULL, NULL); + // Trigerring the bus event + sl_si91x_host_set_bus_event(SL_SI91X_SOCKET_DATA_TX_PENDING_EVENT); + + //! Exit Critical Section + __enable_irq(); + + return SL_STATUS_OK; +} + +static void sl_si91x_atomic_packet_id_allocator(void *user_data) +{ + sl_si91x_driver_context_t *context = (sl_si91x_driver_context_t *)user_data; + uint16_t *packet_id_tracker = (uint16_t *)context->payload; + + // Set the packet ID for the current command and update the tracker + context->packet_id = *packet_id_tracker; + context->packet->packet_id = *packet_id_tracker; + + // Increment the packet ID tracker, ensuring it wraps around at 16 bits + *packet_id_tracker = (*packet_id_tracker + 1) & 0xFFFF; + + return; } sl_status_t sl_si91x_driver_send_socket_data(sl_si91x_socket_send_request_t *request, const void *data, uint32_t wait_time) { + UNUSED_PARAMETER(wait_time); sl_wifi_buffer_t *buffer; sl_si91x_packet_t *packet; sl_si91x_socket_send_request_t *send; @@ -826,7 +878,8 @@ sl_status_t sl_si91x_driver_send_socket_data(sl_si91x_socket_send_request_t *req // Fill frame type packet->length = (sizeof(sl_si91x_socket_send_request_t) + header_length + data_length) & 0xFFF; - return sl_si91x_driver_send_data_packet(SI91X_SOCKET_CMD_QUEUE, buffer, wait_time); + + return sl_si91x_driver_send_data_packet(SI91X_SOCKET_DATA_QUEUE, buffer, wait_time); } sl_status_t sl_si91x_custom_driver_send_command(uint32_t command, @@ -933,9 +986,9 @@ sl_status_t sl_si91x_driver_send_side_band_crypto(uint32_t command, osMutexAcquire(side_band_crypto_mutex, 0xFFFFFFFFUL); // fill crypto desc - crypto_desc[0].addr = packet->desc; + crypto_desc[0].addr = (uint32_t)packet->desc; crypto_desc[0].length = SL_HOST_DESC_LEN; - crypto_desc[1].addr = packet->data; + crypto_desc[1].addr = (uint32_t)packet->data; crypto_desc[1].length = SL_CRYPTO_PKT_LEN; //! Enter Critical Section @@ -950,17 +1003,17 @@ sl_status_t sl_si91x_driver_send_side_band_crypto(uint32_t command, osEventFlagsWait(ta_events, SIDE_BAND_DONE, (osFlagsWaitAny), (wait_period & ~SL_SI91X_WAIT_FOR_RESPONSE_BIT)); if (result == (uint32_t)osErrorTimeout || result == (uint32_t)osErrorResource) { osMutexRelease(side_band_crypto_mutex); - sl_si91x_host_free_buffer(buffer, SL_WIFI_TX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_TIMEOUT; } status = - (((uint8_t *)crypto_desc[0].addr)[12] + ((uint8_t *)crypto_desc[0].addr)[13] << 8); // Extract the frame status + (((uint8_t *)crypto_desc[0].addr)[12] + (((uint8_t *)crypto_desc[0].addr)[13] << 8)); // Extract the frame status // Release Mutex osMutexRelease(side_band_crypto_mutex); - sl_si91x_host_free_buffer(buffer, SL_WIFI_TX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } #endif @@ -1004,21 +1057,6 @@ sl_status_t sl_si91x_driver_wait_for_response(rsi_wlan_cmd_request_t command, sl return SL_STATUS_NOT_SUPPORTED; } -static void sl_si91x_atomic_packet_id_allocator(void *user_data) -{ - sl_si91x_driver_context_t *context = (sl_si91x_driver_context_t *)user_data; - uint16_t *packet_id_tracker = (uint16_t *)context->payload; - - // Set the packet ID for the current command and update the tracker - context->packet_id = *packet_id_tracker; - context->packet->packet_id = *packet_id_tracker; - - // Increment the packet ID tracker, ensuring it wraps around at 16 bits - *packet_id_tracker = (*packet_id_tracker + 1) & 0xFFFF; - - return; -} - static uint8_t si91x_packet_identification_function(sl_wifi_buffer_t *node, void *user_data) { sl_si91x_queue_packet_t *packet = NULL; @@ -1044,7 +1082,9 @@ sl_status_t sl_si91x_driver_wait_for_response_packet(sl_si91x_queue_type_t queue sl_si91x_driver_context_t context = { 0 }; sl_status_t status; uint32_t events = 0; + uint32_t start = 0; + start = osKernelGetTickCount(); while (true) { // Wait for specific events in the event mask with a timeout events = si91x_host_wait_for_event(event_mask, (wait_period & ~SL_SI91X_WAIT_FOR_RESPONSE_BIT)); @@ -1069,9 +1109,12 @@ sl_status_t sl_si91x_driver_wait_for_response_packet(sl_si91x_queue_type_t queue } return SL_STATUS_OK; } - // If a packet is not found but an error other than "not found" occurs, return that error - else if (SL_STATUS_NOT_FOUND != status) { - VERIFY_STATUS_AND_RETURN(status); + SL_DEBUG_LOG("\r\nstatus = 0x%lX\r\n", status); + + // calculate the elapsed time and update the wait_period according to it. + wait_period -= (osKernelGetTickCount() - start); + if (wait_period <= 0) { + return SL_STATUS_TIMEOUT; } } @@ -1103,7 +1146,7 @@ sl_status_t sl_si91x_driver_send_command_packet(uint32_t command, sizeof(sl_si91x_queue_packet_t), SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME); if (status != SL_STATUS_OK) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_TX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -1122,7 +1165,15 @@ sl_status_t sl_si91x_driver_send_command_packet(uint32_t command, // If not an immediate return, set the SI91X_PACKET_RESPONSE_STATUS flag flags |= SI91X_PACKET_RESPONSE_STATUS; // Additionally, set the SI91X_PACKET_RESPONSE_PACKET flag if the SL_SI91X_WAIT_FOR_RESPONSE_BIT is set in wait_period - flags |= (((wait_period & SL_SI91X_WAIT_FOR_RESPONSE_BIT) != 0) ? SI91X_PACKET_RESPONSE_PACKET : 0); + // work around for aws_device_shadow application with Power save enabled on STM32 + // TODO: need to provide proper fix for this issue +#ifndef STM32F411xE + if (data_buffer != NULL) { +#endif + flags |= (((wait_period & SL_SI91X_WAIT_FOR_RESPONSE_BIT) != 0) ? SI91X_PACKET_RESPONSE_PACKET : 0); +#ifndef STM32F411xE + } +#endif } // Check the command type and set the flags accordingly @@ -1159,10 +1210,16 @@ sl_status_t sl_si91x_driver_send_command_packet(uint32_t command, context.packet = node; context.payload = &(packet_id[queue_type]); + //! Enter Critical Section + __disable_irq(); + // Add the command packet to the queue and trigger a bus event sl_si91x_host_add_to_queue_with_atomic_action(queue_type, packet, &context, sl_si91x_atomic_packet_id_allocator); - sl_si91x_host_set_bus_event(NCP_HOST_DATA_TX_EVENT); + sl_si91x_host_set_bus_event(SL_SI91X_TX_PENDING_FLAG(queue_type)); + + //! Exit Critical Section + __enable_irq(); // Check if the command should return immediately or wait for a response if (wait_period == SL_SI91X_RETURN_IMMEDIATELY) { @@ -1194,11 +1251,11 @@ sl_status_t sl_si91x_driver_send_command_packet(uint32_t command, } // If the response packet flag is set, free the host_packet buffer else if (SI91X_PACKET_RESPONSE_PACKET == (node->flags & SI91X_PACKET_RESPONSE_PACKET)) { - sl_si91x_host_free_buffer(node->host_packet, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(node->host_packet); } // Free the response buffer and return the firmware status - sl_si91x_host_free_buffer(response, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(response); return convert_and_save_firmware_status(firmware_status); } @@ -1207,42 +1264,17 @@ sl_status_t sl_si91x_driver_send_data_packet(sl_si91x_queue_type_t queue_type, uint32_t wait_time) { UNUSED_PARAMETER(wait_time); - sl_si91x_queue_packet_t *node = NULL; - sl_status_t return_status; - sl_wifi_buffer_t *packet; - sl_si91x_driver_context_t context = { 0 }; - // Allocate a command buffer for the packet - return_status = sl_si91x_allocate_command_buffer(&packet, - (void **)&node, - sizeof(sl_si91x_queue_packet_t), - SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME); - if (return_status != SL_STATUS_OK) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_TX_FRAME_BUFFER); - return return_status; - } - -#ifdef RSI_CHIP_MFG_EN - // WLAN soc frequency if the command is RSI_BOOTUP_PARAMS - if (command == RSI_BOOTUP_PARAMS) - host_desc[14] = RSI_SOC_FREQ; -#endif - - // Configure the packet properties - node->host_packet = buffer; - node->firmware_queue_id = RSI_WLAN_DATA_Q; - node->command_type = (sl_si91x_command_type_t)queue_type; - node->sdk_context = NULL; - node->flags = SI91X_PACKET_WITH_ASYNC_RESPONSE; - - // Configure the context for packet handling - context.packet = node; - context.payload = &(packet_id[queue_type]); + //! Enter Critical Section + __disable_irq(); // Add the packet to the queue with atomic action and trigger a bus event - sl_si91x_host_add_to_queue_with_atomic_action(queue_type, packet, &context, sl_si91x_atomic_packet_id_allocator); + sl_si91x_host_add_to_queue_with_atomic_action(queue_type, buffer, NULL, NULL); - sl_si91x_host_set_bus_event(NCP_HOST_DATA_TX_EVENT); + sl_si91x_host_set_bus_event(SL_SI91X_SOCKET_DATA_TX_PENDING_EVENT); + + //! Exit Critical Section + __enable_irq(); return SL_STATUS_OK; } @@ -1286,7 +1318,7 @@ sl_status_t sl_si91x_driver_send_async_command(uint32_t command, SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME); if (return_status != SL_STATUS_OK) { - sl_si91x_host_free_buffer(raw_rx_buffer, SL_WIFI_TX_FRAME_BUFFER); + sl_si91x_host_free_buffer(raw_rx_buffer); return return_status; } @@ -1308,10 +1340,16 @@ sl_status_t sl_si91x_driver_send_async_command(uint32_t command, context.packet = node; context.payload = &(packet_id[queue_type]); + //! Enter Critical Section + __disable_irq(); + // Add the command packet to the queue with atomic action and trigger a bus event sl_si91x_host_add_to_queue_with_atomic_action(queue_type, buffer, &context, sl_si91x_atomic_packet_id_allocator); - sl_si91x_host_set_bus_event(NCP_HOST_DATA_TX_EVENT); + sl_si91x_host_set_bus_event(SL_SI91X_TX_PENDING_FLAG(queue_type)); + + //! Exit Critical Section + __enable_irq(); return SL_STATUS_OK; } @@ -1633,14 +1671,14 @@ sl_status_t sl_si91x_get_rtc_timer(sl_si91x_module_rtc_time_t *response) &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); // Extract the RTC timer data from the response sl_si91x_packet_t *packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); memcpy(response, packet->data, sizeof(sl_si91x_module_rtc_time_t)); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } @@ -1654,7 +1692,7 @@ sl_status_t sl_si91x_set_device_region(sl_si91x_operation_mode_t operation_mode, case SL_SI91X_CLIENT_MODE: case SL_SI91X_ENTERPRISE_CLIENT_MODE: case SL_SI91X_TRANSMIT_TEST_MODE: - case SL_SI91X_WLAN_BTR_MODE: { + case SL_SI91X_TRANSCEIVER_MODE: { // For client and transmit test modes, send a command to set the region code sl_si91x_set_region_request_t request = { 0 }; @@ -1881,14 +1919,14 @@ sl_status_t sl_si91x_command_to_read_common_flash(uint32_t read_address, size_t &buffer); if (status != SL_STATUS_OK) { if (buffer != NULL) - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } VERIFY_STATUS_AND_RETURN(status); packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); memcpy(output_buffer, packet->data, packet->length); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); // Adjust pointers and counters read_address += chunkSize; @@ -2068,13 +2106,13 @@ sl_status_t sl_si91x_calibration_read(sl_si91x_calibration_read_t target, sl_si9 &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } sl_si91x_packet_t *packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); memcpy(calibration_read, packet->data, sizeof(sl_si91x_calibration_read_t)); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -2183,13 +2221,13 @@ sl_status_t sl_si91x_efuse_read(sl_si91x_efuse_read_t *efuse_read, uint8_t *efus &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } sl_si91x_packet_t *packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); memcpy(efuse_read_buf, packet->data, efuse_read->efuse_read_data_len); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -2260,49 +2298,6 @@ sl_status_t sl_si91x_configure_timeout(sl_si91x_timeout_type_t timeout_type, uin return status; } -/** - * @brief Dump 802.11 Tx/Rx packet - * - * @param[in] pkt - pointer to start of MAC header - * @param[in] pkt_len - total packet length (MAC header + payload) - */ -void dump_80211_pkt(uint8_t *pkt, uint32_t pkt_len, uint16_t req_dump_bytes) -{ - uint32_t dump_bytes = 0; - uint32_t hdr_len = MAC80211_HDR_MIN_LEN; - - hdr_len += (pkt[0] & BIT(7)) ? 2 : 0; /* 2 bytes QoS Ctrl */ - hdr_len += ((pkt[1] & BIT(0)) && (pkt[1] & BIT(1))) ? 6 : 0; /* 6 byte Addr4 */ - - printf("%02x %02x | ", pkt[0], pkt[1]); /* FC */ - printf("%02x %02x | ", pkt[2], pkt[3]); /* Dur */ - printf("%02x:%02x:%02x:%02x:%02x:%02x | ", pkt[4], pkt[5], pkt[6], pkt[7], pkt[8], pkt[9]); /* Addr1/RA */ - printf("%02x:%02x:%02x:%02x:%02x:%02x | ", pkt[10], pkt[11], pkt[12], pkt[13], pkt[14], pkt[15]); /* Addr2/TA */ - printf("%02x:%02x:%02x:%02x:%02x:%02x | ", pkt[16], pkt[17], pkt[18], pkt[19], pkt[20], pkt[21]); /* Addr3/DA */ - printf("%02x %02x | ", pkt[22], pkt[23]); /* Seq Ctrl */ - if ((pkt[1] & BIT(0)) && (pkt[1] & BIT(1))) /* Addr4 */ - printf("%02x:%02x:%02x:%02x:%02x:%02x | ", pkt[24], pkt[25], pkt[26], pkt[27], pkt[28], pkt[29]); - if (pkt[0] & BIT(7)) - printf("%02x %02x | ", pkt[30], pkt[31]); /* QoS Ctrl */ - - // Length of payload without MAC header - dump_bytes = pkt_len - hdr_len; - -#define TX_RX_FRAME_DUMP_BYTE_COUNT 20 -// If disabled, all payload bytes will be displayed -#ifdef TX_RX_FRAME_DUMP_BYTE_COUNT - dump_bytes = req_dump_bytes > dump_bytes ? dump_bytes : req_dump_bytes; -#else - UNUSED_PARAMETER(req_dump_bytes); -#endif - - for (uint32_t i = hdr_len; i < hdr_len + dump_bytes; i++) /* Data */ - printf("%02x ", pkt[i]); - - printf("|\r\n"); -} - -#ifndef MAC_PEER_DS_SUPPORT uint16_t get_seq_ctrl(uint8_t is_qos) { static uint16_t qos_pkt_count = 0; @@ -2316,26 +2311,40 @@ uint16_t get_seq_ctrl(uint8_t is_qos) return is_qos ? qos_pkt_count++ : non_qos_pkt_count++; } -#endif -int32_t encapsulate_tx_data_packet(sl_wifi_btr_data_ctrlblk_t *data_ctrlblk, uint8_t *pkt_data, uint32_t mac_hdr_len) +int32_t encapsulate_tx_data_packet(sl_wifi_transceiver_tx_data_control_t *control, + uint8_t *pkt_data, + uint32_t mac_hdr_len) { uint16_t seq_ctrl = 0; uint16_t *frame_ctrl; uint32_t qos_ctrl_off = MAC80211_HDR_MIN_LEN; - if (data_ctrlblk == NULL) - return RSI_ERROR_INVALID_PACKET; + SL_VERIFY_POINTER_OR_RETURN(control, SL_STATUS_NULL_POINTER); + + if (IS_MAC_ZERO(control->addr1)) { + return SL_STATUS_TRANSCEIVER_INVALID_MAC_ADDRESS; + } + + /* Auto-rate is unsupported if Peer DS feature in MAC layer is disabled */ + if (!IS_PEER_DS_SUPPORT_ENABLED(feature_bit_map)) { + if (!IS_FIXED_DATA_RATE(control->ctrl_flags)) { + return SL_STATUS_TRANSCEIVER_INVALID_DATA_RATE; + } + } - if (IS_MAC_ZERO(data_ctrlblk->addr1)) - return RSI_ERROR_INVALID_MAC_ADDRESS; + /* Ignore QoS flag for bcast/mcast frames */ + if (IS_BCAST_MCAST_MAC(control->addr1[0])) { + control->ctrl_flags &= ~TX_DATA_CTRL_FLAG_QOS_BIT; + } - if (IS_QOS_PKT(data_ctrlblk->ctrl_flags) && !IS_BCAST_MCAST_MAC(data_ctrlblk->addr1[0])) { - if (data_ctrlblk->priority > 3) - return RSI_ERROR_INVALID_QOS_PRIORITY; + if (IS_QOS_PKT(control->ctrl_flags) && !IS_BCAST_MCAST_MAC(control->addr1[0])) { + if (control->priority > 3) { + return SL_STATUS_TRANSCEIVER_INVALID_QOS_PRIORITY; + } } - if (IS_4ADDR(data_ctrlblk->ctrl_flags)) { + if (IS_4ADDR(control->ctrl_flags)) { qos_ctrl_off += MAC80211_HDR_ADDR4_LEN; } @@ -2344,42 +2353,42 @@ int32_t encapsulate_tx_data_packet(sl_wifi_btr_data_ctrlblk_t *data_ctrlblk, uin frame_ctrl = (uint16_t *)&pkt_data[0]; *frame_ctrl |= FC_TYPE_DATA; - if (IS_4ADDR(data_ctrlblk->ctrl_flags)) { + if (IS_4ADDR(control->ctrl_flags)) { *frame_ctrl |= FC_TO_DS; *frame_ctrl |= FC_FROM_DS; } else { - *frame_ctrl |= IS_TODS(data_ctrlblk->ctrl_flags) ? FC_TO_DS : 0; - *frame_ctrl |= IS_FROMDS(data_ctrlblk->ctrl_flags) ? FC_FROM_DS : 0; + *frame_ctrl |= IS_TODS(control->ctrl_flags) ? FC_TO_DS : 0; + *frame_ctrl |= IS_FROMDS(control->ctrl_flags) ? FC_FROM_DS : 0; } /* Add Addr1, Addr2, Addr3 (18 bytes) */ - memcpy(&pkt_data[4], data_ctrlblk->addr1, 6); - memcpy(&pkt_data[10], data_ctrlblk->addr2, 6); - memcpy(&pkt_data[16], data_ctrlblk->addr3, 6); + memcpy(&pkt_data[4], control->addr1, 6); + memcpy(&pkt_data[10], control->addr2, 6); + memcpy(&pkt_data[16], control->addr3, 6); -#ifndef MAC_PEER_DS_SUPPORT /* Add Sequence control [b0-b3] FragNo [b4-b15] SeqNo */ - seq_ctrl = get_seq_ctrl(IS_QOS_PKT(data_ctrlblk->ctrl_flags)) << 4; - memcpy(&pkt_data[22], &seq_ctrl, 2); -#endif + if (!IS_PEER_DS_SUPPORT_ENABLED(feature_bit_map)) { + seq_ctrl = get_seq_ctrl(IS_QOS_PKT(control->ctrl_flags)) << 4; + memcpy(&pkt_data[22], &seq_ctrl, 2); + } /* Add Addr4 optionally based on ctrl_flag (6 bytes) */ - if (IS_4ADDR(data_ctrlblk->ctrl_flags)) - memcpy(&pkt_data[24], data_ctrlblk->addr4, 6); /* sa */ - + if (IS_4ADDR(control->ctrl_flags)) { + memcpy(&pkt_data[24], control->addr4, 6); /* sa */ + } /* Add QoS control optionally based on ctrl_flag (2 bytes) */ - if (IS_QOS_PKT(data_ctrlblk->ctrl_flags) && !IS_BCAST_MCAST_MAC(data_ctrlblk->addr1[0])) { + if (IS_QOS_PKT(control->ctrl_flags) && !IS_BCAST_MCAST_MAC(control->addr1[0])) { *frame_ctrl |= FC_SUBTYPE_QOS_DATA; - pkt_data[qos_ctrl_off] = WME_AC_TO_TID(data_ctrlblk->priority); + pkt_data[qos_ctrl_off] = WME_AC_TO_TID(control->priority); } return SL_STATUS_OK; } -sl_status_t sl_si91x_driver_btr_send_data(sl_wifi_btr_data_ctrlblk_t *data_ctrlblk, - uint8_t *payload, - uint16_t payload_len, - uint32_t wait_time) +sl_status_t sl_si91x_driver_send_transceiver_data(sl_wifi_transceiver_tx_data_control_t *control, + uint8_t *payload, + uint16_t payload_len, + uint32_t wait_time) { sl_wifi_buffer_t *buffer; sl_si91x_packet_t *packet; @@ -2389,15 +2398,15 @@ sl_status_t sl_si91x_driver_btr_send_data(sl_wifi_btr_data_ctrlblk_t *data_ctrlb uint8_t *host_desc; uint32_t mac_hdr_len = MAC80211_HDR_MIN_LEN; - if (IS_QOS_PKT(data_ctrlblk->ctrl_flags) && !IS_BCAST_MCAST_MAC(data_ctrlblk->addr1[0])) { + if (IS_QOS_PKT(control->ctrl_flags) && !IS_BCAST_MCAST_MAC(control->addr1[0])) { mac_hdr_len += MAC80211_HDR_QOS_CTRL_LEN; } - if (IS_4ADDR(data_ctrlblk->ctrl_flags)) { + if (IS_4ADDR(control->ctrl_flags)) { mac_hdr_len += MAC80211_HDR_ADDR4_LEN; } - ext_desc_size = BTR_TX_DATA_EXT_DESC_SIZE; + ext_desc_size = TRANSCEIVER_TX_DATA_EXT_DESC_SIZE; // Allocate a command buffer with space for the command data and metadata status = sl_si91x_allocate_command_buffer(&buffer, @@ -2412,16 +2421,16 @@ sl_status_t sl_si91x_driver_btr_send_data(sl_wifi_btr_data_ctrlblk_t *data_ctrlb } pkt_offset = packet->data + ext_desc_size; - status = encapsulate_tx_data_packet(data_ctrlblk, pkt_offset, mac_hdr_len); + status = encapsulate_tx_data_packet(control, pkt_offset, mac_hdr_len); if (status != SL_STATUS_OK) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_TX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } memcpy(pkt_offset + mac_hdr_len, payload, payload_len); #ifdef TX_RX_FRAME_DUMP_BYTE_COUNT - dump_80211_pkt(pkt_offset, mac_hdr_len + payload_len, TX_RX_FRAME_DUMP_BYTE_COUNT); + print_80211_packet(pkt_offset, mac_hdr_len + payload_len, TX_RX_FRAME_DUMP_BYTE_COUNT); #endif // Clear the packet descriptor and copy the command data if available @@ -2433,40 +2442,46 @@ sl_status_t sl_si91x_driver_btr_send_data(sl_wifi_btr_data_ctrlblk_t *data_ctrlb // Fill packet type host_desc = packet->desc; - host_desc[2] = 0x01; - if (IS_CFM_TO_HOST_SET(data_ctrlblk->ctrl_flags)) + host_desc[2] = 0x01; //! Frame Type + if (IS_CFM_TO_HOST_SET(control->ctrl_flags)) { host_desc[3] |= CONFIRM_REQUIRED_TO_HOST; //! This bit is used to set CONFIRM_REQUIRED_TO_HOST in firmware. - host_desc[4] = ext_desc_size; //! xtend_desc size - host_desc[5] = ((mac_hdr_len + 3) & ~3); //! Mac_header length + } + host_desc[4] = ext_desc_size; //! xtend_desc size + host_desc[5] = ((mac_hdr_len + 3) & ~3); //! Mac_header length - if (IS_BCAST_MCAST_MAC(data_ctrlblk->addr1[0])) + if (IS_BCAST_MCAST_MAC(control->addr1[0])) { host_desc[7] |= BCAST_INDICATION; //! Bcast_indication + //! If auto-rate is enabled for bcast/mcast pkts, use 1 Mbps + if (!IS_FIXED_DATA_RATE(control->ctrl_flags)) { + host_desc[6] |= MAC_INFO_ENABLE; //! Fixed Rate + host_desc[8] = SL_WIFI_DATA_RATE_1; + } + } - if (IS_FIXED_DATA_RATE(data_ctrlblk->ctrl_flags)) { + if (IS_FIXED_DATA_RATE(control->ctrl_flags)) { host_desc[6] |= MAC_INFO_ENABLE; //! Fixed Rate - host_desc[8] = data_ctrlblk->rate; + host_desc[8] = control->rate; } - if (IS_QOS_PKT(data_ctrlblk->ctrl_flags)) { + if (IS_QOS_PKT(control->ctrl_flags) && !IS_BCAST_MCAST_MAC(control->addr1[0])) { host_desc[13] |= QOS_ENABLE; // QOS ENABLE } - host_desc[14] = - (((WME_AC_TO_TID(data_ctrlblk->priority) & 0xf) << 4) | (WME_AC_TO_QNUM(data_ctrlblk->priority) & 0xf)); + host_desc[14] = (((WME_AC_TO_TID(control->priority) & 0xf) << 4) | (WME_AC_TO_QNUM(control->priority) & 0xf)); //! Initialize extended desc - memcpy(&host_desc[16], &data_ctrlblk->token, 4); + memcpy(&host_desc[16], &control->token, TRANSCEIVER_TX_DATA_EXT_DESC_SIZE); - // Send command packet to the SI91x WLAN queue and await a response - return sl_si91x_driver_send_data_packet(SI91X_WLAN_CMD_QUEUE, buffer, wait_time); + // Send command packet to the SI91x socket data queue and await a response + return sl_si91x_driver_send_data_packet(SI91X_SOCKET_DATA_QUEUE, buffer, wait_time); } -int16_t sl_si91x_bl_upgrade_firmware(uint8_t *firmware_image, uint32_t fw_image_size, uint8_t flags) +sl_status_t sl_si91x_bl_upgrade_firmware(uint8_t *firmware_image, uint32_t fw_image_size, uint8_t flags) { static uint16_t boot_cmd = 0; uint16_t read_value = 0; uint32_t offset = 0; - int16_t retval = 0; + uint32_t retval = 0; uint32_t boot_insn = 0, poll_resp = 0; //! If it is a start of file set the boot cmd to pong valid @@ -2476,7 +2491,7 @@ int16_t sl_si91x_bl_upgrade_firmware(uint8_t *firmware_image, uint32_t fw_image_ //! check for invalid packet if ((fw_image_size % (SL_SI91X_MIN_CHUNK_SIZE) != 0) && (!(flags & SL_SI91X_FW_END_OF_FILE))) { - return -1; + return SL_STATUS_FAIL; } //! loop to execute multiple of 4K chunks @@ -2496,15 +2511,11 @@ int16_t sl_si91x_bl_upgrade_firmware(uint8_t *firmware_image, uint32_t fw_image_ } retval = sl_si91x_boot_instruction(boot_insn, (uint16_t *)((uint8_t *)firmware_image + offset)); - if (retval < 0) { - return retval; - } + VERIFY_STATUS_AND_RETURN(retval); while (1) { retval = sl_si91x_boot_instruction(RSI_REG_READ, &read_value); - if (retval < 0) { - return retval; - } + VERIFY_STATUS_AND_RETURN(retval); if (read_value == (RSI_HOST_INTERACT_REG_VALID | poll_resp)) { break; @@ -2518,16 +2529,12 @@ int16_t sl_si91x_bl_upgrade_firmware(uint8_t *firmware_image, uint32_t fw_image_ boot_cmd = RSI_HOST_INTERACT_REG_VALID | RSI_EOF_REACHED; retval = sl_si91x_boot_instruction(RSI_REG_WRITE, &boot_cmd); - if (retval < 0) { - return retval; - } + VERIFY_STATUS_AND_RETURN(retval); //! check for successful firmware upgrade do { retval = sl_si91x_boot_instruction(RSI_REG_READ, &read_value); - if (retval < 0) { - return retval; - } + VERIFY_STATUS_AND_RETURN(retval); } while (read_value != (RSI_HOST_INTERACT_REG_VALID | RSI_FWUP_SUCCESSFUL)); } @@ -2539,16 +2546,52 @@ sl_status_t sl_si91x_set_fast_fw_up(void) uint32_t read_data = 0; sl_status_t retval = 0; retval = sl_si91x_bus_read_memory(SL_SI91X_SAFE_UPGRADE_ADDR, 4, (uint8_t *)&read_data); - if (retval == SL_STATUS_FAIL) { - return retval; - } + VERIFY_STATUS_AND_RETURN(retval); + //disabling safe upgradation bit if ((read_data & SL_SI91X_SAFE_UPGRADE)) { read_data &= ~(SL_SI91X_SAFE_UPGRADE); retval = sl_si91x_bus_write_memory(SL_SI91X_SAFE_UPGRADE_ADDR, 4, (uint8_t *)&read_data); - if (retval == SL_STATUS_FAIL) { - return retval; - } + VERIFY_STATUS_AND_RETURN(retval); } return retval; } + +#ifdef SLI_SI91X_MCU_INTERFACE +void sli_si91x_append_to_buffer_queue(sl_si91x_buffer_queue_t *queue, sl_wifi_buffer_t *buffer) +{ + CORE_irqState_t state = CORE_EnterAtomic(); + if (queue->tail == NULL) { + assert(queue->head == NULL); // Both should be NULL at the same time + queue->head = buffer; + queue->tail = buffer; + } else { + queue->tail->node.node = &buffer->node; + queue->tail = buffer; + } + CORE_ExitAtomic(state); +} + +sl_status_t sli_si91x_pop_from_buffer_queue(sl_si91x_buffer_queue_t *queue, sl_wifi_buffer_t **buffer) +{ + sl_status_t status = SL_STATUS_EMPTY; + CORE_irqState_t state = CORE_EnterAtomic(); + if (queue->head == NULL) { + assert(queue->tail == NULL); // Both should be NULL at the same time + *buffer = NULL; + status = SL_STATUS_EMPTY; + } else { + *buffer = queue->head; + status = SL_STATUS_OK; + if (queue->head == queue->tail) { + queue->head = NULL; + queue->tail = NULL; + } else { + queue->head = (sl_wifi_buffer_t *)queue->head->node.node; + } + } + CORE_ExitAtomic(state); + return status; +} + +#endif diff --git a/components/device/silabs/si91x/wireless/threading/sli_si91x_multithreaded.c b/components/device/silabs/si91x/wireless/threading/sli_si91x_multithreaded.c index 84c167ea4..d393a4a85 100644 --- a/components/device/silabs/si91x/wireless/threading/sli_si91x_multithreaded.c +++ b/components/device/silabs/si91x/wireless/threading/sli_si91x_multithreaded.c @@ -3,7 +3,7 @@ * @brief ******************************************************************************* * # License - * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * * SPDX-License-Identifier: Zlib @@ -55,10 +55,9 @@ #include "rsi_bt_common.h" #endif -#ifdef SLI_SI91X_MCU_INTERFACE -// Declaration of a global flag to indicate pending RX packets -extern uint8_t rx_packet_pending_flag; -#endif +#define BUS_THREAD_EVENTS \ + (SL_SI91X_ALL_TX_PENDING_COMMAND_EVENTS | SL_SI91X_SOCKET_DATA_TX_PENDING_EVENT | SL_SI91X_NCP_HOST_BUS_RX_EVENT) + /****************************************************** * Function Declarations ******************************************************/ @@ -121,6 +120,11 @@ static sl_status_t bus_write_frame(sl_si91x_queue_type_t queue_type, sl_wifi_buffer_type_t buffer_type, sl_si91x_command_trace_t *trace, bool *global_queue_block); + +static sl_status_t bus_write_data_frame(sl_si91x_queue_type_t queue_type, + sl_wifi_buffer_type_t buffer_type, + bool *global_queue_block); + sl_status_t si91x_req_wakeup(void); sl_status_t sl_create_generic_rx_packet_from_params(sl_si91x_queue_packet_t **queue_packet, @@ -136,7 +140,7 @@ sl_status_t sl_create_generic_rx_packet_from_params(sl_si91x_queue_packet_t **qu uint16_t temp = 0; status = sl_si91x_host_allocate_buffer(&buffer, - SL_WIFI_CONTROL_BUFFER, + SL_WIFI_RX_FRAME_BUFFER, sizeof(sl_si91x_queue_packet_t), SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME); if (status != SL_STATUS_OK) { @@ -219,11 +223,11 @@ void handle_dhcp_and_rejoin_failure(sl_si91x_queue_packet_t *node, // generate dummy MQTT remote terminate packet. status = sl_si91x_host_allocate_buffer(&mqtt_remote_terminate_packet_buffer, - SL_WIFI_CONTROL_BUFFER, + SL_WIFI_RX_FRAME_BUFFER, sizeof(sl_si91x_packet_t), SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME); if (status != SL_STATUS_OK) { - sl_si91x_host_free_buffer(temp_buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(temp_buffer); return; } @@ -234,7 +238,7 @@ void handle_dhcp_and_rejoin_failure(sl_si91x_queue_packet_t *node, node->frame_status = SL_STATUS_OK; node->host_packet = mqtt_remote_terminate_packet_buffer; - mqtt_remote_terminate_packet->command = RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE; + mqtt_remote_terminate_packet->command = RSI_WLAN_RSP_JOIN; // Enqueue the packet and set the async event. sl_si91x_host_add_to_queue(SI91X_NETWORK_EVENT_QUEUE, temp_buffer); @@ -281,7 +285,7 @@ void si91x_event_handler_thread(void *args) } else { // TODO: error handling } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } } } @@ -297,8 +301,8 @@ void si91x_event_handler_thread(void *args) SL_NET_EVENT_DISPATCH_HANDLER(data, packet); // Free the resources associated with the packet. - sl_si91x_host_free_buffer(data->host_packet, SL_WIFI_RX_FRAME_BUFFER); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(data->host_packet); + sl_si91x_host_free_buffer(buffer); } else { // TODO: error handling } @@ -315,8 +319,8 @@ void si91x_event_handler_thread(void *args) SL_NET_EVENT_DISPATCH_HANDLER(data, packet); // Free the resources associated with the packet - sl_si91x_host_free_buffer(data->host_packet, SL_WIFI_RX_FRAME_BUFFER); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(data->host_packet); + sl_si91x_host_free_buffer(buffer); } else { // TODO: error handling } @@ -348,16 +352,16 @@ void si91x_bus_thread(void *args) int i; // Array to track the status of commands in flight - sl_si91x_command_trace_t command_trace[SI91X_CMD_MAX] = { [SI91X_COMMON_CMD] = { .sequential = true }, - [SI91X_WLAN_CMD] = { .sequential = true }, - [SI91X_NETWORK_CMD] = { .sequential = true }, - [SI91X_SOCKET_CMD] = { .sequential = true }, - [SI91X_BT_CMD] = { .sequential = true } }; + sl_si91x_command_trace_t command_trace[SI91X_CMD_MAX] = { + [SI91X_COMMON_CMD] = { .sequential = true }, [SI91X_WLAN_CMD] = { .sequential = true }, + [SI91X_NETWORK_CMD] = { .sequential = true }, [SI91X_SOCKET_CMD] = { .sequential = true }, + [SI91X_BT_CMD] = { .sequential = true }, [SI91X_SOCKET_DATA] = { .sequential = true } + }; while (1) { - // Check if any TX queues are empty - tx_queues_empty = ((cmd_queues[((sl_si91x_queue_type_t)SI91X_SOCKET_CMD)].queued_packet_count - && (false == command_trace[SI91X_SOCKET_CMD].command_in_flight)) + tx_queues_empty = ((cmd_queues[((sl_si91x_queue_type_t)SI91X_SOCKET_DATA)].queued_packet_count) + || (cmd_queues[((sl_si91x_queue_type_t)SI91X_SOCKET_CMD)].queued_packet_count + && (false == command_trace[SI91X_SOCKET_CMD].command_in_flight)) || (cmd_queues[((sl_si91x_queue_type_t)SI91X_WLAN_CMD)].queued_packet_count && (false == command_trace[SI91X_WLAN_CMD].command_in_flight)) || (cmd_queues[((sl_si91x_queue_type_t)SI91X_COMMON_CMD)].queued_packet_count @@ -366,14 +370,13 @@ void si91x_bus_thread(void *args) && (false == command_trace[SI91X_BT_CMD].command_in_flight)) || (cmd_queues[((sl_si91x_queue_type_t)SI91X_NETWORK_CMD)].queued_packet_count && (false == command_trace[SI91X_NETWORK_CMD].command_in_flight))); - // Wait for an event - if ((0 == tx_queues_empty) -#ifdef SLI_SI91X_MCU_INTERFACE - || (rx_packet_pending_flag == 1) -#endif - ) { + + // Check for an already set event + event |= si91x_host_wait_for_bus_event(BUS_THREAD_EVENTS, 0); + // If there are no TX packets to be processed and no RX packets pending, then waitforever + if (((tx_queues_empty == 0) && !(event & SL_SI91X_NCP_HOST_BUS_RX_EVENT))) { // Wait for an event related to data TX or RX on the bus with an infinite timeout. - event = si91x_host_wait_for_bus_event((NCP_HOST_DATA_TX_EVENT | NCP_HOST_BUS_RX_EVENT), osWaitForever); + event |= si91x_host_wait_for_bus_event(BUS_THREAD_EVENTS, osWaitForever); } #ifndef SLI_SI91X_MCU_INTERFACE @@ -391,28 +394,23 @@ void si91x_bus_thread(void *args) } // Check if there is no RX packet pending or the bus RX event is not set - if (!((interrupt_status & RSI_RX_PKT_PENDING) || (event & NCP_HOST_BUS_RX_EVENT))) { + if (!((interrupt_status & RSI_RX_PKT_PENDING) || (event & SL_SI91X_NCP_HOST_BUS_RX_EVENT))) { if (current_performance_profile != HIGH_PERFORMANCE) { // Clear the sleep indicator if the device is not in high-performance mode sl_si91x_host_clear_sleep_indicator(); } } #endif + // Check if there is an RX packet pending or bus RX event is set - if (( + if (((event & SL_SI91X_NCP_HOST_BUS_RX_EVENT) #ifndef SLI_SI91X_MCU_INTERFACE - (interrupt_status & RSI_RX_PKT_PENDING) -#else - (rx_packet_pending_flag == 1) + && (interrupt_status & RSI_RX_PKT_PENDING) #endif - ) - && (sl_si91x_bus_read_frame(&buffer) == SL_STATUS_OK)) { + ) + && (sl_si91x_bus_read_frame(&buffer) == SL_STATUS_OK)) { // Allocation from RX buffer type! -#ifdef SLI_SI91X_MCU_INTERFACE - rx_packet_pending_flag = 0x00; // Reset the pending RX packet flag -#endif - - event = 0; // Reset the event flag + event &= ~SL_SI91X_NCP_HOST_BUS_RX_EVENT; // Reset the event flag if (current_performance_profile != HIGH_PERFORMANCE) { sl_si91x_host_clear_sleep_indicator(); @@ -462,8 +460,10 @@ void si91x_bus_thread(void *args) == SI91X_PACKET_RESPONSE_STATUS) && (command_trace[SI91X_COMMON_CMD].frame_type == frame_type)) { // Allocate a packet to store the response - status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + status = sl_si91x_host_allocate_buffer(&packet, + SL_WIFI_RX_FRAME_BUFFER, + sizeof(sl_si91x_queue_packet_t), + 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -476,7 +476,7 @@ void si91x_bus_thread(void *args) node->host_packet = buffer; } else { node->host_packet = NULL; - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); } // Populate packet metadata @@ -491,7 +491,7 @@ void si91x_bus_thread(void *args) sl_si91x_host_add_to_queue(SI91X_COMMON_RESPONSE_QUEUE, packet); sl_si91x_host_set_event(NCP_HOST_COMMON_RESPONSE_EVENT); } else { - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); } // Marking a received frame as not in flight when it matches the expected type. @@ -553,12 +553,12 @@ void si91x_bus_thread(void *args) case RSI_WLAN_RSP_TIMEOUT: case RSI_WLAN_RSP_BEACON_STOP: case RSI_WLAN_RSP_DYNAMIC_POOL: - case SL_SI91X_WIFI_BTR_RSP_SET_CHANNEL: - case SL_SI91X_WIFI_BTR_RSP_CONFIG_PARAMS: - case SL_SI91X_WIFI_BTR_RSP_PEER_LIST_UPDATE: - case SL_SI91X_WIFI_BTR_RSP_SET_MCAST_FILTER: - case SL_SI91X_WIFI_BTR_RSP_FLUSH_DATA_Q: - case SL_SI91X_WIFI_BTR_TX_DATA_STATUS: + case RSI_WLAN_RSP_TRANSCEIVER_SET_CHANNEL: + case RSI_WLAN_RSP_TRANSCEIVER_CONFIG_PARAMS: + case RSI_WLAN_RSP_TRANSCEIVER_PEER_LIST_UPDATE: + case RSI_WLAN_RSP_TRANSCEIVER_SET_MCAST_FILTER: + case RSI_WLAN_RSP_TRANSCEIVER_FLUSH_DATA_Q: + case RSI_WLAN_RSP_TRANSCEIVER_TX_DATA_STATUS: case RSI_WLAN_RSP_HT_CAPABILITIES: { ++command_trace[SI91X_WLAN_CMD].rx_counter; @@ -582,8 +582,10 @@ void si91x_bus_thread(void *args) && (command_trace[SI91X_WLAN_CMD].frame_type == frame_type)) { // Allocate a buffer for the response packet - status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + status = sl_si91x_host_allocate_buffer(&packet, + SL_WIFI_RX_FRAME_BUFFER, + sizeof(sl_si91x_queue_packet_t), + 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -597,7 +599,7 @@ void si91x_bus_thread(void *args) node->host_packet = buffer; } else { node->host_packet = NULL; - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); } // Populate the response packet information @@ -633,8 +635,10 @@ void si91x_bus_thread(void *args) if (((command_trace[SI91X_WLAN_CMD].flags & SI91X_PACKET_RESPONSE_STATUS) == SI91X_PACKET_RESPONSE_STATUS) && (command_trace[SI91X_WLAN_CMD].frame_type == frame_type)) { // Allocate a buffer for the response packet - status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + status = sl_si91x_host_allocate_buffer(&packet, + SL_WIFI_RX_FRAME_BUFFER, + sizeof(sl_si91x_queue_packet_t), + 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -652,7 +656,7 @@ void si91x_bus_thread(void *args) // Add the response packet to the WLAN response queue and set the WLAN response event sl_si91x_host_add_to_queue(SI91X_WLAN_RESPONSE_QUEUE, packet); sl_si91x_host_set_event(NCP_HOST_WLAN_RESPONSE_EVENT); - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); } else { // If frame status is OK, set bg_enabled flag if (frame_status == SL_STATUS_OK) { @@ -676,8 +680,10 @@ void si91x_bus_thread(void *args) if (((command_trace[SI91X_WLAN_CMD].flags & SI91X_PACKET_RESPONSE_STATUS) == SI91X_PACKET_RESPONSE_STATUS) && (command_trace[SI91X_WLAN_CMD].frame_type == frame_type)) { // Allocate a buffer for the response packet - status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + status = sl_si91x_host_allocate_buffer(&packet, + SL_WIFI_RX_FRAME_BUFFER, + sizeof(sl_si91x_queue_packet_t), + 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -708,7 +714,7 @@ void si91x_bus_thread(void *args) command_trace[SI91X_WLAN_CMD].frame_type = 0; } - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); break; } case RSI_COMMON_RSP_ULP_NO_RAM_RETENTION: { @@ -726,12 +732,13 @@ void si91x_bus_thread(void *args) command_trace[SI91X_COMMON_CMD].frame_type = 0; } - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); sl_si91x_host_set_event(NCP_HOST_COMMON_RESPONSE_EVENT); break; } case RSI_WLAN_RSP_IPCONFV4: case RSI_WLAN_RSP_IPCONFV6: + case RSI_WLAN_RSP_IPV4_CHANGE: case RSI_WLAN_RSP_OTA_FWUP: case RSI_WLAN_RSP_DNS_QUERY: case RSI_WLAN_RSP_SET_SNI_EMBEDDED: @@ -747,7 +754,7 @@ void si91x_bus_thread(void *args) // Allocate a buffer for the response packet status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + sl_si91x_host_allocate_buffer(&packet, SL_WIFI_RX_FRAME_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -785,7 +792,7 @@ void si91x_bus_thread(void *args) if (SI91X_PACKET_RESPONSE_PACKET != (command_trace[SI91X_NETWORK_CMD].flags & SI91X_PACKET_RESPONSE_PACKET)) { node->host_packet = NULL; - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); } // Add the response packet to response queue and set the network response event @@ -832,7 +839,7 @@ void si91x_bus_thread(void *args) } // Allocate a buffer for the response packet status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + sl_si91x_host_allocate_buffer(&packet, SL_WIFI_RX_FRAME_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -865,7 +872,7 @@ void si91x_bus_thread(void *args) if (SI91X_PACKET_RESPONSE_PACKET != (command_trace[SI91X_SOCKET_CMD].flags & SI91X_PACKET_RESPONSE_PACKET)) { node->host_packet = NULL; - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); } // Add the response packet to the socket response queue and set the socket response event @@ -882,7 +889,7 @@ void si91x_bus_thread(void *args) && (command_trace[SI91X_SOCKET_CMD].command_in_flight == true)) { // Allocate a buffer for the error packet status = sl_si91x_host_allocate_buffer(&error_packet, - SL_WIFI_CONTROL_BUFFER, + SL_WIFI_RX_FRAME_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); if (status != SL_STATUS_OK) { @@ -901,8 +908,8 @@ void si91x_bus_thread(void *args) } SL_NET_EVENT_DISPATCH_HANDLER(node, (sl_si91x_packet_t *)data); - sl_si91x_host_free_buffer(packet, SL_WIFI_RX_FRAME_BUFFER); - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(packet); + sl_si91x_host_free_buffer(buffer); } else { // If it's not remote termination, add the packet to the socket event queue // and set asynchronous socket notification event @@ -925,7 +932,7 @@ void si91x_bus_thread(void *args) case RSI_WLAN_RSP_TCP_ACK_INDICATION: { // Allocate memory for a new packet status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + sl_si91x_host_allocate_buffer(&packet, SL_WIFI_RX_FRAME_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -971,7 +978,7 @@ void si91x_bus_thread(void *args) // Allocate memory for a new packet status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + sl_si91x_host_allocate_buffer(&packet, SL_WIFI_RX_FRAME_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -997,7 +1004,7 @@ void si91x_bus_thread(void *args) ++command_trace[SI91X_NETWORK_CMD].rx_counter; status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + sl_si91x_host_allocate_buffer(&packet, SL_WIFI_RX_FRAME_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -1017,7 +1024,7 @@ void si91x_bus_thread(void *args) && (command_trace[SI91X_NETWORK_CMD].frame_type == frame_type)) { // If it's a response status and the frame_type matches, set host_packet to NULL and free the buffer node->host_packet = NULL; - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); // Add the packet to the network response queue and set the network response event sl_si91x_host_add_to_queue(SI91X_NETWORK_RESPONSE_QUEUE, packet); @@ -1044,7 +1051,7 @@ void si91x_bus_thread(void *args) PRINT_ERROR_STATUS(INFO_TAG, frame_type); } // Free the buffer - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); break; } } @@ -1052,7 +1059,6 @@ void si91x_bus_thread(void *args) } case RSI_WLAN_DATA_Q: { - uint8_t rx_data_frame_type = data[2]; // Erase queue ID as it overlays with the length field which is only 24-bit data[1] &= 0xF; if (frame_type == RSI_RECEIVE_RAW_DATA) { @@ -1063,9 +1069,9 @@ void si91x_bus_thread(void *args) // Increment the receive counter for the socket command ++command_trace[SI91X_SOCKET_CMD].rx_counter; - // Allocate memory for a new packet from SL_WIFI_CONTROL_BUFFER + // Allocate memory for a new packet from SL_WIFI_RX_FRAME_BUFFER status = - sl_si91x_host_allocate_buffer(&packet, SL_WIFI_CONTROL_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); + sl_si91x_host_allocate_buffer(&packet, SL_WIFI_RX_FRAME_BUFFER, sizeof(sl_si91x_queue_packet_t), 1000); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\n HEAP EXHAUSTED DURING ALLOCATION \r\n"); BREAKPOINT(); @@ -1104,8 +1110,8 @@ void si91x_bus_thread(void *args) (sl_si91x_packet_t *)sl_si91x_host_get_buffer_data(node->host_packet, 0, NULL); SL_NET_EVENT_DISPATCH_HANDLER(node, raw_packet); - sl_si91x_host_free_buffer(node->host_packet, SL_WIFI_RX_FRAME_BUFFER); - sl_si91x_host_free_buffer(packet, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(node->host_packet); + sl_si91x_host_free_buffer(packet); } if (RSI_WLAN_RSP_SOCKET_READ_DATA == command_trace[SI91X_SOCKET_CMD].frame_type) { @@ -1117,9 +1123,9 @@ void si91x_bus_thread(void *args) #else // If SLI_SI91X_OFFLOAD_NETWORK_STACK is not defined, process the data frame and free the buffer. sl_si91x_host_process_data_frame(SL_WIFI_CLIENT_INTERFACE, buffer); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #endif - } else if (rx_data_frame_type == SL_SI91X_WIFI_RX_DOT11_DATA) { + } else if (frame_type == SL_SI91X_WIFI_RX_DOT11_DATA) { ++command_trace[SI91X_WLAN_CMD].rx_counter; // Marking a received frame as not in flight when it matches the expected type @@ -1148,34 +1154,60 @@ void si91x_bus_thread(void *args) // Process the Bluetooth response data and free the buffer rsi_driver_process_bt_resp_handler(data); - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); break; } #endif default: { // If the frame_type doesn't match any known cases // Free the buffer - sl_si91x_host_free_buffer(buffer, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(buffer); break; } } sli_submit_rx_buffer(); } - // This condition is checked before writing frames to the bus - for (i = 0; i < SI91X_CMD_MAX; i++) { - // Check if the current command queue is empty - if (cmd_queues[((sl_si91x_queue_type_t)i)].queued_packet_count) { + + if (event & SL_SI91X_ALL_TX_PENDING_COMMAND_EVENTS) { + // This condition is checked before writing frames to the bus + for (i = 0; i < SI91X_SOCKET_DATA; i++) { + // Check if the current command queue is empty + if ((cmd_queues[((sl_si91x_queue_type_t)i)].queued_packet_count) && (event & (SL_SI91X_TX_PENDING_FLAG(i))) + && (command_trace[i].command_in_flight != true)) { + // Read the interrupt status + sl_si91x_bus_read_interrupt_status(&interrupt_status); + if ((0 == (interrupt_status & RSI_BUFFER_FULL))) { + if (bus_write_frame(i, SL_WIFI_CONTROL_BUFFER, &(command_trace[i]), &global_queue_block) == SL_STATUS_OK) { + // Check if there are more packets in the queue + if (0 == cmd_queues[((sl_si91x_queue_type_t)i)].queued_packet_count) { + // No more packets, clear the SL_SI91X_ALL_TX_PENDING_COMMAND_EVENTS for the processed queue + event &= ~SL_SI91X_TX_PENDING_FLAG(i); + } + } + } else { + break; + } + } + } + } + + if (event & SL_SI91X_SOCKET_DATA_TX_PENDING_EVENT) { + if (cmd_queues[((sl_si91x_queue_type_t)SI91X_SOCKET_DATA)].queued_packet_count) { // Read the interrupt status sl_si91x_bus_read_interrupt_status(&interrupt_status); if ((0 == (interrupt_status & RSI_BUFFER_FULL))) { - bus_write_frame(i, SL_WIFI_CONTROL_BUFFER, &(command_trace[i]), &global_queue_block); + if (bus_write_data_frame(SI91X_SOCKET_DATA_QUEUE, SL_WIFI_TX_FRAME_BUFFER, &global_queue_block) + != SL_STATUS_OK) { + continue; + } } else { - break; + continue; } + } else { + event &= ~SL_SI91X_SOCKET_DATA_TX_PENDING_EVENT; } } } - //To suppress warning unused parameter, no code effect UNUSED_PARAMETER(event); } @@ -1185,20 +1217,15 @@ static sl_status_t bus_write_frame(sl_si91x_queue_type_t queue_type, sl_si91x_command_trace_t *trace, bool *global_queue_block) { + UNUSED_PARAMETER(buffer_type); sl_status_t status; sl_wifi_buffer_t *buffer; sl_si91x_packet_t *packet; sl_si91x_queue_packet_t *node = NULL; - if (false == global_queue_block) { + if (true == *global_queue_block) { return SL_STATUS_BUSY; } - // Check if sequential processing is enabled, and if a command is already in flight - if (true == trace->sequential) { - if (true == trace->command_in_flight) { - return SL_STATUS_BUSY; - } - } if (current_performance_profile != HIGH_PERFORMANCE) { if (si91x_req_wakeup() != SL_STATUS_OK) { @@ -1216,29 +1243,30 @@ static sl_status_t bus_write_frame(sl_si91x_queue_type_t queue_type, // Modify the packet's descriptor to include the firmware queue ID in the length field packet->desc[1] |= (node->firmware_queue_id << 4); - // If the packet doesn't have an async response, mark the command as in flight - if (SI91X_PACKET_WITH_ASYNC_RESPONSE != (node->flags & SI91X_PACKET_WITH_ASYNC_RESPONSE)) { - trace->command_in_flight = true; - } - - // Set the global_queue_block flag if it is present in the packet's flags - if (SI91X_PACKET_GLOBAL_QUEUE_BLOCK == (SI91X_PACKET_GLOBAL_QUEUE_BLOCK & node->flags)) { - *global_queue_block = true; - } + if (packet->command) { + // If the packet doesn't have an async response, mark the command as in flight + if (SI91X_PACKET_WITH_ASYNC_RESPONSE != (node->flags & SI91X_PACKET_WITH_ASYNC_RESPONSE)) { + trace->command_in_flight = true; + } - // Update trace information with packet details - trace->packet_id = node->packet_id; - trace->firmware_queue_id = node->firmware_queue_id; - trace->frame_type = packet->command; - trace->flags = node->flags; + // Set the global_queue_block flag if it is present in the packet's flags + if (SI91X_PACKET_GLOBAL_QUEUE_BLOCK == (SI91X_PACKET_GLOBAL_QUEUE_BLOCK & node->flags)) { + *global_queue_block = true; + } - // copy the socket_id of sl_si91x_queue_packet_t structure to sl_si91x_command_trace_t structure. - if (queue_type == (sl_si91x_queue_type_t)SI91X_SOCKET_CMD) { - trace->sl_si91x_socket_id = node->sl_si91x_socket_id; - } + // Update trace information with packet details + trace->packet_id = node->packet_id; + trace->firmware_queue_id = node->firmware_queue_id; + trace->frame_type = packet->command; + trace->flags = node->flags; - trace->sdk_context = node->sdk_context; + // copy the socket_id of sl_si91x_queue_packet_t structure to sl_si91x_command_trace_t structure. + if (queue_type == (sl_si91x_queue_type_t)SI91X_SOCKET_CMD) { + trace->sl_si91x_socket_id = node->sl_si91x_socket_id; + } + trace->sdk_context = node->sdk_context; + } // Write the frame to the bus using packet data and length status = sl_si91x_bus_write_frame(packet, packet->data, length); @@ -1269,16 +1297,60 @@ static sl_status_t bus_write_frame(sl_si91x_queue_type_t queue_type, } #endif + sl_si91x_host_free_buffer(node->host_packet); + sl_si91x_host_free_buffer(buffer); + + trace->tx_counter++; + return SL_STATUS_OK; +} + +static sl_status_t bus_write_data_frame(sl_si91x_queue_type_t queue_type, // This function is called for writing data + sl_wifi_buffer_type_t buffer_type, + bool *global_queue_block) +{ + UNUSED_PARAMETER(buffer_type); + sl_status_t status; + sl_wifi_buffer_t *buffer; + sl_si91x_packet_t *packet; + + if (true == *global_queue_block) { + return SL_STATUS_BUSY; + } + + if (current_performance_profile != HIGH_PERFORMANCE) { + if (si91x_req_wakeup() != SL_STATUS_OK) { + return SL_STATUS_TIMEOUT; + } + } + + status = sl_si91x_host_remove_from_queue(queue_type, &buffer); + VERIFY_STATUS_AND_RETURN(status); + packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); + uint16_t length = packet->length; + + // Modify the packet's descriptor to include the firmware queue ID in the length field + packet->desc[1] |= (5 << 4); + + // Write the frame to the bus using packet data and length + status = sl_si91x_bus_write_frame(packet, packet->data, length); + + // Handle errors during frame writing + if (status != SL_STATUS_OK) { + SL_DEBUG_LOG("\r\n BUS_WRITE_ERROR \r\n"); + BREAKPOINT(); + } + + SL_DEBUG_LOG("<>>>> Tx -> queueId : %u, frameId : 0x%x, length : %u\n", 5, 0, length); + + if (current_performance_profile != HIGH_PERFORMANCE) { + sl_si91x_host_clear_sleep_indicator(); + } + #ifndef SLI_SI91X_MCU_INTERFACE // If WLAN data queue is involved, release semaphore - if (RSI_WLAN_DATA_Q == trace->firmware_queue_id) { - osSemaphoreRelease(cmd_lock); - } + osSemaphoreRelease(cmd_lock); #endif - sl_si91x_host_free_buffer(node->host_packet, buffer_type); - sl_si91x_host_free_buffer(buffer, buffer_type); - - trace->tx_counter++; + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } diff --git a/components/device/stm32/Core/Inc/FreeRTOSConfig.h b/components/device/stm32/Core/Inc/FreeRTOSConfig.h index dea1222a0..6f0c1b7c3 100644 --- a/components/device/stm32/Core/Inc/FreeRTOSConfig.h +++ b/components/device/stm32/Core/Inc/FreeRTOSConfig.h @@ -109,7 +109,7 @@ /* Software timer definitions. */ #define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY ( 40 ) +#define configTIMER_TASK_PRIORITY ( 55 ) #define configTIMER_QUEUE_LENGTH 10 #define configTIMER_TASK_STACK_DEPTH 256 diff --git a/components/device/stm32/silabs_utility/common/inc/sl_common.h b/components/device/stm32/silabs_utility/common/inc/sl_common.h index 46d07fffd..b03db47c8 100644 --- a/components/device/stm32/silabs_utility/common/inc/sl_common.h +++ b/components/device/stm32/silabs_utility/common/inc/sl_common.h @@ -93,8 +93,7 @@ extern "C" { /** @brief Macros for handling packed structures. */ #define SL_PACK_START(X) _Pragma(STRINGIZE(pack(X))) #define SL_PACK_END() _Pragma("pack()") -#define SL_ATTRIBUTE_PACKED - +#define SL_ATTRIBUTE_PACKED __attribute__ ((packed)) #if defined(__CC_ARM) /** @brief MDK-ARM compiler: Macros for handling aligned structures. */ #define SL_ALIGN(X) __align(X) diff --git a/components/protocol/wifi/inc/sl_wifi.h b/components/protocol/wifi/inc/sl_wifi.h index 5910e7fae..9ae993f67 100644 --- a/components/protocol/wifi/inc/sl_wifi.h +++ b/components/protocol/wifi/inc/sl_wifi.h @@ -976,7 +976,7 @@ sl_status_t sl_wifi_get_ap_client_count(sl_wifi_interface_t interface, uint32_t /** @} */ -/** \addtogroup WIFI_POWER_API Performance Management +/** \addtogroup WIFI_POWER_API Power and Performance * \ingroup SL_WIFI_FUNCTIONS * @{ */ // Power management functions @@ -1206,37 +1206,43 @@ sl_status_t sl_wifi_stop_statistic_report(sl_wifi_interface_t interface); ******************************************************************************/ sl_status_t sl_wifi_get_status(sl_wifi_status_t *wifi_status); -/*! @cond SL_SI91X_WIFI_BTR_MODE */ -/** \addtogroup WIFI_BTR_API Wi-Fi Basic Transceiver +/*! @cond WIFI_TRANSCEIVER_MODE */ +/** \addtogroup WIFI_TRANSCEIVER_API Wi-Fi Transceiver * \ingroup SL_WIFI_FUNCTIONS * @{ */ -// WiFi Basic Transceiver (BTR) functions +// Wi-Fi Transceiver functions /***************************************************************************/ /** * @brief - * Start a Wi-Fi Basic Transceiver (BTR) interface. + * Start a Wi-Fi Transceiver interface. * @pre Pre-conditions: - * - @ref sl_wifi_init should be called before this API. + * - @ref sl_wifi_init shall be called before this API. * @param[in] interface * Wi-Fi interface as identified by @ref sl_wifi_interface_t * @param[in] config - * Wi-Fi BTR configuration. See @ref sl_wifi_btr_configuration_t + * Wi-Fi Transceiver configuration. See @ref sl_wifi_transceiver_configuration_t * @return - * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. - * @note - * `Wi-Fi Basic Transceiver Mode(BTR) Client` example can be used as reference for this API. + * sl_status_t. See [Status Codes](../../wiseconnect-api-reference-guide-err-codes/pages/sl-additional-status-errors). Possible Error Codes: + * - `0x11` - SL_STATUS_NOT_INITIALIZED + * - `0x21` - SL_STATUS_SI91X_COMMAND_GIVEN_IN_INVALID_STATE + * - `0x22` - SL_STATUS_NULL_POINTER + * - `0x0B65` - SL_STATUS_TRANSCEIVER_INVALID_CHANNEL + * - `0x0B67` - SL_STATUS_TRANSCEIVER_INVALID_CONFIG + * @note This API is only supported in Wi-Fi Transceiver opermode (7). + * @note `Wi-Fi Transceiver Mode` example can be used as reference for this API. This application is available at examples/snippets/wlan/sl_wifi_transceiver path. + * @note `sl_wifi_transceiver_up` internally calls @ref sl_wifi_set_transceiver_parameters and @ref sl_wifi_transceiver_set_channel. Additionally, DUT MAC address is queried using @ref sl_wifi_get_mac_address and used as Addr2 for TX data packets. ******************************************************************************/ -sl_status_t sl_wifi_btr_up(sl_wifi_interface_t interface, sl_wifi_btr_configuration_t *config); +sl_status_t sl_wifi_transceiver_up(sl_wifi_interface_t interface, sl_wifi_transceiver_configuration_t *config); /***************************************************************************/ /** * @brief Configure channel from the host. * * @pre Pre-conditions: - * - @ref sl_wifi_init should be called before this API. + * - @ref sl_wifi_init shall be called before this API. * * @param[in] interface * Wi-Fi interface as identified by @ref sl_wifi_interface_t - * @param[in] btr_chan_info - * Application shall decide the channel at which device operates and transmits frames. See @ref sl_wifi_btr_set_channel_t. + * @param[in] channel + * Application shall decide the channel at which device operates and transmits frames. See @ref sl_wifi_transceiver_set_channel_t. * | Param | Description * |:-----------------------|:----------------------------------------------------------- * |channel | Primary channel number. Valid channels are 1-14. @@ -1245,223 +1251,232 @@ sl_status_t sl_wifi_btr_up(sl_wifi_interface_t interface, sl_wifi_btr_configurat * |tx_power | Reserved * * @return - * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. Possible Error Codes: - * - `0xFFFFFFFD` - Command given in wrong state - * - `0xFFFFFFC4` - Invalid channel + * sl_status_t. See [Status Codes](../../wiseconnect-api-reference-guide-err-codes/pages/sl-additional-status-errors). Possible Error Codes: + * - `0x11` - SL_STATUS_NOT_INITIALIZED + * - `0x21` - SL_STATUS_SI91X_COMMAND_GIVEN_IN_INVALID_STATE + * - `0x0B65` - SL_STATUS_TRANSCEIVER_INVALID_CHANNEL * - * @note This API is only supported in Wi-Fi Basic Tranceiver opermode (7). + * @note This API is only supported in Wi-Fi Transceiver opermode (7). * @note This is a blocking API. - * @note `Wi-Fi Basic Transceiver Mode(BTR) Client` example can be used as reference for this API. + * @note `Wi-Fi Transceiver Mode` example can be used as reference for this API. This application is available at examples/snippets/wlan/sl_wifi_transceiver path. * * Sample command usage: * @code * // Initialize channel - * sl_wifi_btr_set_channel_t btr_chan_info; - * btr_chan_info.chan_info.channel = 14; + * sl_wifi_transceiver_set_channel_t channel = { + * .chan_info.channel = 14, + * }; * * // Set channel - * sl_wifi_btr_set_channel(SL_WIFI_BTR_INTERFACE, btr_chan_info); + * sl_wifi_transceiver_set_channel(SL_WIFI_TRANSCEIVER_INTERFACE, channel); * @endcode * ******************************************************************************/ -sl_status_t sl_wifi_btr_set_channel(sl_wifi_interface_t interface, sl_wifi_btr_set_channel_t btr_chan_info); +sl_status_t sl_wifi_transceiver_set_channel(sl_wifi_interface_t interface, sl_wifi_transceiver_set_channel_t channel); /***************************************************************************/ /** * @brief This API shall be used to configure the CWmin, CWmax, and AIFSN per access category and retransmit count. * * @pre Pre-conditions: - * - @ref sl_wifi_init should be called before this API. + * - @ref sl_wifi_init shall be called before this API. * * @param[in] interface * Wi-Fi interface as identified by @ref sl_wifi_interface_t * * @param[in] config_params - * Shall be used to set/get the contention parameters per access category and the retransmit count in MAC layer. See @ref sl_wifi_btr_config_params_t. + * Transceiver parameters as identified by @ref sl_wifi_transceiver_parameters_t. Shall be used to set/get the contention parameters per access category and the retransmit count in MAC layer. * * @return - * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. + * sl_status_t. See [Status Codes](../../wiseconnect-api-reference-guide-err-codes/pages/sl-additional-status-errors). Possible Error Codes: + * - `0x11` - SL_STATUS_NOT_INITIALIZED + * - `0x21` - SL_STATUS_SI91X_COMMAND_GIVEN_IN_INVALID_STATE + * - `0x22` - SL_STATUS_NULL_POINTER + * - `0x0B67` - SL_STATUS_TRANSCEIVER_INVALID_CONFIG * - * @note Configurations must not be changed dynamically. + * @note This API is only supported in Wi-Fi Transceiver opermode (7). + * @note Set is allowed only once before the first call to sl_wifi_transceiver_set_channel API. * @note This API is optional. Default configurations are used if API is not called. * @note This is a blocking API. - * @note `Wi-Fi Basic Transceiver Mode(BTR) Client` example can be used as reference for this API. + * @note `Wi-Fi Transceiver Mode` example can be used as reference for this API. This application is available at examples/snippets/wlan/sl_wifi_transceiver path. * * Sample command usage: * @code - * // Initialize config params - * sl_wifi_btr_config_params_t config_params; - * config_params.set = 1; - * config_params.retransmit_count = 15; - * config_params.cw_params[0].aifsn = 3; + * // Initialize parameters + * sl_wifi_transceiver_parameters_t params = { + * .set = 1, + * .retransmit_count = 15, + * .cw_params[0].aifsn = 3, + * }; * - * // Set config params - * sl_wifi_btr_config_params(SL_WIFI_BTR_INTERFACE, &config_params); + * // Set parameters + * sl_wifi_set_transceiver_parameters(SL_WIFI_TRANSCEIVER_INTERFACE, ¶ms); * @endcode ******************************************************************************/ -sl_status_t sl_wifi_btr_config_params(sl_wifi_interface_t interface, sl_wifi_btr_config_params_t *config_params); +sl_status_t sl_wifi_set_transceiver_parameters(sl_wifi_interface_t interface, sl_wifi_transceiver_parameters_t *params); /***************************************************************************/ /** * @brief When new peer is added or deleted from the network, application shall call this API to update peer information to the MAC layer. * * @pre Pre-conditions: - * - @ref sl_wifi_btr_set_channel should be called before this API. + * - @ref sl_wifi_transceiver_set_channel shall be called before this API. * * @param[in] interface * Wi-Fi interface as identified by @ref sl_wifi_interface_t * @param[in] peer - * Peer to be added/deleted in MAC layer. See @ref sl_wifi_btr_peer_update_t. + * Peer to be added/deleted in MAC layer. See @ref sl_wifi_transceiver_peer_update_t. * * @return - * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. Possible Error Codes: - * - `0xFFFFFFC3` - Invalid data rate - * - `0xFFFFFFA8` - Invalid mac address - * - `0x75` - Feature disabled - * - `0x76` - Peer already exists - * - `0x77` - Max peer limit reached - * - `0x78` - Peer not found + * sl_status_t. See [Status Codes](../../wiseconnect-api-reference-guide-err-codes/pages/sl-additional-status-errors). Possible Error Codes: + * - `0x11` - SL_STATUS_NOT_INITIALIZED + * - `0x0B44` - SL_STATUS_WIFI_INTERFACE_NOT_UP + * - `0x0B63` - SL_STATUS_TRANSCEIVER_INVALID_MAC_ADDRESS + * - `0x0B66` - SL_STATUS_TRANSCEIVER_INVALID_DATA_RATE + * - `0x10096` - SL_STATUS_SI91X_TRANSCEIVER_PEER_DS_FEAT_DISABLED + * - `0x10097` - SL_STATUS_SI91X_TRANSCEIVER_PEER_ALREADY_EXISTS + * - `0x10098` - SL_STATUS_SI91X_TRANSCEIVER_MAX_PEER_LIMIT_REACHED + * - `0x10099` - SL_STATUS_SI91X_TRANSCEIVER_PEER_NOT_FOUND * + * @note This API is only supported in Wi-Fi Transceiver opermode (7). * @note This is a blocking API. - * @note `Wi-Fi Basic Transceiver Mode(BTR) Client` example can be used as reference for this API. + * @note MAC layer supports storing upto 100 peers. + * @note To add peers in MAC layer, it is mandatory to enable SL_SI91X_FEAT_TRANSCEIVER_MAC_PEER_DS_SUPPORT/BIT(13) in @ref sl_wifi_device_configuration_t feature_bit_map passed in @ref sl_wifi_init. + * @note `Wi-Fi Transceiver Mode` example can be used as reference for this API. This application is available at examples/snippets/wlan/sl_wifi_transceiver path. * * Sample command usage: * @code * // Initialize peer - * sl_wifi_btr_peer_update_t peer; + * sl_wifi_transceiver_peer_update_t peer; * uint8_t peer_mac[6] = {0x00, 0x23, 0xa7, 0x20, 0x21, 0x24}; * memcpy(peer.peer_mac_address, peer_mac, 6); * peer.peer_supported_rate_bitmap = PEER_DS_BITMAP_DATA_RATE_48 | PEER_DS_BITMAP_DATA_RATE_54; * peer.flags |= BIT(0)); // Set bit 0 to add peer * * // Add peer - * sl_wifi_btr_peer_list_update(SL_WIFI_BTR_INTERFACE, peer); + * sl_wifi_update_transceiver_peer_list(SL_WIFI_TRANSCEIVER_INTERFACE, peer); * @endcode ******************************************************************************/ -sl_status_t sl_wifi_btr_peer_list_update(sl_wifi_interface_t interface, sl_wifi_btr_peer_update_t peer); +sl_status_t sl_wifi_update_transceiver_peer_list(sl_wifi_interface_t interface, sl_wifi_transceiver_peer_update_t peer); /***************************************************************************/ /** * @brief This API configures the multicast MAC address to filter Rx multicast packets. * * @pre Pre-conditions: - * - @ref sl_wifi_btr_set_channel should be called before this API. + * - @ref sl_wifi_transceiver_set_channel shall be called before this API. * * @param[in] interface * Wi-Fi interface as identified by @ref sl_wifi_interface_t * @param[in] mcast - * Filtering multicast MAC address to be added/deleted from MAC layer. See @ref sl_wifi_btr_mcast_filter_t. + * Multicast MAC address to be added/deleted from MAC layer for filtering. See @ref sl_wifi_transceiver_mcast_filter_t. * * @return - * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. Possible Error Codes: - * - `0xFFFFFFFE` - Invalid param - * - `0xFFFFFFA8` - Invalid mac address + * sl_status_t. See [Status Codes](../../wiseconnect-api-reference-guide-err-codes/pages/sl-additional-status-errors). Possible Error Codes: + * - `0x11` - SL_STATUS_NOT_INITIALIZED + * - `0x21` - SL_STATUS_INVALID_PARAMETER + * - `0x0B44` - SL_STATUS_WIFI_INTERFACE_NOT_UP + * - `0x0B63` - SL_STATUS_TRANSCEIVER_INVALID_MAC_ADDRESS * + * @note This API is only supported in Wi-Fi Transceiver opermode (7). * @note This API can be called dynamically. - * @note `Wi-Fi Basic Transceiver Mode(BTR) Client` example can be used as reference for this API. + * @note Maximum of two multicast MAC addresses can be configured for filtering. + * @note `Wi-Fi Transceiver Mode` example can be used as reference for this API. This application is available at examples/snippets/wlan/sl_wifi_transceiver path. * * Sample command usage: * @code * // Initialize multicast filter address structure - * sl_wifi_btr_mcast_filter_t mcast; + * sl_wifi_transceiver_mcast_filter_t mcast; * uint8_t filter_mac[6] = { 0x01, 0x00, 0x5e, 0x00, 0x01, 0x01 }; * mcast.flags |= BIT(0); * mcast.num_of_mcast_addr = 1; * memcpy(mcast.mac[0], filter_mac, 6); * * // Add MAC address to be filtered - * sl_wifi_btr_multicast_filter(SL_WIFI_BTR_INTERFACE, mcast); + * sl_wifi_set_transceiver_multicast_filter(SL_WIFI_TRANSCEIVER_INTERFACE, mcast); * @endcode ******************************************************************************/ -sl_status_t sl_wifi_btr_multicast_filter(sl_wifi_interface_t interface, sl_wifi_btr_mcast_filter_t mcast); +sl_status_t sl_wifi_set_transceiver_multicast_filter(sl_wifi_interface_t interface, + sl_wifi_transceiver_mcast_filter_t mcast); /***************************************************************************/ /** * @brief This API shall flush the entire SW buffer pool. * * @pre Pre-conditions: - * - @ref sl_wifi_btr_set_channel should be called before this API. + * - @ref sl_wifi_transceiver_set_channel shall be called before this API. * * @param[in] interface * Wi-Fi interface as identified by @ref sl_wifi_interface_t * * @return - * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. + * sl_status_t. See [Status Codes](../../wiseconnect-api-reference-guide-err-codes/pages/sl-additional-status-errors). Possible Error Codes: + * - `0x11` - SL_STATUS_NOT_INITIALIZED + * - `0x0B44` - SL_STATUS_WIFI_INTERFACE_NOT_UP * + * @note This API is only supported in Wi-Fi Transceiver opermode (7). * @note All priority queues shall be flushed. - * @note `Wi-Fi Basic Transceiver Mode(BTR) Client` example can be used as reference for this API. + * @note `Wi-Fi Transceiver Mode` example can be used as reference for this API. This application is available at examples/snippets/wlan/sl_wifi_transceiver path. * * Sample command usage: * @code - * sl_wifi_btr_flush_data(SL_WIFI_BTR_INTERFACE); + * sl_wifi_flush_transceiver_data(SL_WIFI_TRANSCEIVER_INTERFACE); * @endcode ******************************************************************************/ -sl_status_t sl_wifi_btr_flush_data(sl_wifi_interface_t interface); +sl_status_t sl_wifi_flush_transceiver_data(sl_wifi_interface_t interface); /***************************************************************************/ /** * @brief Host shall call this API to encapsulate the data with 802.11 MAC header and send it to MAC layer. * * @pre Pre-conditions: - * - @ref sl_wifi_btr_set_channel should be called before this API. + * - @ref sl_wifi_transceiver_set_channel shall be called before this API. * * @param[in] interface * Wi-Fi interface as identified by @ref sl_wifi_interface_t * - * @param[in] data_ctrlblk - * API uses meta data for preparing data packet along with MAC header for sending to MAC layer. See @ref sl_wifi_btr_data_ctrlblk_t. + * @param[in] control + * API uses meta data for preparing data packet along with MAC header for sending to MAC layer. See @ref sl_wifi_transceiver_tx_data_control_t. * @param[in] payload * Pointer to payload (encrypted by host) to be sent to LMAC. * @param[in] payload_len * Length of the payload. Valid range is 1 - 2020 bytes. * * @return - * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. Possible Error Codes: - * - `0xFFFFFFFD` - Command given in wrong state - * - `0xFFFFFFFE` - Invalid param - * - `0xFFFFFFC3` - Invalid data rate + * sl_status_t. See [Status Codes](../../wiseconnect-api-reference-guide-err-codes/pages/sl-additional-status-errors). Possible Error Codes: + * - `0x11` - SL_STATUS_NOT_INITIALIZED + * - `0x0B44` - SL_STATUS_WIFI_INTERFACE_NOT_UP + * - `0x0B63` - SL_STATUS_TRANSCEIVER_INVALID_MAC_ADDRESS + * - `0x0B64` - SL_STATUS_TRANSCEIVER_INVALID_QOS_PRIORITY + * - `0x0B66` - SL_STATUS_TRANSCEIVER_INVALID_DATA_RATE + * - `0x21` - SL_STATUS_INVALID_PARAMETER + * - `0x22` - SL_STATUS_NULL_POINTER * * #### Format of encapsulated data sent to LMAC #### * | Field name | Frame Control | Duration | Addr1 | Addr2 | Adddr3 | Seq Ctrl | Addr4 | QoS ctrl | Payload (LLC + Data) | * |:-----------|:---------------|:---------|:------|:------|:-------|:---------|:-----------------------|:----------------------|:----------------------| * | Size(bytes)| 2 | 2 | 6 | 6 | 6 | 2 | 6 (Optionally present) | 2 (Optionally present)| Variable | * - * #### RSI_RATES #### - * | MACRO | Value | Rate in Mbps | - * |:------------------ |:----- |:------------ | - * | `RSI_RATE_1` | 0x0 | 1 | - * | `RSI_RATE_2` | 0x2 | 2 | - * | `RSI_RATE_5_5` | 0x4 | 5.5 | - * | `RSI_RATE_11` | 0x6 | 11 | - * | `RSI_RATE_6` | 0x8b | 6 | - * | `RSI_RATE_9` | 0x8f | 9 | - * | `RSI_RATE_12` | 0x8a | 12 | - * | `RSI_RATE_18` | 0x8e | 18 | - * | `RSI_RATE_24` | 0x89 | 24 | - * | `RSI_RATE_36` | 0x8d | 36 | - * | `RSI_RATE_48` | 0x88 | 48 | - * | `RSI_RATE_54` | 0x8c | 54 | - * - * @note This API is only supported in Wi-Fi Basic Tranceiver opermode (7). - * @note Once this functions returns, the calling API is responsible for freeing data_ctrlblk and payload. - * @note On chip MAC level encryption is not supported in BTR mode. - * @note This is not a blocking API. Callback SL_WIFI_BTR_TX_DATA_STATUS_CB can be registered to get the status report from firmware. + * @note This API is only supported in Wi-Fi Transceiver opermode (7). + * @note Once this functions returns, the calling API is responsible for freeing control and payload. + * @note On chip MAC level encryption is not supported in transceiver mode. + * @note This is not a blocking API. Callback SL_WIFI_TRANSCEIVER_TX_DATA_STATUS_CB can be registered to get the status report from firmware. * @note Only 11b/g rates shall be supported. * @note It is recommended to use basic rate for multicast/broadcast packets. - * @note `Wi-Fi Basic Transceiver Mode(BTR) Client` example can be used as reference for this API. + * @note `Wi-Fi Transceiver Mode` example can be used as reference for this API. This application is available at examples/snippets/wlan/sl_wifi_transceiver path. * @note Sample command usage: * @code * // Prepare payload * - * - * data_ctrlblk->ctrl_flags = BIT(0) | BIT(1) | BIT(2) | BIT(5); // Enable 4-addr MAC hdr, QoS frame, Fixed data rate, send status report for data packet - * data_ctrlblk->priority = 2; // Voice priority queue - * data_ctrlblk->rate = RSI_RATE_36; - * data_ctrlblk->token = token; - * + * + * control->ctrl_flags = BIT(0) | BIT(1) | BIT(2) | BIT(5); // Enable 4-addr MAC hdr, QoS frame, Fixed data rate, send status report for data packet + * control->priority = 2; // Voice priority queue + * control->rate = SL_WIFI_DATA_RATE_36; + * control->token = token; + * * * // Call API to encapsulate the data with 802.11 MAC header and send it to MAC layer. - * sl_wifi_btr_send_80211_data(SL_WIFI_BTR_INTERFACE, data_ctrlblk, payload, payload_len); + * sl_wifi_send_transceiver_data(SL_WIFI_TRANSCEIVER_INTERFACE, control, payload, payload_len); * @endcode ******************************************************************************/ -sl_status_t sl_wifi_btr_send_80211_data(sl_wifi_interface_t interface, - sl_wifi_btr_data_ctrlblk_t *data_ctrlblk, - uint8_t *payload, - uint16_t payload_len); +sl_status_t sl_wifi_send_transceiver_data(sl_wifi_interface_t interface, + sl_wifi_transceiver_tx_data_control_t *control, + uint8_t *payload, + uint16_t payload_len); /** @} */ -/*! @endcond SL_SI91X_WIFI_BTR_MODE */ +/*! @endcond WIFI_TRANSCEIVER_MODE */ diff --git a/components/protocol/wifi/inc/sl_wifi_callback_framework.h b/components/protocol/wifi/inc/sl_wifi_callback_framework.h index 3c7da263c..308b17a26 100644 --- a/components/protocol/wifi/inc/sl_wifi_callback_framework.h +++ b/components/protocol/wifi/inc/sl_wifi_callback_framework.h @@ -155,30 +155,34 @@ typedef sl_status_t (*sl_wifi_twt_config_callback_t)(sl_wifi_event_t event, uint32_t data_length, void *arg); -/*! @cond SL_SI91X_WIFI_BTR_MODE */ +/*! @cond WIFI_TRANSCEIVER_MODE */ /** - * @typedef sl_wifi_btr_callback_t - * @brief Callback for SL_WIFI_BTR_EVENTS group events + * @typedef sl_wifi_transceiver_callback_t + * @brief Callback for SL_WIFI_TRANSCEIVER_EVENTS group events * @param[out] event - * Wi-Fi event of type @ref sl_wifi_event_t. Individual Wi-Fi events related to SL_WIFI_BTR_EVENTS are as follows. - * | @ref sl_wifi_event_t | - * |:-------------------------------| - * | SL_WIFI_BTR_RX_DATA_RECEIVE_CB | - * | SL_WIFI_BTR_TX_DATA_STATUS_CB | + * Wi-Fi event of type @ref sl_wifi_event_t. Individual Wi-Fi events related to SL_WIFI_TRANSCEIVER_EVENTS are as follows. + * | @ref sl_wifi_event_t | + * |:---------------------------------------| + * | SL_WIFI_TRANSCEIVER_RX_DATA_RECEIVE_CB | + * | SL_WIFI_TRANSCEIVER_TX_DATA_STATUS_CB | * @param[out] data - * - Data received is of type @ref sl_wifi_btr_rx_cb_data_t for SL_WIFI_BTR_RX_DATA_RECEIVE_CB event. - * - Data received is of type @ref sl_wifi_btr_tx_cfm_cb_data_t for SL_WIFI_BTR_TX_DATA_STATUS_CB event. + * - Data received is of type @ref sl_wifi_transceiver_rx_data_t for SL_WIFI_TRANSCEIVER_RX_DATA_RECEIVE_CB event. + * - Data received is of type @ref sl_wifi_transceiver_tx_data_confirmation_t for SL_WIFI_TRANSCEIVER_TX_DATA_STATUS_CB event. * @param[out] data_length - * Reserved + * Reserved * @param[out] optional_arg - * Optional user provided argument passed in [sl_wifi_set_btr_callback](../wiseconnect-api-reference-guide-wi-fi/wifi-callback-framework#sl_wifi_set_btr_callback) + * Optional user provided argument passed in [sl_wifi_set_transceiver_callback](../pages/wifi-callback-framework#sl-wifi-set-transceiver-callback) * @return - * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. + * sl_status_t. See [Status Codes](../../wiseconnect-api-reference-guide-err-codes/pages/sl-additional-status-errors). + * @note This API is only supported in Wi-Fi Transceiver opermode (7). * @note - * In case of event failure, SL_WIFI_FAIL_EVENT_STATUS_INDICATION bit is set in event, data will be of type sl_status_t and data_length can be ignored. + * In case of event failure, SL_WIFI_FAIL_EVENT_STATUS_INDICATION bit is set in event, data will be of type sl_status_t and data_length can be ignored. */ -typedef sl_status_t (*sl_wifi_btr_callback_t)(sl_wifi_event_t event, void *data, uint32_t data_length, void *arg); -/*! @endcond SL_SI91X_WIFI_BTR_MODE */ +typedef sl_status_t (*sl_wifi_transceiver_callback_t)(sl_wifi_event_t event, + void *data, + uint32_t data_length, + void *arg); +/*! @endcond WIFI_TRANSCEIVER_MODE */ /***************************************************************************/ /** * @brief @@ -301,24 +305,25 @@ static inline sl_status_t sl_wifi_set_stats_callback(sl_wifi_stats_callback_t fu return sl_wifi_set_callback(SL_WIFI_STATS_RESPONSE_EVENTS, (sl_wifi_callback_function_t)function, optional_arg); } -/*! @cond SL_SI91X_WIFI_BTR_MODE */ +/*! @cond WIFI_TRANSCEIVER_MODE */ /***************************************************************************/ /** * @brief - * Register callback for SL_WIFI_BTR_EVENTS group event from @ref sl_wifi_event_group_t. + * Register callback for SL_WIFI_TRANSCEIVER_EVENTS group event from @ref sl_wifi_event_group_t. * @param[in] function - * Function pointer to callback. This will be passed back to callback handler of type @ref sl_wifi_btr_callback_t + * Function pointer to callback. This will be passed back to callback handler of type @ref sl_wifi_transceiver_callback_t * @param[in] optional_arg * Optional user provided argument. This will be passed back to callback handler. * @pre Pre-conditions: * - @ref sl_wifi_init should be called before this API. * @return - * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. + * sl_status_t. See [Status Codes](../../wiseconnect-api-reference-guide-err-codes/pages/sl-additional-status-errors). * @note * All the individual Wi-Fi events related to this group will be triggered via this callback. ******************************************************************************/ -static inline sl_status_t sl_wifi_set_btr_callback(sl_wifi_btr_callback_t function, void *optional_arg) +static inline sl_status_t sl_wifi_set_transceiver_callback(sl_wifi_transceiver_callback_t function, void *optional_arg) { - return sl_wifi_set_callback(SL_WIFI_BTR_EVENTS, (sl_wifi_callback_function_t)function, optional_arg); + return sl_wifi_set_callback(SL_WIFI_TRANSCEIVER_EVENTS, (sl_wifi_callback_function_t)function, optional_arg); } -/*! @endcond SL_SI91X_WIFI_BTR_MODE */ +/*! @endcond WIFI_TRANSCEIVER_MODE */ + /** @} */ diff --git a/components/protocol/wifi/inc/sl_wifi_constants.h b/components/protocol/wifi/inc/sl_wifi_constants.h index 0dc9d107d..1e4ca9867 100644 --- a/components/protocol/wifi/inc/sl_wifi_constants.h +++ b/components/protocol/wifi/inc/sl_wifi_constants.h @@ -72,14 +72,16 @@ typedef enum { /// Wi-Fi encryption method. /// @note Some encryption types not currently supported in station (STA) mode. typedef enum { + SL_WIFI_DEFAULT_ENCRYPTION, ///< Wi-Fi with Default Encryption SL_WIFI_NO_ENCRYPTION, ///< Wi-Fi with No Encryption (not currently supported in STA mode) SL_WIFI_WEP_ENCRYPTION, ///< Wi-Fi with WEP Encryption (not currently supported in STA mode) SL_WIFI_TKIP_ENCRYPTION, ///< Wi-Fi with TKIP Encryption (not currently supported in STA mode) - SL_WIFI_CCMP_ENCRYPTION, ///< Wi-Fi with CCMP Encryption (not currently supported in STA mode) + SL_WIFI_CCMP_ENCRYPTION, ///< Wi-Fi with CCMP Encryption SL_WIFI_EAP_TLS_ENCRYPTION, ///< Wi-Fi with Enterprise TLS Encryption SL_WIFI_EAP_TTLS_ENCRYPTION, ///< Wi-Fi with Enterprise TTLS Encryption SL_WIFI_EAP_FAST_ENCRYPTION, ///< Wi-Fi with Enterprise FAST Encryption SL_WIFI_PEAP_MSCHAPV2_ENCRYPTION, ///< Wi-Fi with Enterprise PEAP Encryption + SL_WIFI_EAP_LEAP_ENCRYPTION ///< Wi-Fi with Enterprise LEAP Encryption } sl_wifi_encryption_t; /// Wi-Fi Transition Disable Indication (TDI). Supported only in WPA3(Personal or Personal Transition) security in AP mode . @@ -114,19 +116,24 @@ typedef enum { SL_WIFI_AP_2_4GHZ_INTERFACE_INDEX, ///< Wi-Fi access point on 2.4GHz interface SL_WIFI_CLIENT_5GHZ_INTERFACE_INDEX, ///< Wi-Fi client on 5GHz interface (not currently supported) SL_WIFI_AP_5GHZ_INTERFACE_INDEX, ///< Wi-Fi access point on 5GHz interface (not currently supported) - SL_WIFI_BTR_INTERFACE_INDEX, ///< Wi-Fi Basic Transceiver Mode + SL_WIFI_TRANSCEIVER_INTERFACE_INDEX, ///< Wi-Fi Transceiver Mode SL_WIFI_MAX_INTERFACE_INDEX ///< Used for internally by SDK } sl_wifi_interface_index_t; /// Wi-Fi interface enumeration typedef enum { - SL_WIFI_INVALID_INTERFACE = 0, ///< Invalid interface - SL_WIFI_CLIENT_INTERFACE = (1 << 0), ///< Wi-Fi client interface - SL_WIFI_AP_INTERFACE = (1 << 1), ///< Wi-Fi access point interface + SL_WIFI_INVALID_INTERFACE = 0, ///< Invalid interface + + SL_WIFI_CLIENT_INTERFACE = (1 << 0), ///< Wi-Fi client interface + SL_WIFI_AP_INTERFACE = (1 << 1), ///< Wi-Fi access point interface SL_WIFI_2_4GHZ_INTERFACE = (1 << 2), ///< 2.4GHz radio interface SL_WIFI_5GHZ_INTERFACE = (1 << 3), ///< 5GHz radio interface + //BIT(4), BIT(5) - Reserved for 6GHz and Sub-GHz + + SL_WIFI_TRANSCEIVER_INTERFACE = (1 << 7), ///< Wi-Fi Transceiver mode interface + SL_WIFI_CLIENT_2_4GHZ_INTERFACE = SL_WIFI_CLIENT_INTERFACE | SL_WIFI_2_4GHZ_INTERFACE, ///< Wi-Fi client interface on 2.4GHz radio SL_WIFI_AP_2_4GHZ_INTERFACE = SL_WIFI_AP_INTERFACE @@ -140,7 +147,6 @@ typedef enum { SL_WIFI_ALL_INTERFACES = SL_WIFI_CLIENT_INTERFACE | SL_WIFI_AP_INTERFACE | SL_WIFI_2_4GHZ_INTERFACE | SL_WIFI_5GHZ_INTERFACE, ///< All available Wi-Fi interfaces - SL_WIFI_BTR_INTERFACE = (1 << 4), ///< (1 << 4) Wi-Fi Basic Transceiver mode interface } sl_wifi_interface_t; /// Enumeration of de-authentication reasons from an access point @@ -295,7 +301,7 @@ typedef enum { SL_WIFI_CLIENT_CONNECTED_EVENTS, ///< Event group for Wi-Fi client connected status SL_WIFI_TWT_RESPONSE_EVENTS, ///< Event group for Wi-Fi TWT response SL_WIFI_CLIENT_DISCONNECTED_EVENTS, ///< Event group for Wi-Fi client disconnection status - SL_WIFI_BTR_EVENTS, ///< Event group for Wi-Fi BTR events + SL_WIFI_TRANSCEIVER_EVENTS, ///< Event group for Wi-Fi transceiver events SL_WIFI_EVENT_GROUP_COUNT, ///< Event group for Wi-Fi maximum default group count. Used internally by SDK SL_WIFI_EVENT_FAIL_INDICATION_EVENTS = (1 << 31), ///< Event group for Wi-Fi fail indication } sl_wifi_event_group_t; @@ -324,8 +330,7 @@ typedef enum { SL_WIFI_TWT_RESPONSE_EVENT = SL_WIFI_TWT_RESPONSE_EVENTS, ///< Event for Wi-Fi TWT response. Data would be NULL SL_WIFI_CLIENT_DISCONNECTED_EVENT = SL_WIFI_CLIENT_DISCONNECTED_EVENTS, ///< Event for Wi-Fi client disconnection status. Data would of type @ref sl_mac_address_t - SL_WIFI_BTR_EVENT = SL_WIFI_BTR_EVENTS, ///< Event for Wi-Fi BTR TX/RX events. - + SL_WIFI_TRANSCEIVER_EVENT = SL_WIFI_TRANSCEIVER_EVENTS, ///< Event for Wi-Fi transceiver TX/RX events. // TWT specific events SL_WIFI_TWT_UNSOLICITED_SESSION_SUCCESS_EVENT = SL_WIFI_TWT_RESPONSE_EVENTS @@ -389,8 +394,8 @@ typedef enum { | (5 << 16), ///< Event for Wi-Fi module state statistics. Data would be of type [sl_si91x_module_state_stats_response_t](../wiseconnect-api-reference-guide-si91x-driver/sl-si91x-module-state-stats-response-t) - SL_WIFI_BTR_RX_DATA_RECEIVE_CB = SL_WIFI_BTR_EVENTS | (1 << 16), - SL_WIFI_BTR_TX_DATA_STATUS_CB = SL_WIFI_BTR_EVENTS | (2 << 16), + SL_WIFI_TRANSCEIVER_RX_DATA_RECEIVE_CB = SL_WIFI_TRANSCEIVER_EVENTS | (1 << 16), + SL_WIFI_TRANSCEIVER_TX_DATA_STATUS_CB = SL_WIFI_TRANSCEIVER_EVENTS | (2 << 16), // Single bit to indicate relevant event is related to a failure condition SL_WIFI_EVENT_FAIL_INDICATION = (1 << 31), ///< Event for Wi-Fi event failure indication diff --git a/components/protocol/wifi/inc/sl_wifi_host_interface.h b/components/protocol/wifi/inc/sl_wifi_host_interface.h index 647aa46a2..4fd65f7e6 100644 --- a/components/protocol/wifi/inc/sl_wifi_host_interface.h +++ b/components/protocol/wifi/inc/sl_wifi_host_interface.h @@ -13,20 +13,32 @@ #include #include +/** \addtogroup SL_WIFI_TYPES + * @{ */ /// Types of Wi-Fi buffers typedef enum { - SL_WIFI_TX_FRAME_BUFFER, - SL_WIFI_RX_FRAME_BUFFER, - SL_WIFI_CONTROL_BUFFER, - SL_WIFI_SCAN_RESULT_BUFFER, + SL_WIFI_TX_FRAME_BUFFER, ///< Buffer for sending socket data to TA + SL_WIFI_RX_FRAME_BUFFER, ///< Buffer for storing response from TA + SL_WIFI_CONTROL_BUFFER, ///< Buffer for sending command to TA + SL_WIFI_SCAN_RESULT_BUFFER, ///< Buffer for storing scan results } sl_wifi_buffer_type_t; -/** \addtogroup SL_WIFI_TYPES - * @{ */ /// Wi-Fi buffer typedef struct { - sl_slist_node_t node; - uint32_t length; - uint8_t data[]; + sl_slist_node_t node; ///< Points to the node of the list of which the buffer is part of + uint32_t length; ///< Indicates the buffer size + uint8_t + type; ///< Indicates the buffer type (SL_WIFI_TX_FRAME_BUFFER,SL_WIFI_RX_FRAME_BUFFER,etc..) corresponding to the buffer. + uint8_t data[]; ///< Stores the data (header + payload) to be send to TA } sl_wifi_buffer_t; + +/// Wi-Fi buffer configuration +typedef struct { + uint8_t tx_buffer_quota; ///< Indicates the limit on buffers used for sending data to TA + uint8_t rx_buffer_quota; ///< Indicates the limit on buffers used for storing response from TA + uint8_t control_buffer_quota; ///< Indicates the limit on buffers used for sending command to TA + uint32_t block_size; ///< Indicates the block size + void *buffer_memory; ///< This field points to the chunk of memory allocated on first invocation of malloc +} sl_wifi_buffer_configuration_t; + /** @} */ diff --git a/components/protocol/wifi/inc/sl_wifi_types.h b/components/protocol/wifi/inc/sl_wifi_types.h index f30a725b5..5b5b45322 100644 --- a/components/protocol/wifi/inc/sl_wifi_types.h +++ b/components/protocol/wifi/inc/sl_wifi_types.h @@ -20,45 +20,67 @@ #define SL_WIFI_DEFAULT_ACTIVE_CHANNEL_SCAN_TIME 0xFFFF #define SL_WIFI_DEFAULT_KEEP_ALIVE_TIMEOUT 0xFFFF -/// Wi-Fi BTR Mode configurations -#if SPI_EXTENDED_TX_LEN_2K -#define MAX_PAYLOAD_LEN 2020 -#else -#define MAX_PAYLOAD_LEN 1450 -#endif -#define MAC_INFO_ENABLE BIT(0) -#define BCAST_INDICATION BIT(1) -#define CONFIRM_REQUIRED_TO_HOST BIT(2) -#define QOS_ENABLE BIT(4) -#define MAC80211_HDR_MIN_LEN 24 -#define MAC80211_HDR_QOS_CTRL_LEN 2 -#define MAC80211_HDR_ADDR4_LEN 6 -#define WME_AC_BE 0 /* best effort */ -#define WME_AC_BK 1 /* background */ -#define WME_AC_VI 2 /* video */ -#define WME_AC_VO 3 /* voice */ -#define WME_AC_TO_TID(_ac) (((_ac) == WME_AC_VO) ? 6 : ((_ac) == WME_AC_VI) ? 5 : ((_ac) == WME_AC_BK) ? 1 : 0) -#define WME_AC_TO_QNUM(_ac) (((_ac) == WME_AC_BK) ? 0 : ((_ac) == WME_AC_BE) ? 1 : ((_ac) == WME_AC_VI) ? 2 : 3) -#define FC_TYPE_DATA BIT(3) -#define FC_SUBTYPE_QOS_DATA BIT(7) -#define FC_TO_DS BIT(8) -#define FC_FROM_DS BIT(9) -#define IS_4ADDR(ctrl_flags) (ctrl_flags & BIT(0)) -#define IS_QOS_PKT(ctrl_flags) (ctrl_flags & BIT(1)) -#define IS_FIXED_DATA_RATE(ctrl_flags) (ctrl_flags & BIT(2)) -#define IS_TODS(ctrl_flags) (ctrl_flags & BIT(3)) -#define IS_FROMDS(ctrl_flags) (ctrl_flags & BIT(4)) -#define IS_CFM_TO_HOST_SET(ctrl_flags) (ctrl_flags & BIT(5)) -#define IS_BCAST_MCAST_MAC(addr) (addr & BIT(0)) -#define IS_MAC_ZERO(mac) (!(mac[0] | mac[1] | mac[2] | mac[3] | mac[4] | mac[5])) -#define MAX_RETRANSMIT_COUNT 15 -#define MAX_CW_EXPN_COUNT 15 -#define MAX_AIFSN 15 -#define BTR_PEER_ADD_FLAG BIT(0) -#define BTR_PEER_AUTO_RATE_FLAG BIT(1) -#define BTR_MCAST_FILTER_EN BIT(0) -#define BTR_MCAST_FILTER_ADDR_LIMIT 2 -#define BTR_TX_DATA_EXT_DESC_SIZE 4 +/// Wi-Fi transceiver mode configurations +#define MAX_PAYLOAD_LEN 2020 +#define MAC_INFO_ENABLE BIT(0) +#define BCAST_INDICATION BIT(1) +#define CONFIRM_REQUIRED_TO_HOST BIT(2) +#define QOS_ENABLE BIT(4) +#define MAC80211_HDR_MIN_LEN 24 +#define MAC80211_HDR_QOS_CTRL_LEN 2 +#define MAC80211_HDR_ADDR4_LEN 6 +#define WME_AC_BE 0 /* best effort */ +#define WME_AC_BK 1 /* background */ +#define WME_AC_VI 2 /* video */ +#define WME_AC_VO 3 /* voice */ +#define WME_AC_TO_TID(_ac) (((_ac) == WME_AC_VO) ? 6 : ((_ac) == WME_AC_VI) ? 5 : ((_ac) == WME_AC_BK) ? 1 : 0) +#define WME_AC_TO_QNUM(_ac) (((_ac) == WME_AC_BK) ? 0 : ((_ac) == WME_AC_BE) ? 1 : ((_ac) == WME_AC_VI) ? 2 : 3) +#define FC_TYPE_DATA BIT(3) +#define FC_SUBTYPE_QOS_DATA BIT(7) +#define FC_TO_DS BIT(8) +#define FC_FROM_DS BIT(9) +#define TX_DATA_CTRL_FLAG_QOS_BIT BIT(1) +#define IS_QOS_PKT(ctrl_flags) (ctrl_flags & TX_DATA_CTRL_FLAG_QOS_BIT) +#define IS_PEER_DS_SUPPORT_ENABLED(bitmap) (bitmap & SL_SI91X_FEAT_TRANSCEIVER_MAC_PEER_DS_SUPPORT) +#define IS_4ADDR(ctrl_flags) (ctrl_flags & BIT(0)) +#define IS_FIXED_DATA_RATE(ctrl_flags) (ctrl_flags & BIT(2)) +#define IS_TODS(ctrl_flags) (ctrl_flags & BIT(3)) +#define IS_FROMDS(ctrl_flags) (ctrl_flags & BIT(4)) +#define IS_CFM_TO_HOST_SET(ctrl_flags) (ctrl_flags & BIT(5)) +#define IS_BCAST_MCAST_MAC(addr) (addr & BIT(0)) +#define IS_MAC_ZERO(mac) (!(mac[0] | mac[1] | mac[2] | mac[3] | mac[4] | mac[5])) +#define MAX_RETRANSMIT_COUNT 15 +#define MAX_CW_EXPN_COUNT 15 +#define MAX_AIFSN 15 +#define TRANSCEIVER_PEER_ADD_FLAG BIT(0) +#define TRANSCEIVER_PEER_AUTO_RATE_FLAG BIT(1) +#define TRANSCEIVER_MCAST_FILTER_EN BIT(0) +#define TRANSCEIVER_MCAST_FILTER_ADDR_LIMIT 2 +#define TRANSCEIVER_TX_DATA_EXT_DESC_SIZE 4 +#define SL_STATUS_ACK_ERR 0x1 +#define SL_STATUS_CS_BUSY 0x2 +#define SL_STATUS_UNKNOWN_PEER 0x3 +#define TRANSCEIVER_RX_PKT_TA_MATCH_BIT BIT(20) +/*! @cond WIFI_TRANSCEIVER_MODE */ +/** @addtogroup SL_WIFI_CONSTANTS + * @{ */ +#define SL_CHANNEL_NO 14 ///< Wi-Fi transceiver default channel +#define SL_TX_POWER 127 ///< Wi-Fi transceiver default TX power +#define DEFAULT_RETRANSMIT_COUNT 15 ///< Wi-Fi transceiver default retransmit count +#define DEFAULT_QOS_BE_CWMIN 4 ///< Wi-Fi transceiver default BE cwmin contention param value +#define DEFAULT_QOS_BE_CWMAX 6 ///< Wi-Fi transceiver default BE cwmax contention param value +#define DEFAULT_QOS_BE_AIFSN 3 ///< Wi-Fi transceiver default BE aifsn contention param value +#define DEFAULT_QOS_BK_CWMIN 4 ///< Wi-Fi transceiver default BK cwmin contention param value +#define DEFAULT_QOS_BK_CWMAX 10 ///< Wi-Fi transceiver default BK cwmax contention param value +#define DEFAULT_QOS_BK_AIFSN 7 ///< Wi-Fi transceiver default BK aifsn contention param value +#define DEFAULT_QOS_VI_CWMIN 3 ///< Wi-Fi transceiver default VI cwmin contention param value +#define DEFAULT_QOS_VI_CWMAX 4 ///< Wi-Fi transceiver default VI cwmax contention param value +#define DEFAULT_QOS_VI_AIFSN 1 ///< Wi-Fi transceiver default VI aifsn contention param value +#define DEFAULT_QOS_VO_CWMIN 2 ///< Wi-Fi transceiver default VO cwmin contention param value +#define DEFAULT_QOS_VO_CWMAX 3 ///< Wi-Fi transceiver default VO cwmax contention param value +#define DEFAULT_QOS_VO_AIFSN 1 ///< Wi-Fi transceiver default VO aifsn contention param value +/** @} */ +/*! @endcond WIFI_TRANSCEIVER_MODE */ /** @addtogroup SL_WIFI_TYPES Types * @{ */ @@ -405,9 +427,9 @@ typedef struct { uint32_t tsf_m; ///< Used to store MSB of TSF } sl_wifi_tsf64_t; -/*! @cond SL_SI91X_WIFI_BTR_MODE */ -/// Control block structure used to hold meta data for the payload passed in \ref sl_wifi_btr_send_80211_data -typedef struct sl_wifi_btr_data_ctrlblk_s { +/*! @cond WIFI_TRANSCEIVER_MODE */ +/// Control block structure used to hold meta data for the payload passed in @ref sl_wifi_send_transceiver_data +typedef struct { /// | Bit position | ctrl_flags bit description | /// |--------------|------------------------------------------------------------------------------------------------------------------------------------------------| /// | 0 | Shall be set for 4-address packet or unset for 3-address packet. addr4 is ignored if set to 0. | @@ -415,7 +437,7 @@ typedef struct sl_wifi_btr_data_ctrlblk_s { /// | 2 | Shall be set to use the fixed data rate provided in the rate field. If set to 0, rate field is ignored and auto rate shall be used. | /// | 3 | Shall be set to enable ToDS bit in Frame Control. Valid only for 3-addr packet (bit 0 is unset). | /// | 4 | Shall be set to enable FromDS bit in Frame Control. Valid only for 3-addr packet (bit 0 is unset). | - /// | 5 | Shall be set if host requires tx data status report. Token is used for synchronization between data packets sent and reports received. | + /// | 5 | Shall be set if host requires TX data status report. Token is used for synchronization between data packets sent and reports received. | /// | 6:7 | Reserved. | /// @note If addr1 is multicast/broadcast, ctrl_flags bit 1 is ignored and the frame is sent as a non-QoS frame, i.e. QoS control field shall not be present in the MAC header. uint8_t ctrl_flags; @@ -423,7 +445,7 @@ typedef struct sl_wifi_btr_data_ctrlblk_s { uint8_t reserved2; /// Data Packets are queued to respective queue based on priority. Best Effort - 0, Background - 1, Video - 2, Voice - 3. uint8_t priority; - /// Rates shall be provided as per \ref RSI_RATES. Only 11b/g rates shall be supported. + /// Rates shall be provided as per @ref sl_wifi_data_rate_t. Only 11b/g rates shall be supported. sl_wifi_data_rate_t rate; /// Used for synchronization between data packets sent and reports received. Application shall provide token/identifier per PPDU. MAC layer shall send the same token/identifier in status report along with the status of the transmitted packet. uint32_t token; @@ -435,41 +457,41 @@ typedef struct sl_wifi_btr_data_ctrlblk_s { uint8_t addr3[6]; /// Source MAC address. Initialization of addr4 is optional. uint8_t addr4[6]; -} sl_wifi_btr_data_ctrlblk_t; +} sl_wifi_transceiver_tx_data_control_t; -typedef struct sl_wifi_btr_cw_params_s { - /// Min contention window size. Value is calculated from 2n - 1 where exponent shall be provided as the input. Valid values for exponent N are 0 - 10 +typedef struct { + /// Min contention window size. Value is calculated from 2n - 1 where exponent shall be provided as the input. Valid values for exponent N are 0 - 15 uint8_t cwmin; - /// Max contention window size. Value is calculated from 2n - 1 where exponent shall be provided as the input. Valid values for exponent N are 0 - 10. + /// Max contention window size. Value is calculated from 2n - 1 where exponent shall be provided as the input. Valid values for exponent N are 0 - 15. uint8_t cwmax; /// AIFSN. Valid range is 0 to 15. uint8_t aifsn; uint8_t reserved; -} sl_wifi_btr_cw_params_t; +} sl_wifi_transceiver_cw_config_t; -typedef struct sl_wifi_btr_config_params_s { - /// Set or get BTR config params +typedef struct { + /// Shall be set to 1 to configure the transceiver config params in MAC layer. Shall be set to 0 to query the transceiver config params from MAC layer. uint8_t set; - /// Retransmit count. Common across all peers and access categories and valid only for unicast data frames + /// Retransmit count. Common across all peers and access categories and valid only for unicast data frames. Valid range is 1 to 15. uint8_t retransmit_count; /// Reserved uint16_t flags; /// CW params for respective queues. AC index: Best Effort - 0, Background - 1, Video - 2, Voice - 3 - sl_wifi_btr_cw_params_t cw_params[4]; -} sl_wifi_btr_config_params_t; + sl_wifi_transceiver_cw_config_t cw_params[4]; +} sl_wifi_transceiver_parameters_t; -typedef struct sl_wifi_btr_set_channel_s { +typedef struct { /// Channel information sl_wifi_channel_t chan_info; /// TX power uint8_t tx_power; -} sl_wifi_btr_set_channel_t; +} sl_wifi_transceiver_set_channel_t; -typedef struct sl_wifi_btr_peer_update_s { +typedef struct { /// | Bit position | Flags bit description | /// |--------------|--------------------------------------------------------------------------------------------------------------------| /// | 0 | Shall be set to add the peer, else reset to 0 to delete the peer. | - /// | 1 | Shall be set for auto-rate enable. To enable auto-rate application needs to provide peer_supported_rate_bitmap | + /// | 1 | Shall be set for auto-rate enable. To enable auto-rate, application needs to provide peer_supported_rate_bitmap | uint8_t flags; /// MAC address of peer to be added or deleted. uint8_t peer_mac_address[6]; @@ -490,40 +512,69 @@ typedef struct sl_wifi_btr_peer_update_s { /// | BIT(11) | 54 Mbps | /// | BIT(12:31) | Reserved | uint32_t peer_supported_rate_bitmap; -} sl_wifi_btr_peer_update_t; +} sl_wifi_transceiver_peer_update_t; -typedef struct sl_wifi_btr_mcast_filter_s { +typedef struct { /// Bit 0 is set to 1 to enable filtering for the specified MAC addresses, else set to 0 to disable filtering. uint8_t flags; /// Number of multicast addresses. Valid values are 1, 2. This field is ignored when disabling filtering. uint8_t num_of_mcast_addr; /// List of multicast addresses. This field is ignored when disabling filtering. uint8_t mac[2][6]; -} sl_wifi_btr_mcast_filter_t; +} sl_wifi_transceiver_mcast_filter_t; -/// Wi-Fi BTR interface configuration +/// Wi-Fi transceiver interface configuration typedef struct { - sl_wifi_btr_set_channel_t btr_chan_info; ///< Channel info - sl_mac_address_t addr2_ta; ///< DUT MAC address (Addr2/Transmitter Address) - sl_wifi_btr_config_params_t config_params; ///< BTR config params -} sl_wifi_btr_configuration_t; + sl_wifi_transceiver_set_channel_t channel; ///< Channel info + sl_mac_address_t dut_mac; ///< DUT MAC address + sl_wifi_transceiver_parameters_t parameters; ///< Transceiver parameters +} sl_wifi_transceiver_configuration_t; -/// Wi-Fi BTR Tx data confirm callback structure -typedef struct sl_wifi_btr_tx_cfm_cb_data_s { +/// Wi-Fi transceiver TX data confirm callback structure +typedef struct { + /// Status report for the data packet identified by token. + /// | Status | Description | + /// | :----------------------------| :-----------------------------------------------------------------------------------------------------------------------------------| + /// | SL_STATUS_OK (0x0) | Received Ack | + /// | SL_STATUS_ACK_ERR (0x1) | Ack error | + /// | SL_STATUS_CS_BUSY (0x2) | Carrier sense busy | + /// | SL_STATUS_UNKNOWN_PEER (0x3) | If @ref sl_wifi_send_transceiver_data was called for a peer that was not added or was deleted before the data packet was sent out. | sl_status_t status; + /// Rate at which data packet has been sent. Rate is invalid if error is SL_STATUS_CS_BUSY or SL_STATUS_UNKNOWN_PEER. uint32_t rate; + /// Priority used for the data packet from control->priority in the corresponding call to @ref sl_wifi_send_transceiver_data. uint8_t priority; + /// Data packet identifier from control->token value passed in the corresponding call to @ref sl_wifi_send_transceiver_data. uint32_t token; -} sl_wifi_btr_tx_cfm_cb_data_t; +} sl_wifi_transceiver_tx_data_confirmation_t; -/// Wi-Fi BTR Rx Data callback structure -typedef struct sl_wifi_btr_rx_cb_data_s { +/// Wi-Fi transceiver RX Data callback structure +typedef struct { + /// Status code for the received RX packet. + /// | Status | Description | + /// | :----------------------------| :------------------------------------------------------------------------------------------------------------------------------------| + /// | SL_STATUS_OK (0x0) | Success | + /// | SL_STATUS_UNKNOWN_PEER (0x3) | If SL_SI91X_FEAT_TRANSCEIVER_MAC_PEER_DS_SUPPORT feature is enabled and data packet is received from a peer not present in MAC layer | sl_status_t status; + /// RSSI of the received 802.11 frame. This field is valid only if status is set to success. int8_t rssi; + /// Rate of the received 802.11 frame as per @ref sl_wifi_data_rate_t. This field is valid only if status is set to success. uint32_t rate; + /// Length of the buffer. uint32_t length; + /// IEEE 802.11 frame received from firmware. `buffer` points to the beginning of the MAC header. Contents are not valid once the function returns. If the contents need to be accessed after return, it needs to be copied to the application buffer. If the status is not successful, buffer is set to NULL and shall not be accessed. + /// + /// *Format of IEEE 802.11 frame received from firmware in buffer* + /// | Field name | Frame Control | Duration | Addr1 | Addr2 | Adddr3 | Seq Ctrl | Addr4 | QoS ctrl | Payload (LLC + Data) | + /// |:-----------|:---------------|:---------|:------|:------|:-------|:---------|:-----------------------|:----------------------|:----------------------| + /// | Size(bytes)| 2 | 2 | 6 | 6 | 6 | 2 | 6 (Optionally present) | 2 (Optionally present)| Variable | + /// @note All unicast data frames received where Address 1 (RA) matches the device MAC address are passed to the host application. + /// @note All broadcast data frames are sent to the host. + /// @note All multicast data frames are sent to the host unless filtering is enabled using @ref sl_wifi_set_transceiver_multicast_filter. + /// @note On chip duplicate detection is not supported and is expected to be handled by the application. + /// @note On chip MAC level decryption is not supported. uint8_t *buffer; -} sl_wifi_btr_rx_cb_data_t; +} sl_wifi_transceiver_rx_data_t; -/*! @endcond SL_SI91X_WIFI_BTR_MODE */ +/*! @endcond WIFI_TRANSCEIVER_MODE */ /** @} */ diff --git a/components/protocol/wifi/si91x/sl_wifi.c b/components/protocol/wifi/si91x/sl_wifi.c index 21f263df1..2b2f69d61 100644 --- a/components/protocol/wifi/si91x/sl_wifi.c +++ b/components/protocol/wifi/si91x/sl_wifi.c @@ -52,6 +52,9 @@ extern rsi_m4ta_desc_t crypto_desc[2]; #endif +#ifdef SLI_SI91X_MCU_INTERFACE +#include "rsi_wisemcu_hardware_setup.h" +#endif // Enterprise configuration command parameters /*=======================================================================*/ @@ -61,6 +64,7 @@ extern rsi_m4ta_desc_t crypto_desc[2]; #define SL_EAP_TTLS_METHOD "TTLS" #define SL_EAP_FAST_METHOD "FAST" #define SL_EAP_PEAP_METHOD "PEAP" +#define SL_EAP_LEAP_METHOD "LEAP" // This parameter is used to configure the module in Enterprise security mode #define SL_EAP_INNER_METHOD "\"auth=MSCHAPV2\"" @@ -113,6 +117,16 @@ static sl_wifi_advanced_scan_configuration_t advanced_scan_configuration = { static sl_wifi_advanced_client_configuration_t advanced_client_configuration = { 0 }; int32_t validate_datarate(sl_wifi_data_rate_t data_rate); sl_status_t sl_wifi_get_associated_client_list(void *client_list_buffer, uint16_t buffer_length, uint32_t timeout); + +static sl_status_t fill_join_request_security_using_encryption(sl_wifi_encryption_t encryption_mode, + uint8_t *security_type) +{ + if (encryption_mode == SL_WIFI_CCMP_ENCRYPTION) { + *security_type |= BIT(7); + } + return SL_STATUS_OK; +} + static sl_status_t get_configured_join_request(sl_wifi_interface_t module_interface, const void *configuration, sl_si91x_join_request_t *join_request) @@ -143,6 +157,8 @@ static sl_status_t get_configured_join_request(sl_wifi_interface_t module_interf join_request->join_feature_bitmap |= SL_SI91X_JOIN_FEAT_MFP_CAPABLE_ONLY; } + fill_join_request_security_using_encryption(client_configuration->encryption, &(join_request->security_type)); + join_request->vap_id = SL_SI91X_WIFI_CLIENT_VAP_ID; // For Station vap_id will be 0 join_request->listen_interval = sl_si91x_get_listen_interval(); memcpy(join_request->join_bssid, client_configuration->bssid.octet, sizeof(join_request->join_bssid)); @@ -225,12 +241,33 @@ sl_status_t sl_wifi_init(const sl_wifi_device_configuration_t *configuration, sl_wifi_event_handler_t event_handler) { UNUSED_PARAMETER(device_context); +#ifdef SLI_SI91X_MCU_INTERFACE + sl_si91x_efuse_data_t efuse_data; +#endif sl_status_t status = SL_STATUS_OK; status = sl_si91x_driver_init(configuration, event_handler); #ifdef SL_SI91X_SIDE_BAND_CRYPTO if (status == SL_STATUS_OK) { uint32_t crypto_desc_ptr = (uint32_t)crypto_desc; - status = sl_si91x_m4_ta_secure_handshake(SL_SI91X_ENABLE_SIDE_BAND, sizeof(uint32_t), &crypto_desc_ptr, 0, NULL); + uint32_t *desc_ptr = &crypto_desc_ptr; + status = sl_si91x_m4_ta_secure_handshake(SL_SI91X_ENABLE_SIDE_BAND, sizeof(uint32_t), (uint8_t *)desc_ptr, 0, NULL); + } +#endif +#ifdef SLI_SI91X_MCU_INTERFACE + if (status == SL_STATUS_OK) { + /*Getting PTE CRC value to distinguish firmware 17 and 18 boards.*/ + sl_si91x_get_flash_efuse_data(&efuse_data, SL_SI91X_EFUSE_PTE_CRC); + + /*PTE FW version check.*/ + if (efuse_data.pte_crc != FIRMWARE_17_PTE_CRC_VALUE) { + /* Reduce the RETN_LDO voltage */ + RSI_IPMU_Retn_Voltage_Reduction(); + } else { + /* Enable Higher PWM RO Frequency Mode for PMU for FW17 boards*/ + RSI_IPMU_Set_Higher_Pwm_Ro_Frequency_Mode_to_PMU(); + /* Set the RETN_LDO voltage to 0.8V for FW17 boards*/ + RSI_IPMU_Retn_Voltage_To_Default(); + } } #endif return status; @@ -291,12 +328,12 @@ sl_status_t sl_wifi_wait_for_scan_results(sl_wifi_scan_result_t **scan_results, if (packet->command == RSI_WLAN_RSP_SCAN) { *scan_results = (sl_wifi_scan_result_t *)malloc(packet->length); if (scan_results == NULL) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_ALLOCATION_FAILED; } memcpy(*scan_results, packet->data, packet->length); } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); #endif return SL_STATUS_NOT_SUPPORTED; @@ -459,6 +496,8 @@ sl_status_t sl_wifi_connect(sl_wifi_interface_t interface, strcpy((char *)eap_req.eap_method, SL_EAP_FAST_METHOD); } else if (SL_WIFI_PEAP_MSCHAPV2_ENCRYPTION == ap->encryption) { strcpy((char *)eap_req.eap_method, SL_EAP_PEAP_METHOD); + } else if (SL_WIFI_EAP_LEAP_ENCRYPTION == ap->encryption) { + strcpy((char *)eap_req.eap_method, SL_EAP_LEAP_METHOD); } else { return SL_STATUS_WIFI_INVALID_ENCRYPTION_METHOD; } @@ -525,7 +564,7 @@ sl_status_t sl_wifi_connect(sl_wifi_interface_t interface, if (timeout_ms != 0 && status != SL_STATUS_OK) { if (buffer != NULL) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } sl_status_t temp_status = sl_si91x_driver_send_command(RSI_WLAN_REQ_INIT, SI91X_WLAN_CMD_QUEUE, @@ -542,11 +581,11 @@ sl_status_t sl_wifi_connect(sl_wifi_interface_t interface, packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); if (packet->data[0] != 'C') { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_NOT_AVAILABLE; } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } @@ -611,13 +650,13 @@ sl_status_t sl_wifi_get_signal_strength(sl_wifi_interface_t interface, int32_t * NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); sl_si91x_packet_t *packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); *rssi = -(packet->data[0]); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } @@ -648,34 +687,29 @@ sl_status_t sl_wifi_get_sta_tsf(sl_wifi_interface_t interface, sl_wifi_tsf64_t * NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); sl_si91x_packet_t *packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); memcpy(tsf, packet->data, packet->length); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } sl_status_t sl_wifi_set_mac_address(sl_wifi_interface_t interface, const sl_mac_address_t *mac_address) { UNUSED_PARAMETER(interface); - sl_status_t status; - - if (!device_initialized) { - return SL_STATUS_NOT_INITIALIZED; - } SL_VERIFY_POINTER_OR_RETURN(mac_address, SL_STATUS_NULL_POINTER); - status = sl_si91x_driver_send_command(RSI_WLAN_REQ_SET_MAC_ADDRESS, - SI91X_WLAN_CMD_QUEUE, - mac_address, - sizeof(sl_mac_address_t), - SL_SI91X_WAIT_FOR_COMMAND_SUCCESS, - NULL, - NULL); + sl_status_t status = sl_si91x_driver_send_command(RSI_WLAN_REQ_SET_MAC_ADDRESS, + SI91X_WLAN_CMD_QUEUE, + mac_address, + sizeof(sl_mac_address_t), + SL_SI91X_WAIT_FOR_COMMAND_SUCCESS, + NULL, + NULL); VERIFY_STATUS_AND_RETURN(status); return SL_STATUS_OK; } @@ -703,15 +737,21 @@ sl_status_t sl_wifi_get_mac_address(sl_wifi_interface_t interface, sl_mac_addres NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); sl_si91x_packet_t *packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); if (packet->length > 0) { - memcpy(mac->octet, packet->data, sizeof(*mac)); + // In Concurrent mode, for Client Interface, mac address will be at offset 0 + uint8_t mac_address_offset = 0; + if ((SL_SI91X_CONCURRENT_MODE == get_opermode()) && (SL_WIFI_AP_INTERFACE == interface)) { + // In Concurrent mode, for AP Interface, mac address will be at offset 6 + mac_address_offset = sizeof(sl_mac_address_t); + } + memcpy(mac->octet, packet->data + mac_address_offset, sizeof(*mac)); } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } @@ -756,7 +796,7 @@ sl_status_t sl_wifi_get_channel(sl_wifi_interface_t interface, sl_wifi_channel_t NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -777,7 +817,7 @@ sl_status_t sl_wifi_get_channel(sl_wifi_interface_t interface, sl_wifi_channel_t break; } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -893,14 +933,14 @@ sl_status_t sl_wifi_start_ap(sl_wifi_interface_t interface, const sl_wifi_ap_con NULL, &rx_buffer); if ((status != SL_STATUS_OK) && (rx_buffer != NULL)) { - sl_si91x_host_free_buffer(rx_buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(rx_buffer); } VERIFY_STATUS_AND_RETURN(status); join_response = sl_si91x_host_get_buffer_data(rx_buffer, 0, NULL); if (join_response->data[0] != 'G') { - sl_si91x_host_free_buffer(rx_buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(rx_buffer); return SL_STATUS_NOT_AVAILABLE; } @@ -910,7 +950,7 @@ sl_status_t sl_wifi_start_ap(sl_wifi_interface_t interface, const sl_wifi_ap_con else if (interface == SL_WIFI_AP_5GHZ_INTERFACE) interface_is_up[SL_WIFI_AP_5GHZ_INTERFACE_INDEX] = true; - sl_si91x_host_free_buffer(rx_buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(rx_buffer); return SL_STATUS_OK; } @@ -941,13 +981,13 @@ sl_status_t sl_wifi_get_pairwise_master_key(sl_wifi_interface_t interface, NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); sl_si91x_packet_t *packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); memcpy(pairwise_master_key, packet->data, packet->length); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } @@ -972,7 +1012,7 @@ sl_status_t sl_wifi_get_associated_client_list(void *client_list_buffer, uint16_ // // si91x_go_parameters_t* data = &packet->data; // // Process data here - // sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + // sl_si91x_host_free_buffer(buffer); // } // return status; } @@ -1038,7 +1078,7 @@ sl_status_t sl_wifi_get_ap_client_info(sl_wifi_interface_t interface, sl_wifi_cl NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -1047,7 +1087,7 @@ sl_status_t sl_wifi_get_ap_client_info(sl_wifi_interface_t interface, sl_wifi_cl memcpy(&sl_si91x_client_info_response, packet->data, sizeof(sl_si91x_client_info_response)); convert_si91x_wifi_client_info(client_info, &sl_si91x_client_info_response); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -1070,7 +1110,7 @@ sl_status_t sl_wifi_get_firmware_version(sl_wifi_firmware_version_t *version) NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -1089,7 +1129,7 @@ sl_status_t sl_wifi_get_firmware_version(sl_wifi_firmware_version_t *version) version->build_num = (packet->data[7] | packet->data[8]); } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; #else return SL_STATUS_NOT_SUPPORTED; @@ -1212,13 +1252,13 @@ sl_status_t sl_wifi_get_statistics(sl_wifi_interface_t interface, sl_wifi_statis NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); if (packet->length != sizeof(sl_wifi_statistics_t)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_FAIL; } @@ -1226,7 +1266,7 @@ sl_status_t sl_wifi_get_statistics(sl_wifi_interface_t interface, sl_wifi_statis memcpy(statistics, packet->data, packet->length); } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -1256,13 +1296,13 @@ sl_status_t sl_wifi_get_operational_statistics(sl_wifi_interface_t interface, NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); if (packet->length != sizeof(sl_wifi_operational_statistics_t)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_FAIL; } @@ -1270,7 +1310,7 @@ sl_status_t sl_wifi_get_operational_statistics(sl_wifi_interface_t interface, memcpy(operational_statistics, packet->data, packet->length); } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -1434,8 +1474,8 @@ bool sl_wifi_is_interface_up(sl_wifi_interface_t interface) return interface_is_up[SL_WIFI_CLIENT_5GHZ_INTERFACE_INDEX] | interface_is_up[SL_WIFI_AP_5GHZ_INTERFACE_INDEX] | interface_is_up[SL_WIFI_CLIENT_2_4GHZ_INTERFACE_INDEX] | interface_is_up[SL_WIFI_AP_2_4GHZ_INTERFACE_INDEX]; - case SL_WIFI_BTR_INTERFACE: - return interface_is_up[SL_WIFI_BTR_INTERFACE_INDEX]; + case SL_WIFI_TRANSCEIVER_INTERFACE: + return interface_is_up[SL_WIFI_TRANSCEIVER_INTERFACE_INDEX]; default: return false; } @@ -1589,7 +1629,7 @@ sl_status_t sl_wifi_generate_wps_pin(sl_wifi_wps_pin_t *wps_pin) NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -1598,7 +1638,7 @@ sl_status_t sl_wifi_generate_wps_pin(sl_wifi_wps_pin_t *wps_pin) memcpy(wps_pin->digits, packet->data, sizeof(sl_wifi_wps_pin_t)); } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -2102,101 +2142,113 @@ sl_status_t sl_wifi_p2p_connect(sl_wifi_interface_t interface, const sl_wifi_p2p return SL_STATUS_NOT_SUPPORTED; } -sl_status_t sl_wifi_btr_set_channel(sl_wifi_interface_t interface, sl_wifi_btr_set_channel_t btr_chan_info) +sl_status_t sl_wifi_transceiver_set_channel(sl_wifi_interface_t interface, sl_wifi_transceiver_set_channel_t channel) { sl_status_t status = SL_STATUS_OK; sl_si91x_operation_mode_t opermode; - UNUSED_PARAMETER(interface); - if (!device_initialized) { return SL_STATUS_NOT_INITIALIZED; } opermode = get_opermode(); - if (opermode != SL_SI91X_WLAN_BTR_MODE) { - SL_DEBUG_LOG("Invalid mode: %d. Command only supported in Wi-Fi BTR opermode(7)\r\n", opermode); - return RSI_ERROR_COMMAND_GIVEN_IN_WRONG_STATE; + if (opermode != SL_SI91X_TRANSCEIVER_MODE) { + SL_DEBUG_LOG("Invalid mode: %d. Command only supported in Wi-Fi transceiver opermode(7)\r\n", opermode); + return SL_STATUS_SI91X_COMMAND_GIVEN_IN_INVALID_STATE; } - if ((btr_chan_info.chan_info.channel < 1) || (btr_chan_info.chan_info.channel > 14)) { - return RSI_ERROR_INVALID_CHANNEL; + if ((channel.chan_info.channel < 1) || (channel.chan_info.channel > 14)) { + return SL_STATUS_TRANSCEIVER_INVALID_CHANNEL; } // User configuration for band, bandwidth and tx_power are unsupported - btr_chan_info.chan_info.band = SL_WIFI_BAND_2_4GHZ; - btr_chan_info.chan_info.bandwidth = SL_WIFI_BANDWIDTH_20MHz; - btr_chan_info.tx_power = 127; + channel.chan_info.band = SL_WIFI_BAND_2_4GHZ; + channel.chan_info.bandwidth = SL_WIFI_BANDWIDTH_20MHz; + channel.tx_power = 127; - status = sl_si91x_driver_send_command(SL_SI91X_WIFI_BTR_REQ_SET_CHANNEL, + status = sl_si91x_driver_send_command(RSI_WLAN_REQ_SET_TRANSCEIVER_CHANNEL, SI91X_WLAN_CMD_QUEUE, - &btr_chan_info, - sizeof(btr_chan_info), + &channel, + sizeof(channel), SL_SI91X_WAIT_FOR_COMMAND_SUCCESS, NULL, NULL); + VERIFY_STATUS_AND_RETURN(status); + if (interface == SL_WIFI_TRANSCEIVER_INTERFACE) { + interface_is_up[SL_WIFI_TRANSCEIVER_INTERFACE_INDEX] = true; + } + return status; } -sl_status_t sl_wifi_btr_config_params(sl_wifi_interface_t interface, sl_wifi_btr_config_params_t *config_params) +sl_status_t sl_wifi_set_transceiver_parameters(sl_wifi_interface_t interface, sl_wifi_transceiver_parameters_t *params) { sl_status_t status = SL_STATUS_OK; sl_si91x_operation_mode_t opermode = 0; sl_wifi_buffer_t *buffer = NULL; sl_si91x_packet_t *packet = NULL; - UNUSED_PARAMETER(interface); - if (!device_initialized) { return SL_STATUS_NOT_INITIALIZED; } opermode = get_opermode(); - if (opermode != SL_SI91X_WLAN_BTR_MODE) { - SL_DEBUG_LOG("Invalid mode: %d. Command only supported in Wi-Fi BTR opermode(7)\r\n", opermode); - return RSI_ERROR_COMMAND_GIVEN_IN_WRONG_STATE; + if (opermode != SL_SI91X_TRANSCEIVER_MODE) { + SL_DEBUG_LOG("Invalid mode: %d. Command only supported in Wi-Fi transceiver opermode(7)\r\n", opermode); + return SL_STATUS_SI91X_COMMAND_GIVEN_IN_INVALID_STATE; } - SL_VERIFY_POINTER_OR_RETURN(config_params, SL_STATUS_NULL_POINTER); + SL_VERIFY_POINTER_OR_RETURN(params, SL_STATUS_NULL_POINTER); + + if (params->set) { + //! Transceiver configurations shall not be changed dynamically + if (sl_wifi_is_interface_up(interface)) { + return SL_STATUS_SI91X_COMMAND_GIVEN_IN_INVALID_STATE; + } - if (config_params->set) { - if ((!config_params->retransmit_count) || (config_params->retransmit_count > MAX_RETRANSMIT_COUNT)) { - return RSI_ERROR_INVALID_BTR_CONFIG; + if ((!params->retransmit_count) || (params->retransmit_count > MAX_RETRANSMIT_COUNT)) { + return SL_STATUS_TRANSCEIVER_INVALID_CONFIG; } for (uint8_t i = 0; i < 4; i++) { - if ((config_params->cw_params[i].cwmin > MAX_CW_EXPN_COUNT) - || (config_params->cw_params[i].cwmax > MAX_CW_EXPN_COUNT) - || (config_params->cw_params[i].aifsn > MAX_AIFSN)) { - return RSI_ERROR_INVALID_BTR_CONFIG; + if ((params->cw_params[i].cwmin > MAX_CW_EXPN_COUNT) || (params->cw_params[i].cwmax > MAX_CW_EXPN_COUNT) + || (params->cw_params[i].aifsn > MAX_AIFSN)) { + return SL_STATUS_TRANSCEIVER_INVALID_CONFIG; } } } - status = sl_si91x_driver_send_command( - SL_SI91X_WIFI_BTR_REQ_CONFIG_PARAMS, - SI91X_WLAN_CMD_QUEUE, - config_params, - sizeof(sl_wifi_btr_config_params_t), - config_params->set ? SL_SI91X_WAIT_FOR_COMMAND_SUCCESS : SL_SI91X_WAIT_FOR_COMMAND_RESPONSE, - NULL, - &buffer); + status = + sl_si91x_driver_send_command(RSI_WLAN_REQ_TRANSCEIVER_CONFIG_PARAMS, + SI91X_WLAN_CMD_QUEUE, + params, + sizeof(sl_wifi_transceiver_parameters_t), + params->set ? SL_SI91X_WAIT_FOR_COMMAND_SUCCESS : SL_SI91X_WAIT_FOR_COMMAND_RESPONSE, + NULL, + &buffer); + + //! Return if API called to set params. Otherwise, if API called to get params, continue further to copy params received from firmware. + if (params->set) { + return status; + } + if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } + VERIFY_STATUS_AND_RETURN(status); packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); if (packet->length > 0) { - memcpy(config_params, packet->data, sizeof(sl_wifi_btr_config_params_t)); + memcpy(params, packet->data, sizeof(sl_wifi_transceiver_parameters_t)); } - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } -sl_status_t sl_wifi_btr_up(sl_wifi_interface_t interface, sl_wifi_btr_configuration_t *config) +sl_status_t sl_wifi_transceiver_up(sl_wifi_interface_t interface, sl_wifi_transceiver_configuration_t *config) { sl_status_t status = SL_STATUS_OK; @@ -2206,52 +2258,50 @@ sl_status_t sl_wifi_btr_up(sl_wifi_interface_t interface, sl_wifi_btr_configurat SL_VERIFY_POINTER_OR_RETURN(config, SL_STATUS_NULL_POINTER); - status = sl_wifi_btr_config_params(interface, &config->config_params); + status = sl_wifi_set_transceiver_parameters(interface, &config->parameters); if (status != RSI_SUCCESS) { - SL_DEBUG_LOG("\r\nSet BTR config params failed, error code : 0x%lX\r\n", status); - return SL_STATUS_FAIL; + SL_DEBUG_LOG("\r\nSet transceiver config params failed, error code : 0x%lX\r\n", status); + return status; } else { - SL_DEBUG_LOG("\r\nSet BTR config params successful"); + SL_DEBUG_LOG("\r\nSet transceiver config params successful"); } - // Update config_params.set = 0 to fetch BTR config params - memset(&config->config_params, 0, sizeof(sl_wifi_btr_config_params_t)); - status = sl_wifi_btr_config_params(interface, &config->config_params); + // Update params.set = 0 to fetch transceiver config params + memset(&config->parameters, 0, sizeof(sl_wifi_transceiver_parameters_t)); + status = sl_wifi_set_transceiver_parameters(interface, &config->parameters); if (status != RSI_SUCCESS) { - SL_DEBUG_LOG("\r\nGet BTR config params failed, error code : 0x%lX\r\n", status); + SL_DEBUG_LOG("\r\nGet transceiver config params failed, error code : 0x%lX\r\n", status); } else { - SL_DEBUG_LOG("\r\nBTR config params:"); - SL_DEBUG_LOG("\r\nRetransmit count: %d", config->config_params.retransmit_count); - for (uint8_t i = 0; i < 4; i++) + SL_DEBUG_LOG("\r\nTransceiver config params:"); + SL_DEBUG_LOG("\r\nRetransmit count: %d", config->parameters.retransmit_count); + for (uint8_t i = 0; i < 4; i++) { SL_DEBUG_LOG("\r\nAC index[%d] - cwmin: %d, cwmax: %d, aifsn: %d", i, - config->config_params.cw_params[i].cwmin, - config->config_params.cw_params[i].cwmax, - config->config_params.cw_params[i].aifsn); + config->parameters.cw_params[i].cwmin, + config->parameters.cw_params[i].cwmax, + config->parameters.cw_params[i].aifsn); + } } - // Set BTR mode channel - status = sl_wifi_btr_set_channel(interface, config->btr_chan_info); + // Set transceiver mode channel + status = sl_wifi_transceiver_set_channel(interface, config->channel); if (status != SL_STATUS_OK) { SL_DEBUG_LOG("\r\nSet Channel Failed, Error Code : 0x%lX\r\n", status); - return SL_STATUS_FAIL; + return status; } else { - SL_DEBUG_LOG("\r\nSet Channel(%d) Initialization success\r\n", config->btr_chan_info.chan_info.channel); + SL_DEBUG_LOG("\r\nSet Channel(%d) Initialization success\r\n", config->channel.chan_info.channel); } - if (interface == SL_WIFI_BTR_INTERFACE) - interface_is_up[SL_WIFI_BTR_INTERFACE_INDEX] = true; - // Get DUT MAC address to use as Addr2/Transmitter Addresss - status = sl_wifi_get_mac_address(interface, &config->addr2_ta); + status = sl_wifi_get_mac_address(interface, &config->dut_mac); if (status == SL_STATUS_OK) { SL_DEBUG_LOG("\r\nDevice MAC address: %x:%x:%x:%x:%x:%x\r\n", - config->addr2_ta.octet[0], - config->addr2_ta.octet[1], - config->addr2_ta.octet[2], - config->addr2_ta.octet[3], - config->addr2_ta.octet[4], - config->addr2_ta.octet[5]); + config->dut_mac.octet[0], + config->dut_mac.octet[1], + config->dut_mac.octet[2], + config->dut_mac.octet[3], + config->dut_mac.octet[4], + config->dut_mac.octet[5]); } else { SL_DEBUG_LOG("\r\nFailed to get mac address: 0x%lX\r\n", status); return SL_STATUS_FAIL; @@ -2275,16 +2325,16 @@ int32_t validate_datarate(sl_wifi_data_rate_t data_rate) case SL_WIFI_DATA_RATE_36: case SL_WIFI_DATA_RATE_48: case SL_WIFI_DATA_RATE_54: - return RSI_SUCCESS; + return SL_STATUS_OK; default: - return RSI_ERROR_INVALID_PARAM; + return SL_STATUS_TRANSCEIVER_INVALID_DATA_RATE; } } -sl_status_t sl_wifi_btr_send_80211_data(sl_wifi_interface_t interface, - sl_wifi_btr_data_ctrlblk_t *data_ctrlblk, - uint8_t *payload, - uint16_t payload_len) +sl_status_t sl_wifi_send_transceiver_data(sl_wifi_interface_t interface, + sl_wifi_transceiver_tx_data_control_t *control, + uint8_t *payload, + uint16_t payload_len) { sl_status_t status = SL_STATUS_OK; @@ -2300,52 +2350,21 @@ sl_status_t sl_wifi_btr_send_80211_data(sl_wifi_interface_t interface, return SL_STATUS_INVALID_PARAMETER; } - SL_VERIFY_POINTER_OR_RETURN(data_ctrlblk, SL_STATUS_NULL_POINTER); + SL_VERIFY_POINTER_OR_RETURN(control, SL_STATUS_NULL_POINTER); SL_VERIFY_POINTER_OR_RETURN(payload, SL_STATUS_NULL_POINTER); - if (IS_FIXED_DATA_RATE(data_ctrlblk->ctrl_flags)) { - if (validate_datarate(data_ctrlblk->rate)) - return RSI_ERROR_INVALID_DATA_RATE; + if (IS_FIXED_DATA_RATE(control->ctrl_flags)) { + if (validate_datarate(control->rate)) { + return SL_STATUS_TRANSCEIVER_INVALID_DATA_RATE; + } } - status = sl_si91x_driver_btr_send_data(data_ctrlblk, payload, payload_len, SL_SI91X_WAIT_FOR(1000)); - - VERIFY_STATUS_AND_RETURN(status); + status = sl_si91x_driver_send_transceiver_data(control, payload, payload_len, SL_SI91X_WAIT_FOR(1000)); return status; } -/** -* @brief - When new peer is added to the network, application shall call this API to update peer information to the MAC layer. -* Similarly, the API can be called to delete the peer information from MAC layer. -* -* @param[in] flags - Bit 0 shall be set to add the peer, else reset to 0 to delete the peer. -* @param[in] peer_mac_address - MAC address of peer to be added or deleted. -* @param[in] peer_supported_rate_bitmap - Rate bitmap of peer station. -* -* | peer_supported_rate_bitmap | Data rate | -* | :--------------------------| :---------| -* | BIT(0) | 1 Mbps | -* | BIT(1) | 2 Mbps | -* | BIT(2) | 5.5 Mbps | -* | BIT(3) | 11 Mbps | -* | BIT(4) | 6 Mbps | -* | BIT(5) | 9 Mbps | -* | BIT(6) | 12 Mbps | -* | BIT(7) | 18 Mbps | -* | BIT(8) | 24 Mbps | -* | BIT(9) | 36 Mbps | -* | BIT(10) | 48 Mbps | -* | BIT(11) | 54 Mbps | -* | BIT(12:31) | Reserved | -* -* @return 0 - Success -* Non-Zero Value - Failure -* -* @note This is a blocking API. -* @note Status SL_STATUS_UNKNOWN_PEER (0x3) will be returned for any Tx packets queued for a peer that was not added or was deleted before the data packet was sent out. -*/ -sl_status_t sl_wifi_btr_peer_list_update(sl_wifi_interface_t interface, sl_wifi_btr_peer_update_t peer) +sl_status_t sl_wifi_update_transceiver_peer_list(sl_wifi_interface_t interface, sl_wifi_transceiver_peer_update_t peer) { sl_status_t status = SL_STATUS_OK; @@ -2357,30 +2376,30 @@ sl_status_t sl_wifi_btr_peer_list_update(sl_wifi_interface_t interface, sl_wifi_ return SL_STATUS_WIFI_INTERFACE_NOT_UP; } - if ((peer.flags & BTR_PEER_ADD_FLAG) && (peer.flags & BTR_PEER_AUTO_RATE_FLAG) + if ((peer.flags & TRANSCEIVER_PEER_ADD_FLAG) && (peer.flags & TRANSCEIVER_PEER_AUTO_RATE_FLAG) && (!peer.peer_supported_rate_bitmap)) { - return RSI_ERROR_INVALID_DATA_RATE; + return SL_STATUS_TRANSCEIVER_INVALID_DATA_RATE; } if (IS_MAC_ZERO(peer.peer_mac_address)) { - return RSI_ERROR_INVALID_MAC_ADDRESS; + return SL_STATUS_TRANSCEIVER_INVALID_MAC_ADDRESS; } if (IS_BCAST_MCAST_MAC(peer.peer_mac_address[0])) { - return RSI_ERROR_INVALID_MAC_ADDRESS; + return SL_STATUS_TRANSCEIVER_INVALID_MAC_ADDRESS; } - status = sl_si91x_driver_send_command(SL_SI91X_WIFI_BTR_REQ_PEER_LIST_UPDATE, + status = sl_si91x_driver_send_command(RSI_WLAN_REQ_TRANSCEIVER_PEER_LIST_UPDATE, SI91X_WLAN_CMD_QUEUE, &peer, - sizeof(sl_wifi_btr_peer_update_t), + sizeof(sl_wifi_transceiver_peer_update_t), SL_SI91X_WAIT_FOR_COMMAND_SUCCESS, NULL, NULL); - VERIFY_STATUS_AND_RETURN(status); return status; } -sl_status_t sl_wifi_btr_multicast_filter(sl_wifi_interface_t interface, sl_wifi_btr_mcast_filter_t mcast) +sl_status_t sl_wifi_set_transceiver_multicast_filter(sl_wifi_interface_t interface, + sl_wifi_transceiver_mcast_filter_t mcast) { sl_status_t status = SL_STATUS_OK; @@ -2391,30 +2410,28 @@ sl_status_t sl_wifi_btr_multicast_filter(sl_wifi_interface_t interface, sl_wifi_ if (!sl_wifi_is_interface_up(interface)) { return SL_STATUS_WIFI_INTERFACE_NOT_UP; } - - if (mcast.flags & BTR_MCAST_FILTER_EN) { - if ((!mcast.num_of_mcast_addr) || mcast.num_of_mcast_addr > BTR_MCAST_FILTER_ADDR_LIMIT) { - return RSI_ERROR_INVALID_PARAM; + if (mcast.flags & TRANSCEIVER_MCAST_FILTER_EN) { + if ((!mcast.num_of_mcast_addr) || mcast.num_of_mcast_addr > TRANSCEIVER_MCAST_FILTER_ADDR_LIMIT) { + return SL_STATUS_INVALID_PARAMETER; } for (uint8_t i = 0; i < mcast.num_of_mcast_addr; i++) { if (IS_MAC_ZERO(mcast.mac[i])) { - return RSI_ERROR_INVALID_MAC_ADDRESS; + return SL_STATUS_TRANSCEIVER_INVALID_MAC_ADDRESS; } } } - status = sl_si91x_driver_send_command(SL_SI91X_WIFI_BTR_REQ_SET_MCAST_FILTER, + status = sl_si91x_driver_send_command(RSI_WLAN_REQ_SET_TRANSCEIVER_MCAST_FILTER, SI91X_WLAN_CMD_QUEUE, &mcast, - sizeof(sl_wifi_btr_mcast_filter_t), + sizeof(sl_wifi_transceiver_mcast_filter_t), SL_SI91X_WAIT_FOR_COMMAND_SUCCESS, NULL, NULL); - VERIFY_STATUS_AND_RETURN(status); return status; } -sl_status_t sl_wifi_btr_flush_data(sl_wifi_interface_t interface) +sl_status_t sl_wifi_flush_transceiver_data(sl_wifi_interface_t interface) { sl_status_t status = SL_STATUS_OK; @@ -2426,7 +2443,7 @@ sl_status_t sl_wifi_btr_flush_data(sl_wifi_interface_t interface) return SL_STATUS_WIFI_INTERFACE_NOT_UP; } - status = sl_si91x_driver_send_command(SL_SI91X_WIFI_BTR_REQ_FLUSH_DATA_Q, + status = sl_si91x_driver_send_command(RSI_WLAN_REQ_TRANSCEIVER_FLUSH_DATA_Q, SI91X_WLAN_CMD_QUEUE, NULL, 0, @@ -2434,6 +2451,5 @@ sl_status_t sl_wifi_btr_flush_data(sl_wifi_interface_t interface) NULL, NULL); - VERIFY_STATUS_AND_RETURN(status); return status; } diff --git a/components/protocol/wifi/src/sl_wifi_callback_framework.c b/components/protocol/wifi/src/sl_wifi_callback_framework.c index cabd32f8d..a6bd74801 100644 --- a/components/protocol/wifi/src/sl_wifi_callback_framework.c +++ b/components/protocol/wifi/src/sl_wifi_callback_framework.c @@ -71,24 +71,33 @@ sl_status_t sl_wifi_default_event_handler(sl_wifi_event_t event, sl_wifi_buffer_ return entry->function(event, &status, 0, entry->arg); } - if (event == SL_WIFI_BTR_TX_DATA_STATUS_CB) { - sl_wifi_btr_tx_cfm_cb_data_t tx_cfm_cb_data = { 0 }; - tx_cfm_cb_data.status = packet->desc[15]; - tx_cfm_cb_data.rate = packet->data[0]; //Extended descriptor in data[] for rate - tx_cfm_cb_data.priority = packet->data[4]; //Extended descriptor in data[] for priority - memcpy(&tx_cfm_cb_data.token, &packet->data[8], 4); //Extended descriptor in data[] for token + if (event == SL_WIFI_TRANSCEIVER_TX_DATA_STATUS_CB) { + sl_wifi_transceiver_tx_data_confirmation_t tx_cfm_cb_data = { 0 }; + tx_cfm_cb_data.status = packet->desc[15]; + tx_cfm_cb_data.rate = packet->data[0]; //Extended descriptor in data[] for rate + tx_cfm_cb_data.priority = packet->data[4]; //Extended descriptor in data[] for priority + memcpy(&tx_cfm_cb_data.token, &packet->data[8], 4); //Extended descriptor in data[] for token return entry->function(event, &tx_cfm_cb_data, 0, entry->arg); - } else if (event == SL_WIFI_BTR_RX_DATA_RECEIVE_CB) { - sl_wifi_btr_rx_cb_data_t rx_cb_data = { 0 }; - uint16_t payload_offset = packet->desc[4]; - uint16_t payload_length = packet->length & 0xFFF; + } else if (event == SL_WIFI_TRANSCEIVER_RX_DATA_RECEIVE_CB) { + sl_wifi_transceiver_rx_data_t rx_cb_data = { 0 }; + uint16_t payload_offset = packet->desc[4]; + uint16_t payload_length = packet->length & 0xFFF; + uint32_t status = *(uint32_t *)(&packet->data[12]); - rx_cb_data.status = 0; rx_cb_data.length = payload_length - payload_offset; - rx_cb_data.rssi = packet->data[0]; //Extended descriptor in data[] for rssi - rx_cb_data.rate = packet->data[2]; //Extended descriptor in data[] for rate rx_cb_data.buffer = packet->data + payload_offset; + rx_cb_data.rssi = *(uint16_t *)(&packet->data[0]); //Extended descriptor in data[] for rssi + rx_cb_data.rate = *(uint16_t *)(&packet->data[2]); //Extended descriptor in data[] for rate + + /* + * SL_STATUS_UNKNOWN_PEER - If SL_SI91X_FEAT_TRANSCEIVER_MAC_PEER_DS_SUPPORT is enabled but + * data packet is received from a peer not present in MAC layer. + */ + if ((status & TRANSCEIVER_RX_PKT_TA_MATCH_BIT) || IS_BCAST_MCAST_MAC(rx_cb_data.buffer[4])) + rx_cb_data.status = SL_STATUS_OK; + else + rx_cb_data.status = SL_STATUS_UNKNOWN_PEER; return entry->function(event, &rx_cb_data, 0, entry->arg); } @@ -120,9 +129,10 @@ static sl_wifi_event_group_t get_event_group_from_event(sl_wifi_event_t event) else if (event == SL_WIFI_STATS_EVENT || event == SL_WIFI_STATS_AYSNC_EVENT || event == SL_WIFI_STATS_ADVANCE_EVENT || event == SL_WIFI_STATS_TEST_MODE_EVENT || event == SL_WIFI_STATS_MODULE_STATE_EVENT) { return SL_WIFI_STATS_RESPONSE_EVENTS; - } else if (event == SL_WIFI_BTR_RX_DATA_RECEIVE_CB || event == SL_WIFI_BTR_TX_DATA_STATUS_CB) { - return SL_WIFI_BTR_EVENTS; - } else + } else if (event == SL_WIFI_TRANSCEIVER_RX_DATA_RECEIVE_CB || event == SL_WIFI_TRANSCEIVER_TX_DATA_STATUS_CB) { + return SL_WIFI_TRANSCEIVER_EVENTS; + } else { event = SL_WIFI_INVALID_EVENT; + } return (sl_wifi_event_group_t)event; } diff --git a/components/service/bsd_socket/si91x_socket/sl_si91x_bsd_socket.c b/components/service/bsd_socket/si91x_socket/sl_si91x_bsd_socket.c index 3d08ed24a..f23971ce7 100644 --- a/components/service/bsd_socket/si91x_socket/sl_si91x_bsd_socket.c +++ b/components/service/bsd_socket/si91x_socket/sl_si91x_bsd_socket.c @@ -46,6 +46,7 @@ #include "select.h" #include "sl_bsd_utility.h" #include "sl_si91x_socket_constants.h" +#include /****************************************************** @@ -309,7 +310,7 @@ int accept(int socket_id, struct sockaddr *addr, socklen_t *addr_len) // Close the client socket and free resources if the connection fails close(client_socket_id); if (buffer != NULL) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } SET_ERROR_AND_RETURN(SI91X_UNDEFINED_ERROR); } @@ -337,7 +338,7 @@ int accept(int socket_id, struct sockaddr *addr, socklen_t *addr_len) // If addr_len is NULL or invalid value, just return the client socket ID if (addr_len == NULL || *addr_len <= 0) { if (buffer != NULL) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } return client_socket_id; } @@ -353,7 +354,7 @@ int accept(int socket_id, struct sockaddr *addr, socklen_t *addr_len) // Free resources and return the client socket ID if (buffer != NULL) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } return client_socket_id; } @@ -585,7 +586,7 @@ ssize_t recvfrom(int socket_id, void *buf, size_t buf_len, int flags, struct soc // Free the buffer if there was an error if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } SOCKET_VERIFY_STATUS_AND_RETURN(status, SL_STATUS_OK, SI91X_UNDEFINED_ERROR); @@ -621,7 +622,7 @@ ssize_t recvfrom(int socket_id, void *buf, size_t buf_len, int flags, struct soc } // Free the buffer - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return bytes_read; } @@ -801,7 +802,7 @@ int getsockopt(int socket_id, int option_level, int option_name, void *option_va // Check if option_value is valid SET_ERRNO_AND_RETURN_IF_TRUE(option_value == NULL, EFAULT); // Check if option_level is SOL_SOCKET - SET_ERRNO_AND_RETURN_IF_TRUE(option_level != SOL_SOCKET || option_length == NULL, EINVAL) + SET_ERRNO_AND_RETURN_IF_TRUE((option_level != SOL_SOCKET && option_level != SOL_TCP) || option_length == NULL, EINVAL) // Determine the requested socket option and handle it accordingly switch (option_name) { @@ -855,6 +856,13 @@ int getsockopt(int socket_id, int option_level, int option_name, void *option_va break; } + case TCP_ULP: { + // Retrieve and copy the socket ssl_bitmap + *option_length = GET_SAFE_MEMCPY_LENGTH(*option_length, sizeof(si91x_socket->ssl_bitmap)); + memcpy(option_value, &si91x_socket->ssl_bitmap, *option_length); + break; + } + default: { SET_ERROR_AND_RETURN(ENOPROTOOPT); } @@ -902,7 +910,8 @@ struct hostent *gethostbyname(const char *name) { sl_status_t status = SL_STATUS_OK; - if ((name == NULL) || (strlen(name) > SI91X_DNS_REQUEST_MAX_URL_LEN)) { + if ((name == NULL) + || (sl_strnlen((char *)(name), SI91X_DNS_REQUEST_MAX_URL_LEN + 1) > SI91X_DNS_REQUEST_MAX_URL_LEN)) { herrno = TRY_AGAIN; return NULL; } @@ -943,7 +952,8 @@ struct hostent *gethostbyname2(const char *name, int af) sl_status_t status = SL_STATUS_OK; // Validate the 'name' argument - if ((name == NULL) || (strlen(name) > SI91X_DNS_REQUEST_MAX_URL_LEN)) { + if ((name == NULL) + || (sl_strnlen((char *)(name), SI91X_DNS_REQUEST_MAX_URL_LEN + 1) > SI91X_DNS_REQUEST_MAX_URL_LEN)) { herrno = TRY_AGAIN; return NULL; } @@ -1063,7 +1073,7 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc NULL, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } SOCKET_VERIFY_STATUS_AND_RETURN(status, SL_STATUS_OK, SI91X_UNDEFINED_ERROR); @@ -1074,7 +1084,7 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc // Update the file descriptor sets total_fd_set_count = handle_select_response(response, readfds, writefds, exceptfds); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return total_fd_set_count; } diff --git a/components/service/http_client/inc/sl_http_client.h b/components/service/http_client/inc/sl_http_client.h index 2026c6f1f..69bc29194 100644 --- a/components/service/http_client/inc/sl_http_client.h +++ b/components/service/http_client/inc/sl_http_client.h @@ -173,6 +173,8 @@ typedef struct { tcp_connection_reuse; ///< Flag to use same TCP socket for connection. (Si91x chipsets does not support this feature). void *context; ///< User defined context. sl_http_client_event_handler_t event_handler; ///< Callback method. @ref sl_http_client_event_handler_t + uint8_t * + host_name; ///< The hostname of the HTTP server, as specified in the request header. If the hostname is NULL, then the ip_address is used instead of the hostname. } sl_http_client_request_t; /// HTTP client response structure diff --git a/components/service/http_client/si91x_socket/sl_http_client.c b/components/service/http_client/si91x_socket/sl_http_client.c index 696a27464..f96c42a7c 100644 --- a/components/service/http_client/si91x_socket/sl_http_client.c +++ b/components/service/http_client/si91x_socket/sl_http_client.c @@ -23,6 +23,7 @@ #include "sl_si91x_protocol_types.h" #include "sl_net_rsi_utility.h" #include "sl_si91x_http_client_callback_framework.h" +#include /****************************************************** * Macros @@ -576,11 +577,17 @@ static sl_status_t sli_si91x_send_http_client_request(sl_http_client_method_type http_client_request->buffer[http_buffer_offset] = '\0'; http_buffer_offset++; + // Check for HTTP_V_1.1 and Empty host name + if (client_internal->configuration.http_version == SL_HTTP_V_1_1 + && (strlen((char *)request->host_name) == 0 || request->host_name == NULL)) { + strcpy((char *)request->host_name, (char *)request->ip_address); + } + // Fill hostname http_buffer_offset += snprintf((char *)(http_client_request->buffer + http_buffer_offset), SI91X_HTTP_BUFFER_LEN - http_buffer_offset, "%s", - request->ip_address); + request->host_name); http_buffer_offset++; // Fill IP address @@ -619,23 +626,19 @@ static sl_status_t sli_si91x_send_http_client_request(sl_http_client_method_type // Copy total data length into buffer uint8_t temp_str[7] = { 0 }; convert_itoa(request->body_length, temp_str); - http_buffer_offset += snprintf((char *)(http_client_request->buffer + http_buffer_offset), - SI91X_HTTP_BUFFER_LEN - http_buffer_offset, - "%s", - temp_str); - http_buffer_offset++; + size_t temp_str_len = strlen((char *)temp_str); + memcpy(http_client_request->buffer + http_buffer_offset, temp_str, temp_str_len); + http_buffer_offset += temp_str_len; } else { // Fill HTTP post data - http_buffer_offset += snprintf((char *)(http_client_request->buffer + http_buffer_offset), - SI91X_HTTP_BUFFER_LEN - http_buffer_offset, - "%s", - request->body); - http_buffer_offset++; + memcpy(http_client_request->buffer + http_buffer_offset, request->body, request->body_length); + http_buffer_offset += request->body_length; } } // Check if request buffer is overflowed or resource length is overflowed - if (http_buffer_offset > SI91X_HTTP_BUFFER_LEN || strlen((char *)request->resource) > SI91X_MAX_HTTP_URL_SIZE) { + if (http_buffer_offset > SI91X_HTTP_BUFFER_LEN + || sl_strnlen((char *)request->resource, SI91X_MAX_HTTP_URL_SIZE + 1) > SI91X_MAX_HTTP_URL_SIZE) { free(http_client_request); return SL_STATUS_HAS_OVERFLOWED; } @@ -893,11 +896,17 @@ sl_status_t sl_http_client_send_request(const sl_http_client_t *client, const sl http_put_request->http_put_buffer[http_buffer_offset] = '\0'; http_buffer_offset++; + // Check for HTTP_V_1.1 and Empty host name + if (http_client_handle.configuration.http_version == SL_HTTP_V_1_1 + && (strlen((char *)request->host_name) == 0 || request->host_name == NULL)) { + strcpy((char *)request->host_name, (char *)request->ip_address); + } + // Fill hostname http_buffer_offset += snprintf((char *)(http_put_request->http_put_buffer + http_buffer_offset), SI91X_HTTP_CLIENT_PUT_MAX_BUFFER_LENGTH - http_buffer_offset, "%s", - request->ip_address); + request->host_name); http_buffer_offset++; // Fill IP address diff --git a/components/service/mdns/inc/sl_mdns.h b/components/service/mdns/inc/sl_mdns.h index feca7e1cd..e25504a0c 100644 --- a/components/service/mdns/inc/sl_mdns.h +++ b/components/service/mdns/inc/sl_mdns.h @@ -82,7 +82,7 @@ typedef struct { sl_mdns_protocol_t protocol; ///< Protocol to use for MDNS from @ref sl_mdns_protocol_t sl_ip_version_t type; ///< IP version to use for MDNS from @ref sl_ip_version_t char host_name - [32]; ///< Host Name to use for the MDNS Instance. The string length should not exceed 32 including NULL terminator + [32]; ///< Host Name to use for the MDNS Instance. The host name Should contain dot(.) at the end, For example "wiseconnect.local.". The string length should not exceed 32 including NULL terminator. } sl_mdns_configuration_t; /// MDNS interface diff --git a/components/service/mdns/si91x/sl_mdns.c b/components/service/mdns/si91x/sl_mdns.c index cb11d6e91..f98c43f0c 100644 --- a/components/service/mdns/si91x/sl_mdns.c +++ b/components/service/mdns/si91x/sl_mdns.c @@ -61,7 +61,7 @@ static void sli_si91x_clean_service_handle(sl_wifi_buffer_t *service_handle) free(service->instance_name); free(service->service_type); free(service->service_message); - sl_si91x_host_free_buffer(service_handle, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(service_handle); return; } @@ -92,7 +92,7 @@ static void sli_si91x_clean_mdns_handle(sl_mdns_t *mdns) while (interface != NULL) { block = interface; interface = interface->node.node; - sl_si91x_host_free_buffer(block, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(block); } return; @@ -154,7 +154,7 @@ sl_status_t sl_mdns_deinit(sl_mdns_t *mdns) NULL, NULL); - clean_mdns_handle(mdns); + sli_si91x_clean_mdns_handle(mdns); memset(mdns, 0, sizeof(sl_mdns_t)); return SL_STATUS_OK; } diff --git a/components/service/mqtt/inc/sl_mqtt_client.h b/components/service/mqtt/inc/sl_mqtt_client.h index 3017cb767..19a339183 100644 --- a/components/service/mqtt/inc/sl_mqtt_client.h +++ b/components/service/mqtt/inc/sl_mqtt_client.h @@ -76,7 +76,6 @@ sl_status_t sl_mqtt_client_deinit(sl_mqtt_client_t *client); * In case of last_will_message parameter, values given in each connect() call would be considered. If value of last_will_message parameter is given as null, then no will message would be sent to the broker parameter. * @note * Only is_clean_session, credential_id, client_id, client_id_length of sl_mqtt_client_configuration_t are considered. - * If sl_mqtt_client_connect() fails, sl_mqtt_client_disconnect() should be called before calling connect again. * Topic length of last_will_message should be less than SI91X_MQTT_CLIENT_WILL_TOPIC_MAXIMUM_LENGTH. * Client ID length should be less than SI91X_MQTT_CLIENT_CLIENT_ID_MAXIMUM_LENGTH. * Username length should be less than SI91X_MQTT_CLIENT_USERNAME_MAXIMUM_LENGTH. diff --git a/components/service/mqtt/inc/sl_mqtt_client_types.h b/components/service/mqtt/inc/sl_mqtt_client_types.h index 340744366..316d27bff 100644 --- a/components/service/mqtt/inc/sl_mqtt_client_types.h +++ b/components/service/mqtt/inc/sl_mqtt_client_types.h @@ -48,7 +48,7 @@ typedef enum MQTTStatus { typedef enum { SL_MQTT_QOS_LEVEL_0, ///< MQTT QoS level 0 SL_MQTT_QOS_LEVEL_1, ///< MQTT QoS level 1 - SL_MQTT_QOS_LEVEL_2, ///< MQTT QoS level 2 (not currently supported) + SL_MQTT_QOS_LEVEL_2 ///< MQTT QoS level 2 (not currently supported) } sl_mqtt_qos_t; /// MQTT Client connection states @@ -56,8 +56,9 @@ typedef enum { SL_MQTT_CLIENT_DISCONNECTED, ///< Initial state. SL_MQTT_CLIENT_TA_INIT, ///< Attains this state when TA MQTT is initialized successfully. SL_MQTT_CLIENT_CONNECTION_FAILED, ///< Attains this state when the connection to MQTT broker failed. - SL_MQTT_CLIENT_CONNECTED, ///< Connection established with MQTT broker - SL_MQTT_CLIENT_TA_DISCONNECTED, // Attains this state when TA is disconnected from broker but TA deinit is not yet called. + SL_MQTT_CLIENT_CONNECTED, ///< Connection established with MQTT broker. + SL_MQTT_CLIENT_REMOTE_TERMINATE, ///< Attains this state when the connection is terminated by the broker. + SL_MQTT_CLIENT_TA_DISCONNECTED // Attains this state when TA is disconnected from broker but TA deinit is not yet called. } sl_mqtt_client_connection_state_t; /// MQTT Protocol version @@ -74,7 +75,7 @@ typedef enum { SL_MQTT_CLIENT_MESSAGED_RECEIVED_EVENT, ///< MQTT client message received event. SL_MQTT_CLIENT_SUBSCRIBED_EVENT, ///< MQTT client subscribed event. SL_MQTT_CLIENT_UNSUBSCRIBED_EVENT, ///< MQTT client unsubscribed event. - SL_MQTT_CLIENT_ERROR_EVENT, ///< MQTT client error event. + SL_MQTT_CLIENT_ERROR_EVENT ///< MQTT client error event. } sl_mqtt_client_event_t; /// MQTT Client error status @@ -84,9 +85,16 @@ typedef enum { SL_MQTT_CLIENT_SUBSCRIBE_FAILED, ///< MQTT client subscribe failed status. SL_MQTT_CLIENT_UNSUBSCRIBED_FAILED, ///< MQTT client unsubscribe failed status. SL_MQTT_CLIENT_DISCONNECT_FAILED, ///< MQTT client disconnect failed status. - SL_MQTT_CLIENT_UNKNKOWN_ERROR, ///< MQTT client unknown error status. + SL_MQTT_CLIENT_UNKNKOWN_ERROR ///< MQTT client unknown error status. } sl_mqtt_client_error_status_t; +/// MQTT Client disconnection reason +typedef enum { + SL_MQTT_CLIENT_REMOTE_TERMINATE_DISCONNECTION, ///< Disconnection due to remote termination. + SL_MQTT_CLIENT_WLAN_DISCONNECTION, ///< Disconnection due to WLAN disconnection. + SL_MQTT_CLIENT_USER_INITIATED_DISCONNECTION ///< User initiated disconnection. +} sl_mqtt_client_disconnection_reason_t; + /** @} */ /** diff --git a/components/service/mqtt/si91x/sl_mqtt_client.c b/components/service/mqtt/si91x/sl_mqtt_client.c index f85da81f3..cc6ae8de2 100644 --- a/components/service/mqtt/si91x/sl_mqtt_client.c +++ b/components/service/mqtt/si91x/sl_mqtt_client.c @@ -740,10 +740,31 @@ sl_status_t sli_si91x_mqtt_event_handler(sl_status_t status, { sl_mqtt_client_error_status_t error_status = sli_si91x_get_event_error_status(sdk_context->event); + bool is_error_event = false; + uint8_t *event_data = NULL; + sl_mqtt_client_disconnection_reason_t reason = { 0 }; + switch (sdk_context->event) { case SL_MQTT_CLIENT_CONNECTED_EVENT: { - sdk_context->client->state = (status == SL_STATUS_OK) ? SL_MQTT_CLIENT_CONNECTED - : SL_MQTT_CLIENT_CONNECTION_FAILED; + + if (status == SL_STATUS_OK) { + sdk_context->client->state = SL_MQTT_CLIENT_CONNECTED; + break; + } + + is_error_event = true; + // This state updates is necessary as we need to send TA disconnect even in case of connection failure. + sdk_context->client->state = SL_MQTT_CLIENT_CONNECTION_FAILED; + // TA BUG: TA requires disconnection call if connection fails for any reason. Please remove the below code once TA fixed the issue. + sl_status_t status = sl_mqtt_client_disconnect(sdk_context->client, SI91X_MQTT_CLIENT_DISCONNECT_TIMEOUT); + + if (status != SL_STATUS_OK) { + SL_DEBUG_LOG( + "Failed to disconnect the client after failed connection attempt. User need to call disconnect explicitly"); + } else { + sdk_context->client->state = SL_MQTT_CLIENT_DISCONNECTED; + } + break; } @@ -751,6 +772,7 @@ sl_status_t sli_si91x_mqtt_event_handler(sl_status_t status, if (status != SL_STATUS_OK) { // Free subscription passed in subscribe() call if subscription call failed. free(sdk_context->sdk_data); + is_error_event = true; break; } @@ -762,6 +784,7 @@ sl_status_t sli_si91x_mqtt_event_handler(sl_status_t status, case SL_MQTT_CLIENT_UNSUBSCRIBED_EVENT: { if (status != SL_STATUS_OK) { + is_error_event = true; break; } @@ -801,10 +824,37 @@ sl_status_t sli_si91x_mqtt_event_handler(sl_status_t status, } case SL_MQTT_CLIENT_DISCONNECTED_EVENT: { - sdk_context->client->state = (status == SL_STATUS_OK) ? SL_MQTT_CLIENT_DISCONNECTED : sdk_context->client->state; + // If it is a disconnect packet and status is not success, it shall be user initiated disconnect failure. + if (rx_packet->command == RSI_WLAN_REQ_EMB_MQTT_CLIENT && status != SL_STATUS_OK) { + is_error_event = true; + break; + } - // Free all subscriptions as we have disconnected from mqtt broker - if (status == SL_STATUS_OK) { + sl_status_t disconnection_status = SL_STATUS_FAIL; + + if (rx_packet->command == RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE) { + disconnection_status = sl_mqtt_client_disconnect(sdk_context->client, SI91X_MQTT_CLIENT_DISCONNECT_TIMEOUT); + + // TA BUG: TA requires disconnection call if remote termination is received. Please remove the below code once TA fixed the issue. + // If the disconnect call fails, we can't set the state to disconnected. + if (disconnection_status != SL_STATUS_OK) { + SL_DEBUG_LOG( + "Failed to disconnect the client after remote termination. User need to call disconnect explicitly"); + break; + } + + reason = SL_MQTT_CLIENT_REMOTE_TERMINATE_DISCONNECTION; + event_data = &reason; + } else { + reason = (rx_packet->command == RSI_WLAN_RSP_JOIN) ? SL_MQTT_CLIENT_WLAN_DISCONNECTION + : SL_MQTT_CLIENT_USER_INITIATED_DISCONNECTION; + event_data = &reason; + } + + if (rx_packet->command == RSI_WLAN_RSP_JOIN || rx_packet->command == RSI_WLAN_REQ_EMB_MQTT_CLIENT + || (rx_packet->command == RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE && disconnection_status == SL_STATUS_OK)) { + sdk_context->client->state = SL_MQTT_CLIENT_DISCONNECTED; + // Free all subscriptions as we have disconnected from mqtt broker sli_si91x_remove_and_free_all_subscriptions(sdk_context->client); } @@ -816,8 +866,8 @@ sl_status_t sli_si91x_mqtt_event_handler(sl_status_t status, } sdk_context->client->client_event_handler(sdk_context->client, - status != SL_STATUS_OK ? SL_MQTT_CLIENT_ERROR_EVENT : sdk_context->event, - status != SL_STATUS_OK ? &error_status : NULL, + is_error_event ? SL_MQTT_CLIENT_ERROR_EVENT : sdk_context->event, + is_error_event ? &error_status : event_data, sdk_context->user_context); // Free the sdk_context after event handler is triggered. diff --git a/components/service/network_manager/inc/sl_net.h b/components/service/network_manager/inc/sl_net.h index a17f4a8d9..b831b6c94 100644 --- a/components/service/network_manager/inc/sl_net.h +++ b/components/service/network_manager/inc/sl_net.h @@ -34,6 +34,16 @@ /** * \addtogroup NET_INTERFACE_FUNCTIONS Network Interface + * + * @note Stack overflows may occur when invoking functions or using your own variables or data structures while handling callbacks. + * Configure the stack size by modifying the pre-processor macro `SL_SI91X_EVENT_HANDLER_STACK_SIZE` as + * per your application's requirements. See [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-developers-guide-prog-preprocessor-build-settings/list-of-preprocessor-build-settings) + * for the instructions in modifying a pre-processor macro. + * @note Event/Callback handlers must not contain function calls or code which can block or delay the execution of + * the event/callback handler as it will cause all the other events to queue up and delay the execution of + * other events since all the events are invoked and handled from a single thread. + * @note Do not call any synchronous SDK APIs from within the Event/Callback handlers. + * * \ingroup SL_NET_FUNCTIONS * @{ */ @@ -295,7 +305,7 @@ sl_status_t sl_net_inet_addr(const char *addr, uint32_t *value); * @param[in] interface * Interface identified by @ref sl_net_interface_t * @param[in] ip_address - * Multicast IP address of type @ref sl_ip_address_t + * Multicast IP address of type [sl_ip_address_t](../wiseconnect-api-reference-guide-common/ip-addresses#sl-ip-address-t) * @return * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. ******************************************************************************/ @@ -310,7 +320,7 @@ sl_status_t sl_net_join_multicast_address(sl_net_interface_t interface, const sl * @param[in] interface * Interface identified by @ref sl_net_interface_t * @param[in] ip_address - * Multicast IP address of type @ref sl_ip_address_t + * Multicast IP address of type [sl_ip_address_t](../wiseconnect-api-reference-guide-common/ip-addresses#sl-ip-address-t) * @return * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. ******************************************************************************/ @@ -334,8 +344,3 @@ sl_status_t sl_net_wifi_ap_init(sl_net_interface_t interface, sl_status_t sl_net_wifi_ap_deinit(sl_net_interface_t interface); sl_status_t sl_net_wifi_ap_up(sl_net_interface_t interface, sl_net_profile_id_t profile_id); sl_status_t sl_net_wifi_ap_down(sl_net_interface_t interface); -sl_status_t sl_net_wifi_btr_init(sl_net_interface_t interface, - const void *configuration, - void *context, - sl_net_event_handler_t event_handler); -sl_status_t sl_net_wifi_btr_up(sl_net_interface_t interface, sl_net_profile_id_t profile_id); diff --git a/components/service/network_manager/inc/sl_net_constants.h b/components/service/network_manager/inc/sl_net_constants.h index b3fd5a138..1ee5f6e8f 100644 --- a/components/service/network_manager/inc/sl_net_constants.h +++ b/components/service/network_manager/inc/sl_net_constants.h @@ -51,7 +51,6 @@ typedef enum { SL_NET_THREAD_INTERFACE = (4 << 3), ///< Thread Interface (not currently supported) SL_NET_BLUETOOTH_INTERFACE = (5 << 3), ///< Bluetooth Interface (not currently supported) SL_NET_ZWAVE_INTERFACE = (6 << 3), ///< Z-Wave Interface (not currently supported) - SL_NET_WIFI_BTR_INTERFACE = (7 << 3), ///< Wi-Fi Basic Transceiver Mode } sl_net_interface_t; /** @} */ @@ -74,9 +73,6 @@ typedef enum { /// Zwave Interface #define SL_NET_ZWAVE_INTERFACE (6 << 3) -/// Wi-Fi Basic Transceiver Mode -#define SL_NET_WIFI_BTR_INTERFACE (7 << 3) - /** \addtogroup SL_NET_CONSTANTS Constants * @{ */ @@ -138,7 +134,6 @@ typedef enum { SL_NET_DEFAULT_ETHERNET_PROFILE_ID = SL_NET_PROFILE_ID_0, ///< Ethernet Default Profile (not currently supported) SL_NET_DEFAULT_THREAD_PROFILE_ID = SL_NET_PROFILE_ID_0, ///< Thread Default Profile (not currently supported) SL_NET_DEFAULT_ZWAVE_PROFILE_ID = SL_NET_PROFILE_ID_0, ///< Zwave Default Profile (not currently supported) - SL_NET_DEFAULT_WIFI_BTR_PROFILE_ID = SL_NET_PROFILE_ID_0, ///< Wi-Fi BTR Default Profile } sl_net_profile_id_t; /// Enumeration of network credential types. diff --git a/components/service/network_manager/inc/sl_net_dns.h b/components/service/network_manager/inc/sl_net_dns.h index d237f5a43..146e45187 100644 --- a/components/service/network_manager/inc/sl_net_dns.h +++ b/components/service/network_manager/inc/sl_net_dns.h @@ -28,10 +28,13 @@ /** * Resolve given host name to IP address. + * @pre Pre-conditions: + * - + * Before calling this API, [SL_SI91X_TCP_IP_FEAT_DNS_CLIENT](../wiseconnect-api-reference-guide-si91x-driver/si91-x-tcp-ip-feature-bitmap#sl-si91-x-tcp-ip-feat-dns-client) bit should be enabled in TCP/IP feature bitmap. * @param[in] host_name Host name which needs to be resolved. * @param[in] timeout timeout in millisecs. * @param[in] dns_resolution_ip DNS resolution by IP of type @ref sl_net_dns_resolution_ip_type_t - * @param[out] ip_address IP address object to store resolved IP address of type @ref sl_ip_address_t + * @param[out] ip_address IP address object to store resolved IP address of type [sl_ip_address_t](../wiseconnect-api-reference-guide-common/ip-addresses#sl-ip-address-t) * @return * sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details. * @note If timeout value is greater than zero, caller would be blocked till timeout milliseconds to get the response. diff --git a/components/service/network_manager/inc/sl_net_wifi_types.h b/components/service/network_manager/inc/sl_net_wifi_types.h index 9a3b0456a..9b866c624 100644 --- a/components/service/network_manager/inc/sl_net_wifi_types.h +++ b/components/service/network_manager/inc/sl_net_wifi_types.h @@ -37,13 +37,6 @@ typedef struct { sl_net_ip_configuration_t ip; ///< Network IP configuration of type @ref sl_net_ip_configuration_t } sl_net_wifi_ap_profile_t; -/*! @cond SL_SI91X_WIFI_BTR_MODE */ -/// Network Wi-Fi BTR Profile -typedef struct { - sl_wifi_btr_configuration_t config; ///< Wi-Fi BTR configuration of type @ref sl_wifi_btr_configuration_t -} sl_net_wifi_btr_profile_t; -/*! @endcond SL_SI91X_WIFI_BTR_MODE */ - /// Network Wi-Fi PSK credential entry typedef struct { sl_net_credential_type_t type; ///< Network credential type of @ref sl_net_credential_type_t diff --git a/components/service/network_manager/si91x/sl_net_si91x.c b/components/service/network_manager/si91x/sl_net_si91x.c index 3805778fd..e14fb10d8 100644 --- a/components/service/network_manager/si91x/sl_net_si91x.c +++ b/components/service/network_manager/si91x/sl_net_si91x.c @@ -77,12 +77,6 @@ sl_status_t sl_net_wifi_client_init(sl_net_interface_t interface, sl_status_t sl_net_wifi_client_deinit(sl_net_interface_t interface) { UNUSED_PARAMETER(interface); - - // Check if the client interface is not up - if (!sl_wifi_is_interface_up(SL_WIFI_CLIENT_INTERFACE)) { - return SL_STATUS_WIFI_INTERFACE_NOT_UP; - } - return sl_wifi_deinit(); } @@ -97,7 +91,7 @@ sl_status_t sl_net_wifi_client_up(sl_net_interface_t interface, sl_net_profile_i VERIFY_STATUS_AND_RETURN(status); // Connect to the Wi-Fi network - status = sl_wifi_connect(SL_WIFI_CLIENT_INTERFACE, &profile.config, 15000); + status = sl_wifi_connect(SL_WIFI_CLIENT_INTERFACE, &profile.config, 18000); VERIFY_STATUS_AND_RETURN(status); // Configure the IP address settings @@ -137,11 +131,6 @@ sl_status_t sl_net_wifi_ap_init(sl_net_interface_t interface, sl_status_t sl_net_wifi_ap_deinit(sl_net_interface_t interface) { UNUSED_PARAMETER(interface); - - if (!sl_wifi_is_interface_up(SL_WIFI_AP_INTERFACE)) { - return SL_STATUS_WIFI_INTERFACE_NOT_UP; - } - return sl_wifi_deinit(); } @@ -175,41 +164,6 @@ sl_status_t sl_net_wifi_ap_down(sl_net_interface_t interface) return sl_wifi_stop_ap(SL_WIFI_AP_INTERFACE); } -sl_status_t sl_net_wifi_btr_init(sl_net_interface_t interface, - const void *configuration, - void *context, - sl_net_event_handler_t event_handler) -{ - UNUSED_PARAMETER(interface); - UNUSED_PARAMETER(context); - sl_status_t status = SL_STATUS_FAIL; - - // Set the user-defined event handler for BTR mode - sl_si91x_register_event_handler(event_handler); - - status = sl_wifi_init(configuration, NULL, sl_wifi_default_event_handler); - - return status; -} - -sl_status_t sl_net_wifi_btr_up(sl_net_interface_t interface, sl_net_profile_id_t profile_id) -{ - UNUSED_PARAMETER(interface); - sl_status_t status; - sl_net_wifi_btr_profile_t profile; - - // Get the BTR profile using the provided profile_id - status = sl_net_get_profile(SL_NET_WIFI_BTR_INTERFACE, profile_id, &profile); - VERIFY_STATUS_AND_RETURN(status); - - status = sl_wifi_btr_up(SL_WIFI_BTR_INTERFACE, &profile.config); - VERIFY_STATUS_AND_RETURN(status); - - // Set the BTR profile - status = sl_net_set_profile(SL_NET_WIFI_BTR_INTERFACE, profile_id, &profile); - return status; -} - sl_status_t sl_net_join_multicast_address(sl_net_interface_t interface, const sl_ip_address_t *ip_address) { return sli_si91x_send_multicast_request((sl_wifi_interface_t)interface, ip_address, SL_WIFI_MULTICAST_JOIN); @@ -285,7 +239,7 @@ sl_status_t sl_net_host_get_by_name(const char *host_name, // Check if the command failed and free the buffer if it was allocated if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -295,6 +249,6 @@ sl_status_t sl_net_host_get_by_name(const char *host_name, // Convert the SI91X DNS response to the sl_ip_address format convert_si91x_dns_response(sl_ip_address, dns_response); - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return SL_STATUS_OK; } diff --git a/components/service/network_manager/src/sl_net.c b/components/service/network_manager/src/sl_net.c index d0e05c9ad..b05636f43 100644 --- a/components/service/network_manager/src/sl_net.c +++ b/components/service/network_manager/src/sl_net.c @@ -66,12 +66,6 @@ sl_status_t sl_net_init(sl_net_interface_t interface, return sl_net_thread_init(interface, configuration, network_context, event_handler); break; #endif - case SL_NET_WIFI_BTR_INTERFACE: - if (configuration == NULL) { - configuration = (const void *)&sl_wifi_default_btr_configuration; - } - sl_net_set_profile(SL_NET_WIFI_BTR_INTERFACE, SL_NET_DEFAULT_WIFI_BTR_PROFILE_ID, &DEFAULT_WIFI_BTR_PROFILE); - return sl_net_wifi_btr_init(interface, configuration, network_context, event_handler); default: return SL_STATUS_NOT_SUPPORTED; } @@ -124,8 +118,6 @@ sl_status_t sl_net_up(sl_net_interface_t interface, sl_net_profile_id_t profile_ return sl_net_thread_up(interface, profile_id); break; #endif - case SL_NET_WIFI_BTR_INTERFACE: - return sl_net_wifi_btr_up(interface, profile_id); default: return SL_STATUS_NOT_SUPPORTED; } diff --git a/components/service/network_manager/src/sl_net_basic_profiles.c b/components/service/network_manager/src/sl_net_basic_profiles.c index 18487e7e1..9c974aabc 100644 --- a/components/service/network_manager/src/sl_net_basic_profiles.c +++ b/components/service/network_manager/src/sl_net_basic_profiles.c @@ -23,11 +23,9 @@ #define MAX_WIFI_CLIENT_PROFILES 2 #define MAX_WIFI_AP_PROFILES 2 -#define MAX_WIFI_BTR_PROFILES 2 static sl_net_wifi_client_profile_t wifi_client_profiles[MAX_WIFI_CLIENT_PROFILES] = { 0 }; static sl_net_wifi_ap_profile_t wifi_ap_profiles[MAX_WIFI_AP_PROFILES] = { 0 }; -static sl_net_wifi_btr_profile_t wifi_btr_profiles[MAX_WIFI_BTR_PROFILES] = { 0 }; sl_status_t sl_net_set_profile(sl_net_interface_t interface, sl_net_profile_id_t profile_id, @@ -51,13 +49,6 @@ sl_status_t sl_net_set_profile(sl_net_interface_t interface, } memcpy(&wifi_ap_profiles[profile_id], (sl_net_wifi_ap_profile_t *)profile, sizeof(sl_net_wifi_ap_profile_t)); return SL_STATUS_OK; - - case SL_NET_WIFI_BTR_INTERFACE: - if (profile_id >= MAX_WIFI_BTR_PROFILES) { - return SL_STATUS_INVALID_INDEX; - } - memcpy(&wifi_btr_profiles[profile_id], (sl_net_wifi_btr_profile_t *)profile, sizeof(sl_net_wifi_btr_profile_t)); - return SL_STATUS_OK; #endif default: return SL_STATUS_NOT_SUPPORTED; @@ -84,13 +75,6 @@ sl_status_t sl_net_get_profile(sl_net_interface_t interface, sl_net_profile_id_t } memcpy(profile, &wifi_ap_profiles[profile_id], sizeof(sl_net_wifi_ap_profile_t)); return SL_STATUS_OK; - - case SL_NET_WIFI_BTR_INTERFACE: - if (profile_id >= MAX_WIFI_BTR_PROFILES) { - return SL_STATUS_INVALID_INDEX; - } - memcpy(profile, &wifi_btr_profiles[profile_id], sizeof(sl_net_wifi_btr_profile_t)); - return SL_STATUS_OK; #endif default: diff --git a/components/service/network_manager/src/sl_net_for_lwip.c b/components/service/network_manager/src/sl_net_for_lwip.c index 4dfc54772..af4cf5d5f 100644 --- a/components/service/network_manager/src/sl_net_for_lwip.c +++ b/components/service/network_manager/src/sl_net_for_lwip.c @@ -69,25 +69,6 @@ sl_status_t sl_net_wifi_ap_down(sl_net_interface_t interface) return SL_STATUS_NOT_SUPPORTED; } -sl_status_t sl_net_wifi_btr_init(sl_net_interface_t interface, - const void *configuration, - void *context, - sl_net_event_handler_t event_handler) -{ - UNUSED_PARAMETER(interface); - UNUSED_PARAMETER(configuration); - UNUSED_PARAMETER(context); - UNUSED_PARAMETER(event_handler); - return SL_STATUS_NOT_SUPPORTED; -} - -sl_status_t sl_net_wifi_btr_up(sl_net_interface_t interface, sl_net_profile_id_t profile_id) -{ - UNUSED_PARAMETER(interface); - UNUSED_PARAMETER(profile_id); - return SL_STATUS_NOT_SUPPORTED; -} - sl_status_t sl_net_wifi_client_init(sl_net_interface_t interface, const void *configuration, void *context, diff --git a/components/service/sl_http_server/src/sl_http_server.c b/components/service/sl_http_server/src/sl_http_server.c index 826317a69..28b2aad16 100644 --- a/components/service/sl_http_server/src/sl_http_server.c +++ b/components/service/sl_http_server/src/sl_http_server.c @@ -30,9 +30,8 @@ #include #include -#define BACK_LOG 10 +#define BACK_LOG 1 ///< As we are processing one request at a time, the backlog is set to one. #define SL_HIGH_PERFORMANCE_SOCKET BIT(7) -#define MAX_CONNECTIONS 10 #define HTTP_MAX_HEADER_LENGTH (MAX_HEADER_BUFFER_LENGTH - 1) #define HTTP_CONNECTION_STATUS_HEADER "Connection: close\r\n" @@ -350,10 +349,9 @@ static void sli_http_server(const void *arg) SL_DEBUG_LOG("\r\nListening on Local Port : %d\r\n", server_address.sin_port); while (1) { - client_socket = sl_si91x_accept_async(server_socket, client_accept_callback); - if (client_socket != SL_STATUS_IN_PROGRESS) { + socket_return_value = sl_si91x_accept_async(server_socket, client_accept_callback); + if (socket_return_value != SI91X_NO_ERROR) { SL_DEBUG_LOG("\r\nSocket accept failed with bsd error: %d\r\n", errno); - return; } // Wait for small amount of time to check if HTTP server stop is called @@ -366,8 +364,8 @@ static void sli_http_server(const void *arg) // HTTP_SERVER_STOP_CMD flag is set server_handle->server_socket = -1; SL_DEBUG_LOG("\r\nIn http server thread: Got Stop Command\r\n"); - osEventFlagsSet(server_handle->http_server_id, HTTP_SERVER_EXIT); close(server_socket); + osEventFlagsSet(server_handle->http_server_id, HTTP_SERVER_EXIT); break; } if (result & HTTP_SERVER_CONNECT_SUCCESS) { diff --git a/components/service/sntp/si91x/sl_sntp.c b/components/service/sntp/si91x/sl_sntp.c index 025756a77..41275b3a3 100644 --- a/components/service/sntp/si91x/sl_sntp.c +++ b/components/service/sntp/si91x/sl_sntp.c @@ -58,7 +58,7 @@ sl_status_t sli_si91x_sntp_event_handler(sl_si91x_queue_packet_t *data) } osMutexRelease(sntp_mutex); - sl_si91x_host_free_buffer(sdk_context, SL_WIFI_CONTROL_BUFFER); + sl_si91x_host_free_buffer(sdk_context); return SL_STATUS_OK; } @@ -171,7 +171,7 @@ sl_status_t sl_sntp_client_get_time(uint8_t *data, uint16_t data_length, uint32_ (void *)sdk_context, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -184,7 +184,7 @@ sl_status_t sl_sntp_client_get_time(uint8_t *data, uint16_t data_length, uint32_ memcpy(data, packet->data, length); status = SL_STATUS_OK; - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -229,7 +229,7 @@ sl_status_t sl_sntp_client_get_time_date(uint8_t *data, uint16_t data_length, ui (void *)sdk_context, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -242,7 +242,7 @@ sl_status_t sl_sntp_client_get_time_date(uint8_t *data, uint16_t data_length, ui memcpy(data, packet->data, length); status = SL_STATUS_OK; - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } @@ -287,7 +287,7 @@ sl_status_t sl_sntp_client_get_server_info(sl_sntp_server_info_t *data, uint32_t (void *)sdk_context, &buffer); if ((status != SL_STATUS_OK) && (buffer != NULL)) { - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); } VERIFY_STATUS_AND_RETURN(status); @@ -300,7 +300,7 @@ sl_status_t sl_sntp_client_get_server_info(sl_sntp_server_info_t *data, uint32_t memcpy(data, packet->data, length); status = SL_STATUS_OK; - sl_si91x_host_free_buffer(buffer, SL_WIFI_RX_FRAME_BUFFER); + sl_si91x_host_free_buffer(buffer); return status; } diff --git a/connectivity_firmware/SiWG917-B.2.10.1.3.0.7.rps b/connectivity_firmware/SiWG917-B.2.10.1.3.0.7.rps deleted file mode 100644 index 4353541b7..000000000 Binary files a/connectivity_firmware/SiWG917-B.2.10.1.3.0.7.rps and /dev/null differ diff --git a/connectivity_firmware/SiWG917-B.2.11.1.0.0.7.rps b/connectivity_firmware/SiWG917-B.2.11.1.0.0.7.rps new file mode 100644 index 000000000..c666cd136 Binary files /dev/null and b/connectivity_firmware/SiWG917-B.2.11.1.0.0.7.rps differ diff --git a/docs/release-notes/index_ncp.md b/docs/release-notes/index_ncp.md index 7979a8326..ddbbb4b88 100644 --- a/docs/release-notes/index_ncp.md +++ b/docs/release-notes/index_ncp.md @@ -1,4 +1,498 @@ -# **WiSeConnect3\_SDK\_3.1.4 NCP Release Notes**    +# **WiSeConnect3\_SDK\_3.2.0 NCP Release Notes** + +## **Release Details** + +| **Item**| **Details**| +| :- | :- | +| Release date | May 7th, 2024 | +| SDK Version | 3.2.0 | +| Firmware Version | 1711.2.11.1.0.0.7 | +| GSDK Version | 4.4.3 | +| Package Name | WiSeConnect3\_SDK\_3.2.0 | +| Supported RTOS | FreeRTOS | +| Operating Modes Supported | Wi-Fi STA, Wi-Fi AP, Wi-Fi STA+BLE, Wi-Fi STA+AP | + +- SiWx917 release consists of two components + - Wireless Firmware - SiWx917 Firmware Binary available as SiWG917-B.2.11.1.0.0.7.rps + - Wiseconnect3 Library - Wiseconnect3 SDK library runs on the external host in NCP mode. + +## **Supported Hardware OPNs** + +- Expansion kits: SiWx917-EB4346A (based on Radio board SiWx917-4346A + 8045A Co-Processor Adapter board) +- Expansion Kits: Si917-8036B (Beta version) +- IC OPNs: SiWN917M100LGTBA (Wi-Fi 6 NCP IC, QFN 7x7, 2.4 GHz, 4MB stacked flash, -40 to +85C​) + +## **Supported Features** + +### **System** + +- **Operating Modes** + - Wi-Fi STA (802.11ax, 802.11n), Wi-Fi 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + BLE +- **Security** + - Secure Boot, Secure Key storage and HW device identity with PUF, Secure Zone, Secure XIP (Execution in place) from flash, Secure Attestation, Anti Rollback, Secure Debug. Flash Protection + - Secure firmware upgrade options: + - Firmware loading through UART, SPI Interface + - Secure Over the Air (OTA) Upgrade + - Firmware update via Bootloader +- **Crypto Support** + - Crypto API's for Hardware Accelerators: + - Advanced Encryption Standard (AES) 128/256/192, Secure Hash Algorithm (SHA) 256/384/512, Hash Message Authentication Code (HMAC), Random Number Generator (RNG), SHA3, AES-Galois Counter Mode (GCM)/ Cipher based Message Authentication Code (CMAC), ChaCha-poly, True Random Number Generator (TRNG) + - Software Accelerators: RSA, ECC + - Wrapping Secret keys (Symmetric crypto). + - Added ECDSA Sign and Verify APIs. +- **System Power Save** + - Deep Sleep with RAM retention and without RAM retention + - Wireless Power Save: Connected Sleep (Wi-Fi Standby Associated), BLE Advertising with powersave, BLE Scan with powersave , BLE connection with powersave. Only Max PSP power save mode is supported in BLE + +### **Wi-Fi** + +- **Wi-Fi Protocols** + - IEEE 802.11 b/g/n/ax (2.4GHz) +- **Access Point (AP) Mode** + - 4 Client Support, Hidden SSID Mode, Auto Channel Selection, Scan in AP mode (Alpha) + - Wi-Fi Security + - WPA2 Personal, WPA3 Personal (H2E method only) (Alpha), WPA Mixed mode (WPA/WPA2) +- **Wi-Fi Scan** + - Selective Scan, Active/Passive Scan (world domain) +- **Wi-Fi STA (Security Modes)** + - Open Mode, WPA2 Personal, WPA2 Enhancements, WPA3 Personal, Mixed Mode (WPA/WPA2), WPA3 Personal Transition Mode (WPA2/WPA3) +- **WPA2 Enterprise security (STA)** + - Method + - PEAP/TTLS/TLS 1.0/TLS 1.2/FAST/LEAP +- **Wi-Fi STA Rejoin** +- **Wi-Fi STA Roaming** + - BG Scan, OKC (Opportunistic Key caching), PMK (Pairwise Master Key) caching, Pre-Authentication +- **Wi-Fi Protocol Power Save** + - Deep sleep (unconnected state), Max PSP, Enhanced Max PSP, Fast PSP, TWT +- **QoS** + - WMM-QoS +- **Wi-Fi 6 Feature** + - MUMIMO (DL), OFDMA (UL/DL), iTWT, TWT I-Frame & TWT Enhancements (Automatic TWT Configuration), BSS coloring, MBSSID +- **Wi-Fi Concurrency** + - AP+STA (Same channel) +- **Wi-Fi Band/Channels** + - 2.4GHz CH1-11, 2.4GHz CH1-13, 2.4GHz CH1-14 +- **Known Security Vulnerabilities Handled** + - WPA2 KRACK Attacks, Fragment and Forge Vulnerability + +### **Network stack** + +- **Core Networking Features** + - TCP/IP Bypass (LWIP as Hosted stack for reference), IPv4/IPv6/UDP/TCP/ARP/ICMP/ICMPv6 + - SSL client versions TLSV1.0, TLSV1.2, TLSV1.3 + - SSL server versions TLSV1.0 and TLSV1.2 + - DHCPv4 (Client/Server)/ DHCPv6 Client +- **Advanced Network Features** + - HTTP Client/HTTPS Client//DNS Client/SNTP Client, Embedded MQTT/MQTT on host +- **Wi-Fi IoT Cloud Integration** + - AWS IOT Core +- BSD and IoT sockets application programming interface(API) + +### **BLE** + +- GAP(Advertising, Scanning, initiation, Connection and Bonding) +- Generic Attribute Protocol(GATT) +- Attribute protocol(ATT) +- Security +- LL Privacy 1.2 +- Accept list +- Directed Advertising +- Extended Advertising +- Periodic Advertising +- Periodic Advertising scanning +- Extended Advertising scanning +- Periodic Advertising list +- LE periodic advertising synchronization +- LE PHY(1Mbps, 2Mbps) & Coded PHY(125Kbps, 500kbps) +- Simultaneous scanning on 1Mbps and Coded PHY +- LE dual role topology +- LE data packet length extensions(DLE) +- Asymmetric PHYs +- LE channel selection algorithm 2 (CSA#2) +- LE Secure connections +- Bluetooth 5.4 Qualified + +### **SDK** + +- Simplified and Unified DX for Wi-Fi API +- Simplifies application development and presents clean and standardized APIs +- BSD and ARM IoT-compliant socket API +- Available through Simplicity Studio and GitHub + +### **Multi-protocol** + +- Wi-Fi STA + BLE + +### **PTA CoExistence** + +- 3 wire coex acting as Wi-Fi with external Bluetooth +- 3 wire coex acting as Wi-Fi with external Zigbee/OT + +## **Changes in this release compared to v3.1.4 Release** + +### **System** + +- None + +### **SDK** + +- **Enhancements** + - Added sl\_si91x\_mem\_pool\_buffers\_with\_quota component + - API reference guide enhancement with a callback usage note + - Readme enhancements of the example application +- **Fixed Issues** + - Fixed data transfer halt issues in NCP over EFR. + - Fixed TCP RX failure in concurrent mode in multithreading\_application example + - Image path and setup diagrams correction in example Readme + - Handle RPS header corruption during firmware update + - Fixed the issue of DUT returning SL\_STATUS\_TIMEOUT after multiple iterations during wifi init and deinit sequence + - Fixed the issue where DUT is getting hang while running aws\_device\_shadow application with Power save enabled + - Fixed handling of EAP-FAST PAC file loading manually. + +### **Wi-Fi/Network Stack** + +- **Enhancements** + - Added long url support (max 2048 bytes) for HTTP OTAF. + - Removed a limitation in Embedded where MQTT keep alive interval should be either 0 or a value greater than 35 seconds. Now allowing keep alive interval less than 35 seconds also. + - Added support for LEAP security in EAP mode + - Added hostname support to HTTP client request + - For Flash less parts support added to update customer gain offset and xo\_ctune offset to external flash. + - Added support for firmware\_update\_from\_host\_uart, wifi\_data\_transfer\_application\_ncp, wifi\_ap\_throughput\_ncp, wifi\_firmware\_flashing\_from\_host\_uart\_xmodem\_bootloader\_ncp example application. + +- **Fixed Issues** + - Fixed Embedded mqtt sequence issues when remote terminate and wlan disconnection is triggered . + - Fixed issues with MDNS services not responding to the queries from other devices + - Fixed same MAC address being generated for AP and Station address incase of concurrent mode. + - Fixed the issue where DUT is getting hang while running HTTP\_PUT Method in http client application + - Fixed the issue where sl\_net\_set\_credential API is failed with 0x10026 (SL\_STATUS\_SI91X\_WRONG\_PARAMETERS) error when trying to load HTTP certificate(SL\_NET\_HTTP\_CLIENT\_CREDENTIAL\_ID) for HTTPs + - Fixed issue where http otaf firmware update failed with "BBE1(SL\_STATUS\_SI91X\_HTTP\_TIMEOUT) error" for HTTP and BBD6(SL\_STATUS\_SI91X\_SSL\_TLS\_HANDSHAKE\_TIMEOUT\_OR\_FTP\_FILE\_NOT\_CLOSED) for HTTPS otaf + - Fixed issue where DUT is not initializing TCP connection to update the firmware in HTTP OTAF (NCP)application + - Fixed issue where failure/no response during the 2nd iteration of HTTP Server response + - Fixed DUT hang issue which is caused because of HW calibrations. + - Fixed xo captune calibration issue. Issue was xo captune getting overwritten with default value. + - Fixed the issue of module not entering into deep sleep after AP stop API call. + - Fixed an issue of AP VAP initialization in the scenario of AP-start, AP-stop and AP-start again. + - Fixed issues with static IPV4 assignment to DUT. + - Fixed issues with ECDSA ciphers + +### **BLE** + +- **Enhancements** + - Added change to obtain 6 bytes Bluetooth device address when the "rsi\_bt\_get\_local\_device\_address" API is called in all BLE applications. + - Added STM32 support for ble\_ae\_central, ble\_throughput\_app, ble\_power\_save and ble\_ae\_peripheral application +- **Fixed Issues** + - Fixed BLE disconnection issue while running wifi\_https\_ble\_dual\_role application when powersave is disabled. + - Resolved the issue with BLE PER stats cmd API. + - Fixed reconnection issue in case of pairing failure. + - Fixed invalid connection request(CVE-2019-19193) vulnerability. + - Updated readme files for "ble\_accept\_list" and "ble\_testmodes" applications. + - Updated "tx\_power" description for HP mode in "rsi-ble-per-transmit-s" structure. + - Fixed issue where WLAN power save API is failing with error code: SL\_STATUS\_TIMEOUT while executing the ble\_ae\_central application + +### **Multi-protocol** + +- **Enhancements** + - Added support for wifi\_station\_ble\_throughput\_app\_ncp, wifi\_https\_ble\_dual\_role\_ncp, wifi\_throughput\_ble\_dual\_role\_ncp example application +- **Fixed Issues** + - Fixed BLE connection establishment when DUT in the central role while using wifi\_throughput\_ble\_dual\_role\_ncp example + - Fixed issue where DUT is not receiving the IP address to the host even after the DHCP process over the air with the wifi\_station\_ble\_provisioning\_aws\_ncp application. + - Fixed issue where throughputs and Remote BLE device address are not displaying in the logs for wifi\_station\_ble\_throughput\_app\_ncp example + - Fixed issue where data transmission is not working with UART interface while running default wifi\_station\_ble\_provisioning\_aws\_uart\_ncp Application + - Fixed issue where compilation errors are seen in the wifi\_throughput\_ble\_dual\_role\_soc example when configuring CONNECT\_OPTION as CONN\_BY\_ADDR' + - Fixed issue where compilation errors while Disabling HTTPS\_DOWNLOAD macro in wifi\_https\_ble\_dual\_role application. + +## **Recommendations** + +### **System** + +- Set the recommended Power Save Profile (PSP) type to Enhanced Max PSP. +- Memory configuration for NCP mode is 672K\_M4SS\_0K. +- Set the following recommended FreeRTOS configuration in FreeRTOSConfig.h + - configTIMER\_TASK\_PRIORITY to 55 + - configTOTAL\_HEAP\_SIZE to 51200 + - configUSE\_POSIX\_ERRNO to 1 + +### **IDE for EFR host** + +- Simplicity Studio. This release is tested with SV5.8.0 version. +- Refer to the latest version of the NCP "Getting-Started-with-SiWx917" guide for more details + +### **Wi-Fi/Network Stack** + +- It is recommended to enable bit 16 of the 'Extended TCP IP Feature' bit map in the opermode command for all Wi-Fi Socket operations from the host to ensure graceful handling during asynchronous closures from the peer. +- For high throughput applications, aggregation (bit 2 of feature\_bit\_map) is recommended to be enabled in opermode. +- Users can enable SL\_SI91X\_EXT\_TCP\_IP\_SSL\_16K\_RECORD in 'Extended TCP IP Feature' bit map in opermode for (HTTPS server) supporting 16k record. +- **TWT** + - Recommendation is to use sl\_wifi\_target\_wake\_time\_auto\_selection() API for all TWT applications. + - It is recommended to issue iTWT setup command once IP assignment, TCP connection, application specific socket connections are done. + - When using sl\_wifi\_enable\_target\_wake\_time API, increase TCP / ARP Timeouts at the remote side depending upon the configured TWT interval configured. It's highly recommended to use sl\_wifi\_target\_wake\_time\_auto\_selection() as an alternative. + - In case of TWT in coex mode, when using sl\_wifi\_enable\_target\_wake\_time API, use TWT wake duration \<= 16 ms and TWT wake interval \>= 1 sec. If wake duration \> 16 ms or TWT wake interval \< 1sec, there might be performance issues. + - For iTWT GTK interval in AP should be configured to max possible value or zero. If GTK interval is not configurable on AP side, recommended TWT interval (in case of sl\_wifi\_enable\_target\_wake\_time API) or RX Latency (in case of sl\_wifi\_target\_wake\_time\_auto\_selection API) is less than 4sec. + - When sl\_wifi\_enable\_target\_wake\_time API is used, configuring TWT Wake interval beyond 1 min might lead to disconnections from the AP. Recommended to use TWT wake interval of less than or equal to 1 min. + - When using sl\_wifi\_enable\_target\_wake\_time API, it is recommended to set missed\_beacon\_count of sl\_wifi\_set\_advanced\_client\_configuration API greater than 2 times of the configured TWT Interval. +- Disable power save for high throughput applications or use FAST PSP power save mode as per application requirement. +- The application needs to ensure that it sets RTC with the correct timestamp before establishing the SSL/EAP connection. +- The minimum timeout value should not be less than 1 second for socket select and socket receive calls. +- Please refer Keep alive intervals supported by MQTT broker and configure keep alive interval values accordingly. +- The minimum keep alive interval value recommended for embedded MQTT is 10 Seconds. +- Disable power save and suspend any active TWT sessions before triggering HTTP OTAF. +- Randomize the client port if using rapid connect/disconnect of the MQTT session on the same client port with the power save. + +### **BLE** + +- In BLE, the recommended range of Connection Interval in + - Power Save (BLE Only) - 100 ms to 1.28 s. +- In BLE, during Connection, the configuration of Scan Interval and Scan Window with the same value is not recommended. The suggested ratio of Scan Window to Scan Interval is 3:4. +- In BLE, if a device is acting as Central, the scan window (in set\_scan\_params and create\_connection commands) must be less than the existing Connection Interval. The suggested ratio of Scan Window to Connection Interval is 2:3. +- In BLE mode, if scanning and advertising are in progress on the SiWx91x module and it subsequently gets connected and moves to the central role, scanning stops else if it moves to the peripheral role, advertising stops. To further establish a connection to another peripheral device or to a central device, the application should give a command for starting advertising and scanning again. + +### **Multi-protocol** + +- For concurrent Wi-Fi + BLE, and while a Wi-Fi connection is active, we recommend setting the ratio of the BLE scan window to BLE scan interval to 1:3 or 1:4. +- Wi-Fi + BLE Advertising + - All standard advertising intervals are supported. As Wi-Fi throughput is increased, a slight difference in on-air advertisements compared to configured intervals may be observed. + - BLE advertising is skipped if the advertising interval collides with Wi-Fi activity. +- Wi-Fi + BLE scanning + - All standard scan intervals are supported. For better scan results, we recommend setting the ratio of the BLE scan window to BLE scan interval to 1:3 or 1:4. + - BLE scanning will be stopped for intervals that collide with Wi-Fi activity. +- Wi-Fi + BLE Central/Peripheral Connections + - All standard connection intervals are supported. + - For a stable connection, use optimal connection intervals and max supervision timeout in the presence of Wi-Fi activity. +- Wi-Fi + BLE Central/Peripheral Data Transfer + - To achieve higher throughput for both Wi-Fi and BLE, use medium connection intervals, such as 45 to 80 ms with maximum supervision timeout. + - Ensure Wi-Fi activity consumes lower intervals. + +## **Known Issues of WiSeConnect3\_SDK\_3.2.0 Release** + +### **System** + +- None + +### **SDK** + +- Enhanced sl\_wifi\_get\_firmware\_version() API to provide more details (ROM ID, chip ID, security version, etc) which is not backward compatible with firmware older than 1711.2.10.1.0.0.4. Firmware binary notation does not include security version number. +- Observed not being able to receive UDP Rx TPUT print at Teraterm with IPV6 Throughput example +- Matter extension based applications are experiencing compatibility issues with WiseConnect SDK 3.2.0. It is recommended to use WiseConnect SDK 3.1.1 for matter-related applications. This will be addressed in up coming release(s). +- Asynchronous Azure MQTT is not supported, this will be addressed in up coming release(s). +- mDNS with IPV6 is not supported. +- Power Save with TCP/IP is not supported for UART interface. +- Recommended to configure VAP\_ID properly for Si91x STA and AP using sl\_si91x\_setsockopt\_async(), in case of data transfer. +- Recommended to use valid length(\<= 202 bytes) for topic to be published in the "Embedded MQTT" demo, else it leads to return wrong error code(0x21). +- Observed AWS\_DEVICE SHADOW LOGGING STATS is not working with Power Save enable +- Observing DUT is getting stuck while running MQTT publish with 2 different topics +- Observed MQTT RX is failing when continuous data sent every 1 second in aws\_mqtt application +- Observed DUT Failed to connect to AP with timeout error 0x7(SL\_STATUS\_TIMEOUT) while single MQTT subscribe and publish in loop with embedded MQTT application +- Observed DUT is not initiating the AWS connection post-rejoin failure indication after publishing 10-15 packets, turning OFF AP and trying to rejoin the network with aws\_mqtt application +- Observing LAST\_WILL\_MESSAGE is random at every MQTT connection rather than the configured Message/Length with embedded MQTT application +- Observing MQTT disconnect API is getting failed with 0x7(SL\_STATUS\_TIMEOUT) error while doing publish & subscribe with embedded MQTT application +- Bus thread stack may need to increase if local variables are used in user callback to avoid stack overflow + +### **Wi-Fi/Network Stack** + +**Wi-Fi STA** + +- STA Connection with the WPA3 Hunting and Pecking algorithm takes about 3-4 seconds. +- Observed connection failures with some APs in more channel congestion ~50-60% occupancy open lab environment. +- Region selection based on country IE in the beacon is not supported +- Observed intermittent beacon reception from Access Point ( beacon misses) when channel congestion \> 85%. +- UL MU-MIMO is not supported. + +**Access Point (AP) Mode** + +- Scan feature in AP mode not fully functional. +- Fixed rate configuration in AP mode using sl\_wifi\_set\_transmit\_rate API is not being set as expected. + +**WPA2 Enterprise security (STA)** + +- Observed issue with configuring certificate key and programming 4096 bit key and SHA384/SHA512 certificates. +- Observing DUT is throwing 0x1001c when configuring .data.certificate\_key as "123456789" +- Issue observed with WPA2 Enterprise Connectivity using Microsoft RADIUS Server. + +**Wi-Fi Concurrency ( AP + STA in same channel)** + +- Observed 3rd party STA association fail with 917 AP while 917 STA mode is connecting/reconnecting to configured 3rd party AP. Reconnect 3rd party STA to 917 AP in such scenarios. + +**OFDMA (UL/DL)** + +- Less throughput observed in DL-OFDMA with some APs that enabled LDPC. + +**MUMIMO (DL)** + +- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test. +- Observed Performance, Interop issues with MU MIMO with certain APs. +- Less throughput was observed in MU-MIMO with some APs that enabled LDPC. + +**MU-MIMO (UL)** + +- UL MU-MIMO is not supported. + +**TWT** + +- When sl\_wifi\_enable\_target\_wake\_time() API is used, occasional MQTT disconnections may be observed if TWT is configured with longer TWT intervals (\>30secs) with embedded MQTT + TWT. As an alternative, it's highly recommended to use sl\_wifi\_target\_wake\_time\_auto\_selection() API, where these dependencies are internally handled. + +**Wi-Fi STA Rejoin** + +- observed Scanning (probe request) in all channels instead of the channels configured in selective channel(channel\_bitmap\_2g4) during rejoin process + +**IPv4/IPv6** + +- IP change notification is not indicated to the application + +**BSD Socket API** + +- Configuration issue to program TCP retry count (default 10) through setsockopt +- Every server socket created consumes a socket (maximum of 10 sockets supported) and every subsequent connection to server socket consumes an additional socket (from the same pool of 10 sockets), which limits the number of server connections supported. +- Observed socket shutdown is not happening and DUT is getting stuck at "prvCheckTasksWaitingTermination" while doing socket connection-\> data transfer -\> socket shut down for multiple iterations. +- Observed DUT is not sending TCP retry packets on air when configured through setsockopt(). + +**SSL Client/Server** + +- Sometimes during SSL Handshake, ECC curve parameters generated are wrong, resulting in connection failure with BBD2 error. However, this recovers in the next attempt. +- Secure SSL renegotiation not supported in Embedded Networking Stack + +**HTTP Client/ HTTPS Client** + +- Observed occasional HTTPS continuous download failures when power save is enabled. Recommended to disable it before performing HTTPS continuous downloads +- Observed HTTPS post data is failing with error code: BBE2 (HTTP Failed). + +**SNTP** + +- Unable to get SNTP async events when coex mode and power save are enabled + +**Throughputs & Performance** + +- Observed 20% less Wi-Fi throughput with SDK 3.x compare to target throughput (depends on host and host interface), SDK refinements are in progress + +**Secure Over the Air (OTA) Upgrade** + +- Observed firmware upgrade failures after multiple iterations +- Observed OTA failures with power save enabled, So recommended to disable power save during OTA +- Observed "0xffffffff" error at the remote end while doing firmware upgrade via TCP server using (featured) example with ubuntu 21.0x. + +**Wi-Fi IOT Cloud integration (AWS IOT Core)** + +- Observed AWS MQTT keepalive transmission is not happening at expected intervals with power save enabled. +- Observing LAST\_WILL\_MESSAGE is random at every MQTT connection rather than the configured Message/Length + +**Wi-Fi Interoperability (IOP)** + +- Observed disconnections with Amplifi (AFI-INS-R) AP with Powersave enable +- TWT session is failing due to disconnections observed in DUT if rx\_latency is set to 55 seconds and receive data is also set to 55 seconds on MI Xiaomi RA72 and Tplink AX53 AP's +- Observed less throughput(~1Mb) while running TCP RX with Max\_PSP powersave with DLink 810 AP +- Observed interop issue (random disconnections) with few APs (EERO 6+, EERO PRO 6E, Cisco Catalyst 9120AXID) +- Disconnections observed with Netgear RAX120 AP in WPA3 security + +### **BLE** + +**GAP** + +- SPI interrupt miss issue was observed that prevents the host from receiving packets delivered by the TA, when there is continuous BLE TX/RX data transfer using the ble\_multiconnection\_gatt\_test application. + +**DTM/PER** + +- Recommend to limit BLE Tx Maximum power to 18 dBm and not to use power\_index 127 for BLE HP chain. + +**IOP** + +- BLE connection failure has been observed on a few mobile devices (Samsung S23& Oneplus 9pro) when Si917 device is configured as central. + +### **Multi-protocol** + +- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test. +- Observed Wi-Fi + BLE intermittent connection failures, disconnections, and data transfer stalls in the long run when power save is enabled. +- While executing Wi-Fi Commissioning using the wifi\_station\_ble\_provisioning example, BLE is disconnecting is observed with few boards. +- Observed "DUT is not disconnecting to the AP when initiating disconnection from EFR connect app screen using wifi\_station\_ble\_provisioning\_aws example +- Observed DUT failed to load certificate with error "0x10026" (SL\_STATUS\_SI91X\_WRONG\_PARAMETERS) while running wifi\_https\_ble\_dual\_role\_v6 application + +### **Simplicity Studio and Commander (For EFR Host)** + +- All projects in the package are compatible with **GNU ARM V12.2.1** toolchain +- Project Configurator is not supported. + +## **Features in RoadMap** + +### **SDK** + +- WPS 2.0 PIN/PUSH, Network Manager Enhancements +- Websockets +- Matter integration with Embedded TCP/IP stack +- Enhanced buffer management, Throughput optimization +- TLS over LWIP, Network layer applications (MQTT, HTTP, etc.) over LWIP. +- Debugging utilities + +### **System** + +- Secure communication over host interfaces (UART, SPI, SDIO) +- UART 2 Debug prints are supported only on ULP\_GPIO\_9. +- SiWx91x NCP connectivity FW Update Process using simplicity commander + +### **Wi-Fi/Network Stack** + +- Spatial Re-Use, BSS Max Idle +- Provisioning using Wi-Fi AP + +### **BLE** + +- Support for 8 Peripheral + 2 Central connections +- Support for BLE Mesh(4 nodes only) for limited Mesh use case + +## **Limitations and Unsupported Features** + +### **System** + +- BRD8045A and BRD8045C adapter boards does not have software API support for hardware flow control. + +### **SDK** + +- Baremetal mode is not supported. +- WiSeConnect3\_SDK\_3.1.3 and later versions are not compatible with firmware versions prior to 1711.2.10.1.2.0.4, due to enhancements in max transmit power configuration during Wi-Fi join/connection, need to be cautious while doing OTA firmware upgrade. +- SPI configuration for ACTIVE LOW interrupt, LOAD\_DEFAULT\_NWP\_FW\_ACTIVE\_LOW is not supported + +### **Wi-Fi/Network Stack** + +- TLS 1.3 Server is not supported +- 40 MHz bandwidth for 2.4 GHz and 5 GHz band is not supported. +- A maximum of 3 SSL connections are supported in Wi-Fi alone and CoEx modes. +- In SSL ECC Curve ID supported is 23. SSL handshake with 3rd party clients depends on the SSL ECC Curve ID. +- The number of Non-Transmitting BSSIDs processed is limited by the beacon length that can be processed by the stack (which is 1024 bytes). Beacons greater than 1024 Bytes in length will not be processed. +- UL MUMIMO is not supported. +- WPA3 AP supports only H2E algorithm. +- PMKSA caching is not supported in WPA3 AP mode. +- The maximum embedded MQTT Publish payload is 1 kbyte. +- Timeout value for socket select and socket receive calls of less than 1 second is not currently supported. +- SA query procedure not supported in 11W AP mode. +- WPA3 AP transition mode is not supported. +- In Concurrent mode (AP/STA) aggregation (Tx and Rx) is not supported. +- AP standalone mode does not support Tx aggregation. Rx aggregation is supported with limited number of BA sessions. +- Embedded HTTP Server is not supported. +- mDNS with IPV6 is not supported. + +### **BLE** + +- For BLE, if the connection is established with a small connection interval (less than 15 ms), simultaneous roles (i.e., Central + Scanning and Peripheral + Advertising) are not supported. +- BLE maximum two concurrent connections are supported, which can be either a connection to two peripheral devices, to one central and one peripheral device or two central devices. +- BLE Slave latency value is valid up to 32 only. +- BLE TX/RX throughput is less when tested with EFM as compared to EFR. +- Maximum supported AE data length is 200 bytes. +- Supports only two ADV\_EXT sets. +- Supports only two BLE connections (1 Central and 1 Peripheral) with AE. +- Advertising Extension feature is not supported in Coexistence. +- Isochronous channels feature is not supported. +- Connection subrating feature is not supported. +- LE power controller feature is not supported. +- EATT feature is not supported. +- Periodic Advertising with response(PAwR) feature is not supported. +- BLE Audio is not supported. +- The feature of dynamically changing the TX power when extended advertising is active is not supported. +- EFR Connect mobile application doesn't have support to differentiate the BLE configurators based on the Bluetooth Device address. + +### **Multi-protocol** + +- Wi-Fi AP + BLE currently not supported + +
+ +# **WiSeConnect3\_SDK\_3.1.4 NCP Release Notes** ## **Release Details** @@ -12,80 +506,80 @@ |Operating Modes Supported|Wi-Fi STA, Wi-Fi AP, Wi-Fi STA+BLE, Wi-Fi STA+AP| - SiWx917 release consists of two components - - Wireless Firmware - SiWx917 Firmware Binary available as SiWG917-B.2.10.1.3.0.7.rps + - Wireless Firmware - SiWx917 Firmware Binary available as SiWG917-B.2.10.1.3.0.7.rps - Wiseconnect3 Library - Wiseconnect3 SDK library runs on the external host in NCP mode. ## **Supported Hardware OPNs** - Expansion kits: SiWx917-EB4346A (based on Radio board SiWx917-4346A + 8045A Co-Processor Adapter board) - Expansion Kits: Si917-8036B (Beta version) -- IC OPNs: SiWN917M100LGTBA (Wi-Fi 6 NCP IC, QFN 7x7, 2.4 GHz, 4MB stacked flash, -40 to +85C​)  +- IC OPNs: SiWN917M100LGTBA (Wi-Fi 6 NCP IC, QFN 7x7, 2.4 GHz, 4MB stacked flash, -40 to +85C​) ## **Supported Features** ### **System** -- **Operating Modes**  - - Wi-Fi STA (802.11ax, 802.11n), Wi-Fi 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + BLE -- **Security**  - - Secure Boot, Secure Key storage and HW device identity with PUF, Secure Zone, Secure XIP (Execution in place) from flash, Secure Attestation, Anti Rollback, Secure Debug. Flash Protection +- **Operating Modes** + - Wi-Fi STA (802.11ax, 802.11n), Wi-Fi 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + BLE +- **Security** + - Secure Boot, Secure Key storage and HW device identity with PUF, Secure Zone, Secure XIP (Execution in place) from flash, Secure Attestation, Anti Rollback, Secure Debug. Flash Protection - Secure firmware upgrade options: - Firmware loading through UART, SPI Interface - Secure Over the Air (OTA) Upgrade - **Crypto Support** - - ` `Crypto API's for Hardware Accelerators: - - Advanced Encryption Standard (AES) 128/256/192, Secure Hash Algorithm (SHA) 256/384/512, Hash Message Authentication Code (HMAC), Random Number Generator (RNG), SHA3, AES-Galois Counter Mode (GCM)/ Cipher based Message Authentication Code (CMAC), ChaCha-poly, True Random Number Generator (TRNG) - - Software Accelerators: RSA, ECC  - - Wrapping Secret keys (Symmetric crypto).   + - Crypto API's for Hardware Accelerators: + - Advanced Encryption Standard (AES) 128/256/192, Secure Hash Algorithm (SHA) 256/384/512, Hash Message Authentication Code (HMAC), Random Number Generator (RNG), SHA3, AES-Galois Counter Mode (GCM)/ Cipher based Message Authentication Code (CMAC), ChaCha-poly, True Random Number Generator (TRNG) + - Software Accelerators: RSA, ECC + - Wrapping Secret keys (Symmetric crypto). - **System Power Save** - - Deep Sleep with RAM retention and without RAM retention  - - Wireless Power Save: Connected Sleep (Wi-Fi Standby Associated), BLE Advertising with powersave, BLE Scan with powersave ,  BLE connection with powersave. Only Max PSP power save mode is supported in BLE + - Deep Sleep with RAM retention and without RAM retention + - Wireless Power Save: Connected Sleep (Wi-Fi Standby Associated), BLE Advertising with powersave, BLE Scan with powersave , BLE connection with powersave. Only Max PSP power save mode is supported in BLE ### **Wi-Fi** - **Wi-Fi Protocols** - IEEE 802.11 b/g/n/ax (2.4GHz) - **Access Point (AP) Mode** - - 4 Client Support, Hidden SSID Mode, Auto Channel Selection, Scan in AP mode (Alpha Version). - - Wi-Fi Security   - - WPA2 Personal, WPA3 Personal (H2E method only) (Alpha Version), WPA Mixed mode (WPA/WPA2)  + - 4 Client Support, Hidden SSID Mode, Auto Channel Selection, Scan in AP mode (Alpha Version). + - Wi-Fi Security + - WPA2 Personal, WPA3 Personal (H2E method only) (Alpha Version), WPA Mixed mode (WPA/WPA2) - **Wi-Fi Scan** - - Selective Scan, Active/Passive Scan + - Selective Scan, Active/Passive Scan - **Wi-Fi STA (Security Modes)** - - Open Mode, WPA2 Personal, WPA2 Enhancements, WPA3 Personal, Mixed Mode (WPA/WPA2), WPA3 Personal Transition Mode (WPA2/WPA3) + - Open Mode, WPA2 Personal, WPA2 Enhancements, WPA3 Personal, Mixed Mode (WPA/WPA2), WPA3 Personal Transition Mode (WPA2/WPA3) - **WPA2 Enterprise security (STA)** - Method - PEAP/TTLS/TLS 1.0/TLS 1.2/FAST - **Wi-Fi STA Rejoin** -- **Wi-Fi STA Roaming**  - - BG Scan, OKC (Opportunistic Key caching), PMK (Pairwise Master Key) caching, Pre-Authentication -- **Wi-Fi Protocol Power Save**  - - Deep sleep (unconnected state), Max PSP, Enhanced Max PSP, Fast PSP,** TWT +- **Wi-Fi STA Roaming** + - BG Scan, OKC (Opportunistic Key caching), PMK (Pairwise Master Key) caching, Pre-Authentication +- **Wi-Fi Protocol Power Save** + - Deep sleep (unconnected state), Max PSP, Enhanced Max PSP, Fast PSP, TWT - **QoS** - WMM-QoS - **Wi-Fi 6 Feature** - - MUMIMO (DL), OFDMA (UL/DL), iTWT, TWT I-Frame & TWT Enhancements, BSS coloring, MBSSID -- **Wi-Fi Concurrency**  + - MUMIMO (DL), OFDMA (UL/DL), iTWT, TWT I-Frame & TWT Enhancements, BSS coloring, MBSSID +- **Wi-Fi Concurrency** - AP+STA (Same channel) - **Wi-Fi Band/Channels** - - 2.4GHz CH1-11, 2.4GHz CH1-13, 2.4GHz CH1-14 (Japan) + - 2.4GHz CH1-11, 2.4GHz CH1-13, 2.4GHz CH1-14 (Japan) - **Known Security Vulnerabilities Handled** - - WPA2 KRACK Attacks, Fragment and Forge Vulnerability + - WPA2 KRACK Attacks, Fragment and Forge Vulnerability -### **Network stack** +### **Network stack** - **Core Networking Features** - - TCP/IP Bypass (LWIP as Hosted stack for reference), IPv4/IPv6/UDP/TCP/ARP/ICMP/ICMPv6 - - SSL client versions TLSV1.0, TLSV1.2, TLSV1.3  + - TCP/IP Bypass (LWIP as Hosted stack for reference), IPv4/IPv6/UDP/TCP/ARP/ICMP/ICMPv6 + - SSL client versions TLSV1.0, TLSV1.2, TLSV1.3 - SSL server versions TLSV1.0 and TLSV1.2 - DHCPv4 (Client/Server)/ DHCPv6 Client - **Advanced Network Features** - - HTTP Client/HTTPS Client//DNS Client/SNTP Client, Embedded MQTT/MQTT on host + - HTTP Client/HTTPS Client//DNS Client/SNTP Client, Embedded MQTT/MQTT on host - **Wi-Fi IoT Cloud Integration** - AWS IOT Core - BSD and IoT sockets application programming interface(API) -### **BLE**  +### **BLE** - GAP(Advertising, Scanning, initiation, Connection and Bonding) - Generic Attribute Protocol(GATT) @@ -111,7 +605,7 @@ ### **SDK** -- Simplified and Unified DX for Wi-Fi API  +- Simplified and Unified DX for Wi-Fi API - Simplifies application development and presents clean and standardized APIs - BSD and ARM IoT-compliant socket API - Available through Simplicity Studio and GitHub @@ -122,7 +616,7 @@ ### **PTA CoExistence** -- 3 wire coex acting as Wi-Fi with external Bluetooth  +- 3 wire coex acting as Wi-Fi with external Bluetooth - 3 wire coex acting as Wi-Fi with external Zigbee/OT ## **Changes in this release compared to v3.1.3 Release** @@ -191,19 +685,19 @@ - It is recommended to enable bit 16 of the 'Extended TCP IP Feature' bit map in the opermode command for all Wi-Fi Socket operations from the host to ensure graceful handling during asynchronous closures from the peer. - For high throughput applications, aggregation (bit 2 of feature\_bit\_map) is recommended to be enabled in opermode. -- To reset TA (NWP), the application needs to call sl\_wifi\_deinit() followed by sl\_wifi\_init().  +- To reset TA (NWP), the application needs to call sl\_wifi\_deinit() followed by sl\_wifi\_init(). - Users can enable SL\_SI91X\_EXT\_TCP\_IP\_SSL\_16K\_RECORD in 'Extended TCP IP Feature' bit map in opermode for (HTTPS server) supporting 16k record. - **TWT** - - Recommendation is to use sl\_wifi\_target\_wake\_time\_auto\_selection() API for all TWT applications.  + - Recommendation is to use sl\_wifi\_target\_wake\_time\_auto\_selection() API for all TWT applications. - It is recommended to issue iTWT setup command once IP assignment, TCP connection, application specific socket connections are done. - When using sl\_wifi\_enable\_target\_wake\_time API, increase TCP / ARP Timeouts at the remote side depending upon the configured TWT interval configured. It's highly recommended to use sl\_wifi\_target\_wake\_time\_auto\_selection() as an alternative. - In case of TWT in coex mode, when using sl\_wifi\_enable\_target\_wake\_time API, use TWT wake duration <= 16 ms and TWT wake interval >= 1 sec. If wake duration > 16 ms or TWT wake interval < 1sec, there might be performance issues. - For iTWT GTK interval in AP should be configured to max possible value or zero. If GTK interval is not configurable on AP side, recommended TWT interval (in case of sl\_wifi\_enable\_target\_wake\_time API) or RX Latency (in case of sl\_wifi\_target\_wake\_time\_auto\_selection API) is less than 4sec. - - When sl\_wifi\_enable\_target\_wake\_time API is used, configuring TWT Wake interval beyond 1 min might lead to disconnections from the AP. Recommended to use TWT wake interval of less than or equal to 1 min. + - When sl\_wifi\_enable\_target\_wake\_time API is used, configuring TWT Wake interval beyond 1 min might lead to disconnections from the AP. Recommended to use TWT wake interval of less than or equal to 1 min. - When using sl\_wifi\_enable\_target\_wake\_time API, it is recommended to set missed\_beacon\_count of sl\_wifi\_set\_advanced\_client\_configuration API greater than 2 times of the configured TWT Interval. - Disable power save for high throughput applications or use FAST PSP power save mode as per application requirement. - The application needs to ensure that it sets RTC with the correct timestamp before establishing the SSL/EAP connection. -- The minimum timeout value should not be less than 1 second for socket select and socket receive calls.  +- The minimum timeout value should not be less than 1 second for socket select and socket receive calls. - Embedded MQTT keep alive interval should be either 0 or a value greater than 35 seconds. - Disable power save and suspend any active TWT sessions before triggering HTTP OTAF. - Randomize the client port if using rapid connect/disconnect of the MQTT session on the same client port with the power save. @@ -232,7 +726,7 @@ - To achieve higher throughput for both Wi-Fi and BLE, use medium connection intervals, such as 45 to 80 ms with maximum supervision timeout. - Ensure Wi-Fi activity consumes lower intervals. -## **Known Issues of WiSeConnect3\_SDK\_3.1.4 Release** +## **Known Issues of WiSeConnect3\_SDK\_3.1.4 Release** ### **System** @@ -242,7 +736,7 @@ - Enhanced sl\_wifi\_get\_firmware\_version() API to provide more details (ROM ID, chip ID, security version, etc) which is not backward compatible with firmwares older than 1711.2.10.1.0.0.4. Firmware binary notation does not include security version number. - Observed not being able to receive UDP Rx TPUT print at Teraterm with IPV6 Throughput example -- Matter extension based applications are experiencing compatibility issues with WiseConnect SDK 3.1.4. It is recommended to use WiseConnect SDK 3.1.1 for matter-related applications. This will be addressed in up coming release(s). +- Matter extension based applications are experiencing compatibility issues with WiseConnect SDK 3.1.4. It is recommended to use WiseConnect SDK 3.1.1 for matter-related applications. This will be addressed in up coming release(s). - Asynchronous Azure MQTT is not supported, this will be addressed in up coming release(s). - Power Save with TCP/IP is not supported for UART interface. - CLI\_DEMO and Calibration demo are not supported over UART interface. @@ -256,12 +750,12 @@ - STA Connection with the WPA3 Hunting and Pecking algorithm takes about 3-4 seconds. - Observed connection failures with some APs in more channel congestion ~50-60% occupancy open lab environment. - Region selection based on country IE in the beacon is not supported -- Observed intermittent beacon reception from Access Point ( beacon misses) in an extremely congested environment +- Observed intermittent beacon reception from Access Point ( beacon misses) in an extremely congested environment **Access Point (AP) Mode** -- Scan feature in AP mode not fully functional.  -- Fixed rate configuration in AP mode using sl\_wifi\_set\_transmit\_rate API is not being set as expected.  +- Scan feature in AP mode not fully functional. +- Fixed rate configuration in AP mode using sl\_wifi\_set\_transmit\_rate API is not being set as expected. **WPA2 Enterprise security (STA)** @@ -272,7 +766,7 @@ **Wi-Fi Concurrency ( AP + STA in same channel)** -- Observed 3rd party STA association fail with 917 AP while 917 STA mode is connecting/reconnecting to configured 3rd party AP. Reconnect 3rd party STA to 917 AP in such scenarios.  +- Observed 3rd party STA association fail with 917 AP while 917 STA mode is connecting/reconnecting to configured 3rd party AP. Reconnect 3rd party STA to 917 AP in such scenarios. **OFDMA (UL/DL)** @@ -280,8 +774,8 @@ **MUMIMO (DL)** -- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test.  -- Observed Performance, Interop issues with MU MIMO with certain APs.  +- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test. +- Observed Performance, Interop issues with MU MIMO with certain APs. - Less throughput was observed in MU-MIMO with some APs that enabled LDPC. **MU-MIMO (UL)** @@ -290,8 +784,8 @@ **TWT** -- Variability with MQTT keep alive interval based on TWT wake up interval.    -- When sl\_wifi\_enable\_target\_wake\_time() API is used, occasional MQTT disconnections may be observed if TWT is configured with longer TWT intervals (>30secs) with embedded MQTT + TWT.  As an alternative, it's highly recommended to use sl\_wifi\_target\_wake\_time\_auto\_selection() API, where these dependencies are internally handled. +- Variability with MQTT keep alive interval based on TWT wake up interval. +- When sl\_wifi\_enable\_target\_wake\_time() API is used, occasional MQTT disconnections may be observed if TWT is configured with longer TWT intervals (>30secs) with embedded MQTT + TWT. As an alternative, it's highly recommended to use sl\_wifi\_target\_wake\_time\_auto\_selection() API, where these dependencies are internally handled. **Wi-Fi STA Rejoin** @@ -320,7 +814,7 @@ - **SNTP** -- Unable to get SNTP async events when coex mode and power save are enabled  +- Unable to get SNTP async events when coex mode and power save are enabled **Throughputs & Performance** @@ -330,7 +824,7 @@ - Observed firmware upgrade failures after multiple iterations - Observed OTA failures with power save enabled, So recommended to disable power save during OTA -- Observed "0xffffffff" error at the remote end while doing firmware upgrade via TCP server using (featured) example with ubuntu 21.0x.  +- Observed "0xffffffff" error at the remote end while doing firmware upgrade via TCP server using (featured) example with ubuntu 21.0x. **Wi-Fi IOT Cloud integration (AWS IOT Core)** @@ -339,7 +833,7 @@ **Wi-Fi Interoperability (IOP)** - Observed disconnections with Amplifi (AFI-INS-R) AP with Powersave enable -- TWT session is failing due to disconnections observed in DUT if rx\_latency  is set to 55 seconds and receive data is also set to 55 seconds on MI Xiaomi RA72 and Tplink AX53 AP's +- TWT session is failing due to disconnections observed in DUT if rx\_latency is set to 55 seconds and receive data is also set to 55 seconds on MI Xiaomi RA72 and Tplink AX53 AP's - Observed less throughput(~1Mb) while running TCP RX with Max\_PSP powersave with DLink 810 AP - Observed interop issue (random disconnections) with few APs (EERO 6+, EERO PRO 6E, Cisco Catalyst 9120AXID) - Disconnections observed with Netgear RAX120 AP in WPA3 security @@ -363,7 +857,7 @@ ### **Multi-protocol** -- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test.  +- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test. - Observed Wi-Fi + BLE intermittent connection failures, disconnections, and data transfer stalls in the long run when power save is enabled. - While executing Wi-Fi Commissioning using the wifi\_station\_ble\_provisioning example, BLE is disconnecting is observed with few boards. - Observed "DUT is not disconnecting to the AP when initiating disconnection from EFR connect app screen using wifi\_station\_ble\_provisioning\_aws example @@ -379,8 +873,8 @@ - WPS 2.0 PIN/PUSH, Network Manager Enhancements - MDNS, HTTP Server, Azure MQTT Client, Websockets -- Matter integration with Embedded TCP/IP stack  -- Enhanced buffer management, Throughput optimization +- Matter integration with Embedded TCP/IP stack +- Enhanced buffer management, Throughput optimization - TLS over LWIP, Network layer applications (MQTT, HTTP, etc.) over LWIP. - Debugging utilities @@ -396,7 +890,7 @@ ### **BLE** -- Support for 8 Peripheral + 2 Central connections  +- Support for 8 Peripheral + 2 Central connections - Support for BLE Mesh(4 nodes only) for limited Mesh use case ## **Limitations and Unsupported Features** @@ -435,11 +929,11 @@ - Supports only two ADV\_EXT sets. - Supports only two BLE connections (1 Central and 1 Peripheral) with AE. - Advertising Extension feature is not supported in Coexistence. -- Isochronous channels feature is not supported.  -- Connection subrating feature is not supported.  -- LE power controller feature is not supported.  +- Isochronous channels feature is not supported. +- Connection subrating feature is not supported. +- LE power controller feature is not supported. - EATT feature is not supported. -- Periodic Advertising with response(PAwR) feature is not supported.  +- Periodic Advertising with response(PAwR) feature is not supported. - BLE Audio is not supported. - The feature of dynamically changing the TX power when extended advertising is active is not supported. diff --git a/docs/release-notes/index_soc.md b/docs/release-notes/index_soc.md index 6be272b35..068d35d0c 100644 --- a/docs/release-notes/index_soc.md +++ b/docs/release-notes/index_soc.md @@ -1,4 +1,604 @@ -# **WiSeConnect3\_SDK\_3.1.4 SoC Release Notes** +# **WiSeConnect3\_SDK\_3.2.0 SoC Release Notes** + +## **Release Details** + +| **Item** | **Details** | +| :- | :- | +| Release date | May 7th, 2024 | +| SDK Version | 3.2.0 | +| Firmware Version | 1711.2.11.1.0.0.7 | +| GSDK Version | 4.4.3 | +| Release Package Name | WiSeConnect3\_SDK\_3.2.0 | +| Supported RTOS | FreeRTOS | +| Operating Modes Supported | Wi-Fi STA, Wi-Fi AP, Wi-Fi STA+BLE, Wi-Fi STA+AP | + +- SiWx917 release consists of two components: + - Wireless Firmware - SiWx917 Firmware Binary available as SiWG917-B.2.11.1.0.0.7.rps + - Wiseconnect3 Library - Wiseconnect3 SDK library runs on internal Cortex M4 + +**NOTE:** Mandatory to upgrade the earlier version of boards (Si917-6031A Prokit or BRD4338A boards) or 917 Silicon ICs with instructions as outlined in this document "SiWG917–TA_Flash_Memory_Map_ChangeGuide_v1.3.pdf" for more details. + +## **Supported Hardware** + +| **Hardware** | **OPN** | +| :- | :- | +| Silicon (IC OPN) | SiWG917M111MGTBA, SiWG917M100MGTBA | +| Development Kits |

Pro Kit: SiWx917-PK6031A, Si917-PK6031A, SiWx917-PK6032A.

(Pro Kit includes Mother board "SI-MB4002A" + Radio board)

Radio boards: SiWx917-RB4338A, SiWx917-RB4342A

| + +## **Supported Features** + +### **System** + +- **Operating Modes** + - Wi-Fi STA (802.11ax, 802.11n), Wi-Fi 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + BLE +- **Security** + - Secure Boot, Secure Key storage and HW device identity with PUF, Secure Zone, Secure XIP (Execution in place) from flash, Secure Attestation, Anti Rollback, Secure Debug and Flash Protection. + - Secure firmware upgrade options: + - Firmware loading support by Commander Tool through Jlink Debugger. Jlink connected to Serial Wire Debug (SWD) + - Firmware loading via ISP using UART (Commander or Serial terminal), SPI Interface + - Secure Over the Air (OTA) Upgrade + - Firmware update via Bootloader +- **Crypto Support** + - Crypto API's for Hardware Accelerators: + - Advanced Encryption Standard (AES) 128/256/192, Secure Hash Algorithm (SHA) 256/384/512, Hash Message Authentication Code (HMAC), Random Number Generator (RNG), SHA3, AES-Galois Counter Mode (GCM)/ Cipher based Message Authentication Code (CMAC), ChaCha-poly, True Random Number Generator (TRNG) + - Software Accelerators: RSA, ECC + - PSA Crypto APIs support for all crypto operations. + - Wrapping Secret keys (Symmetric crypto). + - Added ECDSA Sign and Verify APIs +- **System Power Save** + - Deep Sleep with RAM retention and without RAM retention. + - Wireless Power Save: Connected Sleep (Wi-Fi Standby Associated), BLE Advertising with powersave, BLE Scan with powersave , BLE connection with powersave. Only Max PSP power save mode is supported in BLE. + +### **MCU** + +- **Memory** + - Common Flash: Single shared Flash for both Cortex-M4 and NWP (Wireless Processor) + - Common Flash + External PSRAM +- **Power States** + - Active: PS4, PS3, PS2, and PS1 + - Standby: PS4, PS3, and PS2 + - Sleep: PS4, PS3 and PS2 + - Deep Sleep(Shutdown): PS0 +- **Peripherals** + - High Performance (HP) - ADC, Calendar, Config Timer (CT), eFuse, EGPIO, GSPI, I2C, I2S, MCPWM, SDIO Secondary, SIO, SSI, SYSRTC, UART, uDMA, USART, WDT, Analog Comparator, DAC, Temperature Sensors (RO and BJT), Bod, CTS, OPAMP, PSRAM, QEI and RTC + - Ultra Low Power (ULP) - ULP_TIMER, ULP_GPIO and ULP_CALENDAR, + - UC Supported Peripherals - I2C, Calendar, SPI, SSI, SIO, uDMA, UART/USART, WDT, Config Timers, ULP Timers, SDIO Secondary, PWM, ADC, DAC, I2S and Analog Comparator +- **Services** + - Sleep Timer, IOSTREAM, Power Manager, SensorHub, NVM3 + - The flash write feature has been enhanced to support the NWP area, providing a 20k allocation within the NWP flash memory for storing user data. Moreover, a Read API has been introduced to retrieve data from the NWP flash region. +- **Development Pro-Kit Peripheral Support** + - LED, Button, MEMLCD, Joystick, RHT Sensor + +### **Development Environment** + +- Simplicity Studio IDE (SV5.8.0 version) and Debugger Integration. Refer to the latest version of the SoC "Getting-Started-with-SiWx917" guide for more details. +- Recommended to install and use Silicon labs Gecko SDK, Git hub based version 4.4.3. +- Simplicity Commander to supports Flash loading, provision of MBR programming, security key management, and calibration support for crystal and gain offsets. refer "siwx917-soc-manufacturing-utility-user-guide" for more details. +- Advanced Energy Monitoring (AEM) to measure ultra-low power capability on Development boards (Pro Kit). +- PinTool Supported peripherals - I2C, GSPI, SSI, SIO, UART/USART, Config Timers, PWM, I2S, ADC, DAC and Analog comparator + +### **Wi-Fi** + +- **Wi-Fi Protocols** + - IEEE 802.11 b/g/n/ax (2.4GHz) +- **Access Point (AP) Mode** + - 4 Client Support, Hidden SSID Mode, Auto Channel Selection, Scan in AP mode (Alpha) + - Wi-Fi Security + - WPA2 Personal, WPA3 Personal (H2E method only) (Alpha), WPA Mixed mode (WPA/WPA2) +- **Wi-Fi Scan** + - Selective Scan, Active/Passive Scan (world domain) +- **Wi-Fi STA (Security Modes)** + - Open Mode, WPA2 Personal, WPA2 Enhancements, WPA3 Personal, Mixed Mode (WPA/WPA2), WPA3 Personal Transition Mode (WPA2/WPA3) +- **WPA2 Enterprise security (STA)** + - Method + - PEAP/TTLS/TLS 1.0/TLS 1.2/FAST/LEAP +- **Wi-Fi STA Rejoin** +- **Wi-Fi STA Roaming** + - BG Scan, OKC (Opportunistic Key caching), PMK (Pairwise Master Key) caching, Pre-Authentication +- **Wi-Fi Protocol Power Save** + - Deep sleep (unconnected state), Max PSP, Enhanced Max PSP, Fast PSP, TWT +- **QoS** + - WMM-QoS +- **Wi-Fi 6 Feature** + - MUMIMO (DL), OFDMA (UL/DL), iTWT, TWT I-Frame & TWT Enhancements (Automatic TWT Configuration), BSS coloring, MBSSID +- **Wi-Fi Concurrency** + - AP+STA (Same channel) +- **Wi-Fi Band/Channels** + - 2.4GHz CH1-11, 2.4GHz CH1-13, 2.4GHz CH1-14 +- **Known Security Vulnerabilities Handled** + - WPA2 KRACK Attacks, Fragment and Forge Vulnerability + +### **Network Stack** + +- **Core Networking Features** + - IPv4/IPv6/UDP/TCP/ARP/ICMP/ICMPv6 + - SSL client versions TLSV1.0, TLSV1.2, TLSV1.3 + - SSL server versions TLSV1.0 and TLSV1.2 + - DHCPv4 (Client/Server)/ DHCPv6 Client + - TCP/IP Bypass (LWIP as Hosted stack for reference), +- **Advanced Network Features** + - HTTP Client/HTTPS Client//DNS Client/SNTP Client, Embedded MQTT/MQTT on host (AWS and AZURE) +- **Wi-Fi IoT Cloud Integration** + - AWS IoT Core + - Azure IoT +- BSD and IoT sockets application programming interface(API) + +### **BLE** + +- GAP(Advertising, Scanning, initiation, Connection and Bonding) +- Generic Attribute Protocol(GATT) +- Attribute protocol(ATT) +- Security +- LL Privacy 1.2 +- Accept list +- Directed Advertising +- Extended Advertising +- Periodic Advertising +- Periodic Advertising scanning +- Extended Advertising scanning +- Periodic Advertising list +- LE periodic advertising synchronization +- LE PHY(1Mbps, 2Mbps) & Coded PHY(125Kbps, 500kbps) +- Simultaneous scanning on 1Mbps and Coded PHY +- LE dual role topology +- LE data packet length extensions(DLE) +- Asymmetric PHYs +- LE channel selection algorithm 2 (CSA#2) +- LE Secure connections +- Bluetooth 5.4 Qualified + +### **SDK** + +- Simplified and Unified DX for Wi-Fi API and Platform APIs +- Simplifies application development and presents clean and standardized APIs +- UC (Universal Configurator) enables componentization, simplifying configuration of peripherals and examples +- BSD and ARM IoT-compliant socket API +- Available through Simplicity Studio and GitHub + +### **Multi-protocol** + +- Wi-Fi STA + BLE + +### **PTA/Coexistence** + +- 3 wire coex acting as Wi-Fi with external Bluetooth +- 3 wire coex acting as Wi-Fi with external Zigbee/OT + +## **Changes in this release compared to v3.1.4 Release** + +### **System** + +- Fixed M4 FW update(OTAF) issue for 1.8MBR + +### **MCU** + +- **Enhancements** + - Implemented I2C 7 or 10-bit combined format transfers + - Integrated SSI with SL DMA + - Updated documentation and UC for Consistency - API Documentation, Readme, SRM and UC + - Added an empty C project for SoC + - Renamed below UART macro's in RTE_Device_917.h file + - RTE_UART1_FRAC_DIV_EN changed to RTE_UART1_FRAC_DIV_SEL + - RTE_USART0_FRAC_DIV_EN changed to RTE_USART0_FRAC_DIV_SEL +- **Fixed Issues** + - Fixed SYSRTC application serial console prints documentation issue in readme + - The issue with separate channel selection in the pwm application has been resolved and updated the associated readme documentation. + - The issue with pwm_start not working after pwm_stop in pwm application has been resolved. + - Resolved PWM toggles stopping issue when BTN0 is pressed in Combo app + - Fixed the transfer for ULP SSI Master DMA issue + - Resolved SSI DMA issue when buffer size is 10000 + - Fixed SSI functionality issue when GSPI component is added to project + - Fixed UART Fractional clock divisor value issue + - Resolved build error issue while adding IOSTREAM components in DAC example + - Resolved UDMA and RAM memory overlapping issue in default examples + - Resolved issues observed with 1 byte I2C read + - Resolved RAM retention issues in Smart Lock application with Power Manager + - Fixed Power Manager component issues observed in SDK v3.1.4 + - Resolved problems in peripheral UC configuration. + - Fixed peripheral documentation links + +### **SDK** + +- **Enhancements** + - Added sl_si91x_mem_pool_buffers_with_quota component + - API reference guide enhancement with a callback usage note + - Readme enhancements of the example application + - Added support for wifi_data_transfer_application_soc, wifi_ap_throughput_soc, wifi_https_ble_dual_role_soc, flash_read_write example application +- **Fixed Issues** + - Fixed TCP RX failure in concurrent mode in multithreading_application example + - Fixed RPS header corruption during firmware update + - Fixed the issue of DUT returning SL_STATUS_TIMEOUT after multiple iterations during wifi init and deinit sequence + - Fixed handling of EAP-FAST PAC file loading manually. + +### **Wi-Fi/Network Stack** + +- **Enhancements** + - Added long url support (max 2048 bytes) for HTTP OTAF. + - Removed a limitation in Embedded where MQTT keep alive interval should be either 0 or a value greater than 35 seconds. Now allowing keep alive interval less than 35 seconds also. + - Added support for LEAP security in EAP mode + - For Flash less parts support added to update customer gain offset and xo_ctune offset to external flash. +- **Fixed Issues** + - Fixed issues with Embedded MQTT state machine, when remote terminate and WLAN disconnection is triggered + - Fixed issues with MDNS services not responding to the queries from other devices + - Fixed same MAC address being generated for AP and Station address incase of concurrent mode. + - Fixed the issue where DUT is getting hang while running HTTP_PUT Method in http client application + - Fixed the issue where sl_net_set_credential API is failed with 0x10026 (SL_STATUS_SI91X_WRONG_PARAMETERS) error when trying to load HTTP certificate(SL_NET_HTTP_CLIENT_CREDENTIAL_ID) for HTTPs + - Added hostname support to HTTP client request + - Fixed issue where http otaf firmware update failed with "BBE1(SL_STATUS_SI91X_HTTP_TIMEOUT) error" for HTTP and BBD6(SL_STATUS_SI91X_SSL_TLS_HANDSHAKE_TIMEOUT_OR_FTP_FILE_NOT_CLOSED) for HTTPS otaf + - Fixed issue where failure/no response during the 2nd iteration of HTTP Server response + - Fixed DUT hang issue which is caused because of HW calibrations. + - Fixed xo captune calibration issue. Issue was xo captune getting overwritten with default value. + - Fixed the issue of module not entering into deep sleep after AP stop API call. + - Fixed an issue of AP VAP initialization in the scenario of AP-start, AP-stop and AP-start again. + - Fixed issues with static IPV4 assignment to DUT. + - Fixed issues with ECDSA ciphers. + +### **BLE** + +- **Enhancements** + - Added "bt_stack_bypass" demo for validating Direct test mode in SOC. + - Added change to obtain 6 bytes Bluetooth device address when the "rsi_bt_get_local_device_address" API is called in all BLE applications. +- **Fixed Issues** + - Fixed BLE disconnection issue while running wifi_https_ble_dual_role application when powersave is disabled. + - Resolved the issue with BLE PER stats cmd API. + - Fixed reconnection issue in case of pairing failure. + - Fixed invalid connection request(CVE-2019-19193) vulnerability. + - Updated readme files for "ble_accept_list" and "ble_testmodes" applications. + - Updated "tx_power" description for HP mode in "rsi-ble-per-transmit-s" structure. + - Fixed issue where WLAN power save API is failing with error code: SL_STATUS_TIMEOUT while executing the ble_ae_central application + +### **Multi-protocol** + +- **Enhancements** + - NA +- **Fixed Issues** + - NA + +## **Recommendations** + +### **System** + +- The current revision of SiWx917 has: + - RAM memory of 672k bytes which can be shared between TA and M4 processors in SoC mode. + - The below configurations are applicable in SoC mode and can be configured based on the application requirement. EXT_FEAT_352K_M4SS_320K is the default configuration, based on requirement EXT_FEAT_480K_M4SS_192K configuration is selected for SoC mode multi-protocol examples. + - EXT_FEAT_480K_M4SS_192K - This mode configures TA with 480k and M4 with 192K bytes of memory + - EXT_FEAT_416K_M4SS_256K - This mode configures TA with 416k and M4 with 256K bytes of memory + - EXT_FEAT_352K_M4SS_320K - This mode configures TA with 352k and M4 with 320K bytes of memory + - SoC mode should not use 672k_M4SS_0K memory configuration. +- Set the recommended Power Save Profile (PSP) type to Enhanced Max PSP. +- There are 2 Versions of Pro-Kits/Radio boards. Si917-6031A based on Si917-4338A (Rev **A01 - A11**) and SiWx917-6031A based on SiWx917-4338A (Rev A12). To get optimal power numbers, enable macro "SL_SI91X_ENABLE_LOWPWR_RET_LDO" pre-processor define for ICs or while using SiWx917-6031A Pro-kit, SiWx917-4338A version of boards. This macro should be disabled for earlier variant of board (Si917-6031A, Si917-4338A). +- With RAM configuration (EXT_FEAT_352K_M4SS_320K), only 352K memory is available to TA which limits the features supported, Recommended to enable EXT_FEAT_416K_M4SS_256K in Wi-Fi + BLE Multi protocol mode to enable more Network features. +- For EXT_FEAT_416K_M4SS_256K and EXT_FEAT_480K_M4SS_192K memory configurations, it is recommended to retain both TA and M4 RAMs in power save. + +### **Wi-Fi/Network Stack** + +- It is recommended to enable bit 16 of the 'Extended TCP IP Feature' bit map in the opermode command for all Wi-Fi Socket operations from the host to ensure graceful handling during asynchronous closures from the peer. +- For high throughput applications, aggregation (bit 2 of feature_bit_map) is recommended to be enabled in opermode. +- Users can enable SL_SI91X_EXT_TCP_IP_SSL_16K_RECORD in 'Extended TCP IP Feature' bit map in opermode for (HTTPS server) supporting 16k record. +- **TWT** + - Recommendation is to use sl_wifi_target_wake_time_auto_selection() API for all TWT applications. + - It is recommended to issue iTWT setup command once IP assignment, TCP connection, application specific socket connections are done. + - When using sl_wifi_enable_target_wake_time API, increase TCP / ARP Timeouts at the remote side depending upon the configured TWT interval configured. It's highly recommended to use sl_wifi_target_wake_time_auto_selection() as an alternative. + - In case of TWT in coex mode, when using sl_wifi_enable_target_wake_time API, use TWT wake duration <= 16 ms and TWT wake interval >= 1 sec. If wake duration > 16 ms or TWT wake interval < 1sec, there might be performance issues. + - For iTWT GTK interval in AP should be configured to max possible value or zero. If GTK interval is not configurable on AP side, recommended TWT interval (in case of sl_wifi_enable_target_wake_time API) or RX Latency (in case of sl_wifi_target_wake_time_auto_selection API) is less than 4sec. + - When sl_wifi_enable_target_wake_time API is used, configuring TWT Wake interval beyond 1 min might lead to disconnections from the AP. Recommended to use TWT wake interval of less than or equal to 1 min. + - When using sl_wifi_enable_target_wake_time API, it is recommended to set missed_beacon_count of sl_wifi_set_advanced_client_configuration API greater than 2 times of the configured TWT Interval. +- Disable power save for high throughput applications or use FAST PSP power save mode as per application requirement. +- The application needs to ensure that it sets RTC with the correct timestamp before establishing the SSL/EAP connection. +- The minimum timeout value should not be less than 1 second for socket select and socket receive calls. +- Please refer Keep alive intervals supported by MQTT broker and configure keep alive interval values accordingly. +- The minimum keep alive interval value recommended for embedded MQTT is 10 Seconds. +- Disable power save and suspend any active TWT sessions before triggering HTTP OTAF. +- Randomize the client port if using rapid connect/disconnect of the MQTT session on the same client port with the power save. +- Recommended to configure VAP_ID properly for Si91x STA and AP using sl_si91x_setsockopt_async(), in case of data transfer. +- Recommended to use valid length(<= 202 bytes) for topic to be published while using Embedded MQTT, else it leads to return wrong error code(0x21). + +### **BLE** + +- In BLE, the recommended range of Connection Interval in + - Power Save (BLE Only) - 100 ms to 1.28 s. +- In BLE, during Connection, the configuration of Scan Interval and Scan Window with the same value is not recommended. The suggested ratio of Scan Window to Scan Interval is 3:4. +- In BLE, if a device is acting as Central, the scan window (in set_scan_params and create_connection commands) must be less than the existing Connection Interval. The suggested ratio of Scan Window to Connection Interval is 2:3. +- In BLE mode, if scanning and advertising are in progress on the SiWx91x module and it subsequently gets connected and moves to the central role, scanning stops else if it moves to the peripheral role, advertising stops. To further establish a connection to another peripheral device or to a central device, the application should give a command for starting advertising and scanning again. + +### **Multi-protocol** + +- For concurrent Wi-Fi + BLE, and while a Wi-Fi connection is active, we recommend setting the ratio of the BLE scan window to BLE scan interval to 1:3 or 1:4. +- Wi-Fi + BLE Advertising + - All standard advertising intervals are supported. As Wi-Fi throughput is increased, a slight difference in on-air advertisements compared to configured intervals may be observed. + - BLE advertising is skipped if the advertising interval collides with Wi-Fi activity. +- Wi-Fi + BLE scanning + - All standard scan intervals are supported. For better scan results, we recommend setting the ratio of the BLE scan window to BLE scan interval to 1:3 or 1:4. + - BLE scanning will be stopped for intervals that collide with Wi-Fi activity. +- Wi-Fi + BLE Central/Peripheral Connections + - All standard connection intervals are supported. + - For a stable connection, use optimal connection intervals and max supervision timeout in the presence of Wi-Fi activity. +- Wi-Fi + BLE Central/Peripheral Data Transfer + - To achieve higher throughput for both Wi-Fi and BLE, use medium connection intervals, such as 45 to 80 ms with maximum supervision timeout. + - Ensure Wi-Fi activity consumes lower intervals. + +## **Known Issues of WiSeConnect3_SDK_3.2.0 Release** + +### **MCU** + +**SensorHub** + +- Power transitions with AWS are not stable in SensorHub +- Support for ADC FIFO Mode and Multi channel is open +- PS1-state supports only ADC senso + +**SSI** + +- SSI Dual and Quad mode are not functional +- SSI Primary: Mode3 and TI are not working as expected +- SSI Primary will not be operable at 40 MHz +- SSI Full Duplex in DMA mode is not working as expected + +**I2C** + +- ULP I2C High speed and Fast plus modes are not working at specified speed + +**UART** + +- Flow control is not supported in ULP UART. + +**ADC** + +- In ADC Multichannel mode, sampling rate is limited to less than 15Ksps. Number of samples is less than 500 and with a maximum of 4 channel +- In ADC Multichannel mode, when using different sampling rates for different channels behavior is not as expected + +**CT (Config Timer)** + +- Config Timer(CT) support as an external event, in 32-bit mode, and DMA are not working as expected + +**Power Manager** + +- The wakeup sources BOD, Comparator, and SYSRTC are not working in the Power Manager service + +**RO Clock** + +- Few peripherals like WDT, SYSRTC when configured with RO clock is not working as expected. No impact on the feature but the clocks are not accurate. + +**ULP Peripheral examples** + +- ULP Peripheral examples (ULP_ADC, ULP_ADC_MULTICHANNEL, ULP_I2S, ULP_SSI_MASTER, ULP_UART, ULP_DMA, ULP_I2C_LEADER, ULP_DAC, and ULP_I2C_DRIVER_LEADER) are being integrated with the Power Manager Service, ULP Peripheral examples without Power Manager are removed from SDK and available through Apps repo for [reference](https://github.com/SiliconLabs/wifi_combo_applications/tree/master/SiWx917). + +### **SDK** + +- Observed Wi-Fi connection is successful even after deleting the stored network credentials using sl_net_delete_credential and responding with SL_NET_INVALID_CREDENTIAL_TYPE for sl_net_get_credential. +- Enhanced sl_wifi_get_firmware_version() API to provide more details (ROM ID, chip ID, security version, etc) which is not backward compatible with firmware older than 1711.2.10.1.0.0.4. Firmware binary notation does not include the security version number. +- In PSRAM enabled demos, moving of text, data and stack segments to PSRAM is allowed. BSS and Heap should still be in SRAM. +- Asynchronous Azure MQTT is not supported, this will be addressed in upcoming release(s). +- mDNS with IPV6 is not supported. +- Observing DUT is getting stuck while running MQTT publish with 2 different topics +- Observed MQTT RX is failing when continuous data sent every 1 second in aws_mqtt application +- Observed DUT Failed to connect to AP with timeout error 0x7(SL_STATUS_TIMEOUT) while single MQTT subscribe and publish in loop with embedded MQTT application +- Observing LAST_WILL_MESSAGE is random at every MQTT connection rather than the configured Message/Length with embedded MQTT application +- Observed DUT is not initiating the AWS connection post-rejoin failure indication after publishing 10-15 packets, turning OFF AP and trying to rejoin the network with aws_mqtt application +- Observing MQTT disconnect API is getting failed with 0x7(SL_STATUS_TIMEOUT) error while doing publish & subscribe with embedded MQTT application +- Bus thread stack may need to increase if local variables are used in user callback to avoid stack overflow. +- Low Power examples usage and documentation still under scope of improvement. + +### **Wi-Fi/Network Stack** + +**Wi-Fi STA** + +- STA Connection with the WPA3 Hunting and Pecking algorithm takes about 3-4 seconds. +- Observed connection failures with some AP's in more channel congestion ~50-60% occupancy open lab environment. +- Region selection based on country IE in the beacon is not supported +- Observed intermittent beacon reception from Access Point ( beacon misses) when channel congestion > 85%. + +**Access Point (AP) Mode** + +- Scan feature in AP mode not fully functional. +- Fixed rate configuration in AP mode using sl_wifi_set_transmit_rate API is not being set as expected. + +**WPA2 Enterprise security (STA)** + +- Observed connection issue with configuring certificate key and programming 4096 bit key and SHA384/SHA512 certificates. +- Observing DUT is throwing 0x1001c when configuring .data.certificate_key as "123456789". +- Issue observed with WPA2 Enterprise Connectivity using Microsoft RADIUS Server. + +**Wi-Fi Concurrency (AP + STA in same channel)** + +- Observed 3rd party STA association fail with 917 AP while 917 STA mode is connecting/reconnecting to configured 3rd party AP. Reconnect 3rd party STA to 917 AP in such scenarios. + +**OFDMA (UL/DL)** + +- Less throughput observed in DL-OFDMA with some APs that enabled Low density parity check coding. + +**MUMIMO (DL)** + +- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test. +- Observed Performance, Interop issues with MU MIMO with certain APs. +- Less throughput observed in MU-MIMO with some APs that enabled LDPC. + +**MU-MIMO (UL)** + +- UL MU-MIMO is not supported. + +**TWT** + +- When sl_wifi_enable_target_wake_time() API is used, occasional MQTT disconnections may be observed if TWT is configured with longer TWT intervals (>30secs) with embedded MQTT + TWT. As an alternative, it's highly recommended to use sl_wifi_target_wake_time_auto_selection() API, where these dependencies are internally handled. + +**Wi-Fi STA Rejoin** + +- Observed Scanning (probe request) in all channels instead of the channels configured in selective channel(channel_bitmap_2g4) during rejoin process. + +**IPv4/IPv6** + +- IP change notification is not indicated to the application. + +**BSD Socket API** + +- Every server socket created consumes a socket (maximum of 10 sockets supported) and every subsequent connection to server socket consumes an additional socket (from the same pool of 10 sockets), which limits the number of server connections supported. +- Observed socket shutdown is not happening and DUT is getting stuck at "prvCheckTasksWaitingTermination" while doing socket connection-> data transfer -> socket shut down for multiple iterations. +- Observed DUT is not sending TCP retry packets on air when configured through setsockopt(). + +**SSL Client/Server** + +- Sometimes during SSL Handshake, ECC curve parameters generated are wrong, resulting in connection failure with BBD2 error. However, this recovers in the next attempt. +- Secure SSL renegotiation is not supported in the Embedded Networking Stack + +**HTTP Client/ HTTPS Client** + +- Observed occasional HTTPS continuous download failures when power save is enabled. Recommended to disable it before performing HTTPS continuous downloads +- Observed HTTPS post data is failing with error code: BBE2 (HTTP Failed). + +**SNTP** + +- Unable to get SNTP async events when Coex mode and power save are enabled + +**Throughputs & Performance** + +- Wi-Fi alone throughput is about SDK 3.x (42Mbps). SDK refinements are in progress to further improve Wi-Fi Standalone and Coex Throughputs. + +**Wi-Fi IOT Cloud integration** + +- **AWS IOT Core** + - Observed AWS MQTT keepalive transmission is not happening at expected intervals with power save enabled. +- **AZURE IOT Core** + - Observed DUT after sending the data, its not sending the MQTT keep alive packet due to this Azure HUB closing the connection. + +**Wi-Fi Interoperability (IOP)** + +- Observed disconnections with Amplifi (AFI-INS-R) AP with powersave enable +- TWT session is failing due to disconnections observed in DUT if rx_latency is set to 55 seconds and receive data is also set to 55 seconds on MI Xiaomi RA72 and Tplink AX53 AP's +- Observed less throughput(~1Mb) while running TCP RX with Max_PSP powersave with DLink 810 AP +- Observed interop issue (random disconnections) with few APs (EERO 6+, EERO PRO 6E, Cisco Catalyst 9120AXID) +- Disconnections observed with Netgear RAX120 AP in WPA3 Security + +### **BLE** + +**GAP** + +- BLE reconnection is not working in ble_multiconnection_gatt demo when power save is enabled in SoC. +- When power save is enabled in the SoC, the DUT hangs with the ble_multiconnection_gatt demo while performing continuous Tx/Rx notifications. + +**DTM/PER** + +- Recommend to limit BLE Tx Maximum power to 18 dBm. Please don't use for 127 power_index for BLE HP chain with this release. + +**IOP** + +- BLE connection failure has been observed on a few mobile devices (Samsung S23& Oneplus 9pro) when the Si917 device is configured as central. + +### **Multi-protocol** + +- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test. +- Observed Wi-Fi + BLE intermittent connection failures, disconnections, and data transfer stalls in the long run when power save is enabled. +- Observed "DUT is not disconnecting to the AP when initiating disconnection from EFR connect app screen using wifi_station_ble_provisioning_aws example +- Observed DUT failed to load certificate with error "0x10026" (SL_STATUS_SI91X_WRONG_PARAMETERS) while running wifi_https_ble_dual_role_v6 application + +### **System** + +- Observed random hang issues with encrypted firmwares on some earlier variant of boards (Si917-6031A, Si917-4338A) with powersave enable. + +### **Simplicity Studio and Commander** + +- Simplicity commander does not support options under "Debug Lock tools". +- All projects in the package are compatible with **GNU ARM V12.2.1** toolchain + +## **Planned Roadmap Features** + +### **SDK** + +- WPS 2.0 PIN/PUSH, Network Manager Enhancements +- Websockets +- Matter integration with Embedded TCP/IP stack +- Enhanced buffer management, Throughput optimization +- TLS over LWIP, Network layer applications (MQTT, HTTP, etc.) over LWIP. +- Debugging utilities, UC Configurator for Wireless configurations + +### **System** + +- Secure communication over CPC (UART & SDIO interfaces) + +### **MCU** + +- Pin Tool for MCU - Pin tool for Analog Peripherals (ADC, DAC. Analog Comparator) +- Dual Flash: Separate flash for Cortex M4 and Wireless Processor +- Peripherals: Capacitive Touch Sensor, OPAMP, HSPI, GPDMA, QEI, RNG, IR decoder, CRC and BOD +- Software-configurable MCU application memory options (192 or 256 or 320 kB) +- RTOS support for MCU Peripheral examples +- SensorHub: Support for SDC_ADC and CLOUD connectivity +- SIO support for features Pattern matching, DMA flow control, self-loop mechanism and as a clock qualifier +- Support for I2S PCM functionality +- Stacked and external PSRAM: Pseudo Static RAM for storing application data and executing SoC applications. + +### **Wi-Fi/Network Stack** + +- Spatial Re-Use, BSS Max Idle +- Provisioning using Wi-Fi AP + +### **BLE** + +- Support for 8 Peripheral + 2 Central connections +- Support for BLE Mesh (4 nodes only) for limited Mesh use case + +## **Limitations and Unsupported Features** + +### **System** + +- None + +### **SDK** + +- Baremetal mode is not supported. +- WiSeConnect3_SDK_3.1.3 and later versions are not compatible with firmware versions prior to 1711.2.10.1.2.0.4, due to enhancements in max transmit power configuration during Wi-Fi join/connection, need to be cautious while doing OTA firmware upgrade. + +### **Wi-Fi/Network Stack** + +- TLS 1.3 Server is not supported. +- 40 MHz bandwidth for 2.4 GHz and 5 GHz band is not supported. +- Max 3 SSL sockets are supported in Wi-Fi alone and CoEx modes. No.of SSL Sockets in Wi-Fi + BLE based on RAM memory configuration selected. +- In SSL ECC Curve ID supported is 23. SSL handshake with 3rd party clients depends on the SSL ECC Curve ID. +- The number of Non-Transmitting BSSIDs processed is limited by the beacon length that can be processed by the stack (which is 1024 bytes). Beacons greater than 1024 Bytes in length will not be processed. +- Multiprotocol (STA +BLE) + EAP Security modes supported only with Memory configurations EXT_FEAT_416K_M4SS_256K and EXT_FEAT_480K_M4SS_192K. +- UL MUMIMO is not supported. +- WPA3 AP supports only H2E algorithm. +- PMKSA caching is not supported in WPA3 AP mode. +- Maximum embedded MQTT Publish payload is 1 kbyte. +- Timeout value for socket select and socket receive calls of less than 1 second is not currently supported. +- SA query procedure not supported in 11W AP mode. +- WPA3 AP transition mode is not supported. +- In Concurrent mode (AP/STA) aggregation (Tx and Rx) is not supported. +- AP standalone mode does not support Tx aggregation. Rx aggregation is supported with limited number of BA sessions. +- Embedded HTTP Server is not supported. +- mDNS with IPV6 is not supported. + +### **BLE** + +- For BLE, if the connection is established with a small connection interval (less than 15 ms), simultaneous roles (i.e., Central + Scanning and Peripheral + Advertising) are not supported. +- BLE maximum two concurrent connections are supported, which can be either a connection to two peripheral devices, to one central and one peripheral device or two central devices. +- BLE Slave latency value is valid up to 32 only. +- Maximum supported AE data length is 200 bytes. +- Supports only two ADV_EXT sets. +- Supports only two BLE connections (1 Central and 1 Peripheral) with AE. +- Advertising Extension feature is not supported in Coexistence. +- The ae_central & ae_peripheral applications are not supported with TA_352K_M4_320K RAM configuration. +- Two BLE connections are not supported with M4 powersave. It only supports a single connection. +- Isochronous channels feature is not supported. +- Connection subrating feature is not supported. +- LE power controller feature is not supported. +- EATT feature is not supported. +- Periodic Advertising with a response feature is not supported. +- BLE Audio is not supported. +- The feature of dynamically changing the TX power when extended advertising is active is not supported. +- EFR Connect mobile application doesn't have support to differentiate the BLE configurators based on the Bluetooth Device address. + +### **MCU** + +- SensorHub supports PS1-power state with ADC sensor. In this mode, other sensors operation is not supported. + +### **Multi-protocol** + +- Wi-Fi AP + BLE currently not supported. +- EXT_FEAT_352K_M4SS_320K RAM configuration is not supported for coex mode with SSL + +
+ +# **WiSeConnect3\_SDK\_3.1.4 SoC Release Notes** ## **Release Details** @@ -15,36 +615,36 @@ - Wireless Firmware - SiWx917 Firmware Binary available as SiWG917-B.2.10.1.3.0.7.rps - Wiseconnect3 Library - Wiseconnect3 SDK library runs on internal Cortex M4 -**NOTE:** Mandatory to upgrade the earlier version of boards (Si917-6031A Prokit or BRD4338A boards) or 917 Silicon ICs with instructions as outlined in this document "SiWG917–TA\_Flash\_Memory\_Map\_ChangeGuide\_v1.3.pdf" for more details.   +**NOTE:** Mandatory to upgrade the earlier version of boards (Si917-6031A Prokit or BRD4338A boards) or 917 Silicon ICs with instructions as outlined in this document "SiWG917–TA\_Flash\_Memory\_Map\_ChangeGuide\_v1.3.pdf" for more details. ## **Supported Hardware** |**Hardware**|**OPN**| | :- | :- | |Silicon (IC OPN)|SiWG917M111MGTBA, SiWG917M111XGTBA, SiWG917M141XGTBA, SiWG917M121XGTBA, SiWG917M110LGTBA, SiWG917M100MGTBA| -|Development Kits|

Pro Kit: SiWx917-PK6031A, Si917-PK6031A, SiWx917-PK6032A.

(Pro Kit includes Mother board "SI-MB4002A" + Radio board)

Radio boards: SiWx917-RB4338A, SiWx917-RB4342A

| +|Development Kits|

Pro Kit: SiWx917-PK6031A, Si917-PK6031A, SiWx917-PK6032A.

(Pro Kit includes Mother board "SI-MB4002A" + Radio board)

Radio boards: SiWx917-RB4338A, SiWx917-RB4342A

| -## **Supported Features**  +## **Supported Features** ### **System** -- **Operating Modes**  - - Wi-Fi STA (802.11ax, 802.11n), Wi-Fi 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + BLE -- **Security**  - - Secure Boot, Secure Key storage and HW device identity with PUF, Secure Zone, Secure XIP (Execution in place) from flash, Secure Attestation, Anti Rollback, Secure Debug and Flash Protection.  +- **Operating Modes** + - Wi-Fi STA (802.11ax, 802.11n), Wi-Fi 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + 802.11n AP, Wi-Fi STA (802.11ax, 802.11n) + BLE +- **Security** + - Secure Boot, Secure Key storage and HW device identity with PUF, Secure Zone, Secure XIP (Execution in place) from flash, Secure Attestation, Anti Rollback, Secure Debug and Flash Protection. - Secure firmware upgrade options: - - Firmware loading support by Commander Tool through Jlink Debugger. Jlink connected to Serial Wire Debug (SWD)  + - Firmware loading support by Commander Tool through Jlink Debugger. Jlink connected to Serial Wire Debug (SWD) - Firmware loading via ISP using UART (Commander or Serial terminal), SPI Interface - Secure Over the Air (OTA) Upgrade - **Crypto Support** - Crypto API's for Hardware Accelerators: - - Advanced Encryption Standard (AES) 128/256/192, Secure Hash Algorithm (SHA) 256/384/512, Hash Message Authentication Code (HMAC), Random Number Generator (RNG), SHA3, AES-Galois Counter Mode (GCM)/ Cipher based Message Authentication Code (CMAC), ChaCha-poly, True Random Number Generator (TRNG) - - Software Accelerators: RSA, ECC  + - Advanced Encryption Standard (AES) 128/256/192, Secure Hash Algorithm (SHA) 256/384/512, Hash Message Authentication Code (HMAC), Random Number Generator (RNG), SHA3, AES-Galois Counter Mode (GCM)/ Cipher based Message Authentication Code (CMAC), ChaCha-poly, True Random Number Generator (TRNG) + - Software Accelerators: RSA, ECC - PSA Crypto APIs support for all crypto operations. - Wrapping Secret keys (Symmetric crypto). - **System Power Save** - - Deep Sleep with RAM retention and without RAM retention.  - - Wireless Power Save: Connected Sleep (Wi-Fi Standby Associated), BLE Advertising with powersave, BLE Scan with powersave ,  BLE connection with powersave. Only Max PSP power save mode is supported in BLE.  + - Deep Sleep with RAM retention and without RAM retention. + - Wireless Power Save: Connected Sleep (Wi-Fi Standby Associated), BLE Advertising with powersave, BLE Scan with powersave , BLE connection with powersave. Only Max PSP power save mode is supported in BLE. ### **MCU** @@ -52,26 +652,26 @@ - Common Flash: Single shared Flash for both Cortex-M4 and NWP (Wireless Processor) - Common Flash + External PSRAM - **Power States** - - Active: PS4, PS3, PS2, and PS1  + - Active: PS4, PS3, PS2, and PS1 - Standby: PS4, PS3, and PS2 - Sleep: PS4, PS3 and PS2 - Deep Sleep(Shutdown): PS0 - **Peripherals** - - High Performance (HP)- ADC, Calendar, Config Timer(CT), eFuse, EGPIO, GSPI, I2C, I2S, MCPWM, SDIO Secondary, SIO, SSI, SYSRTC, UART, uDMA, USART, WDT, Analog Comparator, DAC and Temperature Sensors(RO and BJT), Bod, CTS, OPAMP, PSRAM, QEI and RTC**  + - High Performance (HP)- ADC, Calendar, Config Timer(CT), eFuse, EGPIO, GSPI, I2C, I2S, MCPWM, SDIO Secondary, SIO, SSI, SYSRTC, UART, uDMA, USART, WDT, Analog Comparator, DAC and Temperature Sensors(RO and BJT), Bod, CTS, OPAMP, PSRAM, QEI and RTC** - Ultra Low Power (ULP) - ULP\_TIMER, ULP\_UART, ULP\_I2C, ULP\_I2S, ULP\_uDMA, ULP\_SSI, ULP\_GPIO, ULP\_ADC, ULP\_IR\_DECODER and ULP\_SPI - UC Supported Peripherals - I2C, Calendar, SPI, SSI, SIO, uDMA, UART/USART, WDT, Config Timers, ULP Timers, SDIO Secondary, PWM, ADC, DAC, I2S and Analog Comparator - **Services** - - Sleep Timer, IOSTREAM, Power Manager, SensorHub, NVM3 + - Sleep Timer, IOSTREAM, Power Manager, SensorHub, NVM3 - The flash write feature has been enhanced to support the NWP area, providing a 20k allocation within the NWP flash memory for storing user data. Moreover, a Read API has been introduced to retrieve data from the NWP flash region. - **Development Pro-Kit Peripheral Support** - - LED, Button, MEMLCD, Joystick, RHT Sensor + - LED, Button, MEMLCD, Joystick, RHT Sensor ### **Development Environment** -- Simplicity Studio IDE (SV5.8.0 version) and Debugger Integration.   Refer to the latest version of the SoC "Getting-Started-with-SiWx917" guide for more details. -- Recommended to install and use Silicon labs Gecko SDK, Git hub based version 4.4.1.  -- Simplicity Commander to supports Flash loading, provision of MBR programming, security key management, and calibration support for crystal and gain offsets. refer "siwx917-soc-manufacturing-utility-user-guide" for more details.**  -- Advanced Energy Monitoring (AEM) to measure ultra-low power capability on Development boards (Pro Kit). +- Simplicity Studio IDE (SV5.8.0 version) and Debugger Integration. Refer to the latest version of the SoC "Getting-Started-with-SiWx917" guide for more details. +- Recommended to install and use Silicon labs Gecko SDK, Git hub based version 4.4.1. +- Simplicity Commander to supports Flash loading, provision of MBR programming, security key management, and calibration support for crystal and gain offsets. refer "siwx917-soc-manufacturing-utility-user-guide" for more details.** +- Advanced Energy Monitoring (AEM) to measure ultra-low power capability on Development boards (Pro Kit). - PinTool Supported peripherals - I2C, GSPI, SSI, SIO, UART/USART, Config Timers, PWM, I2S ### **Wi-Fi** @@ -79,46 +679,46 @@ - **Wi-Fi Protocols** - IEEE 802.11 b/g/n/ax (2.4GHz) - **Access Point (AP) Mode** - - 4 Client Support, Hidden SSID Mode, Auto Channel Selection, Scan in AP mode (Alpha Version) - - Wi-Fi Security   - - WPA2 Personal, WPA3 Personal (H2E method only) (Alpha Version), WPA Mixed mode (WPA/WPA2)  + - 4 Client Support, Hidden SSID Mode, Auto Channel Selection, Scan in AP mode (Alpha Version) + - Wi-Fi Security + - WPA2 Personal, WPA3 Personal (H2E method only) (Alpha Version), WPA Mixed mode (WPA/WPA2) - **Wi-Fi Scan** - - Selective Scan, Active/Passive Scan + - Selective Scan, Active/Passive Scan - **Wi-Fi STA (Security Modes)** - - Open Mode, WPA2 Personal, WPA2 Enhancements, WPA3 Personal, Mixed Mode (WPA/WPA2), WPA3 Personal Transition Mode (WPA2/WPA3) + - Open Mode, WPA2 Personal, WPA2 Enhancements, WPA3 Personal, Mixed Mode (WPA/WPA2), WPA3 Personal Transition Mode (WPA2/WPA3) - **WPA2 Enterprise security (STA)** - Method - PEAP/TTLS/TLS 1.0/TLS 1.2/FAST - **Wi-Fi STA Rejoin** - **Wi-Fi STA Roaming** - - BG Scan, OKC (Opportunistic Key caching), PMK (Pairwise Master Key) caching, Pre-Authentication -- **Wi-Fi Protocol Power Save**  - - Deep sleep (unconnected state), Max PSP, Enhanced Max PSP, Fast PSP,** TWT + - BG Scan, OKC (Opportunistic Key caching), PMK (Pairwise Master Key) caching, Pre-Authentication +- **Wi-Fi Protocol Power Save** + - Deep sleep (unconnected state), Max PSP, Enhanced Max PSP, Fast PSP,** TWT - **QoS** - WMM-QoS - **Wi-Fi 6 Feature** - - MUMIMO (DL), OFDMA (UL/DL), iTWT, TWT I-Frame & TWT Enhancements, BSS coloring, MBSSID -- **Wi-Fi Concurrency**  + - MUMIMO (DL), OFDMA (UL/DL), iTWT, TWT I-Frame & TWT Enhancements, BSS coloring, MBSSID +- **Wi-Fi Concurrency** - AP+STA (Same channel) - **Wi-Fi Band/Channels** - - 2.4GHz CH1-11, 2.4GHz CH1-13, 2.4GHz CH1-14 (Japan) + - 2.4GHz CH1-11, 2.4GHz CH1-13, 2.4GHz CH1-14 (Japan) - **Known Security Vulnerabilities Handled** - - WPA2 KRACK Attacks, Fragment and Forge Vulnerability + - WPA2 KRACK Attacks, Fragment and Forge Vulnerability ### **Network Stack** - **Core Networking Features** - - TCP/IP Bypass (LWIP as Hosted stack for reference), IPv4/IPv6/UDP/TCP/ARP/ICMP/ICMPv6 - - SSL client versions TLSV1.0, TLSV1.2, TLSV1.3  + - TCP/IP Bypass (LWIP as Hosted stack for reference), IPv4/IPv6/UDP/TCP/ARP/ICMP/ICMPv6 + - SSL client versions TLSV1.0, TLSV1.2, TLSV1.3 - SSL server versions TLSV1.0 and TLSV1.2 - DHCPv4 (Client/Server)/ DHCPv6 Client - **Advanced Network Features** - - HTTP Client/HTTPS Client//DNS Client/SNTP Client, Embedded MQTT/MQTT on host + - HTTP Client/HTTPS Client//DNS Client/SNTP Client, Embedded MQTT/MQTT on host - **Wi-Fi IoT Cloud Integration** - AWS IOT Core - BSD and IoT sockets application programming interface(API) -### **BLE**  +### **BLE** - GAP(Advertising, Scanning, initiation, Connection and Bonding) - Generic Attribute Protocol(GATT) @@ -159,7 +759,7 @@ - 3 wire coex acting as Wi-Fi with external Bluetooth - 3 wire coex acting as Wi-Fi with external Zigbee/OT -## **Changes in this release compared to v3.1.3 Release** +## **Changes in this release compared to v3.1.3 Release** ### **System** @@ -223,7 +823,7 @@ ### **System** - The current revision of SiWx917 has: - - RAM memory of 672k bytes which can be shared between TA and M4 processors in SoC mode.  + - RAM memory of 672k bytes which can be shared between TA and M4 processors in SoC mode. - The below configurations are applicable in SoC mode and can be configured based on the application requirement. EXT\_FEAT\_352K\_M4SS\_320K is the default configuration, based on requirement EXT\_FEAT\_480K\_M4SS\_192K configuration is selected for SoC mode multi-protocol examples. - EXT\_FEAT\_480K\_M4SS\_192K - This mode configures TA with 480k and M4 with 192K bytes of memory - EXT\_FEAT\_416K\_M4SS\_256K - This mode configures TA with 416k and M4 with 256K bytes of memory @@ -231,26 +831,26 @@ - SoC mode should not use 672k\_M4SS\_0K memory configuration. - Set the recommended Power Save Profile (PSP) type to Enhanced Max PSP. - There are 2 Versions of Pro-Kits/Radio boards. Si917-6031A based on Si917-4338A(Rev: A01 - A11) and SiWx917-6031A based on SiWx917-4338A(Rev: A12). To get optimal power numbers, enable macro "SL\_SI91X\_ENABLE\_LOWPWR\_RET\_LDO" pre-processor define for ICs or while using SiWx917-6031A Pro-kit, SiWx917-4338A version of boards. This macro should be disabled for earlier variant of board (Si917-6031A, Si917-4338A). -- With RAM configuration (EXT\_FEAT\_352K\_M4SS\_320K), only 352K memory is available to TA  which limits the features supported, Recommended to enable EXT\_FEAT\_416K\_M4SS\_256K in Wi-Fi + BLE Multi protocol mode to enable more Network features. -- For EXT\_FEAT\_416K\_M4SS\_256K  and EXT\_FEAT\_480K\_M4SS\_192K memory configurations, it is recommended to retain both TA and M4 RAMs in power save. +- With RAM configuration (EXT\_FEAT\_352K\_M4SS\_320K), only 352K memory is available to TA which limits the features supported, Recommended to enable EXT\_FEAT\_416K\_M4SS\_256K in Wi-Fi + BLE Multi protocol mode to enable more Network features. +- For EXT\_FEAT\_416K\_M4SS\_256K and EXT\_FEAT\_480K\_M4SS\_192K memory configurations, it is recommended to retain both TA and M4 RAMs in power save. ### **Wi-Fi/Network Stack** - It is recommended to enable bit 16 of the 'Extended TCP IP Feature' bit map in the opermode command for all Wi-Fi Socket operations from the host to ensure graceful handling during asynchronous closures from the peer. -- For high throughput applications, aggregation (bit 2 of feature\_bit\_map) is recommended to be enabled in opermode.  -- To reset TA (NWP), the application needs to call sl\_wifi\_deinit() followed by sl\_wifi\_init(). Users must ensure that no execution happens from flash at this point of time. (Refer to example applications)  +- For high throughput applications, aggregation (bit 2 of feature\_bit\_map) is recommended to be enabled in opermode. +- To reset TA (NWP), the application needs to call sl\_wifi\_deinit() followed by sl\_wifi\_init(). Users must ensure that no execution happens from flash at this point of time. (Refer to example applications) - Users can enable SL\_SI91X\_EXT\_TCP\_IP\_SSL\_16K\_RECORD in 'Extended TCP IP Feature' bit map in opermode for (HTTPS server) supporting 16k record. - **TWT** - - Recommendation is to use sl\_wifi\_target\_wake\_time\_auto\_selection() API for all TWT applications.  + - Recommendation is to use sl\_wifi\_target\_wake\_time\_auto\_selection() API for all TWT applications. - It is recommended to issue iTWT setup command once IP assignment, TCP connection, application specific socket connections are done. - When using sl\_wifi\_enable\_target\_wake\_time API, increase TCP / ARP Timeouts at the remote side depending upon the configured TWT interval configured. It's highly recommended to use sl\_wifi\_target\_wake\_time\_auto\_selection() as an alternative. - In case of TWT in coex mode, when using sl\_wifi\_enable\_target\_wake\_time API, use TWT wake duration <= 16 ms and TWT wake interval >= 1 sec. If wake duration > 16 ms or TWT wake interval < 1sec, there might be performance issues. - For iTWT GTK interval in AP should be configured to max possible value or zero. If GTK interval is not configurable on AP side, recommended TWT interval (in case of sl\_wifi\_enable\_target\_wake\_time API) or RX Latency (in case of sl\_wifi\_target\_wake\_time\_auto\_selection API) is less than 4sec. - - When sl\_wifi\_enable\_target\_wake\_time API is used, configuring TWT Wake interval beyond 1 min might lead to disconnections from the AP. Recommended to use TWT wake interval of less than or equal to 1 min. + - When sl\_wifi\_enable\_target\_wake\_time API is used, configuring TWT Wake interval beyond 1 min might lead to disconnections from the AP. Recommended to use TWT wake interval of less than or equal to 1 min. - When using sl\_wifi\_enable\_target\_wake\_time API, it is recommended to set missed\_beacon\_count of sl\_wifi\_set\_advanced\_client\_configuration API greater than 2 times of the configured TWT Interval. - Disable power save for high throughput applications or use FAST PSP power save mode as per application requirement. - The application needs to ensure that it sets RTC with the correct timestamp before establishing the SSL/EAP connection. -- The minimum timeout value should not be less than 1 second for socket select and socket receive calls.  +- The minimum timeout value should not be less than 1 second for socket select and socket receive calls. - Embedded MQTT keep alive interval should be either 0 or a value greater than 35 seconds. - Disable power save and suspend any active TWT sessions before triggering HTTP OTAF. - Randomize the client port if using rapid connect/disconnect of the MQTT session on the same client port with the power save. @@ -284,14 +884,14 @@ ### **MCU** **SensorHub** -  + - Power transitions with AWS are not stable in SensorHub. **SSI** -- SSI Dual and Quad mode are not functional.  -- SSI primary: Mode3 and TI is not working as expected.  -- SSI Primary will not be operable at 40 MHz  +- SSI Dual and Quad mode are not functional. +- SSI primary: Mode3 and TI is not working as expected. +- SSI Primary will not be operable at 40 MHz - SSI Full Duplex in DMA mode is not working as expected - SSI in DMA mode is limited to only 1024 bytes of buffer size @@ -310,7 +910,7 @@ **CT (Config Timer)** -- Config Timer(CT) support as an external event, in 32-bit mode, and DMA are not working as expected +- Config Timer(CT) support as an external event, in 32-bit mode, and DMA are not working as expected **SYSRTC** @@ -337,12 +937,12 @@ - STA Connection with the WPA3 Hunting and Pecking algorithm takes about 3-4 seconds. - Observed connection failures with some AP's in more channel congestion ~50-60% occupancy open lab environment. - Region selection based on country IE in the beacon is not supported -- Observed intermittent beacon reception from Access Point ( beacon misses) in an extremely congested environment +- Observed intermittent beacon reception from Access Point ( beacon misses) in an extremely congested environment **Access Point (AP) Mode** -- Scan feature in AP mode not fully functional.  -- Fixed rate configuration in AP mode using sl\_wifi\_set\_transmit\_rate API is not being set as expected.  +- Scan feature in AP mode not fully functional. +- Fixed rate configuration in AP mode using sl\_wifi\_set\_transmit\_rate API is not being set as expected. **WPA2 Enterprise security (STA)** @@ -353,7 +953,7 @@ **Wi-Fi Concurrency (AP + STA in same channel)** -- Observed 3rd party STA association fail with 917 AP while 917 STA mode is connecting/reconnecting to configured 3rd party AP. Reconnect 3rd party STA to 917 AP in such scenarios.  +- Observed 3rd party STA association fail with 917 AP while 917 STA mode is connecting/reconnecting to configured 3rd party AP. Reconnect 3rd party STA to 917 AP in such scenarios. **OFDMA (UL/DL)** @@ -361,8 +961,8 @@ **MUMIMO (DL)** -- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test.  -- Observed Performance, Interop issues with MU MIMO with certain APs.  +- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test. +- Observed Performance, Interop issues with MU MIMO with certain APs. - Less throughput observed in MU-MIMO with some APs that enabled LDPC. **MU-MIMO (UL)** @@ -371,21 +971,21 @@ **TWT** -- Variability with MQTT keep alive interval based on TWT wake up interval.   -- When sl\_wifi\_enable\_target\_wake\_time() API is used, occasional MQTT disconnections may be observed if TWT is configured with longer TWT intervals (>30secs) with embedded MQTT + TWT.  As an alternative, it's highly recommended to use sl\_wifi\_target\_wake\_time\_auto\_selection() API, where these dependencies are internally handled. +- Variability with MQTT keep alive interval based on TWT wake up interval. +- When sl\_wifi\_enable\_target\_wake\_time() API is used, occasional MQTT disconnections may be observed if TWT is configured with longer TWT intervals (>30secs) with embedded MQTT + TWT. As an alternative, it's highly recommended to use sl\_wifi\_target\_wake\_time\_auto\_selection() API, where these dependencies are internally handled. **Wi-Fi STA Rejoin** -- Observed Scanning (probe request) in all channels instead of the channels configured in selective channel(channel\_bitmap\_2g4) during rejoin process.  +- Observed Scanning (probe request) in all channels instead of the channels configured in selective channel(channel\_bitmap\_2g4) during rejoin process. **IPv4/IPv6** - Observed issue with assigning static IP to DUT -- IP change notification is not indicated to the application.  +- IP change notification is not indicated to the application. **BSD Socket API** -- Configuration issue to program TCP retry count (default 10) through setsockopt +- Configuration issue to program TCP retry count (default 10) through setsockopt - Every server socket created consumes a socket (maximum of 10 sockets supported) and every subsequent connection to server socket consumes an additional socket (from the same pool of 10 sockets), which limits the number of server connections supported. **SSL Client/Server** @@ -402,15 +1002,15 @@ **SNTP** -- Unable to get SNTP async events when Coex mode and power save are enabled  +- Unable to get SNTP async events when Coex mode and power save are enabled **Throughputs & Performance** -- Wi-Fi alone throughput is about SDK 3.x (42Mbps). SDK refinements are in progress to further improve Wi-Fi Standalone and Coex Throughputs.  +- Wi-Fi alone throughput is about SDK 3.x (42Mbps). SDK refinements are in progress to further improve Wi-Fi Standalone and Coex Throughputs. **Secure Over the Air (OTA) Upgrade** -- None.  +- None. **Wi-Fi IOT Cloud integration (AWS IOT Core)** @@ -427,14 +1027,14 @@ ### **BLE** -**GAP**  +**GAP** -- BLE reconnection is not working in ble\_multiconnection\_gatt demo when power save is enabled in SoC.  +- BLE reconnection is not working in ble\_multiconnection\_gatt demo when power save is enabled in SoC. - When power save is enabled in the SoC, the DUT hangs with the ble\_multiconnection\_gatt demo while performing continuous Tx/Rx notifications. **DTM/PER** -- Recommend to limit BLE Tx Maximum power to 18 dBm.  Please don't use for 127 power\_index for BLE HP chain with this release. +- Recommend to limit BLE Tx Maximum power to 18 dBm. Please don't use for 127 power\_index for BLE HP chain with this release. **IOP** @@ -442,15 +1042,15 @@ ### **Multi-protocol** -- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test.  +- For Coex Scenario Wi-Fi + BLE, BLE Data transfer, MU retries (~50-60%) observed while running DL MU-MIMO test. - Observed Wi-Fi + BLE intermittent connection failures, disconnections, and data transfer stalls in the long run when power save is enabled. - Observed "DUT is not disconnecting to the AP when initiating disconnection from EFR connect app screen using wifi\_station\_ble\_provisioning\_aws example ### **System** -- Observed random hang issues with encrypted firmwares on some earlier variant of boards  (Si917-6031A, Si917-4338A) with powersave enable. +- Observed random hang issues with encrypted firmwares on some earlier variant of boards (Si917-6031A, Si917-4338A) with powersave enable. -### **Simplicity Studio and Commander**  +### **Simplicity Studio and Commander** - Simplicity commander does not support options under "Debug Lock tools". - All projects in the package are compatible with **GNU ARM V12.2.1** toolchain @@ -461,10 +1061,10 @@ - WPS 2.0 PIN/PUSH, Network Manager Enhancements - MDNS, HTTP Server, Azure MQTT Client, Websockets -- Matter integration with Embedded TCP/IP stack  -- Enhanced buffer management, Throughput optimization +- Matter integration with Embedded TCP/IP stack +- Enhanced buffer management, Throughput optimization - TLS over LWIP, Network layer applications (MQTT, HTTP, etc.) over LWIP. -- Debugging utilities, UC Configurator for Wireless configurations +- Debugging utilities, UC Configurator for Wireless configurations ### **System** @@ -480,7 +1080,7 @@ - SensorHub: Support for SDC\_ADC and CLOUD connectivity - SIO support for features Pattern matching, DMA flow control, self-loop mechanism and as a clock qualifier - Support for I2S PCM functionality -- Stacked and external PSRAM: Pseudo Static RAM for storing application data and executing SoC applications.  +- Stacked and external PSRAM: Pseudo Static RAM for storing application data and executing SoC applications. ### **Wi-Fi/Network Stack** @@ -489,10 +1089,10 @@ ### **BLE** -- Support for 8 Peripheral + 2 Central connections  +- Support for 8 Peripheral + 2 Central connections - Support for BLE Mesh (4 nodes only) for limited Mesh use case -## **Limitations and Unsupported Features**   +## **Limitations and Unsupported Features** ### **System** @@ -507,7 +1107,7 @@ - TLS 1.3 Server is not supported. - 40 MHz bandwidth for 2.4 GHz band and 5 GHz is not supported. -- Max 3 SSL sockets are supported in Wi-Fi alone and CoEx modes. No.of SSL Sockets in Wi-Fi + BLE based on RAM memory configuration selected.  +- Max 3 SSL sockets are supported in Wi-Fi alone and CoEx modes. No.of SSL Sockets in Wi-Fi + BLE based on RAM memory configuration selected. - In SSL ECC Curve ID supported is 23. SSL handshake with 3rd party clients depends on the SSL ECC Curve ID. - The number of Non-Transmitting BSSIDs processed is limited by the beacon length that can be processed by the stack (which is 1024 bytes). Beacons greater than 1024 Bytes in length will not be processed. - Multiprotocol (STA +BLE) + EAP Security modes supported only with Memory configurations EXT\_FEAT\_416K\_M4SS\_256K and EXT\_FEAT\_480K\_M4SS\_192K. @@ -528,26 +1128,25 @@ - Supports only two ADV\_EXT sets. - Supports only two BLE connections (1 Central and 1 Peripheral) with AE. - Advertising Extension feature is not supported in Coexistence. -- The  ae\_central & ae\_peripheral applications are not supported with TA\_352K\_M4\_320K RAM configuration. -- Two BLE connections are not supported with M4 powersave. It only supports a single connection.  -- Isochronous channels feature is not supported.  -- Connection subrating feature is not supported.  +- The ae\_central & ae\_peripheral applications are not supported with TA\_352K\_M4\_320K RAM configuration. +- Two BLE connections are not supported with M4 powersave. It only supports a single connection. +- Isochronous channels feature is not supported. +- Connection subrating feature is not supported. - LE power controller feature is not supported. - EATT feature is not supported. -- Periodic Advertising with a response feature is not supported.  +- Periodic Advertising with a response feature is not supported. - BLE Audio is not supported. - The feature of dynamically changing the TX power when extended advertising is active is not supported. ### **MCU** -- SensorHub supports PS1-power state with ADC sensor. In this mode, other sensors operation is not supported.  +- SensorHub supports PS1-power state with ADC sensor. In this mode, other sensors operation is not supported. ### **Multi-protocol** -- Wi-Fi AP + BLE currently not supported.  +- Wi-Fi AP + BLE currently not supported. - EXT\_FEAT\_352K\_M4SS\_320K RAM configuration is not supported for coex mode with SSL -
# **WiSeConnect3\_SDK\_3.1.3 SoC Release Notes** diff --git a/docs/software-reference/developer-guides/migrating-from-v3-1-4.md b/docs/software-reference/developer-guides/migrating-from-v3-1-4.md new file mode 100644 index 000000000..aca0ec55d --- /dev/null +++ b/docs/software-reference/developer-guides/migrating-from-v3-1-4.md @@ -0,0 +1,51 @@ +# Migrating from WiSeConnect™ SDK v3.1.4 to v3.2.0 + +## Table of Contents + +- [Overview](#overview) +- [Migration Steps](#migration-steps) + - [Update Files](#update-files) + - [Update Macros](#update-macros) + +## Overview + +This is a guide for updating an existing application using the WiSeConnect™ SDK v3.1.4 to a v3.2.0 application. + +There are few naming and file changes in v3.2.0 as compared to v3.1.4, mostly in order to standardize the names and improve the overall usage experience of the application programming interface (API). Migration requires the names everywhere to be updated in the existing code of an application. + +## Migration Steps + +In order to convert a WiSeConnect SDK v3.1.4 application to a v3.2.0 application, + +1. Open your existing application project in Simplicity Studio. + +2. In each source file of the project, replace the v3.1.4 names or interfaces with v3.2.0 names or interfaces. + +Refer to the tables in each of the sections that follow which map the v3.1.4 API elements to v3.2.0. In some instances, the differences between v3.1.4 and v3.2.0 are highlighted in **bold** text. +- [Update Files](#update-files) +- [Update Macros](#update-macros) + +### Update Files + +| **v3.1.4** | **v3.2.0** | +|----------------|----------------| +| sl_si91x_pwm_init_led0_config.h | removed sl_si91x_pwm_init_led0_config.h | + +**Note:-** +If issue is seen with existing projects which are using led0 instance with PWM component then follow the below steps +1. Copy the source file from the older versions sl_si91x_pwm_init_led0_config.h to components/board/silabs/config/common_config/sl_si91x_pwm_init_led0_config.h +2. Update the board config component brd4338a_config.slcc for brd4338a and brd4342a_config.slcc for brd4342a with the below content +``` + - override: + component: "%extension-wiseconnect3_sdk%pwm_instance" + file_id: pwm_config + instance: led0 + path: common_config/sl_si91x_pwm_init_led0_config.h +``` + +### Update Macros + +| **v3.1.4** | **v3.2.0** | +|----------------|----------------| +| RTE_USART0_FRAC_DIV_EN | RTE_USART0_FRAC_DIV_SEL | +| RTE_UART1_FRAC_DIV_EN | RTE_UART1_FRAC_DIV_SEL | \ No newline at end of file diff --git a/docs/software-reference/manuals/siwx91x-software-reference-manual.md b/docs/software-reference/manuals/siwx91x-software-reference-manual.md index 45b15f52a..ea37b7bfc 100644 --- a/docs/software-reference/manuals/siwx91x-software-reference-manual.md +++ b/docs/software-reference/manuals/siwx91x-software-reference-manual.md @@ -270,6 +270,16 @@ The following is an example code snippet illustrating the use of the above APIs:   sl_si91x_gpio_set_pin_direction(0, 10, 0); ``` +##### SDIO Host Interfaces + +|GPIO | GPIO Default State SPI Mode| +|GPIO_25 | SDIO_CLK | +|GPIO_26 | SDIO_CMD | +|GPIO_27 | SDIO_D0 | +|GPIO_28 | SDIO_D1 | +|GPIO_29 | SDIO_D2 | +|GPIO_30 | SDIO_D3 | + ##### Digital ULP GPIOs The SoC GPIOs configured for ULP Peripheral functionality (ULPPERH_ON_SOC_GPIO_0 to ULPPERH_ON_SOC_GPIO_11) are available only in the normal mode of operation (Power-states 4 and 3). For a description of power-states,For a description of power states, see the **SiWx917 Reference Manual** (contact [sales](https://www.silabs.com/about-us/contact-sales) for access). @@ -541,6 +551,10 @@ The `ULP_MODE_EXECUTION` macro will be enabled if the **ulp_mode_execution** com >**Note:** We recommend you install this component when your application needs to run in the ultra low power mode or to use peripherals. +For low power M4 sleep states such as PS2, PS3, and PS4, certain files must be run from RAM memory.. Please refer [Power manager integration guide]( +https://github.com/SiliconLabs/wiseconnect/blob/master/examples/si91x_soc/service/sl_si91x_power_manager_m4_wireless/resources/power_manager_integration_guide/power_manager_integration.pdf +) for more details + ## Memory Organization This section provides an overview of the different memory regions of the SiWx917. diff --git a/examples/featured/aws_device_shadow/app.c b/examples/featured/aws_device_shadow/app.c index 9d1e9b3a6..979f252c3 100644 --- a/examples/featured/aws_device_shadow/app.c +++ b/examples/featured/aws_device_shadow/app.c @@ -320,7 +320,7 @@ sl_status_t start_aws_device_shadow() simulate_room_temperature(&temperature, &window_open_state); rc = aws_iot_shadow_init_json_document(json_document_buffer, size_of_json_document_buffer); if (rc != SUCCESS) { - printf("\r\nFailed to initialize JSON buffer with error:0x%x\r\n", rc); + printf("\r\nFailed to initialize JSON buffer with error: %d\r\n", rc); continue; } @@ -330,14 +330,14 @@ sl_status_t start_aws_device_shadow() &temperature_handler, &window_actuator); if (rc != SUCCESS) { - printf("\r\nFailed to add reported value in JSON buffer with error:0x%x\r\n", rc); + printf("\r\nFailed to add reported value in JSON buffer with error: %d\r\n", rc); continue; } printf("\r\nAdding reported value in JSON buffer success\r\n"); rc = aws_iot_finalize_json_document(json_document_buffer, size_of_json_document_buffer); if (rc != SUCCESS) { - printf("\r\nFailed to finalize JSON buffer with error:0x%x\r\n", rc); + printf("\r\nFailed to finalize JSON buffer with error: %d\r\n", rc); continue; } printf("\r\nJSON finalization buffer Success\r\n"); @@ -352,7 +352,7 @@ sl_status_t start_aws_device_shadow() 40, true); if (rc != SUCCESS) { - printf("\r\nFailed to update JSON buffer with error:0x%x\r\n", rc); + printf("\r\nFailed to update JSON buffer with error: %d\r\n", rc); continue; } } diff --git a/examples/featured/aws_device_shadow/aws_device_shadow_ncp.slcp b/examples/featured/aws_device_shadow/aws_device_shadow_ncp.slcp index 646f0d5f3..343f6f2cc 100644 --- a/examples/featured/aws_device_shadow/aws_device_shadow_ncp.slcp +++ b/examples/featured/aws_device_shadow/aws_device_shadow_ncp.slcp @@ -11,10 +11,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -61,6 +61,8 @@ configuration: value: '1' - name: configTOTAL_HEAP_SIZE value: '51200' +- name: configTIMER_TASK_PRIORITY + value: '55' readme: - path: readme.md other_file: diff --git a/examples/featured/aws_device_shadow/aws_device_shadow_psram.slcp b/examples/featured/aws_device_shadow/aws_device_shadow_psram.slcp index f8b8abb52..8cffeaf24 100644 --- a/examples/featured/aws_device_shadow/aws_device_shadow_psram.slcp +++ b/examples/featured/aws_device_shadow/aws_device_shadow_psram.slcp @@ -13,10 +13,10 @@ filter: - Advanced sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -61,7 +61,7 @@ component: from: wiseconnect3_sdk - id: aws_sdk from: wiseconnect3_sdk - - id: sl_si91x_mem_pool_buffers + - id: sl_si91x_mem_pool_buffers_with_quota from: wiseconnect3_sdk toolchain_settings: - option: gcc_compiler_option diff --git a/examples/featured/aws_device_shadow/aws_device_shadow_soc.slcp b/examples/featured/aws_device_shadow/aws_device_shadow_soc.slcp index 49ebc5da4..87fc7ab5d 100644 --- a/examples/featured/aws_device_shadow/aws_device_shadow_soc.slcp +++ b/examples/featured/aws_device_shadow/aws_device_shadow_soc.slcp @@ -11,10 +11,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -45,7 +45,7 @@ component: from: wiseconnect3_sdk - id: aws_sdk from: wiseconnect3_sdk - - id: sl_si91x_mem_pool_buffers + - id: sl_si91x_mem_pool_buffers_with_quota from: wiseconnect3_sdk toolchain_settings: - option: gcc_compiler_option diff --git a/examples/featured/aws_device_shadow/aws_device_shadow_uart_ncp.slcp b/examples/featured/aws_device_shadow/aws_device_shadow_uart_ncp.slcp index 566651aeb..a3de5de39 100644 --- a/examples/featured/aws_device_shadow/aws_device_shadow_uart_ncp.slcp +++ b/examples/featured/aws_device_shadow/aws_device_shadow_uart_ncp.slcp @@ -11,10 +11,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -61,6 +61,8 @@ configuration: value: '1' - name: configTOTAL_HEAP_SIZE value: '51200' +- name: configTIMER_TASK_PRIORITY + value: '55' readme: - path: readme.md other_file: diff --git a/examples/featured/aws_device_shadow/readme.md b/examples/featured/aws_device_shadow/readme.md index 7385b88fd..ee36b9c07 100644 --- a/examples/featured/aws_device_shadow/readme.md +++ b/examples/featured/aws_device_shadow/readme.md @@ -23,27 +23,17 @@ This application demonstrates how to securely connect a Silicon Labs Si91x Wi-Fi To successfully use this application, developer should be familiar with the operation of [AWS IoT Core](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) and the [AWS IoT Device Shadow Service](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html). If you are new to AWS IoT Core, we recommend running through the [AWS IoT Core Tutorial](https://docs.aws.amazon.com/iot/latest/developerguide/iot-tutorials.html) before proceeding. In the following text, 'AWS IoT Core' is referred to as 'AWS' for brevity. -AWS refer 'Device Shadow' as a persistent, virtual representation of a device that can be accessed even if the physical device is offline. The device state is captured in its 'shadow' and is represented as a JSON document. The physical device can send commands using the MQTT protocol to get, update and delete the state of the shadow as well as receive notifications via MQTT about changes in the state of the shadow. +AWS refer 'Device Shadow' as a persistent, virtual representation of a device that can be accessed even if the physical device is offline. The device state is captured in its 'shadow' and is represented in a JSON format. The physical device can send commands using the MQTT protocol to get, update and delete the state of the shadow as well as receive notifications via MQTT about changes in the state of the shadow. The AWS IoT Device Shadow application publishes temperature and window open/close status on the topic `$aws/things/thingname/shadow/update`. The room temperature and the window open/close status is available on the AWS cloud. Additionally, the application subscribes to the shadow update topics: - ```sh - $aws/things/thingName/shadow/name/shadowName/update/accepted - $aws/things/thingName/shadow/name/shadowName/update/rejected - $aws/things/thingName/shadow/name/shadowName/update/delta +$aws/things/thingName/shadow/name/shadowName/update/accepted +$aws/things/thingName/shadow/name/shadowName/update/rejected +$aws/things/thingName/shadow/name/shadowName/update/delta ``` - -## Overview of AWS SDK - -AWS IoT Core is a cloud platform which connects devices across AWS cloud services. AWS IoT provides a interface which allows the devices to communicate securely and reliably in bi-directional ways to the AWS touch-points, even when the devices are offline. - -The AWS IoT Device SDK allow applications to securely connect to the AWS IoT platform. - -![Figure: Setup Diagram for Device Shadow Example](resources/readme/image431a.png) - ## Prerequisites/Setup Requirements ### Hardware Requirements @@ -56,6 +46,9 @@ The AWS IoT Device SDK allow applications to securely connect to the AWS IoT pla - Silicon Labs [BRD4180B](https://www.silabs.com/) - Host MCU Eval Kit. This example has been tested with: - Silicon Labs [WSTK + EFR32MG21](https://www.silabs.com/development-tools/wireless/efr32xg21-bluetooth-starter-kit) +- STM32F411RE MCU + - [STM32F411RE](https://www.st.com/en/microcontrollers-microprocessors/stm32f411re.html) MCU + - NCP Radio Board (BRD4346A + BRD8045C) ### Software Requirements @@ -78,10 +71,11 @@ The AWS IoT Device SDK allow applications to securely connect to the AWS IoT pla - Create a Studio project ### Instructions for Keil IDE and STM32F411RE MCU +Refer to the instructions [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode-with-stm32) to: - Install the [Keil IDE](https://www.keil.com/). - Download [WiSeConnect 3 SDK](https://github.com/SiliconLabs/wiseconnect) - - Update the device's connectivity firmware as mentioned [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode). + - Update the device's connectivity firmware as mentioned [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode-with-stm32#upgrade-the-si-wx91x-connectivity-firmware). - Connect the SiWx91x NCP to STM32F411RE Nucleo Board following the below steps: - Connect the male Arduino compatible header on carrier board to female Arduino compatible header on STM32F411RE Nucleo board. - Mount the NCP Radio board (BRD4346A) onto the radio board socket available on the base board (BRD8045C). @@ -92,11 +86,17 @@ The AWS IoT Device SDK allow applications to securely connect to the AWS IoT pla ## Application Build Environment -The application can be configured to suit your requirements and development environment. +The application can be configured to suit user requirements and development environment. Read through the following sections and make any changes needed. -- In the Project Explorer pane, expand the **config** folder and open the **sl_net_default_values.h** file. Configure the following parameters to enable your Silicon Labs Wi-Fi device to connect to your Wi-Fi network +### Configure sl_net_default_values.h -- **STA instance related parameters** +**File path for Simplicity Studio IDE:** +- In the Project Explorer pane, expand the **config** folder and open the **sl_net_default_values.h** file. + +**File path for Keil IDE:** +- In the Project pane, expand the **resources/defaults** folder and open the **sl_net_default_values.h** file. + +### STA instance related parameters - DEFAULT_WIFI_CLIENT_PROFILE_SSID refers to the name with which Wi-Fi network that shall be advertised and Si91X module is connected to it. @@ -160,15 +160,10 @@ After successful execution, the device updates are written to the AWS cloud and ## Additional Information -- AWS_IOT_MQTT_HOST parameter can be found as follows: - - ![AWS_IOT_MQTT_HOST_PAGE_1](resources/readme/aws_iot_mqtt_host_url_1.png) - - ![AWS_IOT_MQTT_HOST_PAGE_2](resources/readme/aws_iot_mqtt_host_url_2.png) - ### Setting up Security Certificates -- The WiSeConnect 3 SDK provides a conversion script (written in Python 3) to make the conversion straightforward. The script is provided in the SDK `/resources/scripts` directory and is called [certificate_to_array.py](https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk/tree/master/resources/certificates/). +- The WiSeConnect 3 SDK provides a conversion script (written in Python 3) to make the conversion straightforward. The script, [certificate_to_array.py](https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk/tree/master/resources/certificates/) +is provided in the SDK at `/resources/scripts` directory. - Copy the downloaded device certificate, private key from AWS and also the certificate_to_array.py to the `/resources/certificates`. @@ -245,14 +240,14 @@ Create a thing in the AWS IoT registry to represent your IoT device. ![Add Device 2](resources/readme/aws_create_thing_step5.png) -- To attach an existing policy choose the policy and click on create thing, if policy is not yet created Choose Create policy and fill the fields as mentioned in the following images. +- Attach the policy to the thing created -- choosing an existing policy. + - If you have any existing policy, attach it and click on create thing ![Attach policy](resources/readme/aws_choosing_policy.png) -- creating a policy. - - Click on create policy. +- If policy is not yet created, follow the below steps. + - Choose **Create policy** and fill the fields as per your requrements. ![Create policy](resources/readme/aws_create_thing_attach_policy.png) - Give the **Name** to your Policy, Fill **Action** and **Resource ARN** as shown in below image, Click on **Allow** under **Effect** and click **Create**. diff --git a/examples/featured/ble_per/app.c b/examples/featured/ble_per/app.c index c8c3f5c31..91206fd00 100644 --- a/examples/featured/ble_per/app.c +++ b/examples/featured/ble_per/app.c @@ -115,7 +115,8 @@ #define DUTY_CYCLING_DISABLE 0 #define DUTY_CYCLING_ENABLE 1 -#define ENABLE_POWER_SAVE 0 //! Set to 1 for powersave mode +#define ENABLE_POWER_SAVE 0 //! Set to 1 for powersave mode +#define LOCAL_DEV_ADDR_LEN 18 // Length of the local device address #define GAIN_TABLE_AND_MAX_POWER_UPDATE_ENABLE 0 //! To update gain table and max tx power and offsets @@ -351,7 +352,8 @@ void ble_per(void *unused) { UNUSED_PARAMETER(unused); sl_status_t status; - sl_wifi_firmware_version_t version = { 0 }; + sl_wifi_firmware_version_t version = { 0 }; + uint8_t local_dev_addr[LOCAL_DEV_ADDR_LEN] = { 0 }; #ifdef SLI_SI91X_MCU_INTERFACE sl_si91x_hardware_setup(); @@ -388,17 +390,14 @@ void ble_per(void *unused) print_firmware_version(&version); } - //! get the local device address(MAC address). + //! get the local device MAC address. status = rsi_bt_get_local_device_address(rsi_app_resp_get_dev_addr); if (status != RSI_SUCCESS) { - LOG_PRINT("\r\n Get Local Device Address Failed = %lx\r\n", status); + LOG_PRINT("\r\n Get local device address failed = %lx\r\n", status); + return; } else { - - LOG_PRINT("Get local device address: %x:%x:%x:%x\n", - rsi_app_resp_get_dev_addr[3], - rsi_app_resp_get_dev_addr[2], - rsi_app_resp_get_dev_addr[1], - rsi_app_resp_get_dev_addr[0]); + rsi_6byte_dev_address_to_ascii(local_dev_addr, rsi_app_resp_get_dev_addr); + LOG_PRINT("\r\n Local device address : %s \r\n ", local_dev_addr); } //! set the local device name @@ -605,6 +604,10 @@ void ble_per(void *unused) LOG_PRINT("\r\n M4 sleep"); sl_si91x_m4_sleep_wakeup(); } +#else + //To get tx_done logs properly and to avoid application hang issue due to continuous stats added 1sec delay. + //It is applicable for both sdk 2.9 and 3.0 + osDelay(1000); #endif } return; diff --git a/examples/featured/ble_per/ble_per_ncp.slcp b/examples/featured/ble_per/ble_per_ncp.slcp index a650829f5..c5a6a46b7 100644 --- a/examples/featured/ble_per/ble_per_ncp.slcp +++ b/examples/featured/ble_per/ble_per_ncp.slcp @@ -13,10 +13,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -64,6 +64,8 @@ configuration: value: '1' - name: configTOTAL_HEAP_SIZE value: '51200' + - name: configTIMER_TASK_PRIORITY + value: '55' readme: - path: readme.md other_file: diff --git a/examples/featured/ble_per/ble_per_psram.slcp b/examples/featured/ble_per/ble_per_psram.slcp index 5dd4e3400..b973f45c8 100644 --- a/examples/featured/ble_per/ble_per_psram.slcp +++ b/examples/featured/ble_per/ble_per_psram.slcp @@ -13,10 +13,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -77,7 +77,7 @@ component: from: wiseconnect3_sdk - id: udma_linker_config from: wiseconnect3_sdk - - id: sl_si91x_mem_pool_buffers + - id: sl_si91x_mem_pool_buffers_with_quota from: wiseconnect3_sdk toolchain_settings: - option: gcc_compiler_option diff --git a/examples/featured/ble_per/ble_per_soc.slcp b/examples/featured/ble_per/ble_per_soc.slcp index e152a6972..1988bda26 100644 --- a/examples/featured/ble_per/ble_per_soc.slcp +++ b/examples/featured/ble_per/ble_per_soc.slcp @@ -13,10 +13,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -60,7 +60,7 @@ component: from: wiseconnect3_sdk - id: basic_network_config_manager from: wiseconnect3_sdk - - id: sl_si91x_mem_pool_buffers + - id: sl_si91x_mem_pool_buffers_with_quota from: wiseconnect3_sdk requires: - name: device_needs_ram_execution diff --git a/examples/featured/ble_per/ble_per_uart_ncp.slcp b/examples/featured/ble_per/ble_per_uart_ncp.slcp index 9f51a7168..241cb8f52 100644 --- a/examples/featured/ble_per/ble_per_uart_ncp.slcp +++ b/examples/featured/ble_per/ble_per_uart_ncp.slcp @@ -13,10 +13,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c diff --git a/examples/featured/ble_per/readme.md b/examples/featured/ble_per/readme.md index e1fb29742..6bd0ab41b 100644 --- a/examples/featured/ble_per/readme.md +++ b/examples/featured/ble_per/readme.md @@ -67,6 +67,8 @@ Before running the application, the user will need the following things to setup - Upgrade your connectivity firmware - Create a Studio project +For details on the project folder structure, see the [WiSeConnect Examples](https://docs.silabs.com/wiseconnect/latest/wiseconnect-examples/#example-folder-structure) page. + ### Instructions for Keil IDE and STM32F411RE MCU - Install the [Keil IDE](https://www.keil.com/). diff --git a/examples/featured/firmware_update/firmware_update_ncp.slcp b/examples/featured/firmware_update/firmware_update_ncp.slcp index 5565a510f..4dea84471 100644 --- a/examples/featured/firmware_update/firmware_update_ncp.slcp +++ b/examples/featured/firmware_update/firmware_update_ncp.slcp @@ -12,10 +12,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -60,6 +60,8 @@ configuration: value: '1' - name: configTOTAL_HEAP_SIZE value: '51200' + - name: configTIMER_TASK_PRIORITY + value: '55' readme: - path: readme.md other_file: diff --git a/examples/featured/firmware_update/firmware_update_psram.slcp b/examples/featured/firmware_update/firmware_update_psram.slcp index ecfbb55af..635b5357d 100644 --- a/examples/featured/firmware_update/firmware_update_psram.slcp +++ b/examples/featured/firmware_update/firmware_update_psram.slcp @@ -14,10 +14,10 @@ filter: - Advanced sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -64,7 +64,7 @@ component: from: wiseconnect3_sdk - id: sl_si91x_soc_soft_reset from: wiseconnect3_sdk - - id: sl_si91x_mem_pool_buffers + - id: sl_si91x_mem_pool_buffers_with_quota from: wiseconnect3_sdk toolchain_settings: - option: gcc_compiler_option diff --git a/examples/featured/firmware_update/firmware_update_soc.slcp b/examples/featured/firmware_update/firmware_update_soc.slcp index b83bf9e4a..2f89ed580 100644 --- a/examples/featured/firmware_update/firmware_update_soc.slcp +++ b/examples/featured/firmware_update/firmware_update_soc.slcp @@ -12,10 +12,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -48,7 +48,7 @@ component: from: wiseconnect3_sdk - id: sl_si91x_soc_soft_reset from: wiseconnect3_sdk - - id: sl_si91x_mem_pool_buffers + - id: sl_si91x_mem_pool_buffers_with_quota from: wiseconnect3_sdk requires: - name: device_needs_ram_execution diff --git a/examples/featured/firmware_update/firmware_update_uart_ncp.slcp b/examples/featured/firmware_update/firmware_update_uart_ncp.slcp index 209e19480..79708f7c8 100644 --- a/examples/featured/firmware_update/firmware_update_uart_ncp.slcp +++ b/examples/featured/firmware_update/firmware_update_uart_ncp.slcp @@ -12,10 +12,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -60,6 +60,8 @@ configuration: value: '1' - name: configTOTAL_HEAP_SIZE value: '51200' + - name: configTIMER_TASK_PRIORITY + value: '55' readme: - path: readme.md other_file: diff --git a/examples/featured/firmware_update/readme.md b/examples/featured/firmware_update/readme.md index f1f625c50..1eca4a24c 100644 --- a/examples/featured/firmware_update/readme.md +++ b/examples/featured/firmware_update/readme.md @@ -18,7 +18,7 @@ This application demonstrates how to update the SiWx91x firmware via Wi-Fi by downloading an image from a remote TCP server. The TCP server may be hosted on a local PC (as demonstrated in this example), or alternately on a cloud service such as Amazon AWS or Microsoft Azure. The update process works as follows: -- The SiWx91x connects via Wi-Fi as a TCP client to a TCP update server. +- The SiWx91x acts as a TCP client and connects to a TCP server via Wi-Fi. - The SiWx91x OTA application sends a firmware file request to the server and server responds with the firmware file. - The OTA application programs the firmware into the SiWx91x flash memory and reboots. @@ -48,6 +48,9 @@ This application demonstrates how to update the SiWx91x firmware via Wi-Fi by do - NCP EFR Expansion Kit with NCP Radio board (BRD4346A + BRD8045A) [SiWx917-EB4346A] - Kits - EFR32xG24 Pro Kit +10 dBm [xG24-PK6009A](https://www.silabs.com/development-tools/wireless/efr32xg24-pro-kit-10-dbm?tab=overview) + - STM32F411RE MCU + - [STM32F411RE](https://www.st.com/en/microcontrollers-microprocessors/stm32f411re.html) MCU + - NCP Radio Board (BRD4346A + BRD8045C) ### Software Requirements @@ -71,10 +74,11 @@ This application demonstrates how to update the SiWx91x firmware via Wi-Fi by do - Create a Studio project ### Instructions for Keil IDE and STM32F411RE MCU + Refer to the instructions [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode-with-stm32) to: - Install the [Keil IDE](https://www.keil.com/). - Download [WiSeConnect 3 SDK](https://github.com/SiliconLabs/wiseconnect) - - Update the device's connectivity firmware as mentioned [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode). + - Update the device's connectivity firmware as mentioned [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode-with-stm32#upgrade-the-si-wx91x-connectivity-firmware). - Connect the SiWx91x NCP to STM32F411RE Nucleo Board following the below steps: - Connect the male Arduino compatible header on carrier board to female Arduino compatible header on STM32F411RE Nucleo board. - Mount the NCP Radio board (BRD4346A) onto the radio board socket available on the base board (BRD8045C). @@ -85,13 +89,18 @@ This application demonstrates how to update the SiWx91x firmware via Wi-Fi by do ## Application Build Environment -The application can be configured to suit your requirements and development environment. +The application can be configured to suit user requirements and development environment. Read through the following sections and make any changes needed. -### Wi-Fi Client Profile Configuration +### Configure sl_net_default_values.h -In the Project Explorer pane, expand the **config** folder and open the **sl_net_default_values.h** file. Configure the following parameters to enable your Silicon Labs Wi-Fi device to connect to your Wi-Fi network +**File path for Simplicity Studio IDE:** +- In the Project Explorer pane, expand the **config** folder and open the **sl_net_default_values.h** file. -- **STA instance related parameters** +**File path for Keil IDE:** +- In the Project pane, expand the **resources/defaults** folder and open the **sl_net_default_values.h** file. + + +### STA instance related parameters - DEFAULT_WIFI_CLIENT_PROFILE_SSID refers to the name with which Wi-Fi network that shall be advertised and Si91X module is connected to it. @@ -151,10 +160,10 @@ Refer to the instructions [here](https://docs.silabs.com/wiseconnect/latest/wise 1. Copy the TCP server application [firmware_update_tcp_server_9117.c](https://github.com/SiliconLabs/wiseconnect/blob/master/examples/featured/firmware_update/firmware_update_tcp_server_9117.c) provided with the application source to a Linux PC connected to the Wi-Fi access point. 2. Compile the application - - ```c - user@linux:~$ gcc firmware_update_tcp_server.c -o ota_server.bin - ``` + + ```c + user@linux:~$ gcc firmware_update_tcp_server_9117.c -o ota_server.bin + ``` 3. Run the application providing the TCP port number (specified in the SiWx91x app) together with the firmware file and path where [SiWx91x.NBZ.WC.GEN.OSI.x.x.x.rps](https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk/tree/master/firmware) is the firmware image to be sent to SiWx91x. diff --git a/examples/featured/powersave_standby_associated/powersave_standby_associated_ncp.slcp b/examples/featured/powersave_standby_associated/powersave_standby_associated_ncp.slcp index 2580edece..f85a8908e 100644 --- a/examples/featured/powersave_standby_associated/powersave_standby_associated_ncp.slcp +++ b/examples/featured/powersave_standby_associated/powersave_standby_associated_ncp.slcp @@ -12,10 +12,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c diff --git a/examples/featured/powersave_standby_associated/powersave_standby_associated_psram.slcp b/examples/featured/powersave_standby_associated/powersave_standby_associated_psram.slcp index 8be2466bb..25c99fe35 100644 --- a/examples/featured/powersave_standby_associated/powersave_standby_associated_psram.slcp +++ b/examples/featured/powersave_standby_associated/powersave_standby_associated_psram.slcp @@ -15,10 +15,10 @@ filter: - Beginner sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -64,7 +64,7 @@ component: from: wiseconnect3_sdk - id: sllib_m4_power_save from: wiseconnect3_sdk - - id: sl_si91x_mem_pool_buffers + - id: sl_si91x_mem_pool_buffers_with_quota from: wiseconnect3_sdk template_contribution: - name: psram_powersave_handle diff --git a/examples/featured/powersave_standby_associated/powersave_standby_associated_soc.slcp b/examples/featured/powersave_standby_associated/powersave_standby_associated_soc.slcp index 052311b77..5e8fca075 100644 --- a/examples/featured/powersave_standby_associated/powersave_standby_associated_soc.slcp +++ b/examples/featured/powersave_standby_associated/powersave_standby_associated_soc.slcp @@ -15,10 +15,10 @@ filter: - Beginner sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -51,7 +51,7 @@ component: from: wiseconnect3_sdk - id: sllib_m4_power_save from: wiseconnect3_sdk - - id: sl_si91x_mem_pool_buffers + - id: sl_si91x_mem_pool_buffers_with_quota from: wiseconnect3_sdk requires: - name: device_needs_ram_execution diff --git a/examples/featured/powersave_standby_associated/powersave_standby_associated_uart_ncp.slcp b/examples/featured/powersave_standby_associated/powersave_standby_associated_uart_ncp.slcp index 0f2092412..881dd328b 100644 --- a/examples/featured/powersave_standby_associated/powersave_standby_associated_uart_ncp.slcp +++ b/examples/featured/powersave_standby_associated/powersave_standby_associated_uart_ncp.slcp @@ -12,10 +12,10 @@ filter: value: ["Beginner"] sdk: id: gecko_sdk - version: 4.4.1 + version: 4.4.3 sdk_extension: - id: wiseconnect3_sdk - version: 3.1.4 + version: 3.2.0 source: - path: app.c - path: main.c @@ -60,6 +60,8 @@ configuration: value: '1' - name: configTOTAL_HEAP_SIZE value: '51200' + - name: configTIMER_TASK_PRIORITY + value: '55' readme: - path: readme.md other_file: diff --git a/examples/featured/powersave_standby_associated/readme.md b/examples/featured/powersave_standby_associated/readme.md index f25e91274..4714ad48e 100644 --- a/examples/featured/powersave_standby_associated/readme.md +++ b/examples/featured/powersave_standby_associated/readme.md @@ -47,19 +47,16 @@ The application connects to a remote server to send UDP data and also enables th - NCP EFR Expansion Kit with NCP Radio board (BRD4346A + BRD8045A) [SiWx917-EB4346A] - Kits - EFR32xG24 Pro Kit +10 dBm [xG24-PK6009A](https://www.silabs.com/development-tools/wireless/efr32xg24-pro-kit-10-dbm?tab=overview) - - Current consumption measurement pins for using power-meter (NCP mode): - - ![Figure: Setup Diagram for NCP mode Power Save Standby Example](resources/readme/power_save_current_measurement_pins.png) - - Negative probe of power meter is used for pin-1 and positive probe is used for pin-2 + - STM32F411RE MCU + - [STM32F411RE](https://www.st.com/en/microcontrollers-microprocessors/stm32f411re.html) MCU + - NCP Radio Board (BRD4346A + BRD8045C) ### Software Requirements - Simplicity Studio IDE (to be used with Silicon Labs MCU) - Keil IDE (to be used with STM32F411RE MCU) -- Serial Terminal - [Docklight](https://docklight.de/)/[Tera Term](https://ttssh2.osdn.jp/index.html.en) (to be used with Keil IDE) +- Serial Terminal - [Docklight](https://docklight.de/)/[Tera Term](https://ttssh2.osdn.jp/index.html.en) - [iPerf Application](https://iperf.fr/iperf-download.php) -- [Python Environment](https://www.python.org/downloads/) ### Setup Diagram @@ -74,29 +71,39 @@ The application connects to a remote server to send UDP data and also enables th - Connect your device to the computer - Upgrade your connectivity firmware - Create a Studio project + +For details on the project folder structure, see the [WiSeConnect Examples](https://docs.silabs.com/wiseconnect/latest/wiseconnect-examples/#example-folder-structure) page. ### Instructions for Keil IDE and STM32F411RE MCU +Refer to the instructions [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/) to: + - Install the [Keil IDE](https://www.keil.com/). - Download [WiSeConnect 3 SDK](https://github.com/SiliconLabs/wiseconnect) - - Update the device's connectivity firmware as mentioned [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode). + - Update the device's connectivity firmware as mentioned [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode-with-stm32#upgrade-the-si-wx91x-connectivity-firmware). - Connect the SiWx91x NCP to STM32F411RE Nucleo Board following the below steps: - Connect the male Arduino compatible header on carrier board to female Arduino compatible header on STM32F411RE Nucleo board. - Mount the NCP Radio board (BRD4346A) onto the radio board socket available on the base board (BRD8045C). - After connecting all the boards, the setup should look like the image shown below: ![Figure: Setup](resources/readme/stm32_setup.png) - Connect the setup to the computer. - - Open the AWS DEVICE SHADOW µVision project - **powersave_standby_associated.uvprojx** by navigating to **WiSeConnect 3 SDK → examples → featured → powersave_standby_associated → keil_project**. + - Open the Powersave standby associated µVision project - **powersave_standby_associated.uvprojx** by navigating to **WiSeConnect 3 SDK → examples → featured → powersave_standby_associated → keil_project**. ## Application Build Environment -The application can be configured to suit your requirements and development environment. +The application can be configured to suit user requirements and development environment. Read through the following sections and make any changes needed. + +### Configure sl_net_default_values.h + +**File path for Simplicity Studio IDE:** +- In the Project Explorer pane, expand the **config** folder and open the **sl_net_default_values.h** file. -- In the Project Explorer pane, expand the **config** folder and open the **sl_net_default_values.h** file. Configure the following parameters to enable your Silicon Labs Wi-Fi device to connect to your Wi-Fi network. +**File path for Keil IDE:** +- In the Project pane, expand the **resources/defaults** folder and open the **sl_net_default_values.h** file. -- STA instance related parameters: +Configure the following parameters to enable your Silicon Labs Wi-Fi device to connect to your Wi-Fi network - - DEFAULT_WIFI_CLIENT_PROFILE_SSID refers to the name with which Wi-Fi network that shall be advertised and Si91X module is connected to it. + - DEFAULT_WIFI_CLIENT_PROFILE_SSID refers to the name with which Wi-Fi network that shall be advertised and Si91X module is connected to it. ```c #define DEFAULT_WIFI_CLIENT_PROFILE_SSID "YOUR_AP_SSID" diff --git a/examples/featured/wlan_throughput/readme.md b/examples/featured/wlan_throughput/readme.md index f16d92a3d..8a8b4bd5b 100644 --- a/examples/featured/wlan_throughput/readme.md +++ b/examples/featured/wlan_throughput/readme.md @@ -2,21 +2,29 @@ ## Table of Contents -- [Purpose/Scope](#purposescope) -- [Prerequisites/Setup Requirements](#prerequisitessetup-requirements) - - [Hardware Requirements](#hardware-requirements) - - [Software Requirements](#software-requirements) - - [Setup Diagram](#setup-diagram) -- [Getting Started](#getting-started) -- [Application Build Environment](#application-build-environment) -- [Test the Application](#test-the-application) - - [Run the UDP Server](#run-the-udp-server) - - [UDP Tx Throughput](#udp-tx-throughput) - - [UDP Rx Throughput](#udp-rx-throughput) - - [TCP Tx Throughput](#tcp-tx-throughput) - - [TCP Rx Throughput](#tcp-rx-throughput) - - [TLS Tx Throughput](#tls-tx-throughput) - - [TLS Rx Throughput](#tls-rx-throughput) +- [Wi-Fi - Throughput](#wi-fi---throughput) + - [Table of Contents](#table-of-contents) + - [Purpose/Scope](#purposescope) + - [Prerequisites/Setup Requirements](#prerequisitessetup-requirements) + - [Hardware Requirements](#hardware-requirements) + - [Software Requirements](#software-requirements) + - [Setup Diagram](#setup-diagram) + - [Getting Started](#getting-started) + - [Instructions for Keil IDE and STM32F411RE MCU](#instructions-for-keil-ide-and-stm32f411re-mcu) + - [Instructions for Simplicity Studio IDE and Silicon Labs devices (SoC and NCP Modes)](#instructions-for-simplicity-studio-ide-and-silicon-labs-devices-soc-and-ncp-modes) + - [Application Build Environment](#application-build-environment) + - [Configure sl\_net\_default\_values.h](#configure-sl_net_default_valuesh) + - [Test the application](#test-the-application) + - [Instructions for Simplicity Studio IDE and Silicon Labs devices (SoC and NCP Modes)](#instructions-for-simplicity-studio-ide-and-silicon-labs-devices-soc-and-ncp-modes-1) + - [Instructions for Keil IDE and STM32F411RE MCU](#instructions-for-keil-ide-and-stm32f411re-mcu-1) + - [Application Prints:](#application-prints) + - [To Run Server](#to-run-server) + - [UDP Tx Throughput](#udp-tx-throughput) + - [UDP Rx Throughput](#udp-rx-throughput) + - [TCP Tx Throughput](#tcp-tx-throughput) + - [TCP Rx Throughput](#tcp-rx-throughput) + - [TLS Tx Throughput](#tls-tx-throughput) + - [TLS Rx Throughput](#tls-rx-throughput) ## Purpose/Scope @@ -68,9 +76,11 @@ In this application, the SiWx91x connects to a Wi-Fi access point, obtains an IP ### Instructions for Keil IDE and STM32F411RE MCU +Refer to the instructions [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/) to: + - Install the [Keil IDE](https://www.keil.com/). - Download [WiSeConnect 3 SDK](https://github.com/SiliconLabs/wiseconnect) -- Update the device's connectivity firmware as mentioned [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode). +- Update the device's connectivity firmware as mentioned [here](https://docs.silabs.com/wiseconnect/latest/wiseconnect-getting-started/getting-started-with-ncp-mode-with-stm32#upgrade-the-si-wx91x-connectivity-firmware). - Connect the SiWx91x NCP to STM32F411RE Nucleo Board following steps: - Connect the male Arduino compatible header on carrier board to female Arduino compatible header on STM32F411RE Nucleo board. - Mount the NCP Radio board (BRD4346A) onto the radio board socket available on the base board (BRD8045C). @@ -78,7 +88,7 @@ In this application, the SiWx91x connects to a Wi-Fi access point, obtains an IP ![Figure: Setup](resources/readme/stm32_setup.png) - Connect the setup to the computer. -- Open the Wi-Fi Throughput µVision project - **wlan_throughput.uvprojx** by navigating to **WiSeConnect 3 SDK → examples → wlan_throughput → projects**. +- Open the Wi-Fi Throughput µVision project - **wlan_throughput.uvprojx** by navigating to **WiSeConnect 3 SDK → examples → wlan_throughput → Keil project**. ### Instructions for Simplicity Studio IDE and Silicon Labs devices (SoC and NCP Modes) @@ -89,6 +99,8 @@ Refer to the instructions [here](https://docs.silabs.com/wiseconnect/latest/wise - Upgrade your connectivity firmware - Create a Studio project +For details on the project folder structure, see the [WiSeConnect Examples](https://docs.silabs.com/wiseconnect/latest/wiseconnect-examples/#example-folder-structure) page. + ## Application Build Environment The application can be configured to suit user requirements and development environment. Read through the following sections and make any changes needed. @@ -125,14 +137,18 @@ Configure the following parameters to enable your Silicon Labs Wi-Fi device to c - Other STA instance configurations can be modified if required in `default_wifi_client_profile` configuration structure. -- Configure the following parameters in `app.c` to test throughput app as per requirements +**Path for app.c in Keil IDE:** + +- Expand the **Application/User/Core** folder and open **app.c** file. + +Configure the following parameters in `app.c` to test throughput app as per requirements - Client/Server IP Settings ```c #define LISTENING_PORT // Local port to use #define SERVER_PORT // Remote server port - #define SERVER_IP_ADDRESS "192.168.0.100" // Remote server IP address + #define SERVER_IP "192.168.0.100" // Remote server IP address #define SOCKET_ASYNC_FEATURE 1 // Type of Socket used. Synchronous = 0, Asynchronous = 1 ``` @@ -161,11 +177,12 @@ Configure the following parameters to enable your Silicon Labs Wi-Fi device to c - Change the PLL_MODE to 1, in sl_si91x_protocol_types.h. **File path for Simplicity Studio IDE:** - - In the Project explorer pane, expand as follows **wiseconnect3_sdk_xxx** > **components** > **si91x** > **inc** folder and open **sl_si91x_protocol_types.h** file. + + - In the Project explorer pane, expand as follows **wiseconnect3_sdk_xxx** > **components** > **device** > **silabs** > **si91x** > **wireless** > **inc** folder and open **sl_si91x_protocol_types.h** file. **File path for Keil IDE:** - - In the Project pane, expand the **components/si91x** folder, open the **sl_si91x_protocol_types.h** file. + - In the Project pane, expand the **components/device/silabs/si91x/wireless/inc** folder, open the **sl_si91x_protocol_types.h** file. ```c #define PLL_MODE 1 @@ -187,10 +204,8 @@ Configure the following parameters to enable your Silicon Labs Wi-Fi device to c 44 // TCP RX window division factor }; ``` - **Path for app.c in Keil IDE:** - - Expand the **Application/User/Core** folder and open **app.c** file. -### Test the application +## Test the application ### Instructions for Simplicity Studio IDE and Silicon Labs devices (SoC and NCP Modes) @@ -201,20 +216,20 @@ Refer to the instructions [here](https://docs.silabs.com/wiseconnect/latest/wise > **Note:** The SiWx91x, which is configured as a UDP/TCP/TLS server/client, connects to the iPerf server/client and sends/receives data for configured intervals. While module is transmitting/receiving the data, application prints the throughput numbers in serial console. - ![Application_Prints](resources/readme/output_soc.png) - ### Instructions for Keil IDE and STM32F411RE MCU - Build the application. - Set the Tera Term up by connecting STM32's Serial COM port. This enables you to view the application prints. - Flash, run and debug the application. - The application prints appear as follows in the serial terminal. + +### Application Prints: ![STM32 Application_Prints](resources/readme/output_stm32.png) -#### Run the UDP Server +### To Run Server -##### UDP Tx Throughput +#### UDP Tx Throughput To measure UDP Tx throughput, configure the SiWx91x as a UDP client and start a UDP server on the remote PC. The iPerf command to start the UDP server on the PC is: @@ -227,20 +242,20 @@ The iPerf command to start the UDP server on the PC is: ![Figure: UDP_TX](resources/readme/image217b.png) -##### UDP Rx Throughput +#### UDP Rx Throughput To measure UDP Rx throughput, configure the SiWx91x as a UDP server and start a UDP client on the remote PC. The iPerf command to start the UDP client is: - > `C:\> iperf.exe -c -u -p -i 1 -b -t