Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove legacy definitions from esp_types.h
  • Loading branch information
igrr committed Nov 22, 2016
1 parent d0c9c1d commit 2393d82
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 50 deletions.
2 changes: 1 addition & 1 deletion components/esp32/include/esp_system.h
Expand Up @@ -16,7 +16,7 @@
#define __ESP_SYSTEM_H__

#include <stdint.h>

#include <stdbool.h>
#include "esp_err.h"
#include "esp_deepsleep.h"

Expand Down
48 changes: 0 additions & 48 deletions components/esp32/include/esp_types.h
Expand Up @@ -22,52 +22,4 @@
#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__ */
8 changes: 8 additions & 0 deletions components/esp32/include/rom/uart.h
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion components/openssl/platform/ssl_pm.c
Expand Up @@ -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;

Expand Down

0 comments on commit 2393d82

Please sign in to comment.