text
stringlengths
1
9.98k
__index_level_0__
int64
0
4.17k
Users should set this if they want to use an external USB PHY. Otherwise, the USB Host Library will automatically configure the internal USB PHY */ int intr_flags; /**< Interrupt flags for the underlying ISR used by the USB Host ...
2,730
/* */ /* Warning: The USB Host Library API is still a beta version and may be subject to change */ #pragma once #include #include "esp_assert.h" #ifdef __cplusplus extern "C" { #endif #define USB_DESC_ATTR __attribute__((packed)) // Chapter 9 /** */ typedef enum { USB_DEVICE_STATE_NOT_...
2,731
1 : 0) #define USB_EP_DESC_GET_MPS(desc_ptr) ((desc_ptr)->wMaxPacketSize & USB_W_MAX_PACKET_SIZE_MPS_MASK) #define USB_EP_DESC_GET_MULT(desc_ptr) (((desc_ptr)->wMaxPacketSize & USB_W_MAX_PACKET_SIZE_MULT_MASK) >> 11) // String Descriptor /** */ #define USB_STR_DESC_SIZE 2 /** */ typedef union { struct...
2,731
/* */ /* Warning: The USB Host Library API is still a beta version and may be subject to change */ #pragma once #include #include "esp_err.h" #include "usb/usb_types_stack.h" #include "usb/usb_types_ch9.h" #ifdef __cplusplus extern "C" { #endif // Configuration Descriptor Parsing /** */ const usb_standard_de...
2,732
/* */ #pragma once #include #include "esp_err.h" #include "soc/soc_caps.h" #include "hal/usb_phy_types.h" #ifdef __cplusplus extern "C" { #endif /** */ #define USB_PHY_SELF_POWERED_DEVICE(vbus_monitor_io) \ { ...
2,733
dmpulldown_io_num = -1, \ .drvvbus_io_num = -1, \ .bvalid_io_num = vbus_monitor_io, ...
2,733
/* */ /* This header contains bare-bone mock implementations of some device classes in order to test various layers of the USB Host stack. */ #pragma once #include #include #include "esp_assert.h" #include "usb/usb_types_ch9.h" #ifdef __cplusplus extern "C" { #endif // MSC SCSI extern const char *MSC_CLIENT_...
2,734
.0: Reserved, set 0 : 0x00 MaxPower : 0x70 (224 mA) Data (HexDump) : 09 02 20 00 01 01 00 80 70 09 04 00 00 02 08 06 50 00 07 05 81 02 00 02 00 07 05 02 02 00 02 00 Interface Descriptor bLength : 0x09 (9 bytes) bDescriptorType : ...
2,734
*/ //Constant descriptors extern const usb_device_desc_t mock_msc_scsi_dev_desc; extern uint8_t mock_msc_scsi_config_desc[255]; extern uint16_t mock_msc_scsi_str_desc_manu[128]; extern uint16_t mock_msc_scsi_str_desc_prod[128]; extern uint16_t mock_msc_scsi_str_desc_ser_num[128]; extern usb_ep_desc_t mock_msc_scsi_bu...
2,734
2Gen1") #define MOCK_MSC_SCSI_STRING_3 ("0101cdd1e856b427bbb796f870561a4b2b817af9da9872c8d75217cccdd5d5eccb3a0000000000000000000096abe1a3ff83610095558107aea948b4") // This string is NOT checked by the enum test #define MOCK_MSC_SCSI_REQ_INIT_RESET(setup_pkt_ptr, intf_num) ({ \ (setup_pkt_ptr)->bmRequestT...
2,734
Since no ACK is given for ISOC, transferring to a non-existent endpoint should work. The non-existent endpoint descriptor is described below: */ #define MOCK_ISOC_EP_NUM 2 #define MOCK_ISOC_EP_MPS 512 static const usb_ep_desc_t mock_isoc_out_ep_desc = { .bLength = sizeof(usb_ep_desc_t), .bDescr...
2,734
/* */ #include #include "freertos/FreeRTOS.h" /** */ void test_usb_init_phy(void); /** */ void test_usb_deinit_phy(void); /** */ void test_usb_set_phy_state(bool connected, TickType_t delay_ticks);
2,735
/* */ /* This header contains bare-bone mock implementations of some device classes in order to test various layers of the USB Host stack. */ #pragma once #include #include #include "esp_assert.h" #include "usb/usb_types_ch9.h" #ifdef __cplusplus extern "C" { #endif // HID Mouse /* Note: The mock HID mouse t...
2,736
00) bCountryCode : 0x00 (00 = not localized) bNumDescriptors : 0x01 Data (HexDump) : 09 21 00 02 00 01 22 4D 00 Descriptor 1: bDescriptorType : 0x22 (Class=Report) wDescriptorLength : 0x004D (77 bytes) Error reading descriptor : ERROR_INVALID_PARAMETER (due to a obscure li...
2,736
/* */ #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" #include "hcd.h" #include "usb_private.h" #include "usb/usb_types_ch9.h" extern hcd_port_handle_t port_hdl; #define URB_CONTEXT_VAL ((void *)0xDEADBEEF) // HCD Event Test /** */ void test_hcd_expect_port_event(hcd_port_handle_t port_hdl, hcd_por...
2,737
/* */ #include #define MSC_ASYNC_CLIENT_MAX_EVENT_MSGS 5 typedef struct { int num_sectors_to_read; int num_sectors_per_xfer; uint32_t msc_scsi_xfer_tag; uint16_t idVendor; uint16_t idProduct; } msc_client_test_param_t; void msc_client_async_seq_task(void *arg); void msc_client_async_dco...
2,738
/* */ #include typedef struct { int num_ctrl_xfer_to_send; uint16_t idVendor; uint16_t idProduct; } ctrl_client_test_param_t; void ctrl_client_async_seq_task(void *arg);
2,739
/* */ #pragma once #include #include #ifdef __cplusplus extern "C" { #endif /** */ /** */ typedef enum { /* SRP specific: ESP_NG_3072 = 0, } esp_ng_type_t; /** */ typedef struct esp_srp_handle esp_srp_handle_t; /** */ esp_srp_handle_t *esp_srp_init(esp_ng_type_t ng); /** */ void esp_srp_free(esp_...
2,740
/* */ #pragma once #include #ifdef __cplusplus extern "C" { #endif #if CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_1 /** */ extern const protocomm_security_t protocomm_security1; #endif #ifdef __cplusplus } #endif
2,741
/* */ #pragma once #include #ifdef __cplusplus extern "C" { #endif #if CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_2 /** */ extern const protocomm_security_t protocomm_security2; #endif #ifdef __cplusplus } #endif
2,742
/* */ #pragma once #include #include "esp_event.h" #ifdef __cplusplus extern "C" { #endif ESP_EVENT_DECLARE_BASE(PROTOCOMM_SECURITY_SESSION_EVENT); /** */ typedef enum { PROTOCOMM_SECURITY_SESSION_SETUP_OK, /**< Secured session established successfully */ PROTOCOMM_SECURITY_SESSION_INVAL...
2,743
/* */ #pragma once #include #ifdef __cplusplus extern "C" { #endif #if CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_0 /** */ extern const protocomm_security_t protocomm_security0; #endif #ifdef __cplusplus } #endif
2,744
// Copyright 2018 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...
2,745
< Priority of server task */ } protocomm_http_server_config_t; /*!< HTTP Server Configuration, if HTTP Server has not been started already */ /** Protocomm HTTPD Configuration Data */ typedef union { /** HTTP Server Handle, if ext_handle_provided is set to true */ void *handle; /** HTTP Server Confi...
2,745
/* */ #pragma once #include #include "esp_event.h" #ifdef __cplusplus extern "C" { #endif ESP_EVENT_DECLARE_BASE(PROTOCOMM_TRANSPORT_BLE_EVENT); /** */ typedef enum { PROTOCOMM_TRANSPORT_BLE_CONNECTED, PROTOCOMM_TRANSPORT_BLE_DISCONNECTED, } protocomm_transport_ble_event_t; /** */ #define MAX_BLE_DEVN...
2,746
// Copyright 2018 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...
2,747
/* */ #pragma once #include #include #ifdef __cplusplus extern "C" { #endif /** */ typedef esp_err_t (*protocomm_req_handler_t)( uint32_t session_id, /*!< Session ID for identifying protocomm client */ const uint8_t *inbuf, /*!< Pointer to user provided input data buffer */ ssize_t ...
2,748
/* Generated by the protocol buffer compiler. DO NOT EDIT! */ /* Generated from: sec1.proto */ #ifndef PROTOBUF_C_sec1_2eproto__INCLUDED #define PROTOBUF_C_sec1_2eproto__INCLUDED #include PROTOBUF_C__BEGIN_DECLS #if PROTOBUF_C_VERSION_NUMBER < 1003000 # error This file was generated by a newer version of protoc-c...
2,749
< Type of message */ Sec1MsgType msg; Sec1Payload__PayloadCase payload_case; union { /* *!< Payload data interpreted as Cmd0 */ SessionCmd0 *sc0; /* *!< Payload data interpreted as Resp0 */ SessionResp0 *sr0; /* *!< Payload data interpreted as Cmd1 */ S...
2,749
/* Generated by the protocol buffer compiler. DO NOT EDIT! */ /* Generated from: constants.proto */ #ifndef PROTOBUF_C_constants_2eproto__INCLUDED #define PROTOBUF_C_constants_2eproto__INCLUDED #include PROTOBUF_C__BEGIN_DECLS #if PROTOBUF_C_VERSION_NUMBER < 1003000 # error This file was generated by a newer vers...
2,750
/* Generated by the protocol buffer compiler. DO NOT EDIT! */ /* Generated from: sec2.proto */ #ifndef PROTOBUF_C_sec2_2eproto__INCLUDED #define PROTOBUF_C_sec2_2eproto__INCLUDED #include PROTOBUF_C__BEGIN_DECLS #if PROTOBUF_C_VERSION_NUMBER < 1003000 # error This file was generated by a newer version of protoc-c...
2,751
< Type of message */ Sec2MsgType msg; Sec2Payload__PayloadCase payload_case; union { /* *!< Payload data interpreted as Cmd0 */ S2SessionCmd0 *sc0; /* *!< Payload data interpreted as Resp0 */ S2SessionResp0 *sr0; /* *!< Payload data interpreted as Cmd1 */ ...
2,751
/* Generated by the protocol buffer compiler. DO NOT EDIT! */ /* Generated from: session.proto */ #ifndef PROTOBUF_C_session_2eproto__INCLUDED #define PROTOBUF_C_session_2eproto__INCLUDED #include PROTOBUF_C__BEGIN_DECLS #if PROTOBUF_C_VERSION_NUMBER < 1003000 # error This file was generated by a newer version of...
2,752
< Security scheme 2 - SRP6a + AES-256-GCM */ SEC_SCHEME_VERSION__SecScheme2 = 2 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SEC_SCHEME_VERSION) } SecSchemeVersion; /* --- messages --- */ typedef enum { SESSION_DATA__PROTO__NOT_SET = 0, SESSION_DATA__PROTO_SEC0 = 10, SESSION_DATA__PROTO_SEC1 = 11, SESSION_D...
2,752
/* Generated by the protocol buffer compiler. DO NOT EDIT! */ /* Generated from: sec0.proto */ #ifndef PROTOBUF_C_sec0_2eproto__INCLUDED #define PROTOBUF_C_sec0_2eproto__INCLUDED #include PROTOBUF_C__BEGIN_DECLS #if PROTOBUF_C_VERSION_NUMBER < 1003000 # error This file was generated by a newer version of protoc-c...
2,753
< Type of message */ Sec0MsgType msg; Sec0Payload__PayloadCase payload_case; union { /* *!< Payload data interpreted as Cmd */ S0SessionCmd *sc; /* *!< Payload data interpreted as Resp */ S0SessionResp *sr; }; }; #define SEC0_PAYLOAD__INIT \ { PROTOBUF_C_MESSAGE_INIT (...
2,753
/* */ #pragma once #include "stdlib.h" #include "string.h" #include "stdio.h" #include "mbedtls/bignum.h" #include "mbedtls/entropy.h" #include "mbedtls/ctr_drbg.h" #include "esp_random.h" #ifdef __cplusplus extern "C" { #endif typedef mbedtls_mpi esp_mpi_t; typedef esp_mpi_t esp_mpi_ctx_t; esp_mpi_t *esp_mpi_new...
2,754
/* */ #ifndef _SIMPLE_BLE_ #define _SIMPLE_BLE_ #include #include #include #include #include typedef void (simple_ble_cb_t)(esp_gatts_cb_event_t event, esp_gatt_if_t p_gatts_if, esp_ble_gatts_cb_param_t *param); /** */ typedef struct { /** Name to be displayed to devices scanning for ESP32 */ const ...
2,755
/* */ #pragma once #include #include #include #define PROTOCOMM_NO_SESSION_ID UINT32_MAX /* Bit Flags for indicating intended functionality of handler to either #define REQ_EP (1 << 0) /*!< Flag indicating request handling endpoint */ #define SEC_EP (1 << 1) /*!< Flag indicating security handli...
2,756
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #include #ifdef CONFIG_ESP_HTTPS_SERVER_ENABLE #include #else #include #endif #include /** */ typedef struct esp_local_ctrl_prop { /** */ char *name; /** */ uint32_t type; /** */ size_t size; /** */ ...
2,757
// 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...
2,759
/* */ #pragma once #include #include #include "esp_err.h" #include "sdkconfig.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { int max_freq_mhz; /*!< Maximum CPU frequency, in MHz */ int min_freq_mhz; /*!< Minimum CPU frequency to use when no locks are taken, in MHz */ ...
2,760
/* */ #pragma once #warning "esp_pm_config_esp32c2_t is deprecated, please include esp_pm.h and use esp_pm_config_t instead" /* backward compatibility */ #include "esp_pm.h"
2,761
/* */ #pragma once #warning "esp_pm_config_esp32c3_t is deprecated, please include esp_pm.h and use esp_pm_config_t instead" /* backward compatibility */ #include "esp_pm.h"
2,762
/* */ #pragma once #warning "esp_pm_config_esp32_t is deprecated, please include esp_pm.h and use esp_pm_config_t instead" /* backward compatibility */ #include "esp_pm.h"
2,763
/* */ #pragma once #warning "esp_pm_config_esp32c6_t is deprecated, please include esp_pm.h and use esp_pm_config_t instead" /* backward compatibility */ #include "esp_pm.h"
2,764
/* */ #pragma once #include "sdkconfig.h" #ifdef __cplusplus extern "C" { #endif typedef enum { ESP_PM_TRACE_IDLE, ESP_PM_TRACE_TICK, ESP_PM_TRACE_FREQ_SWITCH, ESP_PM_TRACE_CCOMPARE_UPDATE, ESP_PM_TRACE_ISR_HOOK, ESP_PM_TRACE_SLEEP, ESP_PM_TRACE_TYPE_MAX } esp_pm_trace_event_t; void es...
2,765
/* */ #pragma once /** */ #include "soc/rtc.h" #include "esp_pm.h" #include "esp_timer.h" #include "sdkconfig.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef enum { PM_MODE_LIGHT_SLEEP,//!< Light sleep PM_MODE_APB_MIN, //!< Idle (no CPU frequency or APB frequency locks) PM_MODE_APB_MAX, ...
2,766
/* */ #pragma once #warning "esp_pm_config_esp32s3_t is deprecated, please include esp_pm.h and use esp_pm_config_t instead" /* backward compatibility */ #include "esp_pm.h"
2,767
/* */ #pragma once #warning "esp_pm_config_esp32s2_t is deprecated, please include esp_pm.h and use esp_pm_config_t instead" /* backward compatibility */ #include "esp_pm.h"
2,768
/* */ #pragma once #ifdef ESP_PLATFORM #include "sdkconfig.h" #include "soc/soc.h" #include "soc/soc_caps.h" #endif /* Configuration macros for multi-heap */ #ifdef CONFIG_HEAP_POISONING_LIGHT #define MULTI_HEAP_POISONING #endif #ifdef CONFIG_HEAP_POISONING_COMPREHENSIVE #define MULTI_HEAP_POISONING #define MULTI_...
2,769
/* */ #pragma once #ifdef MULTI_HEAP_FREERTOS #include "freertos/FreeRTOS.h" #include "sdkconfig.h" #include "esp_rom_sys.h" #include typedef portMUX_TYPE multi_heap_lock_t; /* Because malloc/free can happen inside an ISR context, we need to use portmux spinlocks here not RTOS mutexes */ #define MULTI_HEAP_LO...
2,770
*/ #define MULTI_HEAP_PRINTF esp_rom_printf #define MULTI_HEAP_STDERR_PRINTF(MSG, ...) esp_rom_printf(MSG, __VA_ARGS__) inline static void multi_heap_assert(bool condition, const char *format, int line, intptr_t address) { /* Can't use libc assert() here as it calls printf() which can cause another malloc() for ...
2,770
..) fprintf(stderr, MSG, __VA_ARGS__) #define MULTI_HEAP_LOCK(PLOCK) (void) (PLOCK) #define MULTI_HEAP_UNLOCK(PLOCK) (void) (PLOCK) #define MULTI_HEAP_LOCK_INIT(PLOCK) (void) (PLOCK) #define MULTI_HEAP_LOCK_STATIC_INITIALIZER 0 #define MULTI_HEAP_ASSERT(CONDITION, ADDRESS) assert((CONDITION) && "Heap corrupt") #d...
2,770
/* */ #pragma once #include #include #include #include "multi_heap.h" #include "multi_heap_platform.h" #include "sys/queue.h" #ifdef __cplusplus extern "C" { #endif /* Some common heap registration data structures used for heap_caps_init.c to share heap information with heap_caps.c */ #define HEAP_SIZE_MAX (...
2,771
/* */ #pragma once /* Define a noclone attribute when compiled with GCC as certain functions #if defined __has_attribute && __has_attribute(noclone) #define NOCLONE_ATTR __attribute((noclone)) #else #define NOCLONE_ATTR #endif /* Define a structure that contains some function pointers that point to OS-related functi...
2,772
*/ void *multi_heap_malloc_impl(multi_heap_handle_t heap, size_t size); /* Allocate a memory region of minimum `size` bytes, aligned on `alignment`. */ void *multi_heap_aligned_alloc_impl(multi_heap_handle_t heap, size_t size, size_t alignment); /* Allocate a memory region of minimum `size` bytes, where memory's `o...
2,772
Called by multi_heap_check(). */ bool multi_heap_internal_check_block_poisoning(void *start, size_t size, bool is_free, bool print_errors); /* Fill a region of memory with the free or malloced pattern. Called when merging blocks, to overwrite the old block header. */ void multi_heap_internal_poison_fill_region(voi...
2,772
/* */ #pragma once #include "sdkconfig.h" #ifdef CONFIG_HEAP_TASK_TRACKING #include #include "freertos/FreeRTOS.h" #include "freertos/task.h" #ifdef __cplusplus extern "C" { #endif // This macro controls how much space is provided for partitioning the per-task // heap allocation info according to one or more set...
2,773
/* */ #pragma once #include "sdkconfig.h" #include "sys/queue.h" #include #include #ifdef __cplusplus extern "C" { #endif #if !defined(CONFIG_HEAP_TRACING) && !defined(HEAP_TRACE_SRCFILE) #warning "esp_heap_trace.h is included but heap tracing is disabled in menuconfig, functions are no-ops" #endif #ifndef CONFI...
2,774
) #if CONFIG_HEAP_TRACING_STANDALONE TAILQ_ENTRY(heap_trace_record_t) tailq_list; ///< Linked list: prev & next records #if CONFIG_HEAP_TRACE_HASH_MAP SLIST_ENTRY(heap_trace_record_t) slist_hashmap; ///< Linked list: next in hashmap entry list #endif // CONFIG_HEAP_TRACE_HASH_MAP #endif // CONFIG_HEAP_TRACING_S...
2,774
/* */ #pragma once #include #include #include "multi_heap.h" #include #include "esp_err.h" #include "esp_attr.h" #ifdef __cplusplus extern "C" { #endif #if CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH #define HEAP_IRAM_ATTR #else #define HEAP_IRAM_ATTR IRAM_ATTR #endif /** */ #define MALLOC_CAP_EXEC (1<<...
2,775
g. malloc(), calloc()) call #define MALLOC_CAP_IRAM_8BIT (1<<13) ///< Memory must be in IRAM and allow unaligned access #define MALLOC_CAP_RETENTION (1<<14) ///< Memory must be able to accessed by retention DMA #define MALLOC_CAP_RTCRAM (1<<15) ///< Memory must be in RTC fast memory #define MALL...
2,775
.. ); /** */ void *heap_caps_realloc_prefer( void *ptr, size_t size, size_t num, ... ); /** */ void *heap_caps_calloc_prefer( size_t n, size_t size, size_t num, ... ); /** */ void heap_caps_dump(uint32_t caps); /** void heap_caps_dump_all(void); /** size_t heap_caps_get_allocated_size( void *ptr ); #ifdef __cp...
2,775
/* */ #pragma once #include #include #include #include "sdkconfig.h" #define SOC_MEMORY_TYPE_NO_PRIOS 3 #ifdef __cplusplus extern "C" { #endif /* Type descriptor holds a description for a particular type of memory on a particular SoC. */ typedef struct { const char *name; ///< Name of this memory type ...
2,776
) */ typedef struct { intptr_t start; intptr_t end; } soc_reserved_region_t; /* Use this macro to reserved a fixed region of RAM (hardcoded addresses) */ #define SOC_RESERVE_MEMORY_REGION(START, END, NAME) \ __attribute__((section(".reserved_memory_address"))) __attribute__((used)) \ static soc_re...
2,776
/* */ #pragma once #include #include #include /* multi_heap is a heap implementation for handling multiple heterogenous heaps in a single program. Any contiguous block of memory can be registered as a heap. */ #ifdef __cplusplus extern "C" { #endif /** @brief Opaque handle to a registered heap */ typedef ...
2,777
*/ size_t multi_heap_get_allocated_size(multi_heap_handle_t heap, void *p); /** @brief Register a new heap for use */ multi_heap_handle_t multi_heap_register(void *start, size_t size); /** @brief Associate a private lock pointer with a heap */ void multi_heap_set_lock(multi_heap_handle_t heap, void* lock); /**...
2,777
size_t largest_free_block; ///< Size of the largest free block in the heap. This is the largest malloc-able size. size_t minimum_free_bytes; ///< Lifetime minimum free heap size. Equivalent to multi_minimum_free_heap_size(). size_t allocated_blocks; ///< Number of (variable size) blocks alloc...
2,777
/* */ #pragma once #include "esp_err.h" #include "esp_heap_caps.h" #ifdef __cplusplus extern "C" { #endif /** */ void heap_caps_init(void); /** */ void heap_caps_enable_nonos_stack_heaps(void); /** @verbatim Existing region: 0x1000 0x3000 New region: 0x1000 0x3000 (Allowed) New regi...
2,778
/* */ /** */ #pragma once #include "heap_memory_layout.h" #include "esp_memory_utils.h"
2,779
/* */ #pragma once #include "esp_types.h" #include "soc/soc_caps.h" #include "freertos/FreeRTOS.h" #include "hal/spi_types.h" #include "driver/spi_common.h" #include "sdkconfig.h" #ifdef __cplusplus extern "C" { #endif #if !SOC_SPI_SUPPORT_SLAVE_HD_VER2 && !CI_HEADER_CHECK #error The SPI peripheral does not supp...
2,780
For TX direction, it is meaningless. uint32_t flags; ///< Bitwise OR of SPI_SLAVE_HD_TRANS_* flags void* arg; ///< Extra argument indiciating this data } spi_slave_hd_data_t; /// Information of SPI Slave HD event typedef struct { spi_event_t ...
2,780
In this mode, users can load(append) DMA descriptors without stopping the DMA /// Configuration structure for the SPI Slave HD driver typedef struct { uint8_t mode; /**< SPI mode, representing a pair of (CPOL, CPHA) configuration: ...
2,780
uint32_t queue_size; ///< Transaction queue size. This sets how many transactions can be 'in the air' (queued using spi_slave_hd_queue_trans but not yet finished using spi_slave_hd_get_trans_result) at the same time spi_dma_chan_t dma_chan; ///< DMA channel to used. ...
2,780
/* */ #pragma once #include #include #include "sdkconfig.h" #include "esp_err.h" #include "esp_ipc.h" #include "esp_intr_types.h" #include "hal/spi_types.h" #ifdef __cplusplus extern "C" { #endif //Maximum amount of bytes that can be put in one DMA descriptor #define SPI_MAX_DMA_LEN (4096-4) /** */ #define SPI...
2,781
int data2_io_num; ///< GPIO pin for spi data2 signal in quad/octal mode, or -1 if not used. }; union { int quadhd_io_num; ///< GPIO pin for HD (Hold) signal, or -1 if not used. int data3_io_num; ///< GPIO pin for spi data3 signal in quad/octal mode, or -1 if not used. }; in...
2,781
int intr_flags; /**< Interrupt flag for the bus to set the priority, and IRAM attribute, see */ } spi_bus_config_t; /** */ esp_err_t spi_bus_initialize(spi_host_device_t host_id, const spi_bus_config_t *bus_config, spi_dma_chan_t dma_chan); /** */ esp_err_t spi_bus_free(spi_hos...
2,781
/* */ #pragma once #include "esp_err.h" #include "freertos/FreeRTOS.h" #include "hal/spi_types.h" //for spi_bus_initialization functions. to be back-compatible #include "driver/spi_common.h" /** */ #define SPI_MASTER_FREQ_8M (80 * 1000 * 1000 / 10) ///NOTE: this field, used to be "command" in ESP-IDF 2.1 an...
2,782
The descriptor should not be modified until the descriptor is returned by spi_device_get_trans_result. out. */ esp_err_t spi_device_get_trans_result(spi_device_handle_t handle, spi_transaction_t **trans_desc, TickType_t ticks_to_wait); /** */ esp_err_t spi_device_transmit(spi_device_...
2,782
/* */ #ifndef _DRIVER_SPI_SLAVE_H_ #define _DRIVER_SPI_SLAVE_H_ #include "esp_err.h" #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" #include "driver/spi_common.h" #ifdef __cplusplus extern "C" { #endif #define SPI_SLAVE_TXBIT_LSBFIRST (1<<0) ///< Transmit command/address/data LSB first inste...
2,783
This sets how many transactions can be 'in the air' (queued using spi_slave_queue_trans but not yet finished using spi_slave_get_trans_result) at the same time uint8_t mode; /**< SPI mode, representing a pair of (CPOL, CPHA) configuration: - 0: (0, 0) ...
2,783
*/ void *user; ///< User-defined variable. Can be used to store eg transaction ID. }; /** */ esp_err_t spi_slave_initialize(spi_host_device_t host, const spi_bus_config_t *bus_config, const spi_slave_interface_config_t *slave_config, spi_dma_chan_t dma_cha...
2,783
/* */ #pragma once #include "stdbool.h" #include "hal/spi_types.h" #ifdef __cplusplus extern "C" { #endif #if !SOC_GDMA_SUPPORTED /** */ typedef enum { DMA_CHANNEL_DIRECTION_TX, /*!< DMA channel direction: TX */ DMA_CHANNEL_DIRECTION_RX, /*!< DMA channel direction: RX */ } spi_dma_chan_dir_t; typedef stru...
2,784
/* */ // Internal header, don't use it in the user code #pragma once #include #include "driver/spi_common.h" #include "freertos/FreeRTOS.h" #include "hal/spi_types.h" #include "hal/dma_types.h" #include "esp_private/spi_dma.h" #include "esp_pm.h" #include "esp_private/spi_share_hw_ctrl.h" #if SOC_GDMA_SUPPORTED #i...
2,785
spi_dma_desc_t *dmadesc_tx; ///< DMA descriptor array for TX spi_dma_desc_t *dmadesc_rx; ///< DMA descriptor array for RX } spi_dma_ctx_t; /// Destructor called when a bus is deinitialized. typedef esp_err_t (*spi_destroy_func_t)(void*); /** */ esp_err_t spicommon_dma_chan_alloc(spi_host_device_t ho...
2,785
/* */ /** */ #pragma once #include "sdkconfig.h" #include "esp_err.h" #include "hal/spi_types.h" #include "driver/spi_slave.h" #ifdef __cplusplus extern "C" { #endif /** */ esp_err_t spi_slave_queue_reset(spi_host_device_t host); /** */ esp_err_t spi_slave_queue_reset_isr(spi_host_device_t host); /** */ esp_...
2,786
/* */ #pragma once #if CONFIG_IDF_TARGET_ESP32 #define IDF_PERFORMANCE_MAX_SPI_CLK_FREQ 16*1000*1000 #define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING 15 #define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING_NO_DMA 15 #if !CONFIG_FREERTOS_SMP // IDF-5223 #define ID...
2,787
CONFIG_FREERTOS_SMP // IDF-5223 #define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING 15 #define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING_NO_DMA 15 #define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_NO_POLLING 32 #define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_NO_POLLING_NO_DMA 30 #els...
2,787
/* */ #pragma once #include #include "esp_err.h" #include "esp_cam_ctlr_types.h" #ifdef __cplusplus extern "C" { #endif typedef struct esp_cam_ctlr_t esp_cam_ctlr_t; /*!< Type of CAM controller */ /** */ struct esp_cam_ctlr_t { /** */ esp_err_t (*enable)(esp_cam_ctlr_t *ctlr); /** */ ...
2,788
/* */ #pragma once #include #include #include "esp_err.h" #include "hal/mipi_csi_types.h" #include "esp_cam_ctlr_types.h" #ifdef __cplusplus extern "C" { #endif /** */ #define ESP_CAM_CTLR_MAX_DELAY UINT32_MAX /** */ typedef struct { int ctlr_id; ///< CSI controller ID mi...
2,789
/* */ #pragma once #include #include #include #include "sdkconfig.h" #include "esp_attr.h" #include "esp_log.h" #include "esp_check.h" #include "esp_heap_caps.h" #include "freertos/FreeRTOS.h" #include "esp_cam_ctlr_csi.h" #include "hal/mipi_csi_hal.h" #include "hal/mipi_csi_types.h" #include "soc/soc_caps.h" #in...
2,790
/* */ #pragma once #include #include #include "esp_err.h" #include "esp_cam_ctlr_types.h" #ifdef __cplusplus extern "C" { #endif /** */ esp_err_t esp_cam_ctlr_enable(esp_cam_ctlr_handle_t handle); /** */ esp_err_t esp_cam_ctlr_start(esp_cam_ctlr_handle_t handle); /** */ esp_err_t esp_cam_ctlr_stop(esp_cam_c...
2,791
/* */ #pragma once #include #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct esp_cam_ctlr_t *esp_cam_ctlr_handle_t; /** */ typedef struct { void *buffer; ///< Transaction buffer size_t buflen; ///< Len of the transaction buffer size_t ...
2,792
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #if CONFIG_IDF_TARGET_LINUX && !defined(__containerof) #define __containerof(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) #endif #ifdef __cplusplus } #end...
2,793
/* */ #ifndef __SYS_LOCK_H__ #define __SYS_LOCK_H__ #include #ifdef __cplusplus extern "C" { #endif /* newlib locks implementation for CONFIG_IDF_TARGET_LINUX, single threaded. */ /* Compatibility definitions for legacy newlib locking functions */ typedef int _lock_t; static inline void _lock_init(_lock_t *ploc...
2,794
/* */ #if __has_include() /* On Linux, try using sys/queue.h provided by libbsd-dev */ #include #else /* Fall back to sys/queue.h which may exist e.g. on macOS */ #include_next #endif
2,795
/* */ #pragma once #include_next "sys/random.h" #if __APPLE__ #include int getrandom(void *buf, size_t buflen, unsigned int flags); #endif // __APPLE__
2,796
/* */ #pragma once #if __APPLE__ #include_next #else #include #endif
2,797
/* */ /* */ #pragma once #ifdef __cplusplus extern "C" { #endif int fls(unsigned int value); #ifdef __cplusplus } #endif #include_next
2,798