text stringlengths 1 9.98k | __index_level_0__ int64 0 4.17k |
|---|---|
/*
*/
#pragma once
#include
#include
#include "esp_err.h"
#include "hal/temperature_sensor_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef struct temperature_sensor_obj_t *temperature_sensor_handle_t;
/**
*/
typedef struct {
int range_min; /**< the minimum value of the temperature you wan... | 0 |
< temperature sensor value is higher than high threshold*/
TEMPERATURE_VAL_LOWER_THAN_LOW_THRESHOLD = 1, /*!< temperature sensor value is lower than low threshold*/
} temperature_val_intr_condition_t;
/**
*/
typedef struct {
int celsius_value; /**< Celsius value in interrupt callback. */
temperature_val_... | 0 |
Interrupt will be triggered if temperature value is lower than this value */
} temperature_sensor_abs_threshold_config_t;
/**
*/
esp_err_t temperature_sensor_set_absolute_threshold(temperature_sensor_handle_t tsens, const temperature_sensor_abs_threshold_config_t *abs_cfg);
/**
*/
typedef struct {
float increa... | 0 |
/*
*/
#pragma once
#include "esp_err.h"
#include "esp_etm.h"
#include "driver/temperature_sensor.h"
#include "hal/temperature_sensor_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef struct {
temperature_sensor_etm_event_type_t event_type; /*!< Temperature Sensor ETM event type */
} temperatu... | 1 |
/*
*/
#pragma once
#include
#include "soc/temperature_sensor_periph.h"
#include "hal/temperature_sensor_types.h"
#include "driver/temperature_sensor.h"
#include "esp_intr_alloc.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
TEMP_SENSOR_FSM_INIT,
TEMP_SENSOR_FSM_ENABLE,
} t... | 2 |
/*
*/
#pragma once
/* Provide a SHA256 API for bootloader_support code,
that can be used from bootloader or app code.
This header is available to source code in the bootloader & bootloader_support components only.
Use mbedTLS APIs or include esp32/sha.h to calculate SHA256 in IDF apps.
*/
#include
#includ... | 3 |
/*
*/
#ifndef __BOOT_CONFIG_H__
#define __BOOT_CONFIG_H__
#include
#ifdef __cplusplus
extern "C"
{
#endif
#include "esp_flash_partitions.h"
#include "soc/soc.h"
#define SPI_SEC_SIZE 0x1000
#define SPI_ERROR_LOG "spi flash error"
#define MAX_OTA_SLOTS 16
typedef struct {
esp_partition_pos_t ota_info;
es... | 4 |
/*
*/
#pragma once
#include "bootloader_config.h"
#include "esp_image_format.h"
#include "bootloader_config.h"
/**
*/
bool bootloader_utility_load_partition_table(bootloader_state_t* bs);
/**
*/
int bootloader_utility_get_selected_boot_partition(const bootloader_state_t *bs);
/**
*/
__attribute__((__noreturn__)... | 5 |
/*
*/
#pragma once
/**
*/
void bootloader_ana_super_wdt_reset_config(bool enable);
/**
*/
void bootloader_ana_bod_reset_config(bool enable);
/**
*/
void bootloader_ana_clock_glitch_reset_config(bool enable);
| 6 |
/*
*/
#pragma once
/**
*/
void bootloader_console_init(void);
/**
*/
void bootloader_console_deinit(void);
/**
*/
void bootloader_console_write_char_usb(char c);
| 7 |
/*
*/
#pragma once
#include "sdkconfig.h"
#include
#include
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/... | 8 |
/*
*/
#pragma once
#include "esp_err.h"
#include "esp_image_format.h"
/**@{*/
/**
extern int _bss_start;
extern int _bss_end;
extern int _data_start;
extern int _data_end;
/**@}*/
/**
extern esp_image_header_t bootloader_image_hdr;
/**@{*/
/**
esp_err_t bootloader_read_bootloader_header(void);
esp_err_t bootloader... | 9 |
/*
*/
#warning esp_flash_data_types.h has been merged into esp_flash_partitions.h, please include esp_flash_partitions.h instead
#include "esp_flash_partitions.h"
| 10 |
/*
*/
#pragma once
#include
#include
#include "esp_flash_partitions.h"
#include "esp_app_format.h"
#include "esp_assert.h"
#ifdef __cplusplus
extern "C" {
#endif
#define ESP_ERR_IMAGE_BASE 0x2000
#define ESP_ERR_IMAGE_FLASH_FAIL (ESP_ERR_IMAGE_BASE + 1)
#define ESP_ERR_IMAGE_INVALID (ESP_ERR_IMAGE_BASE +... | 11 |
Print errors. */
ESP_IMAGE_VERIFY_SILENT, /* Verify image contents, not load to memory, load metadata. Don't print errors. */
#ifdef BOOTLOADER_BUILD
ESP_IMAGE_LOAD, /* Verify image contents, load to memory, load metadata. Print errors. */
ESP_IMAGE_LOAD_NO_VALIDATE, /* Not verify image c... | 11 |
< Reserve for custom propose */
#endif
uint32_t crc; /*!< Check sum crc32 */
} rtc_retain_mem_t;
ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, crc) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t), "CRC field must be the last field of rtc_retain_mem_t structure");
#ifdef CONFIG_BOOTLOADER_RESERVE_... | 11 |
/*
*/
#pragma once
#include "esp_err.h"
#include "esp_types.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
#define ESP_PARTITION_MAGIC 0x50AA
#define ESP_PARTITION_MAGIC_MD5 0xEBEB
#define PART_TYPE_APP 0x00
#define PART_SUBTYPE_FACTORY 0x00
#define PART_SUBTYPE_OTA_FLAG 0x10
#define PART_SUBTYP... | 12 |
Has matching value in bootloader KConfig.projbuild file. */
#define ESP_PARTITION_TABLE_OFFSET CONFIG_PARTITION_TABLE_OFFSET /* Offset of partition table. Backwards-compatible name.*/
#define ESP_PARTITION_TABLE_MAX_LEN 0xC00 /* Maximum length of partition table data */
#define ESP_PARTITION_TABLE_MAX_ENTRIES (ESP_PA... | 12 |
< App was confirmed as non-workable. This app will not selected to boot at all. */
ESP_OTA_IMG_ABORTED = 0x4U, /*!< App could not confirm the workable or non-workable. In bootloader IMG_PENDING_VERIFY state will be changed to IMG_ABORTED. This app will not selected to boot at all. */
ESP_OTA_IMG... | 12 |
/*
*/
#pragma once
#include
#include
#include
#include "soc/soc.h"
#include "soc/soc_caps.h"
#include "sdkconfig.h"
#include "esp_attr.h"
#ifdef __cplusplus
extern "C" {
#endif
/** The content of this file is to be kept in sync with the common section of esp_memory_utils.h **/
/**
*/
__attribute__((always_inl... | 13 |
h **/
/** Don't add new functions below **/
#ifdef __cplusplus
}
#endif
| 13 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/** @brief Configure clocks for early boot
*/
void bootloader_clock_configure(void);
/** @brief Return the rated maximum frequency of this chip
*/
int bootloader_clock_get_rated_freq_mhz(void);
#ifdef __cplusplus
}
#endif
| 14 |
/*
*/
#pragma once
#include
#include "esp_assert.h"
// TODO: IDF-9197
#include "sdkconfig.h"
/**
typedef enum {
ESP_CHIP_ID_ESP32 = 0x0000, /*!< chip ID: ESP32 */
ESP_CHIP_ID_ESP32S2 = 0x0002, /*!< chip ID: ESP32-S2 */
ESP_CHIP_ID_ESP32C3 = 0x0005, /*!< chip ID: ESP32-C3 */
ESP_CHIP_ID_ESP32S3 = ... | 15 |
< SPI mode QIO */
ESP_IMAGE_SPI_MODE_QOUT, /*!< SPI mode QOUT */
ESP_IMAGE_SPI_MODE_DIO, /*!< SPI mode DIO */
ESP_IMAGE_SPI_MODE_DOUT, /*!< SPI mode DOUT */
ESP_IMAGE_SPI_MODE_FAST_READ, /*!< SPI mode FAST_READ */
ESP_IMAGE_SPI_MODE_SLOW_READ /*!< SPI mode SLOW_READ */
} e... | 15 |
< SPI flash size 4 MB */
ESP_IMAGE_FLASH_SIZE_8MB, /*!< SPI flash size 8 MB */
ESP_IMAGE_FLASH_SIZE_16MB, /*!< SPI flash size 16 MB */
ESP_IMAGE_FLASH_SIZE_32MB, /*!< SPI flash size 32 MB */
ESP_IMAGE_FLASH_SIZE_64MB, /*!< SPI flash size 64 MB */
ESP_IMAGE_FLASH_SIZE_128MB, ... | 15 |
< Entry address */
uint8_t wp_pin; /*!< WP pin when SPI pins set via efuse (read by ROM bootloader,
uint8_t spi_pin_drv[3]; /*!< Drive settings for the SPI flash pins (read by ROM bootloader) */
esp_chip_id_t chip_id; /*!< Chip identification number */
uint8_t min_chip_rev; /*!... | 15 |
< Address of segment */
uint32_t data_len; /*!< Length of data */
} esp_image_segment_header_t;
#define ESP_IMAGE_MAX_SEGMENTS 16 /*!< Max count of segments in the image. */
| 15 |
/*
*/
#pragma once
#include "esp_flash_partitions.h"
#include "esp_image_format.h"
#ifdef __cplusplus
extern "C" {
#endif
// Type of hold a GPIO in low state
typedef enum {
GPIO_LONG_HOLD = 1, /*!< The long hold GPIO */
GPIO_SHORT_HOLD = -1, /*!< The short hold GPIO */
GPIO_NOT_HOLD = 0 /*!<... | 16 |
/*
*/
#pragma once
#include
#include
#include "soc/efuse_periph.h"
#include "soc/soc_caps.h"
#include "esp_image_format.h"
#include "esp_rom_efuse.h"
#include "sdkconfig.h"
#include "esp_rom_crc.h"
#include "hal/efuse_ll.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP3... | 17 |
Can be compiled as part of app or bootloader code.
*/
#define ESP_SECURE_BOOT_DIGEST_LEN 32
#if CONFIG_IDF_TARGET_ESP32C2
#define ESP_SECURE_BOOT_KEY_DIGEST_LEN 16
#else
#define ESP_SECURE_BOOT_KEY_DIGEST_LEN 32
#endif
#ifdef CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH
#include "esp_efuse.h"
#include "esp_efuse_table.h"... | 17 |
*/
esp_err_t esp_secure_boot_permanently_enable(void);
/** @brief Enables secure boot V2 if it is not already enabled.
*/
esp_err_t esp_secure_boot_v2_permanently_enable(const esp_image_metadata_t *image_data);
/** @brief Verify the secure boot signature appended to some binary data in flash.
*/
esp_err_t esp_sec... | 17 |
CONFIG_IDF_TARGET_ESP32 || CONFIG_ESP32_REV_MIN_FULL >= 300
/** @brief Legacy ECDSA verification function
*/
esp_err_t esp_secure_boot_verify_signature_block(const esp_secure_boot_sig_block_t *sig_block, const uint8_t *image_digest)
__attribute__((deprecated("use esp_secure_boot_verify_ecdsa_signature_block inste... | 17 |
defined(BOOTLOADER_BUILD) && SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
/** @brief Returns the verification status of the image pointed by the part_pos argument against the public key digest present at index `efuse_digest_index`
*/
esp_err_t esp_secure_boot_verify_with_efuse_digest_index(int ... | 17 |
/*
*/
#pragma once
#include
#include
#include
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
static inline bool bootloader_util_regions_overlap(
const intptr_t start1, const intptr_t end1,
const intptr_t start2, const intptr_t end2)
{
assert(end1 > start1);
assert(end2 > start2);
return (end... | 18 |
/*
*/
#pragma once
#include
#include "esp_attr.h"
#include "esp_err.h"
#include "soc/soc_caps.h"
#ifndef BOOTLOADER_BUILD
#include "spi_flash_mmap.h"
#endif
#include "hal/efuse_ll.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
/* @brief Flash encryption mode based on efuse values
*/
typedef enum ... | 19 |
/*
*/
#pragma once
#include
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
void bootloader_random_enable(void);
/**
*/
void bootloader_random_disable(void);
/**
*/
void bootloader_fill_random(void *buffer, size_t length);
#ifdef __cplusplus
}
#endif
| 20 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
void bootloader_init_mem(void);
#ifdef __cplusplus
}
#endif
| 21 |
/*
*/
#ifndef __BOOTLOADER_FLASH_H
#define __BOOTLOADER_FLASH_H
#include
#include
#include
#include
#include /* including in bootloader for error values */
#include "sdkconfig.h"
#include "bootloader_flash.h"
#ifdef __cplusplus
extern "C" {
#endif
#define FLASH_SECTOR_SIZE 0x1000
#define FLASH_BLOCK_SIZE 0x10... | 22 |
This header is available to source code in the bootloader &
bootloader_support components only.
*/
/**
*/
uint32_t bootloader_mmap_get_free_pages(void);
/**
*/
const void *bootloader_mmap(uint32_t src_addr, uint32_t size);
/**
*/
void bootloader_munmap(const void *mapping);
/**
*/
esp_err_t bootloader_... | 22 |
/*
*/
#pragma once
#include
#include
#include "spi_flash_mmap.h" /* including in bootloader for error values */
#include "esp_private/spi_flash_os.h"
#include "sdkconfig.h"
#include "soc/soc_caps.h"
#include "bootloader_flash_override.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
flash_id = ID & 0xffff;
*... | 23 |
/*
*/
#pragma once
#include "sdkconfig.h"
#include "esp_image_format.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
void bootloader_flash_update_id(void);
/**
*/
void bootloader_flash_update_size(uint32_t size);
/**
*/
void bootloader_flash_cs_timing_config(void);
/**
*/
void bootloader_flash_clock_config... | 24 |
/*
*/
#pragma once
#include
#ifdef __cplusplus
extern "C" {
#endif
/** @brief Enable Quad I/O mode in bootloader (if configured)
*/
void bootloader_enable_qio_mode(void);
/**
flash_id = ID & 0xffff;
*/
uint32_t bootloader_read_flash_id(void);
#ifdef __cplusplus
}
#endif
| 25 |
/*
*/
#pragma once
#include
#include "esp_err.h"
#include "esp_attr.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned (*bootloader_flash_read_status_fn_t)(void);
typedef void (*bootloader_flash_write_status_fn_t)(unsigned);
typedef struct __attribute__((packed))
{
const char *manufacturer;
uint8_... | 26 |
py
flash_id"
If manufacturer ID matches, and flash ID ORed with flash ID mask
matches, enable_qio_mode() will execute "Read Cmd", test if bit
number "QIE Bit" is set, and if not set it will call "Write Cmd"
with this bit set.
Searching of this table stops when the first match is found.
*/
extern co... | 26 |
/*
*/
#pragma once
#include
#include
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
esp_err_t bootloader_init_spi_flash(void);
#if CONFIG_APP_BUILD_TYPE_RAM && !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP
/**
*/
void bootloader_flash_hardware_init(void);
#endif
#ifdef __cplusplus
}
#endif
| 27 |
/*
*/
#include "esp_secure_boot.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/secure_boot.h"
#elif CONFIG_... | 28 |
/*
*/
#pragma once
#include
#include
#include "hal/ieee802154_ll.h"
#include "esp_ieee802154_frame.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef struct {
bool auto_ack_tx; /*!< A flag indicates auto-tx ack mode is enabled or not */
... | 29 |
< Tx power configuration */
uint8_t channel; /*!< Channel configuration */
ieee802154_ll_pending_mode_t pending_mode; /*!< Pending mode configuration */
int8_t cca_threshold; ... | 29 |
/*
*/
#pragma once
#include
#include
#include "sdkconfig.h"
#include "esp_log.h"
#include "esp_err.h"
#include "soc/soc.h"
#include "esp_ieee802154_frame.h"
#include "esp_ieee802154.h"
#ifdef __cplusplus
extern "C" {
#endif
#define IEEE802154_TAG "ieee802154"
// These three macros are in microseconds, used for ... | 30 |
< IEEE802154 radio state cca trigger tx */
IEEE802154_STATE_TX, /*!< IEEE802154 radio state tx */
IEEE802154_STATE_TEST_TX, /*!< IEEE802154 radio state test mode tx */
IEEE802154_STATE_RX_ACK, /*!< IEEE802154 radio state rx ack */
IEEE802154_STATE_ED, ... | 30 |
**/
/**
extern void esp_ieee802154_cca_done(bool channel_free);
/**
extern void esp_ieee802154_receive_failed(uint16_t error);
/**
extern void esp_ieee802154_ed_failed(uint16_t error);
#if CONFIG_IEEE802154_TEST
#define IEEE802154_STATIC
#define IEEE802154_INLINE
extern void esp_ieee802154_timer0_done(void);
extern... | 30 |
/*
*/
#pragma once
#include
#include
#include "esp_err.h"
#include "esp_ieee802154_frame.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef struct {
uint8_t short_addr[CONFIG_IEEE802154_PENDING_TABLE_SIZE][IEEE802154_FRAME_SHORT_ADDR_SIZE]; /*!< Short address table */
uint8_t ext_addr[CONFIG_IEEE8... | 31 |
/*
*/
#pragma once
#include
#include
#include "esp_ieee802154_dev.h"
#include "hal/ieee802154_ll.h"
#include "esp_timer.h"
#ifdef __cplusplus
extern "C" {
#endif
#if SOC_PM_MODEM_RETENTION_BY_REGDMA && CONFIG_FREERTOS_USE_TICKLESS_IDLE
#define IEEE802154_RF_ENABLE() ieee802154_rf_enable()
#define IEEE802154_RF_DI... | 32 |
event[g_ieee802154_probe.event_index].abort_reason.rx \
= ieee802154_ll_get_rx_abort_reason(); \
} else if (a == IEEE802154_EVENT_TX_ABORT) { \
g_ieee802154_probe.event[g_ieee802154_probe.event_index].abort_reason.tx \
= ieee802154_ll_get_tx_abort_reas... | 32 |
< record timestamp*/
} ieee802154_event_info_t;
#else
#define IEEE802154_RECORD_EVENT(a)
#endif // CONFIG_IEEE802154_RECORD_EVENT
#if CONFIG_IEEE802154_RECORD_STATE
#define IEEE802154_ASSERT_RECORD_STATE_SIZE CONFIG_IEEE802154_RECORD_STATE_SIZE
#define ieee802154_set_state(a) do { s_ieee802154_state = a; \
... | 32 |
< record timestamp */
} ieee802154_state_info_t;
#else
#define ieee802154_set_state(state) (s_ieee802154_state = state)
#endif // CONFIG_IEEE802154_RECORD_STATE
#if CONFIG_IEEE802154_RECORD_CMD
#define IEEE802154_ASSERT_RECORD_CMD_SIZE CONFIG_IEEE802154_RECORD_CMD_SIZE
#define ieee802154_set_cmd(a) do { ieee802154_ll_... | 32 |
< record timestamp */
} ieee802154_cmd_info_t;
#else
#define ieee802154_set_cmd(cmd) ieee802154_ll_set_cmd(cmd)
#endif //CONFIG_IEEE802154_RECORD_CMD
#if CONFIG_IEEE802154_RECORD_ABORT
#define IEEE802154_ASSERT_RECORD_ABORT_SIZE CONFIG_IEEE802154_RECORD_ABORT_SIZE
#define ieee802154_record_abort(a) do { \
... | 32 |
abort_index].abort_reason.tx \
= ieee802154_ll_get_tx_abort_reason();\
g_ieee802154_probe.abort[g_ieee802154_probe.abort_index].is_tx_abort = 1; \
g_ieee802154_probe.abort[g_ieee802154_probe.abort_index++].timestamp = esp_timer_get_time(); \
g_ieee8021... | 32 |
< record radio event */
uint8_t event_index; /*!< the index of event */
#endif // CONFIG_IEEE802154_RECORD_EVENT
#if CONFIG_IEEE802154_RECORD_STATE
ieee802154_state_info_t state[IEEE802154_ASSERT_RECORD_STATE_SIZE]; /*!< record radio state */
uint8_t state_inde... | 32 |
(a)) { \
ieee802154_assert_print(); \
assert(a); \
} \
} while (0)
#else // CONFIG_IEEE802154_ASSERT
#define IEEE802154_ASSERT(a) assert(a)
#endif // CONFIG_IEEE802154_ASSE... | 32 |
< IEEE802154 radio coexistence scene IDLE */
IEEE802154_SCENE_TX, /*!< IEEE802154 radio coexistence scene TX */
IEEE802154_SCENE_RX, /*!< IEEE802154 radio coexistence scene RX */
IEEE802154_SCENE_TX_AT, /*!< IEEE802154 radio coexistence scene TX AT */
IEEE802154_SCENE_RX_AT, /*!< I... | 32 |
/*
*/
#pragma once
#include
#define IEEE802154_SECURITY_ADDR_SIZE 8
#define IEEE802154_SECURITY_KEY_SIZE 16
#ifdef __cplusplus
extern "C" {
#endif
/**
void ieee802154_transmit_security_config(uint8_t *frame, uint8_t *key, uint8_t *addr);
/**
*/
void ieee802154_sec_update(void);
#ifdef __cplusplus
}
#endif
| 33 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "esp_log.h"
#include "esp_err.h"
/**
void ieee802154_timer0_start(void);
/**
void ieee802154_timer0_stop(void);
/**
esp_err_t ieee802154_timer0_set_threshold(uint32_t value);
/**
uint32_t ieee802154_timer0_get_value(void);
/**
void ieee802154_t... | 34 |
/*
*/
#pragma once
#include
#include
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
#define IEEE802154_FRAME_INVALID_OFFSET 0xff
#define IEEE802154_FRAME_INVALID_ADDR_MODE 0xff
#define IEEE802154_FRAME_TYPE_OFFSET 1
#define IEEE802154_FRAME_TYPE_MASK 0x07
#defin... | 35 |
15.4 - 2003
#define IEEE802154_FRAME_VERSION_1 0x10 // IEEE 802.15.4 - 2006 & 2011
#define IEEE802154_FRAME_VERSION_2 0x20 // IEEE 802.15.4 - 2015
#define IEEE802154_FRAME_VERSION_R 0x30 // Reserved
#define IEEE802154_FRAME_DSN_OFFSET 2
#define IEEE802154_FRAME_DSN_BI... | 35 |
/*
*/
#pragma once
#include
#include
#include "sdkconfig.h"
#include "esp_err.h"
#include "esp_ieee802154_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
esp_err_t esp_ieee802154_enable(void);
/**
*/
esp_err_t esp_ieee802154_disable(void);
/**
uint8_t esp_ieee802154_get_channel(void);
/**
*/
esp_err_t e... | 36 |
15.4 subsystem, which are in ISR context **/
/**
extern void esp_ieee802154_receive_done(uint8_t *frame, esp_ieee802154_frame_info_t *frame_info);
/**
extern void esp_ieee802154_receive_sfd_done(void);
/**
extern void esp_ieee802154_transmit_done(const uint8_t *frame, const uint8_t *ack, esp_ieee802154_frame_info_t *... | 36 |
/*
*/
#pragma once
#include
#include
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef enum {
ESP_IEEE802154_RADIO_DISABLE, /*!< Radio not up */
ESP_IEEE802154_RADIO_IDLE, /*!< Radio in the idle state */
ESP_IEEE802154_RADIO_SLEEP, /*!< Radio in the sleep state */
ESP_IEEE802154_R... | 37 |
< Carrier only */
ESP_IEEE802154_CCA_MODE_ED, /*!< Energy Detect only */
ESP_IEEE802154_CCA_MODE_CARRIER_OR_ED, /*!< Carrier or Energy Detect */
ESP_IEEE802154_CCA_MODE_CARRIER_AND_ED, /*!< Carrier and Energy Detect */
} esp_ieee802154_cca_mode_t;
/**
*/
typedef enum {
ESP_IEEE802154_A... | 37 |
< The frame was acked with frame pending set */
bool process; /*!< The frame needs to be processed by the upper layer */
uint8_t channel; /*!< Channel */
int8_t rssi; /*!< RSSI */
uint8_t lqi; /*!< LQI */
uint64_t timestamp; /*!< Th... | 37 |
/*
*/
#pragma once
#include
#include
// This file gets included from unity.h via unity_internals.h via unity_config.h
// It is inside #ifdef __cplusplus / extern "C" block, so we can
// only use C features here
// Define helpers to register test cases from multiple files
#define UNITY_EXPAND2(a, b) a ## b
#define... | 38 |
..) FN_NAME_SET2(n)(__VA_ARGS__)
#define UNITY_TEST_FN_SET(...) \
static test_func UNITY_TEST_UID(test_functions)[] = {__VA_ARGS__}; \
static const char* UNITY_TEST_UID(test_fn_name)[] = FN_NAME_SET(PP_NARG(__VA_ARGS__), __VA_ARGS__)
typedef void (* test_func)(void);
typedef struct test_desc_t
{
const ... | 38 |
name = name_, \
.desc = desc_, \
.fn = test_fn_, \
.file = __FILE__, \
.line = __LINE__, \
.test_fn_count = 1, \
.test_fn_name = NULL, \
.next = NULL \
}; \
unity_testcase_register( & UNITY_TEST_UID(test_desc_) ); \
... | 38 |
..) \
UNITY_TEST_FN_SET(__VA_ARGS__); \
static void __attribute__((constructor)) UNITY_TEST_UID(test_reg_helper_) (void) \
{ \
static test_desc_t UNITY_TEST_UID(test_desc_) = { \
.name = name_, \
.desc = desc_"[multi_device]", \
.fn = UNITY_TEST_UID(test_functions... | 38 |
..) (_UNITY_DFT_10(__VA_ARGS__, NA, NA, NA, NA, NA, NA, NA, NA, NA))
/*
*/
#define DISABLED_FOR_TARGETS(...) TEMPORARY_DISABLED_FOR_TARGETS(__VA_ARGS__)
#define _UNITY_DFT_10(TARGET, ...) (CONFIG_IDF_TARGET_##TARGET || _UNITY_DFT_9(__VA_ARGS__))
#define _UNITY_DFT_9(TARGET, ...) (CONFIG_IDF_TARGET_##TARGET ... | 38 |
..) (CONFIG_IDF_TARGET_##TARGET)
| 38 |
/*
*/
#pragma once
#include
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "unity_test_utils_memory.h"
#include "unity_test_utils_cache.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
void unity_utils_task_delete(TaskHandle_t thandle);
#ifdef __cplusplus
}
#endif
| 39 |
/*
*/
#pragma once
#include
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
void unity_utils_set_leak_level(size_t leak_level);
/**
*/
void unity_utils_record_free_mem(void);
/**
*/
void unity_utils_check_leak(unsigned int before_free,
unsigned int after_free,
const char *type,
unsigned... | 40 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
void unity_utils_run_cache_disable_stub(void (*post_cache_disable)(void *), void *user_ctx);
#ifdef __cplusplus
}
#endif
| 41 |
/*
*/
#ifndef UNITY_CONFIG_H
#define UNITY_CONFIG_H
// This file gets included from unity.h via unity_internals.h
// It is inside #ifdef __cplusplus / extern "C" block, so we can
// only use C features here
#include
#include
#include
#include "sdkconfig.h"
#ifdef CONFIG_UNITY_ENABLE_FLOAT
#define UNITY_INCLUDE_... | 42 |
h"
#endif //CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER
#ifdef CONFIG_UNITY_ENABLE_FIXTURE
// Two separate "extras" options here:
// 1. Disable memory allocation wrappers in Unity Fixture
#define UNITY_FIXTURE_NO_EXTRAS
// 2. Add IDF-specific additions to Unity Fixture
#include "unity_fixture_extras.h"
#endif // CONFIG_UNITY... | 42 |
/*
*/
/* IDF-specific additions to "Unity Fixture".
*/
#pragma once
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(CONFIG_IDF_TARGET) || defined(CONFIG_IDF_TARGET_LINUX)
#define UNITY_MAYBE_EXIT(rc) do { exit(rc); } while(0)
#else
#define UNITY_MAYBE_EXIT(rc) do { (void) rc; } while... | 43 |
/*
*/
#include_next
#include "esp_debug_helpers.h"
/*
*/
/** Insert backtrace before longjmp (TEST_ABORT).
*/
#define longjmp(buf, val) do {esp_backtrace_print(100); longjmp(buf, val);} while(0)
| 44 |
/*
*/
#ifndef PHY_INIT_DATA_H
#define PHY_INIT_DATA_H /* don't use #pragma once here, we compile this file sometimes */
#include "esp_phy_init.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
// constrain a value between 'low' and 'high', inclusive
#define LIMIT(val, low, high) ((val high) ? high :... | 45 |
rodata"))) phy_init_magic_post[] = PHY_INIT_MAGIC;
#if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN
/**
*/
typedef struct {
uint8_t control_info_checksum[4]; /*!< 4-byte control infomation checksum */
uint8_t multiple_bin_checksum[4]; /*!< 4-byte multiple bin checksum */
uint8_t check_algorithm; ... | 45 |
/*
*/
#ifndef PHY_INIT_DATA_H
#define PHY_INIT_DATA_H /* don't use #pragma once here, we compile this file sometimes */
#include "esp_phy_init.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
// constrain a value between 'low' and 'high', inclusive
#define LIMIT(val, low, high) ((val high) ? high :... | 46 |
rodata"))) phy_init_magic_post[] = PHY_INIT_MAGIC;
#if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN
/**
*/
typedef struct {
uint8_t control_info_checksum[4]; /*!< 4-byte control infomation checksum */
uint8_t multiple_bin_checksum[4]; /*!< 4-byte multiple bin checksum */
uint8_t check_algorithm; ... | 46 |
/*
*/
#pragma once
#include
#include
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
/**
*/
typedef struct {
uint8_t params[128]; /*!< opaque PHY initialization parameters */
} esp_phy_init_data_t;
/**
*/
typedef enum {
PHY_MODEM_WIFI = 1, /*!< PHY mode... | 47 |
*/
PHY_RF_CAL_FULL = 0x00000002 /*!< Do full RF calibration. Produces best results, but also consumes a lot of time and current. Suggested to be used once. */
} esp_phy_calibration_mode_t;
#if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN
/**
*/
typedef enum {
ESP_PHY_INIT_DATA_TYPE_DEFAULT = 0,
ESP_P... | 47 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include
#include
typedef enum {
//11b
PHY_RATE_1M = 0x0,
PHY_RATE_2M = 0x1,
PHY_RATE_5M5 = 0x2,
PHY_RATE_11M = 0x3,
//11g
PHY_RATE_6M = 0xb,
PHY_RATE_9M = 0xf,
PHY_RATE_12M = 0xa,
PHY_RATE_18M = 0xe,
PHY_RA... | 48 |
< The number of desired packets received */
int phy_rx_rssi; /*!< Average RSSI of desired packets */
uint32_t phy_rx_total_count; /*!< The number of total packets received */
uint32_t phy_rx_result_flag; /*!< 0 means no RX info; 1 means the lastest Wi-Fi RX info; 2 means the lastest BLE RX... | 48 |
/*
*/
#pragma once
#include "esp_phy_init.h"
#ifdef __cplusplus
extern "C" {
#endif
#define ESP_CAL_DATA_CHECK_FAIL 1
typedef enum {
PHY_I2C_MST_CMD_TYPE_OFF = 0,
PHY_I2C_MST_CMD_TYPE_ON,
PHY_I2C_MST_CMD_TYPE_MAX
} phy_i2c_master_command_type_t;
typedef struct {
struct {
uint8_t start, end... | 49 |
/*
*/
#pragma once
#include
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
void bt_bb_v2_init_cmplx(int print_version);
#ifdef __cplusplus
}
#endif
| 50 |
/*
*/
#ifndef PHY_INIT_DATA_H
#define PHY_INIT_DATA_H /* don't use #pragma once here, we compile this file sometimes */
#include "esp_phy_init.h"
#include "sdkconfig.h"
// constrain a value between 'low' and 'high', inclusive
#define LIMIT(val, low, high) ((val high) ? high : val)
#define PHY_INIT_MAGIC "PHYINIT"
... | 51 |
< 4-byte control infomation checksum */
uint8_t multiple_bin_checksum[4]; /*!< 4-byte multiple bin checksum */
uint8_t check_algorithm; /*!< check algorithm */
uint8_t version; /*!< PHY init data bin version */
uint8_t number; /*!< PHY init dat... | 51 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
// btbb sleep retention reg
#define BB_PART_0_SIZE 93
#define BB_PART_1_SIZE 62
#define BB_PART_2_SIZE 19
#define BB_PART_0_ADDR 0x600A2000
#define BB_PART_1_ADDR 0x600A2800
#define BB_PART_2_ADDR 0x600A2C00
#ifdef __cplusplus
}
#endif
| 52 |
/*
*/
#ifndef PHY_INIT_DATA_H
#define PHY_INIT_DATA_H /* don't use #pragma once here, we compile this file sometimes */
#include "esp_phy_init.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
// constrain a value between 'low' and 'high', inclusive
#define LIMIT(val, low, high) ((val high) ? high :... | 53 |
rodata"))) phy_init_magic_post[] = PHY_INIT_MAGIC;
#if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN
/**
*/
typedef struct {
uint8_t control_info_checksum[4]; /*!< 4-byte control infomation checksum */
uint8_t multiple_bin_checksum[4]; /*!< 4-byte multiple bin checksum */
uint8_t check_algorithm; ... | 53 |
/*
*/
#ifndef PHY_INIT_DATA_H
#define PHY_INIT_DATA_H /* don't use #pragma once here, we compile this file sometimes */
#include "esp_phy_init.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
// There is no init data for H4 right now, could be added when necessary.
#ifdef __cplusplus
}
#endif
#end... | 54 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
// btbb sleep retention reg
#define BB_PART_0_SIZE 93
#define BB_PART_1_SIZE 62
#define BB_PART_2_SIZE 19
#define BB_PART_0_ADDR 0x600A2000
#define BB_PART_1_ADDR 0x600A2800
#define BB_PART_2_ADDR 0x600A2C00
#ifdef __cplusplus
}
#endif
| 55 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.