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: BLE_API WIFI_API_32kRAM mbed nRF51822
Fork of NNN40_WiFi by
Diff: WIFI_API/WIFI_Driver/wifi_api.h
- Revision:
- 4:6e3cc0584ae9
- Parent:
- 0:25ffe5869e35
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WIFI_API/WIFI_Driver/wifi_api.h Mon Mar 23 01:57:58 2015 +0000
@@ -0,0 +1,64 @@
+
+
+#ifndef WIFI_API_H
+#define WIFI_API_H
+
+#include <stdbool.h>
+#include <stdint.h>
+
+/* @file
+* @brief Wi-Fi Connection API for NNN40.
+*
+*
+* @defgroup lib_driver_spi_master Software controlled SPI Master driver
+* @{
+* @ingroup nrf_drivers
+* @brief Software controlled SPI Master driver.
+*
+* Supported features:
+* - Operate two SPI masters independently or in parallel.
+* - Transmit and Receive given size of data through SPI.
+* - configure each SPI module separately through @ref spi_master_init.
+*/
+
+#define SSID_MAX_LENGTH 32
+#define SCAN_SSID_MAX_NUM 20
+
+#define ticker_internal 20
+#define wait_ms_internal 1
+
+/**
+ * Wi-Fi Init
+ */
+int wifi_init(void);
+int wifi_apConnect(void);
+void wifi_ssid_pw_set(uint8_t* SSID, uint8_t* PW, uint8_t priority);
+uint8_t wifi_scan(void);
+int wifi_connect(unsigned int timeout_ms);
+int wifi_static_ip_set(const char * ip);
+int wifi_disconnect(void);
+
+int wifi_UDP_server_init(const int port);
+int wifi_TCP_server_init(const int port);
+int wifi_UDP_client_init(void);
+int wifi_TCP_client_init(const char *ipv4_addr, const int port);
+int wifi_send_UDP(char *data, uint8_t cid, const char *ipv4_addr, const int port);
+int wifi_send_TCP(char *data, uint8_t cid);
+
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void start_socket_routine(void);
+int wifi_receive_UDP_callback(uint8_t *data, uint8_t cid);
+int wifi_receive_TCP_callback(uint8_t *data, uint8_t cid);
+void Socket_Close_All(void);
+int wifi_ipconfig(unsigned int timeout_ms);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
