5 years, 6 months ago.

ESP8266 + stm32f429dicovery

Hi, i try to connect esp8266 to discovery board. I made custom board whith WIFI definition. And main.cpp looks like:

  1. include <mbed.h>
  2. include <rtos/rtos.h>
  3. include <WiFiInterface.h>

int main() {

put your setup code here, to run once: WiFiInterface *wifi; wifi = WiFiInterface::get_default_instance(); int count = wifi->scan(NULL,0);

while(1) { put your main code here, to run repeatedly: } }

WiFiInterface *WiFiInterface::get_default_instance() - this function always return 0x00, because macro

  1. if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT) is not true.

In mbed_config.h i can find MBED_CONF_EVENTS_PRESENT 1, MBED_CONF_NSAPI_PRESENT 1, MBED_CONF_RTOS_PRESENT 1. How can i define DEVICE_SERIAL and DEVICE_INTERRUPTIN?

May be i dont understand something?

Thanks!

Be the first to answer this question.