text stringlengths 1 9.98k | __index_level_0__ int64 0 4.17k |
|---|---|
/*
#ifndef _SHA512_ALT_H_
#define _SHA512_ALT_H_
#if defined(MBEDTLS_SHA512_ALT)
#include "hal/sha_types.h"
#include "soc/soc_caps.h"
#ifdef __cplusplus
extern "C" {
#endif
#if SOC_SHA_SUPPORT_PARALLEL_ENG
typedef enum {
ESP_MBEDTLS_SHA512_UNUSED, /* first block hasn't been processed yet */
ESP_MBEDTLS_SH... | 2,569 |
< t_val for 512/t mode */
esp_sha512_state sha_state;
} mbedtls_sha512_context;
/**
void esp_sha512_set_mode(mbedtls_sha512_context *ctx, esp_sha_type type);
/* For SHA512/t mode the intial hash value will depend on t */
void esp_sha512_set_t( mbedtls_sha512_context *ctx, uint16_t t_val);
#endif
#endif
#ifdef... | 2,569 |
#ifndef _ESP_BIGNUM_H_
#define _ESP_BIGNUM_H_
#include
#include
/* Use montgomery exponentiation (HAC 14.94) for calculating X ^ Y mod M,
this may be faster for some targets. The hardware acceleration support for modular
exponentiation on the ESP32 is slow for public key operations, so use montgomery
expon... | 2,570 |
/**
*/
#ifndef MBEDTLS_ENTROPY_POLL_H
#define MBEDTLS_ENTROPY_POLL_H
#include "mbedtls/build_info.h"
#include
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
int mbedtls_hardware_poll( void *data,
unsigned char *output, size_t len, size_t *olen );
#ifdef __cplusplus
}
#endif
#endif /* ent... | 2,571 |
/*
*/
#ifndef GCM_ALT_H
#define GCM_ALT_H
#include "soc/soc_caps.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(MBEDTLS_GCM_ALT)
#include "aes/esp_aes_gcm.h"
typedef esp_gcm_context mbedtls_gcm_context;
#define mbedtls_gcm_init esp_aes_gcm_init
#define mbedtls_gcm_free esp_aes_gcm_... | 2,572 |
/*
#ifndef _SHA1_ALT_H_
#define _SHA1_ALT_H_
#if defined(MBEDTLS_SHA1_ALT)
#include "hal/sha_types.h"
#include "soc/soc_caps.h"
#ifdef __cplusplus
extern "C" {
#endif
#if SOC_SHA_SUPPORT_PARALLEL_ENG
typedef enum {
ESP_MBEDTLS_SHA1_UNUSED, /* first block hasn't been processed yet */
ESP_MBEDTLS_SHA1_HARDWA... | 2,573 |
/*
*/
#pragma once
#include
#include
#include "mbedtls/ecp.h"
#include "mbedtls/pk.h"
#include "sdkconfig.h"
#include "soc/soc_caps.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef struct {
mbedtls_ecp_group_id grp_id; /*!< MbedTLS ECP group identifier */
uint8_t efuse_block; ... | 2,574 |
/*
*/
#pragma once
#include_next "mbedtls/ecp.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(MBEDTLS_ECP_MUL_ALT) || defined(MBEDTLS_ECP_MUL_ALT_SOFT_FALLBACK)
int ecp_mul_restartable_internal( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
const mbedtls_mpi *m, const mbedt... | 2,575 |
/**
*/
/*
*/
#ifndef ESP_CONFIG_H
#define ESP_CONFIG_H
#include "sdkconfig.h"
#include "mbedtls/mbedtls_config.h"
#include "soc/soc_caps.h"
/**
*/
/**
*/
#ifdef CONFIG_MBEDTLS_HAVE_TIME
#define MBEDTLS_HAVE_TIME
/**
*/
#define MBEDTLS_PLATFORM_MS_TIME_ALT
#else
#undef MBEDTLS_HAVE_TIME
#undef MBEDTLS_PLATFORM_M... | 2,576 |
*/
#ifdef CONFIG_MBEDTLS_HARDWARE_AES
#define MBEDTLS_AES_ALT
#else
#undef MBEDTLS_AES_ALT
#endif
#ifdef CONFIG_MBEDTLS_HARDWARE_AES
#define MBEDTLS_GCM_ALT
#ifdef CONFIG_MBEDTLS_GCM_SUPPORT_NON_AES_CIPHER
/* Prefer hardware and fallback to software */
#define MBEDTLS_GCM_NON_AES_CIPHER_SOFT_FALLBACK
#else
... | 2,576 |
CONFIG_IDF_TARGET_LINUX
/**
*/
#define MBEDTLS_AES_ROM_TABLES
/**
*/
#define MBEDTLS_CIPHER_MODE_CBC
/**
*/
#define MBEDTLS_CIPHER_MODE_CFB
/**
*/
#define MBEDTLS_CIPHER_MODE_CTR
/**
*/
#define MBEDTLS_CIPHER_MODE_OFB
/**
*/
#define MBEDTLS_CIPHER_MODE_XTS
/**
*/
#define MBEDTLS_CIPHER_PADDING_PKCS7
#defi... | 2,576 |
CONFIG_IDF_TARGET_LINUX
/**
*/
#define MBEDTLS_PK_RSA_ALT_SUPPORT
/**
*/
#define MBEDTLS_PKCS1_V15
/**
*/
#define MBEDTLS_PKCS1_V21
/**
*/
#define MBEDTLS_SELF_TEST
/**
*/
#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
/**
*/
#ifdef CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID
#define MBEDTLS_SSL_DTLS_CONNECTION_ID
#else
... | 2,576 |
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN */
/**
*/
#define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
/**
*/
#ifdef CONFIG_MBEDTLS_THREADING_C
#define MBEDTLS_THREADING_C
#else
#undef MBEDTLS_THREADING_C
#endif
/**
*/
#ifdef CONFIG_MBEDTLS_THREADING_ALT
#define MBEDTLS_THREADING_ALT
#else
#undef MBEDTLS_THREADIN... | 2,576 |
// Copyright 2015-2016 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 app... | 2,577 |
/*
*/
#pragma once
#include_next "mbedtls/gcm.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(MBEDTLS_GCM_ALT) && defined(MBEDTLS_GCM_NON_AES_CIPHER_SOFT_FALLBACK)
/**
*/
void mbedtls_gcm_init_soft(mbedtls_gcm_context_soft *ctx);
int mbedtls_gcm_setkey_soft(mbedtls_gcm_context_soft... | 2,578 |
/*
*/
#pragma once
#include_next "mbedtls/bignum.h"
#include "sdkconfig.h"
/**
*/
/**
void esp_mpi_acquire_hardware(void);
/**
*/
void esp_mpi_release_hardware(void);
#if CONFIG_MBEDTLS_HARDWARE_MPI
/* @brief MPI modular mupltiplication function
*/
int esp_mpi_mul_mpi_mod(mbedtls_mpi *Z, const mbedtls_mpi *X,... | 2,579 |
// Copyright 2019-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 app... | 2,580 |
/**
*/
#ifndef ESP_AES_H
#define ESP_AES_H
#warning "esp32/aes.h is deprecated, please use aes/esp_aes.h instead"
#include "aes/esp_aes.h"
#endif /* aes.h */
| 2,581 |
/*
*/
#pragma once
#ifndef _ESP_RSA_SIGN_ALT_H_
#define _ESP_RSA_SIGN_ALT_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "esp_ds.h"
#include "mbedtls/md.h"
/**
*/
/* Context for encrypted private key data required for DS */
typedef struct esp_ds_data_ctx {
esp_ds_data_t *esp_ds_data;
uint8_t efuse_k... | 2,582 |
/*
*/
#pragma once
#include "esp_rom_md5.h"
#ifdef __cplusplus
extern "C" {
#endif
#if CONFIG_IDF_TARGET_ESP32C2
typedef struct mbedtls_md5_context mbedtls_md5_context;
#else
typedef struct MD5Context mbedtls_md5_context;
#endif
/**
void esp_md5_init( mbedtls_md5_context *ctx );
/**
void esp_md5_free( mbedtls_md5... | 2,583 |
/*
*/
#pragma once
#include
#include "hal/sha_types.h"
/** @brief Low-level support functions for the hardware SHA engine
#ifdef __cplusplus
extern "C" {
#endif
/** @brief Calculate SHA1 or SHA2 sum of some data, using hardware SHA engine
*/
void esp_sha(esp_sha_type sha_type, const unsigned char *input, size... | 2,584 |
// Copyright 2015-2016 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 app... | 2,585 |
void esp_sha_read_digest_state(esp_sha_type sha_type, void *digest_state);
/**
*/
void esp_sha_lock_engine(esp_sha_type sha_type);
/**
*/
bool esp_sha_try_lock_engine(esp_sha_type sha_type);
/**
*/
void esp_sha_unlock_engine(esp_sha_type sha_type);
/**
*/
void esp_sha_lock_memory_block(void);
/**
*/
void esp... | 2,585 |
// Copyright 2019-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 app... | 2,586 |
// Copyright 2019-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 app... | 2,587 |
/**
*/
#ifndef ESP_AES_H
#define ESP_AES_H
//#warning "esp32s2/aes.h is deprecated, please use aes/esp_aes.h instead"
#include "aes/esp_aes.h"
#endif /* aes.h */
| 2,588 |
/**
*/
#pragma once
#warning "esp32s2/gcm.h is deprecated, please use aes/esp_aes_gcm.h instead"
#include "aes/esp_aes_gcm.h"
| 2,589 |
/**
*/
#pragma once
#include "esp_types.h"
#include "hal/aes_types.h"
#ifdef __cplusplus
extern "C" {
#endif
#define ERR_ESP_AES_INVALID_KEY_LENGTH -0x0020 /**256 bits (each of key1 and key2 is a 128-bit key)
*/
int esp_aes_xts_setkey_enc( esp_aes_xts_context *ctx,
... | 2,590 |
/*
*/
#pragma once
#include "aes/esp_aes.h"
#include "mbedtls/cipher.h"
#include "soc/lldesc.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
ESP_AES_GCM_STATE_INIT,
ESP_AES_GCM_STATE_START,
ESP_AES_GCM_STATE_UPDATE,
ESP_AES_GCM_STATE_FINISH
} esp_aes_gcm_state;
/**
*/
typedef struct {
... | 2,591 |
/**
*/
#pragma once
#include "aes/esp_aes.h"
#include "aes/esp_aes_gcm.h"
#include
#ifdef __cplusplus
extern "C" {
#endif
bool valid_key_length(const esp_aes_context *ctx);
/**
*/
int esp_aes_process_dma_gcm(esp_aes_context *ctx, const unsigned char *input, unsigned char *output, size_t len, lldesc_t *aad_des... | 2,592 |
// 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... | 2,593 |
defined(CONFIG_MBEDTLS_USE_CRYPTO_ROM_IMPL))
#error "CONFIG_MBEDTLS_USE_CRYPTO_ROM_IMPL"
#endif
/* platform_util.c */
#if (defined(MBEDTLS_PLATFORM_ZEROIZE_ALT))
#error "MBEDTLS_PLATFORM_ZEROIZE_ALT"
#endif
/* sha1.c */
STRUCT_OFFSET_CHECK(mbedtls_sha1_context, total, 0);
STRUCT_OFFSET_CHECK(mbedtls_sha1_context, sta... | 2,594 |
MBEDTLS_SHA256_C"
#endif
/* sha512.c */
STRUCT_OFFSET_CHECK(mbedtls_sha512_context, MBEDTLS_PRIVATE(total), 0);
STRUCT_OFFSET_CHECK(mbedtls_sha512_context, MBEDTLS_PRIVATE(state), 16);
STRUCT_OFFSET_CHECK(mbedtls_sha512_context, MBEDTLS_PRIVATE(buffer), 80);
STRUCT_OFFSET_CHECK(mbedtls_sha512_context, MBEDTLS_PRIVATE(... | 2,594 |
defined(MBEDTLS_AES_C)) || \
(defined(MBEDTLS_AES_ALT)) || \
(defined(MBEDTLS_AES_ENCRYPT_ALT)) || \
(defined(MBEDTLS_AES_DECRYPT_ALT)) || \
(defined(MBEDTLS_AES_SETKEY_ENC_ALT)) || \
(defined(MBEDTLS_AES_SETKEY_DEC_ALT))
#error "MBEDTLS_AES_C"
#endif
#if (!defined(MBEDTLS_AES_ROM_TABLES)) || \
... | 2,594 |
defined(MBEDTLS_ASN1_PARSE_C))
#error "MBEDTLS_ASN1_PARSE_C"
#endif
#if (!defined(MBEDTLS_ASN1_WRITE_C))
#error "MBEDTLS_ASN1_PARSE_C"
#endif
/* base64.c */
#if (!defined(MBEDTLS_BASE64_C))
#error "MBEDTLS_BASE64_C"
#endif
/* md5.c */
#if (defined(MBEDTLS_MD2_C)) || \
(defined(MBEDTLS_MD4_C)) || \
(!defined(M... | 2,594 |
/*
*/
#pragma once
#include "soc/lldesc.h"
#include "soc/soc_caps.h"
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
esp_err_t esp_aes_dma_start(const lldesc_t *input, const lldesc_t *output);
/**
*/
bool esp_aes_dma_done(const lldesc_t *output);
/**
*/
void esp_aes_intr_alloc(void);
#ifde... | 2,595 |
/*
*/
#ifndef __ESP_PARTITION_H__
#define __ESP_PARTITION_H__
#include
#include
#include
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
/** @cond */
typedef struct esp_flash_t esp_flash_t;
/** @endcond */
/**
*/
typedef enum {
ESP_PARTITION_MMAP_DATA, /**erase_size.
*/
esp_err_t ... | 2,596 |
/*
*/
#pragma once
#include
#include
#include
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
/** @brief emulated sector size for the partition API on Linux */
#define ESP_PARTITION_EMULATED_SECTOR_SIZE 0x1000
/** @brief emulated whole flash size for the partition API on Linux */
#define E... | 2,597 |
< name of flash dump file, zero-terminated ASCII string */
size_t flash_file_size; /*!< size of flash dump file in bytes */
char partition_file_name[PATH_MAX]; /*!< name of file containing binary representation of partition table, zero-terminated ASCII string */
bool remove_dump; ... | 2,597 |
/*
*/
#pragma once
#include
#include_next
#ifdef __cplusplus
extern "C" {
#endif
#define _POSIX_TIMERS 1
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC (clockid_t)4
#endif
#ifndef CLOCK_BOOTTIME
#define CLOCK_BOOTTIME (clockid_t)4
#endif
int clock_settime(clockid_t clock_id, const struct timespec *tp);
int cl... | 2,598 |
/*
*/
#pragma once
#include
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned int sem_t;
/**
*/
#define SEM_VALUE_MAX 0x7FFF
/**
*/
int sem_destroy(sem_t *sem);
/**
*/
int sem_init(sem_t *sem, int pshared, unsigned value);
/**
*/
int sem_post(sem_t *sem);
/**
*/
int sem_timedwait(sem_t *semaphore,... | 2,599 |
/*
*/
#pragma once
#include
#ifdef __cplusplus
extern "C" {
#endif
/*
*/
void esp_newlib_time_init(void);
/**
*/
void esp_reent_init(struct _reent* r);
/**
void esp_newlib_init_global_stdio(const char* stdio_dev);
/**
*/
void esp_reent_cleanup(void);
/**
*/
void esp_newlib_init(void);
void esp_setup_sysc... | 2,600 |
/*
*/
/*-
*/
#pragma once
#include
/*
*/
#include
#ifdef __cplusplus
extern "C" {
#endif
/*
*/
#define bswap16(x) __bswap16(x)
#define bswap32(x) __bswap32(x)
#define bswap64(x) __bswap64(x)
/*
*/
#if _BYTE_ORDER == _LITTLE_ENDIAN
#define htobe16(x) bswap16((x))
#define htobe32(x) bswap32((x))
#defin... | 2,601 |
*/
static __inline uint16_t
be16dec(const void *pp)
{
uint8_t const *p = (uint8_t const *)pp;
return ((p[0] > 8) & 0xff;
p[1] = u & 0xff;
}
static __inline void
be32enc(void *pp, uint32_t u)
{
uint8_t *p = (uint8_t *)pp;
p[0] = (u >> 24) & 0xff;
p[1] = (u >> 16) & 0xff;
p[2] = (u >> 8) ... | 2,601 |
/*
*/
#ifndef __ESP_PLATFORM_PTHREAD_H__
#define __ESP_PLATFORM_PTHREAD_H__
#include
#include
#include
#include_next
#ifdef __cplusplus
extern "C" {
#endif
int pthread_condattr_getclock(const pthread_condattr_t * attr, clockid_t * clock_id);
int pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t cl... | 2,602 |
/*
*/
#ifndef _ESP_PLATFORM_ERRNO_H_
#define _ESP_PLATFORM_ERRNO_H_
#include_next "errno.h"
//
// Possibly define some missing errors
//
#ifndef ESHUTDOWN
#define ESHUTDOWN 110 /* Cannot send after transport endpoint shutdown */
#endif
#ifndef EAI_SOCKTYPE
#define EAI_SOCKTYPE 10 /* ai_socktype not suppo... | 2,603 |
/*
*/
/* This header file wraps newlib's own unmodified assert.h and adds
support for silent assertion failure.
*/
#pragma once
#include
#include
#include
#include_next
/* moved part of libc provided assert to here allows
*/
#undef assert
/* __FILENAME__ points to the file name instead of path + filename
... | 2,604 |
/*
*/
#ifndef _ESP_PLATFORM_NET_IF_H_
#define _ESP_PLATFORM_NET_IF_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "lwip/sockets.h"
#include "lwip/if_api.h"
#define MSG_DONTROUTE 0x4 /* send without using routing tables */
#define SOCK_SEQPACKET 5 /* sequenced packet stream */
#define MSG_EOR ... | 2,605 |
/*
*/
#pragma once
/* Newlib sys/time.h defines timerisset, timerclear, timercmp, timeradd, timersub macros
for __CYGWIN__ and __rtems__. We want to define these macros in IDF as well.
Since we wish to use un-modified newlib headers until a patched newlib version is
available, temporarily define __rtems__ her... | 2,606 |
/*
*/
#ifndef _UTIME_H_
#define _UTIME_H_
#include
#ifdef __cplusplus
extern "C" {
#endif
struct utimbuf {
time_t actime; // access time
time_t modtime; // modification time
};
int utime(const char *path, const struct utimbuf *times);
#ifdef __cplusplus
};
#endif
#endif /* _UTIME_H_ */
| 2,607 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
int ioctl(int fd, int request, ...);
#ifdef __cplusplus
}
#endif
| 2,608 |
/*
*/
#pragma once
#include
#include
#ifdef __cplusplus
extern "C" {
#endif
struct iovec;
int writev(int s, const struct iovec *iov, int iovcnt);
ssize_t readv(int fd, const struct iovec *iov, int iovcnt);
#ifdef __cplusplus
}
#endif
| 2,609 |
/*
*/
#pragma once
#include
#include_next
#ifdef __cplusplus
extern "C" {
#endif
int truncate(const char *, off_t __length);
int gethostname(char *__name, size_t __len);
int getentropy(void *buffer, size_t length);
#ifdef __cplusplus
}
#endif
| 2,610 |
/*
*/
#pragma once
#include_next
#include "sdkconfig.h"
#ifdef _RETARGETABLE_LOCKING
/* Actual platfrom-specific definition of struct __lock.
*/
struct __lock {
#if (CONFIG_FREERTOS_USE_LIST_DATA_INTEGRITY_CHECK_BYTES && CONFIG_FREERTOS_USE_TRACE_FACILITY)
int reserved[29];
#elif (CONFIG_FREERTOS_USE_LIST_DAT... | 2,611 |
/*
*/
#pragma once
#include
#include
#include
/**
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef struct {
uint16_t dd_vfs_idx; /*!< VFS index, not to be used by applications */
uint16_t dd_rsv; /*!< field reserved for future extension */
/* remaining fields are defined by VFS implem... | 2,612 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#define AF_UNIX 1 /* local to host (pipes) */
struct sockaddr_un {
short sun_family; /*AF_UNIX*/
char sun_path[108]; /*path name */
};
#ifdef __cplusplus
}
#endif
| 2,613 |
/*
*/
#pragma once
#if __NEWLIB__ > 4 || ( __NEWLIB__ == 4 && __NEWLIB_MINOR__ > 1 ) /* TODO: IDF-8134 */
#define _REENT_BACKWARD_BINARY_COMPAT
#define _REENT_SDIDINIT(_ptr) ((_ptr)->_reserved_0)
#define _REENT_SGLUE(_ptr) (__sglue)
#else
#define _REENT_CLEANUP(_ptr) ((_ptr)->__cleanup)
#define _REENT_STDIN(_... | 2,614 |
/*
*/
//
// This header file is based on the termios header of
// "The Single UNIX (r) Specification, Version 2, Copyright (c) 1997 The Open Group".
#ifndef __ESP_SYS_TERMIOS_H__
#define __ESP_SYS_TERMIOS_H__
// ESP-IDF NOTE: This header provides only a compatibility layer for macros and functions defined in sys/te... | 2,615 |
*/
#define ICRNL (1u << 1) /** Map CR to NL on input. */
#define IGNBRK (1u << 2) /** Ignore break condition. */
#define IGNCR (1u << 3) /** Ignore CR. */
#define IGNPAR (1u << 4) /** Ignore characters with parity errors. */
#define INLCR (1u << 5) /** Map NL t... | 2,615 |
*/
#define ONLCR (1u << 2) /** Map NL to CR-NL on output. */
#define OCRNL (1u << 3) /** Map CR to NL on output. */
#define ONOCR (1u << 4) /** No CR output at column 0. */
#define ONLRET (1u << 5) /** NL performs CR function. */
#define OFILL (1u << 6) /... | 2,615 |
*/
#define TAB1 (1u << 10) /** Horizontal-tab delay type 1. */
#define TAB2 (2u << 10) /** Horizontal-tab delay type 2. */
#define TAB3 (3u << 10) /** Expand tabs to spaces. */
#define BSDLY (1u << 12) /** Select backspace delays: */
#define BS0 (0u << 12) ... | 2,615 |
*/
#define CS6 (1u << 0) /** 6 bits. */
#define CS7 (2u << 0) /** 7 bits. */
#define CS8 (3u << 0) /** 8 bits. */
#define CSTOPB (1u << 2) /** Send two stop bits, else one. */
#define CREAD (1u << 3) /** Enable receiver. */
#define PARENB (1u << 4) ... | 2,615 |
*/
#define ECHONL (1u << 3) /** Echo NL. */
#define ICANON (1u << 4) /** Canonical input (erase and kill processing). */
#define IEXTEN (1u << 5) /** Enable extended input character processing. */
#define ISIG (1u << 6) /** Enable signals. */
#define NOFLSH (1u << 7) ... | 2,615 |
*/
#define TCIOFLUSH 1 /** Flush both pending input and untransmitted output. */
#define TCOFLUSH 2 /** Flush untransmitted output. */
// constants for use with tcflow():
#define TCIOFF 0 /** Transmit a STOP character, intended to suspend input data. */
#define TCIO... | 2,615 |
/*
*/
#ifndef _ESP_PLATFORM_SYS_POLL_H_
#define _ESP_PLATFORM_SYS_POLL_H_
#define POLLIN (1u << 0) /* data other than high-priority may be read without blocking */
#define POLLRDNORM (1u << 1) /* normal data may be read without blocking */
#define POLLRDBAND (1u << 2) /* priority data may be re... | 2,616 |
*/
short events; /* The event(s) is/are specified here. */
short revents; /* Events found are returned here. */
};
typedef unsigned int nfds_t;
int poll(struct pollfd *fds, nfds_t nfds, int timeout);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // _ESP_PLATFORM_SYS_POLL_H_
| 2,616 |
/*
*/
#ifndef __SYS_RANDOM__
#define __SYS_RANDOM__
#include
#ifdef __cplusplus
extern "C" {
#endif
ssize_t getrandom(void *buf, size_t buflen, unsigned int flags);
#ifdef __cplusplus
} // extern "C"
#endif
#endif //__SYS_RANDOM__
| 2,617 |
/*
*/
#ifndef __ESP_SYS_SELECT_H__
#define __ESP_SYS_SELECT_H__
/* Newlib 2.2.0 does not provide sys/select.h, and fd_set is defined in sys/types.h */
#include
#ifndef fd_set
#include_next
#else // fd_set
#include
#ifdef __cplusplus
extern "C" {
#endif
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_... | 2,618 |
/*
*/
#pragma once
void esp_time_impl_init(void);
uint64_t esp_time_impl_get_time(void);
uint64_t esp_time_impl_get_time_since_boot(void);
uint32_t esp_time_impl_get_time_resolution(void);
void esp_time_impl_set_boot_time(uint64_t t);
uint64_t esp_time_impl_get_boot_time(void);
| 2,619 |
/*
*/
#pragma once
#include
#include
#include
#include "esp_err.h"
#include "driver/i2c_types.h"
#include "hal/i2c_hal.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/task.h"
#include "freertos/ringbuf.h"
#include "driver/i2c_slave.h"
#include "esp_private/periph_ctrl.h"
#include... | 2,620 |
ack_val = (ack_value), .op_code = I2C_LL_CMD_READ}
#define I2C_TRANS_WRITE_COMMAND(ack_check) {.ack_en = (ack_check), .op_code = I2C_LL_CMD_WRITE}
#define I2C_TRANS_STOP_COMMAND {.op_code = I2C_LL_CMD_STOP}
#define I2C_TRANS_START_COMMAND {.op_code = I2C_LL_CMD_RESTART}
typedef struct i2c_... | 2,620 |
SemaphoreHandle_t cmd_semphr; // Semaphore between task and interrupt, using for synchronizing ISR and I2C task.
uint32_t read_buf_pos; // Read buffer position
bool contains_read; // Wh... | 2,620 |
i2c_addr_bit_len_t addr_10bits_bus; // Slave address is 10 bits.
size_t queue_size; // I2C transaction queue size.
size_t num_trans_inflight; // Indicates the number of transactions that are und... | 2,620 |
StaticQueue_t trans_queue_structs[I2C_TRANS_QUEUE_MAX]; // memory to store the static structure for trans_queues
i2c_operation_t (*i2c_async_ops)[I2C_STATIC_OPERATION_ARRAY_MAX]; // pointer to asynchronous operation(s).
uint32_t ops_prepare_idx; // Index for ... | 2,620 |
void *user_ctx; // Callback user context
};
typedef struct {
bool trans_complete; // Event of transaction complete
bool slave_stretch; // Event of slave stretch happens
bool addr_unmatch; // Event of address unmatched
} i2c_slave_evt_t;
typedef struct {
uint8_t *buffer... | 2,620 |
QueueHandle_t slv_evt_queue; // Event Queue used in slave nonfifo mode.
i2c_slave_evt_t slave_evt; // Slave event structure.
i2c_slave_receive_t receive_desc; // Slave receive descriptor
uint32_t already_receive_len; // Data length already receive... | 2,620 |
/*
*/
#pragma once
#include
#include "esp_err.h"
#include "driver/i2c_types.h"
#include "hal/gpio_types.h"
#include "soc/soc_caps.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef struct {
i2c_port_num_t i2c_port; /*!< I2C port number, `-1` for auto selecting */
gpio_num_t sda_io_nu... | 2,621 |
< Enable slave stretch */
#endif
#if SOC_I2C_SLAVE_SUPPORT_BROADCAST
uint32_t broadcast_en: 1; /*!< I2C slave enable broadcast */
#endif
#if SOC_I2C_SLAVE_SUPPORT_I2CRAM_ACCESS
uint32_t access_ram_en: 1; /*!< Can get access to I2C RAM directly */
#endif
#if SOC_I2C_SLAVE_SUPPORT_SLA... | 2,621 |
/*
*/
#pragma once
#include
#include
#include "hal/i2c_types.h"
#include "soc/soc_caps.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef int i2c_port_num_t;
/**
*/
typedef enum {
I2C_STATUS_READ, /*!< read status for current master command */
I2C_STATUS_WRITE, /*!< write status for cur... | 2,622 |
*/
} i2c_master_event_data_t;
/**
*/
typedef bool (*i2c_master_callback_t)(i2c_master_dev_handle_t i2c_dev, const i2c_master_event_data_t *evt_data, void *arg);
/**
*/
typedef struct {
uint8_t *buffer; /**< Pointer for buffer received in callback. */
} i2c_slave_rx_done_event_data_t;
/**
*/
typedef bool (*i... | 2,622 |
/*
*/
#pragma once
#include
#include "esp_err.h"
#include "driver/i2c_types.h"
#include "hal/gpio_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
typedef struct {
i2c_port_num_t i2c_port; /*!< I2C port number, `-1` for auto selecting */
gpio_num_t sda_io_num; /*!< GPIO ... | 2,623 |
(Typically max_device_num * per_transaction)*/
struct {
uint32_t enable_internal_pullup: 1; /*!< Enable internal pullups. Note: This is not strong enough to pullup buses under high-speed frequency. Recommend proper external pull-up if possible */
} flags; /*!< I2C master c... | 2,623 |
/*
*/
#pragma once
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
#if CONFIG_IDF_TARGET_ESP32
#define I2C_SLAVE_SCL_IO 18 /*!<gpio number for i2c slave clock */
#define I2C_SLAVE_SDA_IO 19 /*!<gpio number for i2c slave data */
#define I2C_MASTER_SCL_IO 18 /*!< gpio number for I... | 2,624 |
/*
*/
#ifndef _OTA_OPS_H
#define _OTA_OPS_H
#include
#include
#include
#include "esp_err.h"
#include "esp_partition.h"
#include "esp_app_desc.h"
#include "esp_bootloader_desc.h"
#include "esp_flash_partitions.h"
#include "soc/soc_caps.h"
#ifdef __cplusplus
extern "C"
{
#endif
#define OTA_SIZE_UNKNOWN 0xffffffff... | 2,625 |
/*
*/
#ifndef _ESP_HTTP_CLIENT_H
#define _ESP_HTTP_CLIENT_H
#include "freertos/FreeRTOS.h"
#include "sdkconfig.h"
#include "esp_err.h"
#include
#ifdef __cplusplus
extern "C" {
#endif
#define DEFAULT_HTTP_BUF_SIZE (512)
#include "esp_event.h"
ESP_EVENT_DECLARE_BASE(ESP_HTTP_CLIENT_EVENT);
typedef struct esp_http... | 2,626 |
/*
*/
#ifndef _HTTP_HEADER_H_
#define _HTTP_HEADER_H_
#include "sys/queue.h"
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct http_header *http_header_handle_t;
typedef struct http_header_item *http_header_item_handle_t;
/**
*/
http_header_handle_t http_header_init(void);
/**
*/
esp_e... | 2,627 |
/*
*/
#ifndef _HTTP_BASIC_AUTH_H_
#define _HTTP_BASIC_AUTH_H_
/**
*/
typedef struct {
char *method; /*!< Request method, example: GET */
char *algorithm; /*!< Authentication algorithm */
char *uri; /*!< URI of request example: /path/to/file.html */
char *realm; /*!< Authent... | 2,628 |
/*
*/
#ifndef _HTTP_UTILS_H_
#define _HTTP_UTILS_H_
#include
/**
*/
char *http_utils_assign_string(char **str, const char *new_str, int len);
/**
*/
char *http_utils_append_string(char **str, const char *new_str, int len);
/**
*/
void http_utils_trim_whitespace(char **str);
/**
*/
char *http_utils_get_strin... | 2,629 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/**
*/
void vPortSetupTimer(void);
#ifdef __cplusplus
}
#endif
| 2,630 |
/*
*/
#pragma once
/* Xtensa Architecture specific configuration. This file is included in the common FreeRTOSConfig.h. */
#include "sdkconfig.h"
/* Required for configuration-dependent settings. */
#include "xtensa_config.h"
/* Xtensa Additional Config
#define configXT_SIMULATOR 0
#define configXT_B... | 2,631 |
#if CONFIG_FREERTOS_SMP
#define configINIT_TLS_BLOCK( xTLSBlock, pxTopOfStack ) esp_reent_init( &( xTLSBlock ) )
#else /* CONFIG_FREERTOS_SMP */
#define configINIT_TLS_BLOCK( xTLSBlock ) esp_reent_init( &( xTLSBlock ) )
#endif /* CONFIG_FREERTOS_SMP */
#define configSET_TLS_BLOCK( xTLSBlock... | 2,631 |
Adjust the stack size
*/
#define configSTACK_ALIGNMENT 16
#ifndef configISR_STACK_SIZE
#define configISR_STACK_SIZE ( ( CONFIG_FREERTOS_ISR_STACKSIZE + configSTACK_ALIGNMENT - 1 ) & ( ~( configSTACK_ALIGNMENT - 1 ) ) )
#endif
| 2,631 |
/*
*/
#pragma once
#include "sdkconfig.h"
/* This file gets pulled into assembly sources. Therefore, some includes need to
#ifndef __ASSEMBLER__
/* For configASSERT() */
#include
#endif /* def __ASSEMBLER__ */
/* Helpers
/* Higher stack checker modes cause overhead on each function call */
#if CONFIG_... | 2,632 |
h in esp_additions/arch_include/.
#include "freertos/FreeRTOSConfig_arch.h"
/* FreeRTOS Config
/*
**/
/* Scheduler Related */
#define configUSE_PREEMPTION 1
#define configUSE_TICKLESS_IDLE CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if configUSE_TICKLESS_IDLE
#define conf... | 2,632 |
e.,
#if CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS ( CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS * 2 )
#else /* CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS */
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS
#endif /* ... | 2,632 |
pxEndOfStack */
/* Run-time Stats */
#ifdef CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS
#define configGENERATE_RUN_TIME_STATS 1 /* Used by vTaskGetRunTimeStats() */
#endif /* CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS */
#ifdef CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS
#define configUSE_STATS_... | 2,632 |
h"
#undef INLINE /* to avoid redefinition */
#endif /* CONFIG_SYSVIEW_ENABLE */
#if CONFIG_FREERTOS_SMP
/* Default values for trace macros added to ESP-IDF implementation of SYSVIEW
#ifndef traceISR_EXIT
#define traceISR_EXIT()
#endif
#ifndef traceISR_ENTER
... | 2,632 |
CONFIG_FREERTOS_SMP
#ifdef CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID
#define configTASKLIST_INCLUDE_COREID 1
#endif /* CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID */
#ifdef CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS
#define configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS 1
#endi... | 2,632 |
/*
*/
#pragma once
/* Linux POSIX simulator specific configuration. This file is included in the common FreeRTOSConfig.h. */
#include "sdkconfig.h"
/* FreeRTOS Config
/* Scheduler Related */
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
/* The stack allocated by FreeRTOS will be passed to a pthread.
... | 2,633 |
/*
*/
#pragma once
/* RISC-V Architecture specific configuration. This file is included in the common FreeRTOSConfig.h. */
#include "sdkconfig.h"
/* FreeRTOS Config
/* Scheduler Related */
#ifdef CONFIG_FREERTOS_OPTIMIZED_SCHEDULER
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
#else
#define co... | 2,634 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.