Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
3b589e21
Commit
3b589e21
authored
Jan 22, 2016
by
Arnim Läuger
Browse files
Merge pull request #958 from DiUS/modules-gnu11
Enable -std=gnu11 for modules dir.
parents
aac98243
0cd287e6
Changes
29
Hide whitespace changes
Inline
Side-by-side
app/modules/uart.c
View file @
3b589e21
...
...
@@ -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
;
...
...
app/modules/wifi.c
View file @
3b589e21
...
...
@@ -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
;
...
...
app/modules/ws2801.c
View file @
3b589e21
...
...
@@ -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
:
...
...
app/platform/platform.c
View file @
3b589e21
...
...
@@ -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
++
)
{
...
...
app/platform/platform.h
View file @
3b589e21
...
...
@@ -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 )\
...
...
app/smart/smart.c
View file @
3b589e21
...
...
@@ -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
}
app/spiffs/spiffs.h
View file @
3b589e21
...
...
@@ -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
);
...
...
sdk-overrides/include/mem.h
0 → 100644
View file @
3b589e21
#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
sdk-overrides/include/osapi.h
0 → 100644
View file @
3b589e21
#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
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment