mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
fix(hal): check the public header files and fix violations
fix(hal/include): fix header violations in hal component fix(hal/include): Move type definitions from `xx_hal.h` to `xx_types.h` fix(hal/include): Move type definitions from `xx_hal.h` to `xx_types.h` fix(hal/include): Add comment for a far away `#endif` fix(hal/include): change scope for cpp guard ci: Remove components/hal/ comment from public headers check exceptions Add missing include macro sdkconfig.h for header files Add missing include macro stdbool.h for header files Add missing include macro stdint.h for header files Add missing capability guard macro for header files Add missing cpp guard macro for header files Remove some useless include macros Add some missing `inline` attribute for functions defined in header files Remove components/hal/ from public headers check exceptions fix(hal/include): fix invalid licenses fix(hal/include): fix invalid licenses fix(hal/include): add missing soc_caps.h fix(hal): include soc_caps.h before cap macro is used fix(hal): Remove unnecessary target check fix(hal): fix header and macro problems Add missing include macro Remove loop dependency in hal Add comment for far-away endif fix(hal): Add missing soc_caps.h ci: update check_copyright_ignore.txt Change the sequence of `#include` macro, cpp guard macro Change the wrap scope of capacity macro fix(hal): Change position of C++ guard to pass test
This commit is contained in:
@@ -168,7 +168,7 @@ static inline uint32_t periph_ll_get_rst_en_mask(periph_module_t periph, bool en
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t periph_ll_get_clk_en_reg(periph_module_t periph)
|
||||
static inline uint32_t periph_ll_get_clk_en_reg(periph_module_t periph)
|
||||
{
|
||||
switch (periph) {
|
||||
case PERIPH_SARADC_MODULE:
|
||||
@@ -236,7 +236,7 @@ static uint32_t periph_ll_get_clk_en_reg(periph_module_t periph)
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t periph_ll_get_rst_en_reg(periph_module_t periph)
|
||||
static inline uint32_t periph_ll_get_rst_en_reg(periph_module_t periph)
|
||||
{
|
||||
switch (periph) {
|
||||
case PERIPH_SARADC_MODULE:
|
||||
|
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "soc/hwcrypto_reg.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "hal/ds_types.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "hal/assert.h"
|
||||
#include "hal/ecc_types.h"
|
||||
#include "soc/ecc_mult_reg.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "soc/system_reg.h"
|
||||
#include "soc/hwcrypto_reg.h"
|
||||
#include "hal/hmac_hal.h"
|
||||
#include "hal/hmac_types.h"
|
||||
|
||||
#define SHA256_BLOCK_SZ 64
|
||||
#define SHA256_DIGEST_SZ 32
|
||||
|
@@ -17,7 +17,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static uint32_t lp_periph_ll_get_clk_en_mask(lp_periph_module_t lp_periph)
|
||||
static inline uint32_t lp_periph_ll_get_clk_en_mask(lp_periph_module_t lp_periph)
|
||||
{
|
||||
switch (lp_periph) {
|
||||
case LP_PERIPH_I2C0_MODULE:
|
||||
@@ -30,7 +30,7 @@ static uint32_t lp_periph_ll_get_clk_en_mask(lp_periph_module_t lp_periph)
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t lp_periph_ll_get_rst_en_mask(lp_periph_module_t lp_periph)
|
||||
static inline uint32_t lp_periph_ll_get_rst_en_mask(lp_periph_module_t lp_periph)
|
||||
{
|
||||
switch (lp_periph) {
|
||||
case LP_PERIPH_I2C0_MODULE:
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include "soc/soc.h"
|
||||
#include "hal/assert.h"
|
||||
#include "modem/modem_lpcon_struct.h"
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include "soc/soc.h"
|
||||
#include "hal/assert.h"
|
||||
#include "modem/modem_syscon_struct.h"
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "hal/assert.h"
|
||||
#include "hal/mpi_types.h"
|
||||
#include "soc/pcr_reg.h"
|
||||
#include "soc/rsa_reg.h"
|
||||
#include "soc/mpi_periph.h"
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "hal/sdio_slave_hal.h"
|
||||
#include "hal/sdio_slave_types.h"
|
||||
#include "soc/slc_struct.h"
|
||||
#include "soc/slc_reg.h"
|
||||
#include "soc/host_struct.h"
|
||||
@@ -24,6 +24,10 @@
|
||||
#include "soc/hinf_struct.h"
|
||||
#include "soc/lldesc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/// Get address of the only SLC registers
|
||||
#define sdio_slave_ll_get_slc(ID) (&SLC)
|
||||
/// Get address of the only HOST registers
|
||||
@@ -507,3 +511,7 @@ static inline void sdio_slave_ll_slvint_fetch_clear(slc_dev_t *slc, sdio_slave_l
|
||||
*out_slv_int = slv_int;
|
||||
slc->slc0int_clr.val = slv_int;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include "soc/spi_periph.h"
|
||||
#include "soc/spi_mem_struct.h"
|
||||
#include "hal/assert.h"
|
||||
#include "hal/misc.h"
|
||||
#include "hal/spi_types.h"
|
||||
#include "hal/spi_flash_types.h"
|
||||
#include "soc/pcr_struct.h"
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include "esp_assert.h"
|
||||
#include "hal/misc.h"
|
||||
#include "hal/assert.h"
|
||||
#include "hal/twai_types.h"
|
||||
@@ -82,7 +83,7 @@ typedef union {
|
||||
uint8_t bytes[13];
|
||||
} __attribute__((packed)) twai_ll_frame_buffer_t;
|
||||
|
||||
_Static_assert(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes");
|
||||
ESP_STATIC_ASSERT(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes");
|
||||
|
||||
/* ---------------------------- Peripheral Control Register ----------------- */
|
||||
|
||||
|
Reference in New Issue
Block a user