text
stringlengths
1
9.98k
__index_level_0__
int64
0
4.17k
radio_mode = RADIO_MODE_NATIVE, \ } #else #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ .radio_mode = RADIO_MODE_UART_RCP, \ .radio_uart_config = { ...
4,118
rx_pin = 4, \ .tx_pin = 5, \ }, \ } #endif #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { ...
4,118
/* This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #pragma once #include #include "esp_err....
4,119
/* This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #pragma once #include #include "esp_err....
4,120
/* This code demonstrates how to use the SPI master half duplex mode to read/write a AT932C46D EEPROM (8-bit mode). This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS,...
4,121
/* */ #pragma once #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef enum { SOFT_I2C_100KHZ, SOFT_I2C_200KHZ, SOFT_I2C_300KHZ, SOFT_I2C_FREQ_END } soft_i2c_master_freq_t; /** */ typedef struct { uint32_t scl_pin; uint32_t sda_pin; soft_i2c_master_fr...
4,122
/* */ #pragma once #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef enum { SOFT_UART_115200, SOFT_UART_230400, SOFT_UART_460800, SOFT_UART_921600, SOFT_UART_BAUD_END } soft_uart_baudrate_t; /** */ typedef struct { uint32_t tx_pin; uint32_t rx_pin; ...
4,123
/* */ #pragma once #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { uint32_t clk_pin; uint32_t mosi_pin; uint32_t miso_pin; uint32_t cs_pin; } soft_spi_config_t; /** */ typedef struct soft_spi_bus_impl_t* soft_spi_bus_t; /** */ esp_err_t soft_spi_ne...
4,124
/* */ #pragma once #include "driver/i2c_master.h" #ifdef __cplusplus extern "C" { #endif void register_i2ctools(void); extern i2c_master_bus_handle_t tool_bus_handle; #ifdef __cplusplus } #endif
4,125
/* */ #include #include "driver/i2c_master.h" #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif typedef struct { i2c_device_config_t eeprom_device; /*!< Configuration for eeprom device */ uint8_t addr_wordlen; /*!< block address wordlen */ uint8_t write_time_ms; /*!...
4,126
/* */ #pragma once #include "stdint.h" #include "sdkconfig.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/queue.h" #include "esp_heap_caps.h" #include "esp_probe.h" #ifdef __cplusplus extern "C" { #endif #define ESP_PROBE_DEFAULT_Q_DEPTH 8 #define ESP_PROBE_DEFAULT_MAX_RECV_SIZE ...
4,127
< Max dump size */ uint32_t dump_data_size; /*!< Dump data size */ QueueHandle_t recv_que; /*!< Receive data queue */ QueueHandle_t flush_que; /*!< Flush data queue */ uint8_t *buffer; /*!< The storage buffer for dump data */ uint32_t buf_size; /*!< The storage buffer s...
4,127
/* */ #pragma once #include #include "driver/parlio_rx.h" #ifdef __cplusplus extern "C" { #endif #define ESP_PROBE_MAX_CHANNEL_NUM 16 /*!< Max supported probe channel number. Note that not all targets can reach the max channel, for ex...
4,128
sample_rate_hz = rate_hz, \ .dump_task_priority = 6, \ .storage_depth_kb = depth_kb, \ .max_dump_size_kb = depth_kb, \ .probe_gpio = { \ [0 ... ESP_PROBE_MAX_CHANNEL_NUM - 1] = -1, \ ...
4,128
< The GPIO of each probe channel, please set '-1' for unused channels, some targets like ESP32-H2 only support up to 8 channels */ uint32_t storage_depth_kb; /*!< The max heap storage depth for probed data (unit: kilobytes). ...
4,128
set 0 for no dump size limitation (like dumping to the host via UART/USB/Network), set equals to `storage_depth_kb` to guarantee no sample lost in a short time */ uint32_t dump_task_priority...
4,128
/* */ #pragma once #include #include #include "soc/soc_caps.h" #ifdef __cplusplus extern "C" { #endif #if SOC_WIFI_SUPPORTED || SOC_EMAC_SUPPORTED /** */ FILE* esp_probe_open_tcp_stream(const char *host_ip, int port); /** */ void esp_probe_close_tcp_stream(FILE *f); #endif // SOC_WIFI_SUPPORTED || SOC_EMAC_S...
4,129
/* */ #pragma once #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif esp_err_t tcp_server_wait_for_connection(void); esp_err_t tcp_server_send(uint8_t *payload, size_t size); void tcp_server_close_when_done(void); #ifdef __cplusplus } #endif
4,130
/* */ #pragma once #include #include "sdkconfig.h" #include "soc/soc_caps.h" #ifdef __cplusplus extern "C" { #endif #define EXAMPLE_ANA_CMPR_UNIT 0 // Analog Comparator unit #define EXAMPLE_WAIT_TIME_PROP (0.1) // The wait time proportion in one relative signal period ...
4,131
/* */ #pragma once #include #include "esp_err.h" /** */ void pretty_effect_calc_lines(uint16_t *dest, int line, int frame, int linect); /** */ esp_err_t pretty_effect_init(void);
4,132
/* */ #pragma once #include #include "esp_err.h" #define IMAGE_W 320 #define IMAGE_H 240 /** */ esp_err_t decode_image(uint16_t **pixels);
4,133
/* */ #include // Use IQ18 type, range [-8,192 8,191.999 996 185] // This definition should be added before including "IQmathLib.h" #define GLOBAL_IQ 18 #include "IQmathLib.h" // 3-phase uvw coord data type typedef struct foc_uvw_coord { _iq u; // U phase data in IQ type _iq v; // V ...
4,134
/* */ #include "driver/mcpwm_prelude.h" /** */ typedef struct inverter_config { mcpwm_timer_config_t timer_config; // pwm timer and timing config mcpwm_operator_config_t operator_config; // mcpwm operator config mcpwm_comparator_config_t compare_config; // mcpwm comparator config int g...
4,135
/* */ #define CONST_PERIOD_2_PI 6.2832 // 2 * PI #define EXAMPLE_ARRAY_LEN 400 // Length of wave array #define EXAMPLE_DAC_AMPLITUDE 255 // Amplitude of DAC voltage. If it's more than 256 will causes dac_output_voltage() output 0. typ...
4,136
/* */ #pragma once #include "sdkconfig.h" #ifdef __cplusplus extern "C" { #endif #if CONFIG_IDF_TARGET_ESP32 #define EXAMPLE_I2S_BCLK_IO1 GPIO_NUM_4 // I2S bit clock io number #define EXAMPLE_I2S_WS_IO1 GPIO_NUM_5 // I2S word select io number #define EXAMPLE_I2S_DOUT_IO1 GPIO_NUM_1...
4,138
/* */ #pragma once #include #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { struct { char chunk_id[4]; /*!< Contains the letters "RIFF" in ASCII form */ uint32_t chunk_size; /*!< This is the size of the rest of the chunk following this number */ char chunk_format[4]; /*!...
4,139
< 8 bits = 8, 16 bits = 16, etc. */ } fmt_chunk; /*!< The "fmt " subchunk describes the sound data's format */ struct { char subchunk_id[4]; /*!< Contains the letters "data" */ uint32_t subchunk_size; /*!< ==NumSamples * NumChannels * BitsPerSample / 8 */ int16_t data[0]; /*!< Holds raw ...
4,139
byte_rate = (wav_sample_bits) * (wav_sample_rate) * (wav_channel_num) / 8, \ .block_align = (wav_sample_bits) * (wav_channel_num) / 8, \ .bits_per_sample = (wav_sample_bits)\ }, \ .data_chunk = { \ .subchunk_id = {'d', 'a', 't', 'a'}, \ .subchunk_size = (wav_sample_size) \ } ...
4,139
/* */ #pragma once #include "sdkconfig.h" /* Example configurations */ #define EXAMPLE_RECV_BUF_SIZE (2400) #define EXAMPLE_SAMPLE_RATE (16000) #define EXAMPLE_MCLK_MULTIPLE (384) // If not using 24-bit data width, 256 should be enough #define EXAMPLE_MCLK_FREQ_HZ (EXAMPLE_SAMPLE_RATE * EXAMPLE_MCLK_MULT...
4,140
h" #define I2C_NUM BSP_I2C_NUM #endif // CONFIG_EXAMPLE_BSP
4,140
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #define EXAMPLE_BUFF_SIZE 2048 /** */ void i2s_example_pdm_tx_task(void *args); /** */ void i2s_example_pdm_rx_task(void *args); #ifdef __cplusplus } #endif
4,141
// Copyright 2020 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...
4,142
< Array, contains GPIO numbers used by row line */ const int *col_gpios; /*!< Array, contains GPIO numbers used by column line */ uint32_t nr_row_gpios; /*!< row_gpios array size */ uint32_t nr_col_gpios; /*!< col_gpios array size */ uint32_t debounce_ms; /*!< Debounce time */ } matrix_kbd_config_t; ...
4,142
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #include "esp_types.h" #include "esp_event.h" #include "esp_err.h" #include "driver/uart.h" #define GPS_MAX_SATELLITES_IN_USE (12) #define GPS_MAX_SATELLITES_IN_VIEW (16) /** ESP_EVENT_DECLARE_BASE(ESP_NMEA_EVENT); /** typedef enum { GPS_FIX_INVALID, ...
4,143
< Thousand */ } gps_time_t; /** typedef struct { uint8_t day; /*!< Day (start from 1) */ uint8_t month; /*!< Month (start from 1) */ uint16_t year; /*!< Year (start from 2000) */ } gps_date_t; /** typedef enum { STATEMENT_UNKNOWN = 0, /*!< Unknown statement */ STATEMENT_GGA, /*!< GGA */ ...
4,143
< time in UTC */ gps_fix_mode_t fix_mode; /*!< Fix mode */ uint8_t sats_id_in_use[GPS_MAX_SATELLITES_IN_USE]; /*!< ID list of satellite in use */ float dop_h; /*!< Horizontal dilution of precision */ floa...
4,143
< Course over ground */ float variation; /*!< Magnetic variation */ } gps_t; /** typedef struct { struct { uart_port_t uart_port; /*!< UART port number */ uint32_t rx_pin; /*!< UART Rx Pin number */ uint32_t baud_rate; ...
4,143
baud_rate = 9600, \ .data_bits = UART_DATA_8_BITS, \ .parity = UART_PARITY_DISABLE, \ .stop_bits = UART_STOP_BITS_1, \ .event_queue_size = 16 \ } \ } /** typedef en...
4,143
/* */ #pragma once #include #include "driver/rmt_encoder.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { uint32_t resolution; /*!< Encoder resolution, in Hz */ } led_strip_encoder_config_t; /** */ esp_err_t rmt_new_led_strip_encoder(const led_strip_encoder_config_t *config, rmt_encoder_han...
4,144
/* */ #pragma once #include #include "driver/rmt_encoder.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { uint16_t address; uint16_t command; } ir_nec_scan_code_t; /** */ typedef struct { uint32_t resolution; /*!< Encoder resolution, in Hz */ } ir_nec_encoder_config_t; /** */ esp_...
4,145
/* */ #pragma once #include #include "driver/rmt_encoder.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { uint32_t resolution; // Encoder resolution, in Hz uint32_t sample_points; // Sample points used for deceleration phase. Note: |end_freq_hz - start_freq_hz| >= sample_points uin...
4,146
/* */ #pragma once #include #include "driver/rmt_encoder.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { uint32_t freq_hz; /*!< Frequency, in Hz */ uint32_t duration_ms; /*!< Duration, in ms */ } buzzer_musical_score_t; /** */ typedef struct { uint32_t resolution; /*!< Encoder ...
4,147
/* */ #pragma once #include #include #include "driver/rmt_encoder.h" #ifdef __cplusplus extern "C" { #endif /** */ typedef struct { uint16_t throttle; /*!< Throttle value */ bool telemetry_req; /*!< Telemetry request */ } dshot_esc_throttle_t; /** */ typedef struct { uint32_t resolution; /*!< E...
4,148
/* */ #pragma once #include #ifdef __cplusplus extern "C" { #endif /** */ uint32_t example_uri_encode(char *dest, const char *src, size_t len); /** */ void example_uri_decode(char *dest, const char *src, size_t len); #ifdef __cplusplus } #endif
4,149
/* Common utilities for socket address input interface: The API get_addr_from_stdin() is mainly used by socket client examples which read IP address from stdin (if configured). This option is typically used in the CI, but could be enabled in the project configuration. In that case this component is used to...
4,150
/* */ /* Private Funtions of protocol example common */ #pragma once #include "esp_err.h" #include "esp_wifi.h" #include "sdkconfig.h" #ifdef __cplusplus extern "C" { #endif #if CONFIG_EXAMPLE_CONNECT_IPV6 #define MAX_IP6_ADDRS_PER_NETIF (5) #if defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK) #define EXAMPL...
4,151
/* Common functions for protocol examples, to establish Wi-Fi or Ethernet connection. This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS O...
4,152
CONFIG_IDF_TARGET_LINUX #ifdef __cplusplus } #endif
4,152
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif void register_wifi_cmd(void); void register_wifi_itwt(void); void register_wifi_stats(void); #ifdef __cplusplus } #endif
4,153
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #if CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS || CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS int wifi_cmd_get_tx_statistics(int argc, char **argv); int wifi_cmd_clr_tx_statistics(int argc, char **argv); int wifi_cmd_get_rx_statistics(int argc, char **argv); int wifi_...
4,154
/* Iperf Example - iperf declaration This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #ifnde...
4,155
/* */ #pragma once #include "lwip/esp_netif_net_stack.h" /** */ err_t lwip_tapif_init(struct netif *netif); /** */ void lwip_tapif_input(void *h, void *buffer, size_t len, void *l2_buff);
4,156
/* */ #pragma once #include "esp_err.h" #include "esp_netif.h" /** */ void *tapio_create(void); /** */ esp_err_t tapio_output(void *h, void *buffer, size_t len);
4,157
/* */ /* Common functions for protocol examples, to establish tap interface connection This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS...
4,158
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif /** esp_err_t update_time_from_nvs(void); /** esp_err_t fetch_and_store_time_in_nvs(void*); #ifdef __cplusplus } #endif
4,159
/* */ /* HTTP File Server Example, common declarations This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or ...
4,160
#ifndef __HTTPD_TESTS_H__ #define __HTTPD_TESTS_H__ #include extern httpd_handle_t start_tests(void); extern void stop_tests(httpd_handle_t hd); #endif // __HTTPD_TESTS_H__
4,161
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #ifndef DNS_SERVER_MAX_ITEMS #define DNS_SERVER_MAX_ITEMS 1 #endif #define DNS_SERVER_CONFIG_SINGLE(queried_name, netif_key) { \ .num_of_entries = 1, \ .item = { { .name = queried_name, .if_key ...
4,162
/* */ #include #include #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif esp_err_t esp_netif_init(void); #ifdef __cplusplus } #endif
4,163
/* Keep Alive engine for wss server example This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ ...
4,164
< stack size of the created task */ size_t task_prio; /*!< priority of the created task */ size_t keep_alive_period_ms; /*!< check every client after this time */ size_t not_alive_after_ms; /*!< consider client ...
4,164
/* */ /* **/ #ifndef _DEVICE_PARAMS #define _DEVICE_PARAMS #include // This file defines structure of modbus parameters which reflect correspond modbus address space // for each modbus register type (coils, discreet inputs, holding registers, input registers) #pragma pack(push, 1) typedef struct { uint8_t dis...
4,165
defined(_DEVICE_PARAMS)
4,165