]> granicus.if.org Git - esp-idf/commitdiff
remove legacy definitions from esp_types.h
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 21 Nov 2016 09:13:55 +0000 (17:13 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Tue, 22 Nov 2016 13:14:36 +0000 (21:14 +0800)
components/esp32/include/esp_system.h
components/esp32/include/esp_types.h
components/esp32/include/rom/uart.h
components/openssl/platform/ssl_pm.c

index d416e23d070a9ca0e29bdc180f28617c754d421f..2b408eacc6ef8a21a6379b71b9ebd1cf4a4e88d0 100644 (file)
@@ -16,7 +16,7 @@
 #define __ESP_SYSTEM_H__
 
 #include <stdint.h>
-
+#include <stdbool.h>
 #include "esp_err.h"
 #include "esp_deepsleep.h"
 
index c142aee6873c10facac86565ed86ec930c5dc541..547024e3f75480f0df11cfa8a2134ede4e54c08b 100755 (executable)
 #include <stdbool.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__ */
index 8e3125133ca8b53a1f1be3eac8cc514873f0004f..0c08590f57c7e7a350a584f2d573681cfcc34f15 100644 (file)
@@ -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.
index a5986dc3ee8667db319efabc3999ca68e9cad398..522721ad7c8659779b5096090909be112d5ee867 100644 (file)
@@ -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;