From c4986a79a2f401df2ef0b6dee4d69fc6a65ee586 Mon Sep 17 00:00:00 2001 From: Jeroen Domburg Date: Mon, 8 Jun 2015 12:21:52 +0800 Subject: [PATCH] SDK 1.1.1 compatibility fixes --- include/espmissingincludes.h | 15 ++++++++++++++- user/user_main.c | 4 ++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/include/espmissingincludes.h b/include/espmissingincludes.h index 8c1334e..27e6652 100644 --- a/include/espmissingincludes.h +++ b/include/espmissingincludes.h @@ -4,6 +4,7 @@ #include #include #include +#include //Missing function prototypes in include folders. Gcc will warn on these if we don't define 'em anywhere. //MOST OF THESE ARE GUESSED! but they seem to swork and shut up the compiler. @@ -40,8 +41,20 @@ void vPortFree(void *ptr); void *vPortMalloc(size_t xWantedSize); uint8 wifi_get_opmode(void); uint32 system_get_time(); -int os_random(); int rand(void); void ets_bzero(void *s, size_t n); void ets_delay_us(int ms); + + +//Standard PIN_FUNC_SELECT gives a warning. Replace by a non-warning one. +#ifdef PIN_FUNC_SELECT +#undef PIN_FUNC_SELECT +#define PIN_FUNC_SELECT(PIN_NAME, FUNC) do { \ + WRITE_PERI_REG(PIN_NAME, \ + (READ_PERI_REG(PIN_NAME) \ + & (~(PERIPHS_IO_MUX_FUNC<