From 2393d829de9995eb70d6458c9aa40eac81897a71 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 21 Nov 2016 17:13:55 +0800 Subject: [PATCH] remove legacy definitions from esp_types.h --- components/esp32/include/esp_system.h | 2 +- components/esp32/include/esp_types.h | 48 --------------------------- components/esp32/include/rom/uart.h | 8 +++++ components/openssl/platform/ssl_pm.c | 2 +- 4 files changed, 10 insertions(+), 50 deletions(-) diff --git a/components/esp32/include/esp_system.h b/components/esp32/include/esp_system.h index d416e23d0..2b408eacc 100644 --- a/components/esp32/include/esp_system.h +++ b/components/esp32/include/esp_system.h @@ -16,7 +16,7 @@ #define __ESP_SYSTEM_H__ #include - +#include #include "esp_err.h" #include "esp_deepsleep.h" diff --git a/components/esp32/include/esp_types.h b/components/esp32/include/esp_types.h index c142aee68..547024e3f 100755 --- a/components/esp32/include/esp_types.h +++ b/components/esp32/include/esp_types.h @@ -22,52 +22,4 @@ #include #include -#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__ */ diff --git a/components/esp32/include/rom/uart.h b/components/esp32/include/rom/uart.h index 8e3125133..0c08590f5 100644 --- a/components/esp32/include/rom/uart.h +++ b/components/esp32/include/rom/uart.h @@ -161,6 +161,14 @@ typedef struct { int received; } UartDevice; +typedef enum { + OK = 0, + FAIL, + PENDING, + BUSY, + CANCEL, +} STATUS; + /** * @brief Init uart device struct value and reset uart0/uart1 rx. * Please do not call this function in SDK. diff --git a/components/openssl/platform/ssl_pm.c b/components/openssl/platform/ssl_pm.c index a5986dc3e..522721ad7 100644 --- a/components/openssl/platform/ssl_pm.c +++ b/components/openssl/platform/ssl_pm.c @@ -215,7 +215,7 @@ static int ssl_pm_reload_crt(SSL *ssl) * Perform the mbedtls SSL handshake instead of mbedtls_ssl_handshake. * We can add debug here. */ -LOCAL int mbedtls_handshake( mbedtls_ssl_context *ssl ) +static int mbedtls_handshake( mbedtls_ssl_context *ssl ) { int ret = 0;