Merge branch 'master' into feature/esp32s2beta_update

This commit is contained in:
Angus Gratton
2019-08-08 14:00:45 +10:00
committed by Angus Gratton
657 changed files with 6814 additions and 7534 deletions

View File

@@ -504,7 +504,7 @@ esp_err_t rtc_gpio_isolate(gpio_num_t gpio_num)
return ESP_OK;
}
void rtc_gpio_force_hold_dis_all()
void rtc_gpio_force_hold_dis_all(void)
{
#if CONFIG_IDF_TARGET_ESP32
for (int gpio = 0; gpio < GPIO_PIN_COUNT; ++gpio) {
@@ -836,7 +836,7 @@ esp_err_t touch_pad_get_fsm_mode(touch_fsm_mode_t *mode)
return ESP_OK;
}
esp_err_t touch_pad_sw_start()
esp_err_t touch_pad_sw_start(void)
{
portENTER_CRITICAL(&rtc_spinlock);
SENS.sar_touch_ctrl2.touch_start_en = 0;
@@ -951,19 +951,19 @@ esp_err_t touch_pad_clear_group_mask(uint16_t set1_mask, uint16_t set2_mask, uin
return ESP_OK;
}
uint32_t IRAM_ATTR touch_pad_get_status()
uint32_t IRAM_ATTR touch_pad_get_status(void)
{
uint32_t status = SENS.sar_touch_ctrl2.touch_meas_en;
return TOUCH_BITS_SWAP(status);
}
esp_err_t touch_pad_clear_status()
esp_err_t IRAM_ATTR touch_pad_clear_status(void)
{
SENS.sar_touch_ctrl2.touch_meas_en_clr = 1;
return ESP_OK;
}
esp_err_t touch_pad_intr_enable()
esp_err_t touch_pad_intr_enable(void)
{
portENTER_CRITICAL(&rtc_spinlock);
RTCCNTL.int_ena.rtc_touch = 1;
@@ -971,7 +971,7 @@ esp_err_t touch_pad_intr_enable()
return ESP_OK;
}
esp_err_t touch_pad_intr_disable()
esp_err_t touch_pad_intr_disable(void)
{
portENTER_CRITICAL(&rtc_spinlock);
RTCCNTL.int_ena.rtc_touch = 0;
@@ -1011,7 +1011,7 @@ esp_err_t touch_pad_config(touch_pad_t touch_num, uint16_t threshold)
return ESP_OK;
}
esp_err_t touch_pad_init()
esp_err_t touch_pad_init(void)
{
if (rtc_touch_mux == NULL) {
rtc_touch_mux = xSemaphoreCreateMutex();
@@ -1029,7 +1029,7 @@ esp_err_t touch_pad_init()
return ESP_OK;
}
esp_err_t touch_pad_deinit()
esp_err_t touch_pad_deinit(void)
{
RTC_MODULE_CHECK(rtc_touch_mux != NULL, "Touch pad not initialized", ESP_FAIL);
if (s_touch_pad_filter != NULL) {
@@ -1183,7 +1183,7 @@ err_no_mem:
return ESP_ERR_NO_MEM;
}
esp_err_t touch_pad_filter_stop()
esp_err_t touch_pad_filter_stop(void)
{
RTC_MODULE_CHECK(s_touch_pad_filter != NULL, "Touch pad filter not initialized", ESP_ERR_INVALID_STATE);
RTC_MODULE_CHECK(rtc_touch_mux != NULL, "Touch pad not initialized", ESP_ERR_INVALID_STATE);
@@ -1199,7 +1199,7 @@ esp_err_t touch_pad_filter_stop()
return ret;
}
esp_err_t touch_pad_filter_delete()
esp_err_t touch_pad_filter_delete(void)
{
RTC_MODULE_CHECK(s_touch_pad_filter != NULL, "Touch pad filter not initialized", ESP_ERR_INVALID_STATE);
RTC_MODULE_CHECK(rtc_touch_mux != NULL, "Touch pad not initialized", ESP_ERR_INVALID_STATE);
@@ -1349,7 +1349,7 @@ static esp_err_t adc_set_atten(adc_unit_t adc_unit, adc_channel_t channel, adc_a
return ESP_OK;
}
void adc_power_always_on()
void adc_power_always_on(void)
{
portENTER_CRITICAL(&rtc_spinlock);
#if CONFIG_IDF_TARGET_ESP32
@@ -1360,7 +1360,7 @@ void adc_power_always_on()
portEXIT_CRITICAL(&rtc_spinlock);
}
void adc_power_on()
void adc_power_on(void)
{
portENTER_CRITICAL(&rtc_spinlock);
#if CONFIG_IDF_TARGET_ESP32
@@ -1393,7 +1393,7 @@ void adc_power_on()
portEXIT_CRITICAL(&rtc_spinlock);
}
void adc_power_off()
void adc_power_off(void)
{
portENTER_CRITICAL(&rtc_spinlock);
#if CONFIG_IDF_TARGET_ESP32
@@ -1804,7 +1804,7 @@ esp_err_t adc1_config_width(adc_bits_width_t width_bit)
return ESP_OK;
}
static inline void adc1_fsm_disable()
static inline void adc1_fsm_disable(void)
{
#if CONFIG_IDF_TARGET_ESP32
//channel is set in the convert function
@@ -1829,7 +1829,7 @@ static inline void adc1_fsm_disable()
#endif
}
esp_err_t adc1_i2s_mode_acquire()
esp_err_t adc1_i2s_mode_acquire(void)
{
//lazy initialization
//for i2s, block until acquire the lock
@@ -1849,7 +1849,7 @@ esp_err_t adc1_i2s_mode_acquire()
return ESP_OK;
}
esp_err_t adc1_adc_mode_acquire()
esp_err_t adc1_adc_mode_acquire(void)
{
//lazy initialization
//for adc1, block until acquire the lock
@@ -1870,7 +1870,7 @@ esp_err_t adc1_adc_mode_acquire()
return ESP_OK;
}
esp_err_t adc1_lock_release()
esp_err_t adc1_lock_release(void)
{
RTC_MODULE_CHECK((uint32_t*)adc1_i2s_lock != NULL, "adc1 lock release called before acquire", ESP_ERR_INVALID_STATE );
// for now the WiFi would use ADC2 and set xpd_sar force on.
@@ -1901,7 +1901,7 @@ int adc1_get_raw(adc1_channel_t channel)
return adc_value;
}
int adc1_get_voltage(adc1_channel_t channel) //Deprecated. Use adc1_get_raw() instead
int adc1_get_voltage(adc1_channel_t channel) //Deprecated. Use adc1_get_raw(void) instead
{
return adc1_get_raw(channel);
}
@@ -1964,7 +1964,7 @@ esp_err_t adc2_pad_get_io_num(adc2_channel_t channel, gpio_num_t *gpio_num)
return ESP_OK;
}
esp_err_t adc2_wifi_acquire()
esp_err_t adc2_wifi_acquire(void)
{
//lazy initialization
//for wifi, block until acquire the lock
@@ -1973,7 +1973,7 @@ esp_err_t adc2_wifi_acquire()
return ESP_OK;
}
esp_err_t adc2_wifi_release()
esp_err_t adc2_wifi_release(void)
{
RTC_MODULE_CHECK((uint32_t*)adc2_wifi_lock != NULL, "wifi release called before acquire", ESP_ERR_INVALID_STATE );
@@ -2252,7 +2252,7 @@ esp_err_t dac_out_voltage(dac_channel_t channel, uint8_t dac_value)
return ESP_OK;
}
esp_err_t dac_i2s_enable()
esp_err_t dac_i2s_enable(void)
{
portENTER_CRITICAL(&rtc_spinlock);
SET_PERI_REG_MASK(SENS_SAR_DAC_CTRL1_REG, SENS_DAC_DIG_FORCE_M | SENS_DAC_CLK_INV_M);
@@ -2260,7 +2260,7 @@ esp_err_t dac_i2s_enable()
return ESP_OK;
}
esp_err_t dac_i2s_disable()
esp_err_t dac_i2s_disable(void)
{
portENTER_CRITICAL(&rtc_spinlock);
CLEAR_PERI_REG_MASK(SENS_SAR_DAC_CTRL1_REG, SENS_DAC_DIG_FORCE_M | SENS_DAC_CLK_INV_M);
@@ -2279,7 +2279,7 @@ static inline void adc1_hall_enable(bool enable)
#endif
}
static int hall_sensor_get_value() //hall sensor without LNA
static int hall_sensor_get_value(void) //hall sensor without LNA
{
int hall_value = 0;
@@ -2309,7 +2309,7 @@ static int hall_sensor_get_value() //hall sensor without LNA
return hall_value;
}
int hall_sensor_read()
int hall_sensor_read(void)
{
adc_gpio_init(ADC_UNIT_1, ADC1_CHANNEL_0);
adc_gpio_init(ADC_UNIT_1, ADC1_CHANNEL_3);
@@ -2351,7 +2351,7 @@ static void rtc_isr(void* arg)
REG_WRITE(RTC_CNTL_INT_CLR_REG, status);
}
static esp_err_t rtc_isr_ensure_installed()
static esp_err_t rtc_isr_ensure_installed(void)
{
esp_err_t err = ESP_OK;
portENTER_CRITICAL(&s_rtc_isr_handler_list_lock);