soc: updates caps usage
We should define caps as 1 if true. When use the caps macros, #if and #if ! should be used instead of #ifdef/#ifndef.
This commit is contained in:
@@ -23,7 +23,7 @@ extern "C" {
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
typedef enum {
|
||||
#ifdef SOC_LEDC_SUPPORT_HS_MODE
|
||||
#if SOC_LEDC_SUPPORT_HS_MODE
|
||||
LEDC_HIGH_SPEED_MODE = 0, /*!< LEDC high speed speed_mode */
|
||||
#endif
|
||||
LEDC_LOW_SPEED_MODE, /*!< LEDC low speed speed_mode */
|
||||
@@ -45,7 +45,7 @@ typedef enum {
|
||||
typedef enum {
|
||||
LEDC_SLOW_CLK_RTC8M = 0, /*!< LEDC low speed timer clock source is 8MHz RTC clock*/
|
||||
LEDC_SLOW_CLK_APB, /*!< LEDC low speed timer clock source is 80MHz APB clock*/
|
||||
#ifdef SOC_LEDC_SUPPORT_XTAL_CLOCK
|
||||
#if SOC_LEDC_SUPPORT_XTAL_CLOCK
|
||||
LEDC_SLOW_CLK_XTAL, /*!< LEDC low speed timer clock source XTAL clock*/
|
||||
#endif
|
||||
} ledc_slow_clk_sel_t;
|
||||
@@ -55,7 +55,7 @@ typedef enum {
|
||||
LEDC_USE_REF_TICK, /*!< LEDC timer select REF_TICK clock as source clock*/
|
||||
LEDC_USE_APB_CLK, /*!< LEDC timer select APB clock as source clock*/
|
||||
LEDC_USE_RTC8M_CLK, /*!< LEDC timer select RTC8M_CLK as source clock. Only for low speed channels and this parameter must be the same for all low speed channels*/
|
||||
#ifdef SOC_LEDC_SUPPORT_XTAL_CLOCK
|
||||
#if SOC_LEDC_SUPPORT_XTAL_CLOCK
|
||||
LEDC_USE_XTAL_CLK, /*!< LEDC timer select XTAL clock as source clock*/
|
||||
#endif
|
||||
} ledc_clk_cfg_t;
|
||||
|
||||
@@ -133,7 +133,7 @@ typedef struct {
|
||||
uint32_t tx_lsbfirst : 1; ///< Whether LSB is sent first for TX data, device specific
|
||||
uint32_t rx_lsbfirst : 1; ///< Whether LSB is received first for RX data, device specific
|
||||
uint32_t no_compensate : 1; ///< No need to add dummy to compensate the timing, device specific
|
||||
#ifdef SOC_SPI_SUPPORT_AS_CS
|
||||
#if SOC_SPI_SUPPORT_AS_CS
|
||||
uint32_t as_cs : 1; ///< Whether to toggle the CS while the clock toggles, device specific
|
||||
#endif
|
||||
uint32_t positive_cs : 1; ///< Whether the postive CS feature is abled, device specific
|
||||
|
||||
@@ -302,7 +302,7 @@ void timer_hal_get_status_reg_mask_bit(timer_hal_context_t *hal, uint32_t *statu
|
||||
*/
|
||||
#define timer_hal_get_intr_status_reg(hal) timer_ll_get_intr_status_reg((hal)->dev)
|
||||
|
||||
#ifdef SOC_TIMER_GROUP_SUPPORT_XTAL
|
||||
#if SOC_TIMER_GROUP_SUPPORT_XTAL
|
||||
/**
|
||||
* @brief Set clock source.
|
||||
*
|
||||
|
||||
@@ -98,7 +98,7 @@ typedef enum {
|
||||
TIMER_AUTORELOAD_MAX,
|
||||
} timer_autoreload_t;
|
||||
|
||||
#ifdef SOC_TIMER_GROUP_SUPPORT_XTAL
|
||||
#if SOC_TIMER_GROUP_SUPPORT_XTAL
|
||||
/**
|
||||
* @brief Select timer source clock.
|
||||
*/
|
||||
@@ -118,7 +118,7 @@ typedef struct {
|
||||
timer_count_dir_t counter_dir; /*!< Counter direction */
|
||||
timer_autoreload_t auto_reload; /*!< Timer auto-reload */
|
||||
uint32_t divider; /*!< Counter clock divider. The divider's range is from from 2 to 65536. */
|
||||
#ifdef SOC_TIMER_GROUP_SUPPORT_XTAL
|
||||
#if SOC_TIMER_GROUP_SUPPORT_XTAL
|
||||
timer_src_clk_t clk_src; /*!< Use XTAL as source clock. */
|
||||
#endif
|
||||
} timer_config_t;
|
||||
|
||||
Reference in New Issue
Block a user