ci: solve public headers errors

This commit is contained in:
Renz Christian Bagaporo
2020-01-27 11:43:08 +08:00
parent b675df4b08
commit 16e0c93e40
49 changed files with 359 additions and 17 deletions

View File

@@ -17,6 +17,10 @@
#include "i2c_apll.h"
#include "i2c_bbpll.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Analog function control register */
#define ANA_CONFIG_REG 0x6000E044
#define ANA_CONFIG_S (8)
@@ -46,3 +50,7 @@ void rom_i2c_writeReg_Mask(uint8_t block, uint8_t host_id, uint8_t reg_add, uint
#define I2C_READREG_RTC(block, reg_add) \
rom_i2c_readReg(block, block##_HOSTID, reg_add)
#ifdef __cplusplus
}
#endif

View File

@@ -5,6 +5,10 @@
#include "soc/apb_ctrl_struct.h"
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
ADC_DIG_FORMAT_12BIT, /*!< ADC to I2S data format, [15:12]-channel [11:0]-12 bits ADC data.
Note: In single convert mode. */
@@ -588,3 +592,8 @@ static inline bool adc_ll_vref_output(int io)
{
return false;
}
#ifdef __cplusplus
}
#endif

View File

@@ -24,6 +24,10 @@
#include "soc/dac_periph.h"
#include "hal/dac_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Power on dac module and start output voltage.
*
@@ -182,4 +186,8 @@ static inline void dac_ll_dma_enable(void)
static inline void dac_ll_dma_disable(void)
{
SENS.sar_dac_ctrl1.dac_dig_force = 0;
}
}
#ifdef __cplusplus
}
#endif

View File

@@ -30,6 +30,9 @@
#include <stdbool.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
#define gpspi_flash_ll_get_hw(host_id) (((host_id)==SPI2_HOST ? &GPSPI2 \
: ((host_id)==SPI3_HOST ? &GPSPI3 \
@@ -352,3 +355,6 @@ static inline void gpspi_flash_ll_set_dummy_out(spi_dev_t *dev, uint32_t out_en,
dev->ctrl.d_pol = out_lev;
}
#ifdef __cplusplus
}
#endif

View File

@@ -18,6 +18,10 @@
#include "soc/i2c_periph.h"
#include "hal/i2c_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief I2C hardware cmd register filed.
*/
@@ -864,3 +868,7 @@ static inline void i2c_ll_slave_init(i2c_dev_t *hw)
hw->ctr.val = ctrl_reg.val;
hw->fifo_conf.fifo_addr_cfg_en = 0;
}
#ifdef __cplusplus
}
#endif

View File

@@ -20,6 +20,10 @@
#include "hal/ledc_types.h"
#include "soc/ledc_periph.h"
#ifdef __cplusplus
extern "C" {
#endif
#define LEDC_LL_GET_HW() &LEDC
/**
@@ -477,3 +481,7 @@ static inline void ledc_ll_bind_channel_timer(ledc_dev_t *hw, ledc_mode_t speed_
static inline void ledc_ll_get_channel_timer(ledc_dev_t *hw, ledc_mode_t speed_mode, ledc_channel_t channel_num, ledc_timer_t *timer_sel){
*timer_sel = hw->channel_group[speed_mode].channel[channel_num].conf0.timer_sel;
}
#ifdef __cplusplus
}
#endif

View File

@@ -25,6 +25,10 @@
#include "hal/rtc_io_types.h"
#include "hal/gpio_types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
RTCIO_FUNC_RTC = 0x0, /*!< The pin controled by RTC module. */
RTCIO_FUNC_DIGITAL = 0x1, /*!< The pin controlled by DIGITAL module. */
@@ -346,4 +350,8 @@ static inline void rtcio_ll_enable_sleep_setting(gpio_num_t gpio_num)
static inline void rtcio_ll_disable_sleep_setting(gpio_num_t gpio_num)
{
CLEAR_PERI_REG_MASK(rtc_io_desc[gpio_num].reg, rtc_io_desc[gpio_num].slpsel);
}
}
#ifdef __cplusplus
}
#endif

