text
stringlengths
1
9.98k
__index_level_0__
int64
0
4.17k
/* ctr_mode.h - TinyCrypt interface to CTR mode */ /* */ /** #include #ifdef __cplusplus extern "C" { #endif /** */ int tc_ctr_mode(uint8_t *out, unsigned int outlen, const uint8_t *in, unsigned int inlen, uint8_t *ctr, const TCAesKeySched_t sched); #ifdef __cplusplus } #endif #endif /* __TC_CTR_MODE_H__ */
3,325
/* constants.h - TinyCrypt interface to constants */ /* */ /** #ifndef __TC_CONSTANTS_H__ #define __TC_CONSTANTS_H__ #ifdef __cplusplus extern "C" { #endif #include #ifndef NULL #define NULL ((void *)0) #endif #define TC_CRYPTO_SUCCESS 1 #define TC_CRYPTO_FAIL 0 #define TC_ZERO_BYTE 0x00 #ifdef __cplusplus }...
3,326
/* hmac.h - TinyCrypt interface to an HMAC implementation */ /* */ /** */ #ifndef __TC_HMAC_H__ #define __TC_HMAC_H__ #include #ifdef __cplusplus extern "C" { #endif struct tc_hmac_state_struct { /* the internal state required by h */ struct tc_sha256_state_struct hash_state; /* HMAC key schedule */ uint8_...
3,327
/* aes.h - TinyCrypt interface to an AES-128 implementation */ /* */ /** */ #ifndef __TC_AES_H__ #define __TC_AES_H__ #include #ifdef __cplusplus extern "C" { #endif #define Nb (4) /* number of columns (32-bit words) comprising the state */ #define Nk (4) /* number of 32-bit words comprising the key */ #defi...
3,328
/* cmac_mode.h -- interface to a CMAC implementation */ /* */ /** */ #ifndef __TC_CMAC_MODE_H__ #define __TC_CMAC_MODE_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* padding for last message block */ #define TC_CMAC_PADDING 0x80 /* struct tc_cmac_struct represents the state of a CMAC compu...
3,329
/* ecc.h - TinyCrypt interface to common ECC functions */ /* Copyright (c) 2014, Kenneth MacKay */ /* */ /** #ifndef __TC_UECC_H__ #define __TC_UECC_H__ #include #ifdef __cplusplus extern "C" { #endif /* Word size (4 bytes considering 32-bits architectures) */ #define uECC_WORD_SIZE 4 /* setting max number o...
3,330
g. p256):*/ struct uECC_Curve_t; typedef const struct uECC_Curve_t * uECC_Curve; struct uECC_Curve_t { wordcount_t num_words; wordcount_t num_bytes; bitcount_t num_n_bits; uECC_word_t p[NUM_ECC_WORDS]; uECC_word_t n[NUM_ECC_WORDS]; uECC_word_t G[NUM_ECC_WORDS * 2]; uECC_word_t b[NUM_ECC_WORDS]; void (*d...
3,330
/* uECC_platform_specific.h - Interface to platform specific functions*/ /* Copyright (c) 2014, Kenneth MacKay /* */ #ifndef __UECC_PLATFORM_SPECIFIC_H_ #define __UECC_PLATFORM_SPECIFIC_H_ /* */ #define default_RNG_defined 0 int default_CSPRNG(uint8_t *dest, unsigned int size); #endif /* __UECC_PLATFORM_SPECIFI...
3,331
/* ecc_dh.h - TinyCrypt interface to EC-DSA implementation */ /* */ /* */ /** */ #ifndef __TC_ECC_DSA_H__ #define __TC_ECC_DSA_H__ #include #ifdef __cplusplus extern "C" { #endif /** */ int uECC_sign(const uint8_t *p_private_key, const uint8_t *p_message_hash, unsigned p_hash_size, uint8_t *p_signatu...
3,332
/* */ /* */ /** */ #ifndef _OS_MEMPOOL_H_ #define _OS_MEMPOOL_H_ #include #include "os/os.h" #ifdef __cplusplus extern "C" { #endif /** */ struct os_memblock { SLIST_ENTRY(os_memblock) mb_next; }; /* XXX: Change this structure so that we keep the first address in the pool? */ /* XXX: add memory debug st...
3,333
*/ os_mempool_put_fn *mpe_put_cb; void *mpe_put_arg; }; #define OS_MEMPOOL_INFO_NAME_LEN (32) /** */ struct os_mempool_info { /** Size of the memory blocks in the pool */ int omi_block_size; /** Number of memory blocks in the pool */ int omi_num_blocks; /** Number of free memory blocks *...
3,333
*/ #define OS_MEMPOOL_BYTES(n,blksize) \ (sizeof (os_membuf_t) * OS_MEMPOOL_SIZE((n), (blksize))) #if SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED /** */ os_error_t r_os_mempool_init(struct os_mempool *mp, uint16_t blocks, uint32_t block_size, void *membuf, const char ...
3,333
/* */ /* */ #ifndef H_ENDIAN_ #define H_ENDIAN_ #include #ifdef __cplusplus extern "C" { #endif /* Internal helpers */ #ifndef os_bswap_64 #define os_bswap_64(x) ((uint64_t) \ ((((x) & 0xff00000000000000ull) >> 56) | \ (((x) & 0x00ff000000000000ull) >> 40) | \ (((x) ...
3,334
/* */ /* */ #ifndef _OS_H #define _OS_H #include #include "esp_assert.h" #ifdef __cplusplus extern "C" { #endif #if !defined __cplusplus && !defined static_assert #define static_assert _Static_assert #endif #include "nimble/nimble_npl.h" #define OS_ALIGN(__n, __a) ( \ (((__n...
3,335
/* */ /* */ #ifndef H_OS_UTIL_ #define H_OS_UTIL_ /* Helpers to pass integers as pointers and vice-versa */ #define POINTER_TO_UINT(p) ((unsigned int) ((uintptr_t) (p))) #define UINT_TO_POINTER(u) ((void *) ((uintptr_t) (u))) #define POINTER_TO_INT(p) ((int) ((intptr_t) (p))) #define INT_TO_POINTER(u) ((void *) ((i...
3,336
/* */ /* */ /** */ #ifndef _OS_MBUF_H #define _OS_MBUF_H #include "os/os.h" #ifdef __cplusplus extern "C" { #endif /** */ struct os_mbuf_pool { /** */ uint16_t omp_databuf_len; /** */ struct os_mempool *omp_pool; STAILQ_ENTRY(os_mbuf_pool) omp_next; }; /** */ struct os_mbuf_...
3,337
*/ static inline uint16_t _os_mbuf_trailingspace(struct os_mbuf *om) { struct os_mbuf_pool *omp; omp = om->om_omp; return (&om->om_databuf[0] + omp->omp_databuf_len) - (om->om_data + om->om_len); } /** @endcond */ /** */ #define OS_MBUF_TRAILINGSPACE(__om) _os_mbuf_trailingspace(__om) #if...
3,337
/* */ /* */ #ifndef H_OS_ERROR_ #define H_OS_ERROR_ #include "os/os.h" #ifdef __cplusplus extern "C" { #endif /* OS error enumerations */ enum os_error { OS_OK = 0, OS_ENOMEM = 1, OS_EINVAL = 2, OS_INVALID_PARM = 3, OS_MEM_NOT_ALIGNED = 4, OS_BAD_MUTEX = 5, OS_TIMEOUT = 6, OS_ERR_I...
3,338
/* */ #ifndef _QUEUE_H_ #define _QUEUE_H_ /* The common BSD linked list queue macros are already defined here for ESP-IDF */ #include #ifdef __cplusplus extern "C" { #endif /* /* */ #define CIRCLEQ_HEAD(name, type) \ struct name { \ struct type *cqh_first; /* first element */ \ struct type *cqh_l...
3,339
= (void *)(head) || ((var) = NULL); \ (var) = CIRCLEQ_PREV((var), field)) #define CIRCLEQ_INIT(head) do { \ CIRCLEQ_FIRST((head)) = (void *)(head); \ CIRCLEQ_LAST((head)) = (void *)(head); \ } while (0) #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ CIRCLEQ_NEXT((elm), field) = C...
3,339
cqe_next) #define CIRCLEQ_PREV(elm,field) ((elm)->field.cqe_prev) #define CIRCLEQ_REMOVE(head, elm, field) do { \ if (CIRCLEQ_NEXT((elm), field) == (void *)(head)) \ CIRCLEQ_LAST((head)) = CIRCLEQ_PREV((elm), field); \ else \ CIRCLEQ_PREV(CIRCLEQ_NEXT((elm), field), field) = \ CIRCLEQ_PREV((elm...
3,339
/* */ /* */ #ifndef H_BLE_ #define H_BLE_ #include #include #include "syscfg/syscfg.h" #include "os/os.h" #ifdef __cplusplus extern "C" { #endif /* The number of advertising instances */ #define BLE_ADV_INSTANCES (MYNEWT_VAL(BLE_MULTI_ADV_INSTANCES) + 1) /* BLE encryption block definitions */ #define BLE_EN...
3,340
NOTE: no flags defined */ struct ble_mbuf_hdr_txinfo { uint8_t flags; uint8_t reserve0; uint8_t pyld_len; uint8_t hdr_byte; uint16_t offset; }; struct ble_mbuf_hdr { union { struct ble_mbuf_hdr_rxinfo rxinfo; struct ble_mbuf_hdr_txinfo txinfo; }; uint32_t beg_cputime; ...
3,340
!((hdr)->rxinfo.flags & BLE_MBUF_HDR_F_AUX_PTR_WAIT)) #define BLE_MBUF_HDR_CRC_OK(hdr) \ (!!((hdr)->rxinfo.flags & BLE_MBUF_HDR_F_CRC_OK)) #define BLE_MBUF_HDR_MIC_FAILURE(hdr) \ (!!((hdr)->rxinfo.flags & BLE_MBUF_HDR_F_MIC_FAILURE)) #define BLE_MBUF_HDR_RESOLVED(hdr) \ (!!((hdr)->rxinfo.fl...
3,340
Only contains the peer's connection handle. */ #define BLE_MBUF_HS_HDR_LEN (2) #define BLE_DEV_ADDR_LEN (6) extern uint8_t g_dev_addr[BLE_DEV_ADDR_LEN]; extern uint8_t g_random_addr[BLE_DEV_ADDR_LEN]; /* BLE Error Codes (Core v4.2 Vol 2 part D) */ enum ble_error_codes { /* An "error" code of 0x0 mean...
3,340
= 0) { return type_diff; } return memcmp(a->val, b->val, sizeof(a->val)); } #ifdef __cplusplus } #endif #endif /* H_BLE_ */
3,340
/* */ #ifndef H_NIMBLE_OPT_ #define H_NIMBLE_OPT_ #ifdef __cplusplus extern "C" { #endif /* Include automatically-generated settings. */ #include "nimble/nimble_opt_auto.h" #ifdef __cplusplus } #endif #endif
3,341
/* */ #ifndef H_HCI_TRANSPORT_ #define H_HCI_TRANSPORT_ #ifdef __cplusplus extern "C" { #endif #include #include "os/os_mempool.h" #define BLE_HCI_TRANS_CMD_SZ 260 /*** Type of buffers for holding commands and events. */ /** */ #define BLE_HCI_TRANS_BUF_EVT_LO 1 #define BLE_HCI_TRANS_BUF_EVT_HI 2 /...
3,342
/* */ #ifndef _NIMBLE_NPL_H_ #define _NIMBLE_NPL_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif struct ble_npl_event; typedef void ble_npl_event_fn(struct ble_npl_event *ev); enum ble_npl_error { BLE_NPL_OK = 0, BLE_NPL_ENOMEM = 1, BLE_NPL_EINVAL = 2, BLE_NPL_INVALID_PARAM...
3,343
/* */ /* */ #ifndef H_NIMBLE_OPT_AUTO_ #define H_NIMBLE_OPT_AUTO_ #include "syscfg/syscfg.h" #ifdef __cplusplus extern "C" { #endif /*** */ #undef NIMBLE_BLE_ADVERTISE #define NIMBLE_BLE_ADVERTISE \ (MYNEWT_VAL(BLE_ROLE_BROADCASTER) || MYNEWT_VAL(BLE_ROLE_PERIPHERAL)) #undef NIMBLE_BLE_S...
3,344
*/ #undef NIMBLE_BLE_SM #define NIMBLE_BLE_SM (MYNEWT_VAL(BLE_SM_LEGACY) || MYNEWT_VAL(BLE_SM_SC)) #ifdef __cplusplus } #endif #endif
3,344
/* */ #ifndef _NIMBLE_PORT_H #define _NIMBLE_PORT_H #include "sdkconfig.h" #include "esp_err.h" #include "nimble/nimble_npl.h" #define NIMBLE_CORE (CONFIG_BT_NIMBLE_PINNED_TO_CORE < CONFIG_FREERTOS_NUMBER_OF_CORES ? CONFIG_BT_NIMBLE_PINNED_TO_CORE : tskNO_AFFINITY) #define NIMBLE_HS_STACK_SIZE CONFIG_BT_NIMBLE_HOS...
3,345
/* */ #ifndef _NIMBLE_NPL_OS_H_ #define _NIMBLE_NPL_OS_H_ #include #include #include #include "freertos/FreeRTOS.h" #include "freertos/queue.h" #include "freertos/semphr.h" #include "freertos/task.h" #include "freertos/timers.h" #include "esp_timer.h" #ifdef __cplusplus extern "C" { #endif #ifndef ARRAY_SIZE #d...
3,346
h" struct npl_funcs_t { bool (*p_ble_npl_os_started)(void); void *(*p_ble_npl_get_current_task_id)(void); void (*p_ble_npl_eventq_init)(struct ble_npl_eventq *); void (*p_ble_npl_eventq_deinit)(struct ble_npl_eventq *); struct ble_npl_event * (*p_ble_npl_eventq_get)(struct ble_npl_eventq *, ble_npl...
3,346
/* */ #ifndef _NPL_FREERTOS_H_ #define _NPL_FREERTOS_H_ #ifdef __cplusplus extern "C" { #endif #include "sdkconfig.h" #if ((defined(CONFIG_BT_NIMBLE_USE_ESP_TIMER) && CONFIG_BT_NIMBLE_USE_ESP_TIMER) || \ (defined(CONFIG_BT_LE_USE_ESP_TIMER) && CONFIG_BT_LE_USE_ESP_TIMER)) /* Use esp timer instead of FreeRTOS t...
3,347
/* */ #ifndef _NIMBLE_PORT_FREERTOS_H #define _NIMBLE_PORT_FREERTOS_H #include "nimble/nimble_npl.h" #ifdef __cplusplus extern "C" { #endif /** */ esp_err_t esp_nimble_enable(void *host_task); /** */ esp_err_t esp_nimble_disable(void); void nimble_port_freertos_init(TaskFunction_t host_task_fn); void nimble_p...
3,348
/* */ #pragma once #include "sdkconfig.h" #include "esp_attr.h" #include "esp_heap_caps.h" void *bt_osi_mem_malloc(size_t size); void *bt_osi_mem_calloc(size_t n, size_t size); void *bt_osi_mem_malloc_internal(size_t size); void *bt_osi_mem_calloc_internal(size_t n, size_t size); void bt_osi_mem_free(void *ptr)...
3,349
/* */ #pragma once #include "freertos/FreeRTOS.h" #include "freertos/queue.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef void * RingbufHandle_t; typedef enum { /** */ RINGBUF_TYPE_NOSPLIT = 0, /** */ RINGBUF_TYPE_ALLOWSPLIT, /** */ RINGBUF_TYPE_BYTEBUF, RINGB...
3,350
pdTRUE : pdFALSE; } /** */ BaseType_t xRingbufferRemoveFromQueueSetRead(RingbufHandle_t xRingbuffer, QueueSetHandle_t xQueueSet); /** */ void vRingbufferGetInfo(RingbufHandle_t xRingbuffer, UBaseType_t *uxFree, UBaseType_t *uxRead, UBaseType_t...
3,350
/* */ #pragma once #include #include #include #include "esp_gdbstub_arch.h" #include "sdkconfig.h" #ifdef CONFIG_ESP_GDBSTUB_SUPPORT_TASKS #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_private/freertos_debug.h" #endif // CONFIG_ESP_GDBSTUB_SUPPORT_TASKS /* Internal error codes used by...
3,351
< index of the last task passed to qsThreadInfo esp_gdbstub_frame_t paniced_frame; TaskSnapshot_t tasks[GDBSTUB_TASKS_NUM]; // TODO: add an API to get snapshots one by one #endif // CONFIG_ESP_GDBSTUB_SUPPORT_TASKS } esp_gdbstub_scratch_t; extern esp_gdbstub_scratch_t s_scratch; /**** Functions provi...
3,351
/* */ #pragma once #include #include #include "sdkconfig.h" #if CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG #include "soc/reg_base.h" #include "soc/usb_serial_jtag_struct.h" #else #include "soc/uart_reg.h" #include "soc/uart_struct.h" #endif static inline bool is_transport_memory_region(intptr_t addr) { #if CONFIG_ESP_CO...
3,352
/* */ #pragma once #define CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME
3,353
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif void esp_gdbstub_init(void); void esp_gdbstub_panic_handler(void *frame); void update_breakpoints(void); #ifdef __cplusplus } #endif
3,354
/* */ #pragma once #include #include #include "esp_gdbstub_memory_regions_common.h" #ifdef __cplusplus extern "C" { #endif static inline bool is_valid_memory_region(intptr_t addr) { /* We shouldn't read transport registers since it will disturb the debugging. */ return (!is_transport_memory_region(addr))...
3,355
/* */ #pragma once #include #include "xtensa_context.h" #include "sdkconfig.h" #if CONFIG_IDF_TARGET_ESP32 #define GDBSTUB_EXTRA_TIE_SIZE 0 #elif defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) #define GDBSTUB_EXTRA_TIE_SIZE 1 #else #error "Unknown Xtensa chip" #endif #ifdef __cplusplus ex...
3,356
/* */ #pragma once #include "esp_gdbstub_common.h" uintptr_t rv_compute_next_pc(esp_gdbstub_frame_t *frame, uintptr_t inst_addr);
3,357
/* */ #pragma once #include #include #include "esp_gdbstub_memory_regions_common.h" #include "soc/soc.h" #ifdef __cplusplus extern "C" { #endif static inline bool __is_valid_memory_region(intptr_t addr) { return (addr >= SOC_DROM_LOW && addr = SOC_IROM_LOW && addr = SOC_IRAM_LOW && addr = SOC_DRAM_LOW && addr...
3,358
/* */ #pragma once #include #include "riscv/rvruntime-frames.h" #ifdef __cplusplus extern "C" { #endif typedef RvExcFrame esp_gdbstub_frame_t; /* GDB regfile structure, configuration dependent */ typedef struct { uint32_t x[32]; uint32_t pc; } esp_gdbstub_gdb_regfile_t; #ifdef __cplusplus } #endif
3,359
/* */ #pragma once #include #ifdef __cplusplus extern "C" { #endif void esp_log_impl_lock(void); bool esp_log_impl_lock_timeout(void); void esp_log_impl_unlock(void); #ifdef __cplusplus } #endif
3,360
/* */ #ifndef __ESP_LOG_H__ #define __ESP_LOG_H__ #include #include #include #include "sdkconfig.h" #include "esp_rom_sys.h" #ifdef __cplusplus extern "C" { #endif /** typedef enum { ESP_LOG_NONE, /*!= (level) ) { \ esp_log_buffer_hex_internal( tag, buffer, buff_len, level ); \ } \...
3,361
/// Log at ``ESP_LOG_ERROR`` level. @see ``printf``,``ESP_LOGE``,``ESP_DRAM_LOGE`` /** */ #if defined(__cplusplus) && (__cplusplus > 201703L) #define ESP_EARLY_LOGE( tag, format, ... ) ESP_LOG_EARLY_IMPL(tag, format, ESP_LOG_ERROR, E __VA_OPT__(,) __VA_ARGS__) /// macro to output logs in startup code at ``ESP_LOG...
3,361
@see ``ESP_EARLY_LOGE``,``ESP_LOGE``, ``printf`` #define ESP_EARLY_LOGV( tag, format, ... ) ESP_LOG_EARLY_IMPL(tag, format, ESP_LOG_VERBOSE, V __VA_OPT__(,) __VA_ARGS__) #else // !(defined(__cplusplus) && (__cplusplus > 201703L)) #define ESP_EARLY_LOGE( tag, format, ... ) ESP_LOG_EARLY_IMPL(tag, format, ESP_LOG_ERRO...
3,361
@see ``ESP_EARLY_LOGE``,``ESP_LOGE``, ``printf`` #define ESP_EARLY_LOGV( tag, format, ... ) ESP_LOG_EARLY_IMPL(tag, format, ESP_LOG_VERBOSE, V, ##__VA_ARGS__) #endif // !(defined(__cplusplus) && (__cplusplus > 201703L)) #ifdef BOOTLOADER_BUILD #define _ESP_LOG_EARLY_ENABLED(log_level) (LOG_LOCAL_LEVEL >= (log_level...
3,361
.. ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, tag, format __VA_OPT__(,) __VA_ARGS__) #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format __VA_OPT__(,) __VA_ARGS__) #define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, tag, format __VA_OPT__(,) __VA_ARGS__) #define ESP_L...
3,361
.. ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_VERBOSE, tag, format, ##__VA_ARGS__) #endif // !(defined(__cplusplus) && (__cplusplus > 201703L)) #else /** */ #if defined(__cplusplus) && (__cplusplus > 201703L) #define ESP_LOGE( tag, format, ... ) ESP_EARLY_LOGE(tag, format __VA_OPT__(,) __VA_ARGS__) /// macro to output logs at ...
3,361
.. ) ESP_EARLY_LOGE(tag, format, ##__VA_ARGS__) /// macro to output logs at ``ESP_LOG_WARN`` level. @see ``ESP_LOGE`` #define ESP_LOGW( tag, format, ... ) ESP_EARLY_LOGW(tag, format, ##__VA_ARGS__) /// macro to output logs at ``ESP_LOG_INFO`` level. @see ``ESP_LOGE`` #define ESP_LOGI( tag, format, ... ) ESP_EARLY_...
3,361
..) do { \ if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_SYSTEM_TIME_FORMAT(E, format), esp_log_system_timestamp(), tag __VA_OPT__(,) __VA_ARGS__); } \ else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_SYSTEM_TIME_FORM...
3,361
(defined(__cplusplus) && (__cplusplus > 201703L)) #if CONFIG_LOG_TIMESTAMP_SOURCE_RTOS #define ESP_LOG_LEVEL(level, tag, format, ...) do { \ if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ ...
3,361
..) do { \ if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_SYSTEM_TIME_FORMAT(E, format), esp_log_system_timestamp(), tag, ##__VA_ARGS__); } \ else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_SYSTEM_TIME_FORMAT(W, forma...
3,361
Also check the level with ``LOG_LOCAL_LEVEL``. */ #ifdef CONFIG_LOG_MASTER_LEVEL #define ESP_LOG_LEVEL_LOCAL(level, tag, format, ...) do { \ if ( (esp_log_get_level_master() >= level) && (LOG_LOCAL_LEVEL >= level) ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ } while(0) #else #define...
3,361
@see ``ESP_DRAM_LOGI``,``ESP_LOGI``, ``esp_rom_printf`` #define ESP_DRAM_LOGI( tag, format, ... ) ESP_DRAM_LOG_IMPL(tag, format, ESP_LOG_INFO, I __VA_OPT__(,) __VA_ARGS__) /// macro to output logs when the cache is disabled at ``ESP_LOG_DEBUG`` level. @see ``ESP_DRAM_LOGD``,``ESP_LOGD``, ``esp_rom_printf`` #defin...
3,361
.. ) ESP_DRAM_LOG_IMPL(tag, format, ESP_LOG_WARN, W, ##__VA_ARGS__) /// macro to output logs when the cache is disabled at ``ESP_LOG_INFO`` level. @see ``ESP_DRAM_LOGI``,``ESP_LOGI``, ``esp_rom_printf`` #define ESP_DRAM_LOGI( tag, format, ... ) ESP_DRAM_LOG_IMPL(tag, format, ESP_LOG_INFO, I, ##__VA_ARGS__) /// m...
3,361
..) do { \ if (_ESP_LOG_EARLY_ENABLED(log_level)) { \ esp_rom_printf(_ESP_LOG_DRAM_LOG_FORMAT(log_tag_letter, format), tag __VA_OPT__(,) __VA_ARGS__); \ }} while(0) #else // !(defined(__cplusplus) &&...
3,361
/* */ #ifndef __ESP_LOG_INTERNAL_H__ #define __ESP_LOG_INTERNAL_H__ //these functions do not check level versus ESP_LOCAL_LEVEL, this should be done in esp_log.h void esp_log_buffer_hex_internal(const char *tag, const void *buffer, uint16_t buff_len, esp_log_level_t level); void esp_log_buffer_char_internal(const ch...
3,362
/* */ #pragma once #include #include "esp_err.h" #include "esp_lcd_panel_io.h" #ifdef __cplusplus extern "C" { #endif typedef struct esp_lcd_panel_io_t esp_lcd_panel_io_t; /*!< Type of LCD panel IO */ /** */ struct esp_lcd_panel_io_t { /** */ esp_err_t (*rx_param)(esp_lcd_panel_io_t *io, int lcd_cmd...
3,363
/* */ #pragma once #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif typedef struct esp_lcd_panel_t esp_lcd_panel_t; /*! 0 for color data line, and vice versa) */ esp_err_t (*invert_color)(esp_lcd_panel_t *panel, bool invert_color_data); /** */ esp_err_t (*disp_on_off)(es...
3,364
/* */ #pragma once #include #include "esp_err.h" #include "esp_lcd_types.h" #include "soc/soc_caps.h" #include "hal/lcd_types.h" #include "hal/i2c_types.h" #include "driver/i2c_types.h" #define ESP_LCD_I80_BUS_WIDTH_MAX 16 /*! D[0:N] */ unsigned int swap_color_bytes: 1; /*!< Swap adjacent two color bytes ...
3,365
/* */ #pragma once #include #include "esp_err.h" #include "esp_lcd_types.h" #ifdef __cplusplus extern "C" { #endif /** */ esp_err_t esp_lcd_panel_reset(esp_lcd_panel_handle_t panel); /** */ esp_err_t esp_lcd_panel_init(esp_lcd_panel_handle_t panel); /** */ esp_err_t esp_lcd_panel_del(esp_lcd_panel_handle_t pa...
3,366
/* */ #pragma once #include #include "esp_err.h" #include "esp_lcd_panel_dev.h" #ifdef __cplusplus extern "C" { #endif /** */ esp_err_t esp_lcd_new_panel_nt35510(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, esp_lcd_panel_handle_t *ret_panel); #ifdef __cplusplus } #endif...
3,367
/* */ #pragma once #include "esp_lcd_panel_dev.h" #include "esp_lcd_panel_ssd1306.h" #include "esp_lcd_panel_st7789.h" #include "esp_lcd_panel_nt35510.h"
3,368
/* */ #pragma once #include #include "esp_err.h" #include "esp_lcd_panel_dev.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { /** */ uint8_t height; } esp_lcd_panel_ssd1306_config_t; /** */ esp_err_t esp_lcd_new_panel_ssd1306(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_...
3,369
/* */ #pragma once /* Common LCD panel commands */ #define LCD_CMD_NOP 0x00 // This command is empty command #define LCD_CMD_SWRESET 0x01 // Software reset registers (the built-in frame buffer is not affected) #define LCD_CMD_RDDID 0x04 // Read 24-bit display ID #define LCD_CMD_RDDST 0x09 ...
3,370
0) #define LCD_CMD_MH_BIT (1 << 2) // Display data latch order, 0: refresh left to right, 1: refresh right to left #define LCD_CMD_BGR_BIT (1 << 3) // RGB/BGR order, 0: RGB, 1: BGR #define LCD_CMD_ML_BIT (1 << 4) // Line address order, 0: refresh top to bottom, 1: refresh bottom to top #define LCD_CMD_...
3,370
/* */ #pragma once #include "esp_assert.h" #include "hal/lcd_types.h" #include "hal/mipi_dsi_types.h" #include "hal/color_types.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { uint32_t h_size; /*!< Horizontal resolution, i.e. the number of pixels in a line */ uint32_t v_size; ...
3,371
< Type of LCD panel IO handle */ typedef struct esp_lcd_panel_t *esp_lcd_panel_handle_t; /*!< Type of LCD panel handle */ /** */ typedef enum { LCD_RGB_ELEMENT_ORDER_RGB = COLOR_RGB_ELEMENT_ORDER_RGB, /*!< RGB element order: RGB */ LCD_RGB_ELEMENT_ORDER_BGR = COLOR_RGB_ELEMENT_ORDER_BGR, /*!< RGB elemen...
3,371
/* */ #pragma once #include #include #include "esp_err.h" #include "esp_lcd_types.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { int reset_gpio_num; /*!< GPIO used to reset the LCD panel, set to -1 if it's not used */ union { lcd_rgb_element_order_t color_space; /*!< @depreca...
3,372
/* */ #pragma once #include #include "esp_err.h" #include "esp_lcd_panel_dev.h" #ifdef __cplusplus extern "C" { #endif /** */ esp_err_t esp_lcd_new_panel_st7789(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, esp_lcd_panel_handle_t *ret_panel); #ifdef __cplusplus } #endif
3,373
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #define TEST_LCD_H_RES 128 #define TEST_LCD_V_RES 64 #define TEST_I2C_SDA_GPIO 0 #define TEST_I2C_SCL_GPIO 2 #define TEST_I2C_HOST_ID 0 #define TEST_I2C_DEV_ADDR 0x3C #define TEST_LCD_PIXEL_CLOCK_HZ (400 * 1000) ...
3,374
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #define TEST_LCD_H_RES 800 #define TEST_LCD_V_RES 480 #define TEST_LCD_VSYNC_GPIO 3 #define TEST_LCD_HSYNC_GPIO 46 #define TEST_LCD_DE_GPIO 0 #define TEST_LCD_PCLK_GPIO 9 #define TEST_LCD_DATA0_GPIO 14 // B0 #define TEST_LC...
3,375
/* */ #pragma once #include "sdkconfig.h" #ifdef __cplusplus extern "C" { #endif #define TEST_LCD_H_RES 240 #define TEST_LCD_V_RES 280 #if CONFIG_IDF_TARGET_ESP32H2 #define TEST_LCD_BK_LIGHT_GPIO 10 #define TEST_LCD_RST_GPIO 5 #define TEST_LCD_CS_GPIO 3 #define TEST_LCD_DC_GPIO ...
3,376
/* */ #include "sdkconfig.h" #ifdef __cplusplus extern "C" { #endif #define TEST_LCD_H_RES (240) #define TEST_LCD_V_RES (280) #if CONFIG_IDF_TARGET_ESP32S3 #define TEST_LCD_BK_LIGHT_GPIO (1) #define TEST_LCD_RST_GPIO (2) #define TEST_LCD_CS_GPIO (3) #define TEST_LCD_DC_GPIO (4) #def...
3,377
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #define TEST_LCD_H_RES 128 #define TEST_LCD_V_RES 64 #define TEST_I2C_SDA_GPIO 0 #define TEST_I2C_SCL_GPIO 2 #define TEST_I2C_HOST_ID 0 #define TEST_I2C_DEV_ADDR 0x3C #define TEST_LCD_PIXEL_CLOCK_HZ (400 * 1000) ...
3,378
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif // FPS = 80000000/(40+140+40+800)/(4+16+16+1280) = 60Hz #define MIPI_DSI_DPI_CLK_MHZ 80 #define MIPI_DSI_LCD_H_RES 800 #define MIPI_DSI_LCD_V_RES 1280 #define MIPI_DSI_LCD_HSYNC 40 #define MIPI_DSI_LCD_HBP 140 #define MIPI_DSI_LCD_HFP 40 #...
3,379
/* */ #pragma once #include #include #include "esp_err.h" #include "esp_lcd_types.h" #include "soc/soc_caps.h" #include "hal/lcd_types.h" #ifdef __cplusplus extern "C" { #endif #if SOC_LCD_RGB_SUPPORTED /** */ typedef struct { uint32_t pclk_hz; /*!< Frequency of pixel clock */ uint32_t h_res; ...
3,380
< Vertical front porch, number of invalid lines between the end of frame and the next vsync */ struct { uint32_t hsync_idle_low: 1; /*!< The hsync signal is low in IDLE state */ uint32_t vsync_idle_low: 1; /*!< The vsync signal is low in IDLE state */ uint32_t de_idle_high: 1; /*!< The ...
3,380
< VSYNC event callback */ esp_lcd_rgb_panel_bounce_buf_fill_cb_t on_bounce_empty; /*!< Bounce buffer empty callback. */ esp_lcd_rgb_panel_bounce_buf_finish_cb_t on_bounce_frame_finish; /*!< Bounce buffer finish callback. */ } esp_lcd_rgb_panel_event_callbacks_t; /** */ typedef struct { lcd_clock_sour...
3,380
< If it's non-zero, the driver allocates two DRAM bounce buffers for DMA use. DMA fetching from DRAM bounce buffer is much faster than PSRAM frame buffer. */ size_t sram_trans_align; /*!< Alignment of buffers (frame buffer or bounce buffer) that allocated in SRAM */ s...
3,380
< If this flag is enabled, the host only refresh the frame buffer when `esp_lcd_panel_draw_bitmap` is called. This is useful when the LCD screen has a GRAM and can refresh the LCD by itself. */ uint32_t fb_in_psram: 1; /*!< If this flag is enabled, the frame...
3,380
*/ } flags; /*!< LCD RGB panel configuration flags */ } esp_lcd_rgb_panel_config_t; /** */ esp_err_t esp_lcd_new_rgb_panel(const esp_lcd_rgb_panel_config_t *rgb_panel_config, esp_lcd_panel_handle_t *ret_panel); /** */ esp_err_t esp_lcd_rgb_panel_register_event_callbacks(esp_lcd_pane...
3,380
< YUV conversion standard: BT601, BT709 */ esp_lcd_color_conv_profile_t src; /*!< Color conversion profile of the input image */ esp_lcd_color_conv_profile_t dst; /*!< Color conversion profile of the output image */ } esp_lcd_yuv_conv_config_t; /** */ esp_err_t esp_lcd_rgb_panel_set_yuv_conversion(esp_lcd_pan...
3,380
/* */ #pragma once #include "hal/mipi_dsi_hal.h" #include "hal/mipi_dsi_ll.h" #include "esp_heap_caps.h" #include "esp_private/periph_ctrl.h" #if SOC_PERIPH_CLK_CTRL_SHARED #define DSI_CLOCK_SRC_ATOMIC() PERIPH_RCC_ATOMIC() #else #define DSI_CLOCK_SRC_ATOMIC() #endif #if !SOC_RCC_IS_INDEPENDENT #define DSI_RCC_ATOM...
3,381
/* */ #pragma once #include #include #include "esp_err.h" #include "esp_lcd_types.h" typedef struct esp_lcd_dsi_bus_t *esp_lcd_dsi_bus_handle_t; /*!< Type of MIPI DSI bus handle */ #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { int bus_id; /*!< Select which DSI...
3,382
< Virtual channel ID, index from 0 */ mipi_dsi_dpi_clock_source_t dpi_clk_src; /*!< MIPI DSI DPI clock source */ uint32_t dpi_clock_freq_mhz; /*!< DPI clock frequency in MHz */ lcd_color_rgb_pixel_format_t pixel_format; /*!< Pixel format that used by the MIPI LCD device */ uint8_t num_fb...
3,382
..); /** */ esp_err_t esp_lcd_dpi_panel_set_pattern(esp_lcd_panel_handle_t dpi_panel, mipi_dsi_pattern_type_t pattern); /** */ typedef struct { } esp_lcd_dpi_panel_event_data_t; /** */ typedef bool (*esp_lcd_dpi_panel_color_trans_done_cb_t)(esp_lcd_panel_handle_t panel, esp_lcd_dpi_panel_event_data_t *edata, void...
3,382
/* */ #pragma once #include "esp_err.h" #include "hal/color_types.h" /** */ typedef struct esp_async_fbcpy_context_t *esp_async_fbcpy_handle_t; /** */ typedef struct { } esp_async_fbcpy_config_t; /** */ esp_err_t esp_async_fbcpy_install(const esp_async_fbcpy_config_t *config, esp_async_fbcpy_handle_t *mcp); /...
3,383
< Copy action will start from this offset in source buffer in the x direction, offset count in the number of pixels */ size_t src_offset_y; /*!< Copy action will start from this offset in source buffer in the y direction, offset count in the number of pixels */ size_t dst_offset_x; /*!< Copy action wi...
3,383
/* */ #pragma once #include #include "sdkconfig.h" #include "soc/soc_caps.h" #include "hal/dma_types.h" #include "esp_intr_alloc.h" #include "esp_heap_caps.h" #if SOC_LCDCAM_SUPPORTED #include "hal/lcd_hal.h" #endif #ifdef __cplusplus extern "C" { #endif #define LCD_I80_INTR_ALLOC_FLAGS ESP_INTR_FLAG_INTRDISAB...
3,384
/* */ #pragma once #include #include "esp_event.h" #include "esp_wifi_types.h" #include "wifi_provisioning/wifi_config.h" #ifdef __cplusplus extern "C" { #endif ESP_EVENT_DECLARE_BASE(WIFI_PROV_EVENT); /** */ typedef enum { /** */ WIFI_PROV_INIT, /** */ WIFI_PROV_START, /** ...
3,385
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applic...
3,386