Commit 3b589e21 authored by Arnim Läuger's avatar Arnim Läuger
Browse files

Merge pull request #958 from DiUS/modules-gnu11

Enable -std=gnu11 for modules dir.
parents aac98243 0cd287e6
......@@ -6,6 +6,7 @@
#include "c_types.h"
#include "c_string.h"
#include "rom.h"
static lua_State *gL = NULL;
static int uart_receive_rf = LUA_NOREF;
......
......@@ -6,6 +6,7 @@
#include "c_string.h"
#include "c_stdlib.h"
#include "ctype.h"
#include "c_types.h"
#include "user_interface.h"
......@@ -22,7 +23,7 @@ static bool FLAG_wifi_force_sleep_enabled=0;
//variables for wifi event monitor
static sint32_t wifi_status_cb_ref[6] = {LUA_NOREF,LUA_NOREF,LUA_NOREF,LUA_NOREF,LUA_NOREF,LUA_NOREF};
static volatile os_timer_t wifi_sta_status_timer;
static os_timer_t wifi_sta_status_timer;
static uint8 prev_wifi_status=0;
......
......@@ -43,7 +43,7 @@ static void ws2801_strip(uint8_t const * data, uint16_t len) {
GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, ws2801_bit_data);
}
static void enable_pin_mux(pin) {
static void enable_pin_mux(int pin) {
// The API only supports setting PERIPHS_IO_MUX on GPIO 0, 2, 4, 5
switch (pin) {
case 0:
......
......@@ -131,7 +131,8 @@ int platform_gpio_read( unsigned pin )
}
#ifdef GPIO_INTERRUPT_ENABLE
static void platform_gpio_intr_dispatcher( platform_gpio_intr_handler_fn_t cb){
static void platform_gpio_intr_dispatcher( void *arg) {
platform_gpio_intr_handler_fn_t cb = arg;
uint8 i, level;
uint32 gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS);
for (i = 0; i < GPIO_PIN_NUM; i++) {
......
......@@ -149,6 +149,7 @@ int platform_uart_recv( unsigned id, unsigned timer_id, timer_data_type timeout
int platform_s_uart_recv( unsigned id, timer_data_type timeout );
int platform_uart_set_flow_control( unsigned id, int type );
int platform_s_uart_set_flow_control( unsigned id, int type );
void platform_uart_alt( int set );
// *****************************************************************************
// PWM subsection
......@@ -253,6 +254,14 @@ uint32_t platform_flash_mapped2phys (uint32_t mapped_addr);
void* platform_get_first_free_ram( unsigned id );
void* platform_get_last_free_ram( unsigned id );
// *****************************************************************************
// Other glue
int platform_ow_exists( unsigned id );
int platform_gpio_exists( unsigned id );
int platform_tmr_exists( unsigned id );
// *****************************************************************************
// Helper macros
#define MOD_CHECK_ID( mod, id )\
......
......@@ -499,7 +499,7 @@ void smart_end(){
wifi_station_connect();
os_timer_disarm(&smart_timer);
os_timer_setfn(&smart_timer, (os_timer_func_t *)station_check_connect, 1);
os_timer_setfn(&smart_timer, (os_timer_func_t *)station_check_connect, (void *)1);
os_timer_arm(&smart_timer, STATION_CHECK_TIME, 0); // no repeat
}
}
......@@ -716,6 +716,6 @@ void station_check_connect(bool smart){
break;
}
os_timer_disarm(&smart_timer);
os_timer_setfn(&smart_timer, (os_timer_func_t *)station_check_connect, smart);
os_timer_setfn(&smart_timer, (os_timer_func_t *)station_check_connect, (void *)(int)smart);
os_timer_arm(&smart_timer, STATION_CHECK_TIME, 0); // no repeat
}
......@@ -571,6 +571,7 @@ void myspiffs_clearerr( int fd );
int myspiffs_check( void );
int myspiffs_rename( const char *old, const char *newname );
size_t myspiffs_size( int fd );
int myspiffs_format (void);
s32_t SPIFFS_eof(spiffs *fs, spiffs_file fh);
s32_t SPIFFS_tell(spiffs *fs, spiffs_file fh);
......
#ifndef _SDK_OVERRIDE_MEM_H_
#define _SDK_OVERRIDE_MEM_H_
void *pvPortMalloc (size_t sz, const char *, unsigned);
void vPortFree (void *p, const char *, unsigned);
void *pvPortZalloc (size_t sz, const char *, unsigned);
void *pvPortRealloc (void *p, size_t n, const char *, unsigned);
#include_next "mem.h"
#endif
#ifndef _SDK_OVERRIDE_OSAPI_H_
#define _SDK_OVERRIDE_OSAPI_H_
#include "rom.h"
void ets_timer_arm_new (ETSTimer *a, int b, int c, int isMstimer);
#include_next "osapi.h"
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment