mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
refactor(esp_hal_regi2c): move regi2c implementation from esp_rom to esp_hal_regi2c
This commit is contained in:
@@ -57,6 +57,12 @@ extern "C" {
|
||||
---------------------------------------------------------------*/
|
||||
#define ADC_LL_PWDET_CCT_DEFAULT (4)
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
I2C SAR ADC REG PD workaround
|
||||
---------------------------------------------------------------*/
|
||||
#define ADC_LL_ANA_CALI_REG_PD_WORKAROUND 1
|
||||
#define ADC_LL_ANA_CALI_REG_BYTE_NUM 8
|
||||
|
||||
typedef enum {
|
||||
ADC_LL_POWER_BY_FSM, /*!< ADC XPD controlled by FSM. Used for polling mode */
|
||||
ADC_LL_POWER_SW_ON, /*!< ADC XPD controlled by SW. power on. Used for DMA mode */
|
||||
|
||||
@@ -104,6 +104,7 @@ static inline void temperature_sensor_ll_clk_sel(temperature_sensor_clk_src_t cl
|
||||
*
|
||||
* @param tsens_dac ``reg_val`` in table ``temperature_sensor_attributes``
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void temperature_sensor_ll_set_range(uint32_t range)
|
||||
{
|
||||
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_TSENS_DAC, range);
|
||||
@@ -126,6 +127,7 @@ static inline uint32_t temperature_sensor_ll_get_raw_value(void)
|
||||
*
|
||||
* @return uint32_t offset value
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline uint32_t temperature_sensor_ll_get_offset(void)
|
||||
{
|
||||
return REGI2C_READ_MASK(I2C_SAR_ADC, I2C_SARADC_TSENS_DAC);
|
||||
|
||||
Reference in New Issue
Block a user