sdm: fixed wrong sdm struct sequence on esp32h2

This commit is contained in:
laokaiyao
2023-02-24 15:46:15 +08:00
committed by morris
parent af805df3cb
commit fd5bfb2cd4
4 changed files with 49 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
/**
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -34,58 +34,58 @@ extern "C" {
* Duty Cycle Configure Register of SDM1
*/
#define GPIO_SIGMADELTA1_REG (DR_REG_GPIO_EXT_BASE + 0x4)
/** GPIO_SD0_IN : R/W; bitpos: [7:0]; default: 0;
/** GPIO_SD1_IN : R/W; bitpos: [7:0]; default: 0;
* This field is used to configure the duty cycle of sigma delta modulation output.
*/
#define GPIO_SD0_IN 0x000000FFU
#define GPIO_SD0_IN_M (GPIO_SD0_IN_V << GPIO_SD0_IN_S)
#define GPIO_SD0_IN_V 0x000000FFU
#define GPIO_SD0_IN_S 0
/** GPIO_SD0_PRESCALE : R/W; bitpos: [15:8]; default: 255;
#define GPIO_SD1_IN 0x000000FFU
#define GPIO_SD1_IN_M (GPIO_SD1_IN_V << GPIO_SD1_IN_S)
#define GPIO_SD1_IN_V 0x000000FFU
#define GPIO_SD1_IN_S 0
/** GPIO_SD1_PRESCALE : R/W; bitpos: [15:8]; default: 255;
* This field is used to set a divider value to divide APB clock.
*/
#define GPIO_SD0_PRESCALE 0x000000FFU
#define GPIO_SD0_PRESCALE_M (GPIO_SD0_PRESCALE_V << GPIO_SD0_PRESCALE_S)
#define GPIO_SD0_PRESCALE_V 0x000000FFU
#define GPIO_SD0_PRESCALE_S 8
#define GPIO_SD1_PRESCALE 0x000000FFU
#define GPIO_SD1_PRESCALE_M (GPIO_SD1_PRESCALE_V << GPIO_SD1_PRESCALE_S)
#define GPIO_SD1_PRESCALE_V 0x000000FFU
#define GPIO_SD1_PRESCALE_S 8
/** GPIO_SIGMADELTA2_REG register
* Duty Cycle Configure Register of SDM2
*/
#define GPIO_SIGMADELTA2_REG (DR_REG_GPIO_EXT_BASE + 0x8)
/** GPIO_SD0_IN : R/W; bitpos: [7:0]; default: 0;
/** GPIO_SD2_IN : R/W; bitpos: [7:0]; default: 0;
* This field is used to configure the duty cycle of sigma delta modulation output.
*/
#define GPIO_SD0_IN 0x000000FFU
#define GPIO_SD0_IN_M (GPIO_SD0_IN_V << GPIO_SD0_IN_S)
#define GPIO_SD0_IN_V 0x000000FFU
#define GPIO_SD0_IN_S 0
/** GPIO_SD0_PRESCALE : R/W; bitpos: [15:8]; default: 255;
#define GPIO_SD2_IN 0x000000FFU
#define GPIO_SD2_IN_M (GPIO_SD2_IN_V << GPIO_SD2_IN_S)
#define GPIO_SD2_IN_V 0x000000FFU
#define GPIO_SD2_IN_S 0
/** GPIO_SD2_PRESCALE : R/W; bitpos: [15:8]; default: 255;
* This field is used to set a divider value to divide APB clock.
*/
#define GPIO_SD0_PRESCALE 0x000000FFU
#define GPIO_SD0_PRESCALE_M (GPIO_SD0_PRESCALE_V << GPIO_SD0_PRESCALE_S)
#define GPIO_SD0_PRESCALE_V 0x000000FFU
#define GPIO_SD0_PRESCALE_S 8
#define GPIO_SD2_PRESCALE 0x000000FFU
#define GPIO_SD2_PRESCALE_M (GPIO_SD2_PRESCALE_V << GPIO_SD2_PRESCALE_S)
#define GPIO_SD2_PRESCALE_V 0x000000FFU
#define GPIO_SD2_PRESCALE_S 8
/** GPIO_SIGMADELTA3_REG register
* Duty Cycle Configure Register of SDM3
*/
#define GPIO_SIGMADELTA3_REG (DR_REG_GPIO_EXT_BASE + 0xc)
/** GPIO_SD0_IN : R/W; bitpos: [7:0]; default: 0;
/** GPIO_SD3_IN : R/W; bitpos: [7:0]; default: 0;
* This field is used to configure the duty cycle of sigma delta modulation output.
*/
#define GPIO_SD0_IN 0x000000FFU
#define GPIO_SD0_IN_M (GPIO_SD0_IN_V << GPIO_SD0_IN_S)
#define GPIO_SD0_IN_V 0x000000FFU
#define GPIO_SD0_IN_S 0
/** GPIO_SD0_PRESCALE : R/W; bitpos: [15:8]; default: 255;
#define GPIO_SD3_IN 0x000000FFU
#define GPIO_SD3_IN_M (GPIO_SD3_IN_V << GPIO_SD3_IN_S)
#define GPIO_SD3_IN_V 0x000000FFU
#define GPIO_SD3_IN_S 0
/** GPIO_SD3_PRESCALE : R/W; bitpos: [15:8]; default: 255;
* This field is used to set a divider value to divide APB clock.
*/
#define GPIO_SD0_PRESCALE 0x000000FFU
#define GPIO_SD0_PRESCALE_M (GPIO_SD0_PRESCALE_V << GPIO_SD0_PRESCALE_S)
#define GPIO_SD0_PRESCALE_V 0x000000FFU
#define GPIO_SD0_PRESCALE_S 8
#define GPIO_SD3_PRESCALE 0x000000FFU
#define GPIO_SD3_PRESCALE_M (GPIO_SD3_PRESCALE_V << GPIO_SD3_PRESCALE_S)
#define GPIO_SD3_PRESCALE_V 0x000000FFU
#define GPIO_SD3_PRESCALE_S 8
/** GPIO_CLOCK_GATE_REG register
* Clock Gating Configure Register