Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NNN50_WIFI_API mbed
main.cpp
00001 /******************** (C) COPYRIGHT 2016 Delta Electronics, Inc. *************** 00002 * 00003 * File Name : main.cpp 00004 * Authors : JS Wu - CPBG (js.wu@cyntec.com) 00005 * Version : V.1.0.0 00006 * Date : 2017/Mar/03 00007 * 00008 * This example shows how to enable WiFi chip, and disable the interface between 00009 * BLE & WiFi of NNN50, thus the external Host MCU can use SPI interface to 00010 * control WiFi under linux base OS 00011 * 00012 *******************************************************************************/ 00013 00014 #include "mbed.h" 00015 #include "EthernetInterface.h" 00016 #include "WIFIDevice.h" 00017 00018 DigitalOut myled(p13); 00019 00020 DigitalOut WiFi_en(p8); 00021 DigitalOut WiFi_reset_n(p10); 00022 DigitalOut WiFi_wake(p18); 00023 DigitalOut RF_control_1(p19); 00024 DigitalOut RF_control_2(p28); 00025 DigitalIn SPI_SSN(p12); 00026 DigitalIn SPI_MISO(p9); 00027 DigitalIn SPI_MOSI(p15); 00028 DigitalIn SPI_CLK(p11); 00029 DigitalIn SPI_IRQ(p14); 00030 00031 int main() { 00032 00033 //config WiFi pins 00034 WiFi_en = 1; 00035 WiFi_wake = 1; 00036 WiFi_reset_n = 1; //make a Reset signal 00037 wait(0.3); 00038 WiFi_reset_n = 0; 00039 wait(0.5); 00040 WiFi_reset_n = 1; 00041 wait(0.3); 00042 00043 //config RF path to WiFi 00044 RF_control_1 = 1; 00045 RF_control_2 = 0; 00046 00047 while(1) { 00048 myled = 1; 00049 wait(0.2); 00050 myled = 0; 00051 wait(0.2); 00052 } 00053 }
Generated on Sat Jul 16 2022 08:27:10 by
1.7.2