Skip to content

Commit ef4f475

Browse files
VaiaPatta1985suda-morris
authored andcommitted
docs: fix anonymous flags in various structs
I noticed a few structs where the flags didn't show up correctly in the docs. Naming the flag struct makes the individual flags appear properly in the nested struct. Merges #17803 Closes #17804
1 parent b07432e commit ef4f475

File tree

18 files changed

+82
-69
lines changed

18 files changed

+82
-69
lines changed

components/esp_driver_mcpwm/include/driver/mcpwm_cap.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ typedef struct {
2222
int group_id; /*!< Specify from which group to allocate the capture timer */
2323
mcpwm_capture_clock_source_t clk_src; /*!< MCPWM capture timer clock source */
2424
uint32_t resolution_hz; /*!< Resolution of capture timer */
25-
struct {
25+
/// Extra configuration flags for capture timer
26+
struct extra_mcpwm_capture_timer_flags {
2627
uint32_t allow_pd: 1; /*!< Set to allow power down. When this flag set, the driver will backup/restore the MCPWM registers before/after entering/exist sleep mode.
2728
By this approach, the system can power off MCPWM's power domain.
2829
This can save power, but at the expense of more RAM being consumed.*/

components/esp_driver_mcpwm/include/driver/mcpwm_cmpr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ extern "C" {
2121
typedef struct {
2222
int intr_priority; /*!< MCPWM comparator interrupt priority,
2323
if set to 0, the driver will try to allocate an interrupt with a relative low priority (1,2,3) */
24-
struct {
24+
/// Extra configuration flags for comparator
25+
struct extra_mcpwm_comparator_flags {
2526
uint32_t update_cmp_on_tez: 1; /*!< Whether to update compare value when timer count equals to zero (tez) */
2627
uint32_t update_cmp_on_tep: 1; /*!< Whether to update compare value when timer count equals to peak (tep) */
2728
uint32_t update_cmp_on_sync: 1; /*!< Whether to update compare value on sync event */

components/esp_driver_mcpwm/include/driver/mcpwm_fault.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ typedef struct {
2323
int intr_priority; /*!< MCPWM GPIO fault interrupt priority,
2424
if set to 0, the driver will try to allocate an interrupt with a relative low priority (1,2,3) */
2525
int gpio_num; /*!< GPIO used by the fault signal */
26-
struct {
26+
/// Extra configuration flags for GPIO fault
27+
struct extra_mcpwm_gpio_fault_flags {
2728
uint32_t active_level: 1; /*!< On which level the fault signal is treated as active */
2829
} flags; /*!< Extra configuration flags for GPIO fault */
2930
} mcpwm_gpio_fault_config_t;

components/esp_driver_mcpwm/include/driver/mcpwm_gen.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ extern "C" {
2020
*/
2121
typedef struct {
2222
int gen_gpio_num; /*!< The GPIO number used to output the PWM signal */
23-
struct {
23+
/// Extra configuration flags for generator
24+
struct extra_mcpwm_generator_flags {
2425
uint32_t invert_pwm: 1; /*!< Whether to invert the PWM signal (done by GPIO matrix) */
2526
} flags; /*!< Extra configuration flags for generator */
2627
} mcpwm_generator_config_t;

components/esp_driver_mcpwm/include/driver/mcpwm_oper.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ typedef struct {
2222
int group_id; /*!< Specify from which group to allocate the MCPWM operator */
2323
int intr_priority; /*!< MCPWM operator interrupt priority,
2424
if set to 0, the driver will try to allocate an interrupt with a relative low priority (1,2,3) */
25-
struct {
25+
/// Extra configuration flags for operator
26+
struct extra_mcpwm_operator_flags {
2627
uint32_t update_gen_action_on_tez: 1; /*!< Whether to update generator action when timer counts to zero */
2728
uint32_t update_gen_action_on_tep: 1; /*!< Whether to update generator action when timer counts to peak */
2829
uint32_t update_gen_action_on_sync: 1; /*!< Whether to update generator action on sync event */

components/esp_driver_mcpwm/include/driver/mcpwm_sync.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ extern "C" {
2020
*/
2121
typedef struct {
2222
mcpwm_timer_event_t timer_event; /*!< Timer event, upon which MCPWM timer will generate the sync signal */
23-
struct {
23+
/// Extra configuration flags for timer sync source
24+
struct extra_mcpwm_timer_sync_src_flags {
2425
uint32_t propagate_input_sync: 1; /*!< The input sync signal would be routed to its sync output */
25-
} flags; /*!< Extra configuration flags for timer sync source */
26+
} flags; /*!< Extra configuration flags for timer sync source */
2627
} mcpwm_timer_sync_src_config_t;
2728

2829
/**
@@ -46,7 +47,8 @@ esp_err_t mcpwm_new_timer_sync_src(mcpwm_timer_handle_t timer, const mcpwm_timer
4647
typedef struct {
4748
int group_id; /*!< MCPWM group ID */
4849
int gpio_num; /*!< GPIO used by sync source */
49-
struct {
50+
/// Extra configuration flags for GPIO sync source
51+
struct extra_mcpwm_gpio_sync_src_flags {
5052
uint32_t active_neg: 1; /*!< Whether the sync signal is active on negedge, by default, the sync signal's posedge is treated as active */
5153
} flags; /*!< Extra configuration flags for GPIO sync source */
5254
} mcpwm_gpio_sync_src_config_t;

components/esp_driver_mcpwm/include/driver/mcpwm_timer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ typedef struct {
3737
uint32_t period_ticks; /*!< Number of count ticks within a period */
3838
int intr_priority; /*!< MCPWM timer interrupt priority,
3939
if set to 0, the driver will try to allocate an interrupt with a relative low priority (1,2,3) */
40-
struct {
40+
/// Extra configuration flags for MCPWM timer
41+
struct extra_mcpwm_timer_flags {
4142
uint32_t update_period_on_empty: 1; /*!< Whether to update period when timer counts to zero */
4243
uint32_t update_period_on_sync: 1; /*!< Whether to update period on sync event */
4344
uint32_t allow_pd: 1; /*!< Set to allow power down. When this flag set, the driver will backup/restore the MCPWM registers before/after entering/exist sleep mode.

components/esp_driver_parlio/include/driver/parlio_rx.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@ typedef struct {
3333
Only takes effect when using level or pulse delimiter, set to `-1` if only use the soft delimiter */
3434
gpio_num_t data_gpio_nums[PARLIO_RX_UNIT_MAX_DATA_WIDTH]; /*!< Parallel IO data GPIO numbers, set to `-1` if it's not used,
3535
The driver will take [0 .. (data_width - 1)] as the data pins */
36-
struct {
36+
/// Extra configuration flags for PARLIO RX unit
37+
struct extra_parlio_rx_unit_flags {
3738
uint32_t free_clk : 1; /*!< Whether the input external clock is a free-running clock. A free-running clock will always keep running (e.g. I2S bclk),
3839
a non-free-running clock will start when there are data transporting and stop when the bus idle (e.g. SPI).
3940
This flag only takes effect when select PARLIO_CLK_SRC_EXTERNAL as clock source */
4041
uint32_t clk_gate_en : 1; /*!< Enable RX clock gating, only available when the clock direction is output(not supported on ESP32-C6)
4142
the output clock will be controlled by the valid gpio,
4243
i.e. high level of valid gpio to enable the clock output, low to disable */
43-
uint32_t allow_pd: 1; /*!< Set to allow power down. When this flag set, the driver will backup/restore the PARLIO registers before/after entering/exist sleep mode.
44+
uint32_t allow_pd: 1; /*!< Set to allow power down. When this flag set, the driver will backup/restore the PARLIO registers before/after entering/exist sleep mode.
4445
By this approach, the system can power off PARLIO's power domain.
4546
This can save power, but at the expense of more RAM being consumed. */
4647
} flags; /*!< RX driver flags */

components/esp_driver_parlio/include/driver/parlio_tx.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ typedef struct {
3737
size_t dma_burst_size; /*!< DMA burst size, in bytes */
3838
parlio_sample_edge_t sample_edge; /*!< Parallel IO sample edge */
3939
parlio_bit_pack_order_t bit_pack_order; /*!< Set the order of packing the bits into bytes (only works when `data_width` < 8) */
40-
struct {
40+
/// Extra configuration flags for PARLIO TX unit
41+
struct extra_parlio_tx_unit_flags {
4142
uint32_t clk_gate_en: 1; /*!< Enable TX clock gating,
4243
the output clock will be controlled by the MSB bit of the data bus,
4344
i.e. by data_gpio_nums[PARLIO_TX_UNIT_MAX_DATA_WIDTH-1]. High level to enable the clock output, low to disable */

components/esp_driver_pcnt/include/driver/pulse_cnt.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ typedef struct {
6464
int high_limit; /*!< High limitation of the count unit, should be higher than 0 */
6565
int intr_priority; /*!< PCNT interrupt priority,
6666
if set to 0, the driver will try to allocate an interrupt with a relative low priority (1,2,3) */
67-
struct {
67+
/// Extra configuration flags for PCNT unit
68+
struct extra_pcnt_unit_flags {
6869
uint32_t accum_count: 1; /*!< Whether to accumulate the count value when overflows at the high/low limit */
6970
#if SOC_PCNT_SUPPORT_STEP_NOTIFY
7071
uint32_t en_step_notify_up: 1; /*!< Enable step notify in the positive direction */
@@ -79,7 +80,8 @@ typedef struct {
7980
typedef struct {
8081
int edge_gpio_num; /*!< GPIO number used by the edge signal. Set to -1 if unused */
8182
int level_gpio_num; /*!< GPIO number used by the level signal. Set to -1 if unused */
82-
struct {
83+
/// Extra configuration flags for PCNT channel
84+
struct extra_pcnt_chan_flags {
8385
uint32_t invert_edge_input: 1; /*!< Invert the input edge signal */
8486
uint32_t invert_level_input: 1; /*!< Invert the input level signal */
8587
uint32_t virt_edge_io_level: 1; /*!< Virtual edge IO level, 0: low, 1: high. Only valid when edge_gpio_num is set to -1 */
@@ -146,7 +148,8 @@ esp_err_t pcnt_unit_set_glitch_filter(pcnt_unit_handle_t unit, const pcnt_glitch
146148
*/
147149
typedef struct {
148150
int clear_signal_gpio_num; /*!< GPIO number used by the clear signal, the default active level is high */
149-
struct {
151+
/// Extra configuration flags for PCNT clear signal
152+
struct extra_pcnt_clear_signal_flags {
150153
uint32_t invert_clear_signal: 1; /*!< Invert the clear input signal */
151154
} flags; /*!< clear signal config flags */
152155
} pcnt_clear_signal_config_t;

0 commit comments

Comments
 (0)