undefined reference to `wifi_set_event_hander_cb'

AgentSmithers
Posts: 162
Joined: Sat Apr 01, 2017 1:21 am
Contact:

undefined reference to `wifi_set_event_hander_cb'

Postby AgentSmithers » Tue May 07, 2019 2:33 pm

*Update* Hander was a typo of Handler. This issue is resolved. watch your copying and pasting out there kids!


Has anyone gotten this code to work? Wifi_Set_Event_Hander_CB

Code: Select all

In 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 -Teagle.app.v6.ld  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 all

void wifi_handle_event_cb(System_Event_t *evt)
{
   os_printf("event %x\n",   evt->event);
   switch (evt->event)   
   {
      case   EVENT_STAMODE_CONNECTED:
          os_printf("connect   to   ssid   %s,   channel   %d\n",   
          evt->event_info.connected.ssid,   
          evt->event_info.connected.channel);
          break;
      case   EVENT_STAMODE_DISCONNECTED:
          os_printf("disconnect   from   ssid   %s,   reason   %d\n",   
          evt->event_info.disconnected.ssid,   
          evt->event_info.disconnected.reason);
          break;
      case   EVENT_STAMODE_AUTHMODE_CHANGE:
         os_printf("mode:   %d   ->   %d\n",   
          evt->event_info.auth_change.old_mode,   
         evt->event_info.auth_change.new_mode);
         break;
      case   EVENT_STAMODE_GOT_IP:
          os_printf("ip:"   IPSTR   ",mask:"   IPSTR   ",gw:"   IPSTR,
          IP2STR(&evt->event_info.got_ip.ip),
          IP2STR(&evt->event_info.got_ip.mask),
         IP2STR(&evt->event_info.got_ip.gw));
          os_printf("\n");
          break;
      case   EVENT_SOFTAPMODE_STACONNECTED:
         os_printf("station:   "   MACSTR   "join,   AID   =   %d\n",   
         MAC2STR(evt->event_info.sta_connected.mac),   
         evt->event_info.sta_connected.aid);
         break;
      case   EVENT_SOFTAPMODE_STADISCONNECTED:
         os_printf("station:   "   MACSTR   "leave,   AID   =   %d\n",   MAC2STR(evt->event_info.sta_disconnected.mac),   evt->event_info.sta_disconnected.aid);
          break;
      default:
          break;
    }
}



wifi_set_event_hander_cb(wifi_handle_event_cb);

Who is online

Users browsing this forum: Google [Bot] and 8 guests