mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
remove legacy definitions from esp_types.h
This commit is contained in:
parent
d0c9c1de57
commit
2393d829de
@ -16,7 +16,7 @@
|
|||||||
#define __ESP_SYSTEM_H__
|
#define __ESP_SYSTEM_H__
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_deepsleep.h"
|
#include "esp_deepsleep.h"
|
||||||
|
|
||||||
|
@ -22,52 +22,4 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#define __ATTRIB_PACK __attribute__ ((packed))
|
|
||||||
#define __ATTRIB_PRINTF __attribute__ ((format (printf, 1, 2)))
|
|
||||||
#define __ATTRIB_NORETURN __attribute__ ((noreturn))
|
|
||||||
#define __ATTRIB_ALIGN(x) __attribute__ ((aligned((x))))
|
|
||||||
#define INLINE __inline__
|
|
||||||
|
|
||||||
#define LOCAL static
|
|
||||||
|
|
||||||
/* probably should not put STATUS here */
|
|
||||||
typedef enum {
|
|
||||||
OK = 0,
|
|
||||||
FAIL,
|
|
||||||
PENDING,
|
|
||||||
BUSY,
|
|
||||||
CANCEL,
|
|
||||||
} STATUS;
|
|
||||||
|
|
||||||
//#define _LITTLE_ENDIAN 1234
|
|
||||||
//#define _BYTE_ORDER == _LITTLE_ENDIAN
|
|
||||||
|
|
||||||
#define ASSERT( x ) do { \
|
|
||||||
if (!(x)) { \
|
|
||||||
printf("%s %u\n", __FILE__, __LINE__); \
|
|
||||||
while (1) { \
|
|
||||||
asm volatile("nop"); \
|
|
||||||
}; \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/* #if __GNUC_PREREQ__(4, 1) */
|
|
||||||
#ifndef __GNUC__
|
|
||||||
#if 1
|
|
||||||
#define __offsetof(type, field) __builtin_offsetof(type, field)
|
|
||||||
#else
|
|
||||||
#define __offsetof(type, field) ((size_t)(&((type *)0)->field))
|
|
||||||
#endif
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
|
|
||||||
/* Macros for counting and rounding. */
|
|
||||||
#ifndef howmany
|
|
||||||
#define howmany(x, y) (((x)+((y)-1))/(y))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define container_of(ptr, type, member) ({ \
|
|
||||||
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
|
|
||||||
(type *)( (char *)__mptr - __offsetof(type,member) );})
|
|
||||||
|
|
||||||
#endif /* __ESP_TYPES_H__ */
|
#endif /* __ESP_TYPES_H__ */
|
||||||
|
@ -161,6 +161,14 @@ typedef struct {
|
|||||||
int received;
|
int received;
|
||||||
} UartDevice;
|
} UartDevice;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
OK = 0,
|
||||||
|
FAIL,
|
||||||
|
PENDING,
|
||||||
|
BUSY,
|
||||||
|
CANCEL,
|
||||||
|
} STATUS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Init uart device struct value and reset uart0/uart1 rx.
|
* @brief Init uart device struct value and reset uart0/uart1 rx.
|
||||||
* Please do not call this function in SDK.
|
* Please do not call this function in SDK.
|
||||||
|
@ -215,7 +215,7 @@ static int ssl_pm_reload_crt(SSL *ssl)
|
|||||||
* Perform the mbedtls SSL handshake instead of mbedtls_ssl_handshake.
|
* Perform the mbedtls SSL handshake instead of mbedtls_ssl_handshake.
|
||||||
* We can add debug here.
|
* We can add debug here.
|
||||||
*/
|
*/
|
||||||
LOCAL int mbedtls_handshake( mbedtls_ssl_context *ssl )
|
static int mbedtls_handshake( mbedtls_ssl_context *ssl )
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user