Advanced Users can post their questions and comments here for the not so Newbie crowd.

Moderator: eriksl

User avatar
By Agentsmithers
#82182 Has anyone gotten this code to work? Wifi_Set_Event_Hander_CB
Code: Select allIn file included from Main.c:3:0:
/home/osboxes/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/osapi.h:65:6: note: expected 'struct ETSTimer *' but argument is of type 'volatile struct ETSTimer *'
 void ets_timer_arm_new(os_timer_t *ptimer, uint32_t time, bool repeat_flag, bool ms_flag);
xtensa-lx106-elf-gcc  Main.o  -nostdlib -Wl,--start-group -lmain -lpwm -lnet80211 -lwpa -llwip -lpp -lphy -lc -Wl,--end-group -lgcc -o Main
Main.o:(.irom0.literal+0x214): undefined reference to `wifi_set_event_hander_cb'
Main.o: In function `calculateCRC32':
Main.c:(.irom0.text+0x17f4): undefined reference to `wifi_set_event_hander_cb'
collect2: error: ld returned 1 exit status
make: *** [Main] Error 1

Code: Select allvoid wifi_handle_event_cb(System_Event_t *evt)
   os_printf("event %x\n",   evt->event);
   switch (evt->event)   
          os_printf("connect   to   ssid   %s,   channel   %d\n",   
          os_printf("disconnect   from   ssid   %s,   reason   %d\n",   
         os_printf("mode:   %d   ->   %d\n",   
      case   EVENT_STAMODE_GOT_IP:
          os_printf("ip:"   IPSTR   ",mask:"   IPSTR   ",gw:"   IPSTR,
         os_printf("station:   "   MACSTR   "join,   AID   =   %d\n",   
         os_printf("station:   "   MACSTR   "leave,   AID   =   %d\n",   MAC2STR(evt->event_info.sta_disconnected.mac),   evt->event_info.sta_disconnected.aid);


*update* Turned out to be a typo on hander and not handler.. this is what I get for copying and pasting code =.=