Upgrade to IDF v5.1.2
This commit is contained in:
parent
4816c168d8
commit
6798f027f3
|
@ -61,9 +61,9 @@ typedef void (*nodemcu_esp_event_cb) (esp_event_base_t event_base, int32_t event
|
|||
|
||||
// Internal definitions
|
||||
typedef struct {
|
||||
esp_event_base_t *event_base_ptr;
|
||||
int32_t event_id;
|
||||
nodemcu_esp_event_cb callback;
|
||||
const esp_event_base_t *event_base_ptr;
|
||||
int32_t event_id;
|
||||
nodemcu_esp_event_cb callback;
|
||||
} nodemcu_esp_event_reg_t;
|
||||
|
||||
extern nodemcu_esp_event_reg_t _esp_event_cb_table_start;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#define GET_CHN(idx) \
|
||||
int chn = luaL_checkint( L, idx ); \
|
||||
luaL_argcheck( L, chn >= DAC_CHANNEL_1 && chn <= DAC_CHANNEL_MAX, idx, "invalid channel" );
|
||||
luaL_argcheck( L, chn >= DAC_CHAN_0 && chn <= DAC_CHAN_1, idx, "invalid channel" );
|
||||
|
||||
// Lua: enable( dac_channel )
|
||||
static int ldac_enable( lua_State *L )
|
||||
|
@ -56,8 +56,8 @@ LROT_BEGIN(dac, NULL, 0)
|
|||
LROT_FUNCENTRY( enable, ldac_enable )
|
||||
LROT_FUNCENTRY( disable, ldac_disable )
|
||||
LROT_FUNCENTRY( write, ldac_write )
|
||||
LROT_NUMENTRY ( CHANNEL_1, DAC_CHANNEL_1 )
|
||||
LROT_NUMENTRY ( CHANNEL_2, DAC_CHANNEL_2 )
|
||||
LROT_NUMENTRY ( CHANNEL_1, DAC_CHAN_0 )
|
||||
LROT_NUMENTRY ( CHANNEL_2, DAC_CHAN_1 )
|
||||
LROT_END(dac, NULL, 0)
|
||||
|
||||
NODEMCU_MODULE(DAC, "dac", dac, NULL);
|
||||
|
|
|
@ -48,7 +48,7 @@ typedef void (*fill_cb_arg_fn) (lua_State *L, const void *data);
|
|||
typedef struct
|
||||
{
|
||||
const char *name;
|
||||
esp_event_base_t *event_base_ptr;
|
||||
const esp_event_base_t *event_base_ptr;
|
||||
int32_t event_id;
|
||||
fill_cb_arg_fn fill_cb_arg;
|
||||
} event_desc_t;
|
||||
|
|
|
@ -562,7 +562,8 @@ static int mqtt_subscribe(lua_State* L) {
|
|||
|
||||
ESP_LOGD(TAG, "MQTT subscribe client %p, topic %s", client, topic);
|
||||
|
||||
esp_err_t err = esp_mqtt_client_subscribe(client, topic, qos);
|
||||
// We have to cast away the const due to _Generic expression :(
|
||||
esp_err_t err = esp_mqtt_client_subscribe(client, (char *)topic, qos);
|
||||
lua_pushboolean(L, err == ESP_OK);
|
||||
|
||||
return 1; // one value returned, true on success, false on error.
|
||||
|
|
|
@ -362,7 +362,12 @@ static int node_dsleep (lua_State *L)
|
|||
int level = opt_checkint_range(L, "level", 1, 0, 1);
|
||||
if (pin_mask) {
|
||||
esp_sleep_ext1_wakeup_mode_t mode = (level == 1) ?
|
||||
ESP_EXT1_WAKEUP_ANY_HIGH : ESP_EXT1_WAKEUP_ALL_LOW;
|
||||
ESP_EXT1_WAKEUP_ANY_HIGH :
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
ESP_EXT1_WAKEUP_ALL_LOW;
|
||||
#else
|
||||
ESP_EXT1_WAKEUP_ANY_LOW;
|
||||
#endif
|
||||
int err = esp_sleep_enable_ext1_wakeup(pin_mask, mode);
|
||||
if (err) {
|
||||
return luaL_error(L, "Error %d returned from esp_sleep_enable_ext1_wakeup", err);
|
||||
|
|
|
@ -56,7 +56,7 @@ typedef void (*fill_cb_arg_fn) (lua_State *L, const void *data);
|
|||
typedef struct
|
||||
{
|
||||
const char *name;
|
||||
esp_event_base_t *event_base_ptr;
|
||||
const esp_event_base_t *event_base_ptr;
|
||||
int32_t event_id;
|
||||
fill_cb_arg_fn fill_cb_arg;
|
||||
} event_desc_t;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 5181de8ac5ec5e18f04f634da8ce173b7ef5ab73
|
||||
Subproject commit 482a8fb2d78e3b58eb21b26da8a5bedf90623213
|
Loading…
Reference in New Issue