View File

@@ -25,6 +25,10 @@
#include "gpspi_flash_ll.h"
#include "spimem_flash_ll.h"
#ifdef __cplusplus
extern "C" {
#endif
// For esp32s2, spimem is equivalent to traditional spi peripherals found
// in esp32. Let the spi flash clock reg definitions reflect this.
#define SPI_FLASH_LL_CLKREG_VAL_5MHZ {.spimem=SPIMEM_FLASH_LL_CLKREG_VAL_5MHZ}
@@ -89,3 +93,7 @@ typedef union {
#define spi_flash_ll_set_dummy(dev, dummy) spimem_flash_ll_set_dummy((spi_mem_dev_t*)dev, dummy)
#define spi_flash_ll_set_dummy_out(dev, en, lev) spimem_flash_ll_set_dummy_out((spi_mem_dev_t*)dev, en, lev)
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -29,6 +29,10 @@
#include "soc/spi_periph.h"
#include "esp32s2/rom/lldesc.h"
#ifdef __cplusplus
extern "C" {
#endif
/// Registers to reset during initialization. Don't use in app.
#define SPI_LL_RST_MASK (SPI_OUT_RST | SPI_IN_RST | SPI_AHBM_RST | SPI_AHBM_FIFO_RST)
/// Interrupt not used. Don't use in app.
@@ -858,3 +862,7 @@ static inline uint32_t spi_ll_slave_get_rcv_bitlen(spi_dev_t *hw)
#undef SPI_LL_RST_MASK
#undef SPI_LL_UNUSED_INT_MASK
#ifdef __cplusplus
}
#endif

View File

@@ -31,6 +31,10 @@
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#ifdef __cplusplus
extern "C" {
#endif
#define spimem_flash_ll_get_hw(host_id) (((host_id)==SPI1_HOST ? &SPIMEM1 : NULL ))
typedef typeof(SPIMEM1.clock) spimem_flash_ll_clock_reg_t;
@@ -377,3 +381,7 @@ static inline void spimem_flash_ll_set_dummy_out(spi_mem_dev_t *dev, uint32_t ou
dev->ctrl.q_pol = out_lev;
dev->ctrl.d_pol = out_lev;
}
#ifdef __cplusplus
}
#endif

View File

@@ -27,6 +27,10 @@
#include_next "hal/touch_sensor_hal.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Reset the whole of touch module.
*
@@ -572,3 +576,7 @@ void touch_hal_sleep_channel_config(const touch_pad_sleep_channel_t *slp_config)
* @param pad_num pointer to touch pad which caused wakeup.
*/
#define touch_hal_get_wakeup_status(pad_num) touch_ll_get_wakeup_status(pad_num)
#ifdef __cplusplus
}
#endif

View File

@@ -27,6 +27,11 @@
#include "soc/touch_sensor_periph.h"
#include "hal/touch_sensor_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Set touch sensor touch sensor times of charge and discharge.
*
@@ -1070,4 +1075,8 @@ static inline void touch_ll_sleep_read_proximity_cnt(uint32_t *approach_cnt)
static inline void touch_ll_get_wakeup_status(touch_pad_t *pad_num)
{
*pad_num = (touch_pad_t)RTCCNTL.touch_slp_thres.touch_slp_pad;
}
}
#ifdef __cplusplus
}
#endif

View File

@@ -20,6 +20,10 @@
#include "hal/uart_types.h"
#include "soc/uart_periph.h"
#ifdef __cplusplus
extern "C" {
#endif
// The default fifo depth
#define UART_LL_FIFO_DEF_LEN (UART_FIFO_LEN)
// Get UART hardware instance with giving uart num
@@ -767,3 +771,7 @@ static inline void uart_ll_inverse_signal(uart_dev_t *hw, uint32_t inv_mask)
conf0_reg.dtr_inv |= (inv_mask & UART_SIGNAL_DTR_INV) ? 1 : 0;
hw->conf0.val = conf0_reg.val;
}
#ifdef __cplusplus
}
#endif