Skip to content

Commit

Permalink
Upgrade to IDF v5.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattsson committed Feb 2, 2024
1 parent 4816c16 commit 6798f02
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
6 changes: 3 additions & 3 deletions components/base_nodemcu/include/nodemcu_esp_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions components/modules/dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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);
2 changes: 1 addition & 1 deletion components/modules/eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion components/modules/mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 6 additions & 1 deletion components/modules/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion components/modules/wifi_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sdk/esp32-esp-idf
Submodule esp32-esp-idf updated 6621 files

0 comments on commit 6798f02

Please sign in to comment.