Turn down WIFI_API_DEBUG_LOG in wifi_api.h
Fork of WIFI_API_32kRAM by
WIFI_Driver/wifi_api.h@6:d68eb50990bd, 2015-08-31 (annotated)
- Committer:
- wgd8700
- Date:
- Mon Aug 31 07:18:11 2015 +0000
- Revision:
- 6:d68eb50990bd
Soft AP mode enabled (need to program SoftAP_FW_update.hex in advance)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wgd8700 | 6:d68eb50990bd | 1 | |
wgd8700 | 6:d68eb50990bd | 2 | |
wgd8700 | 6:d68eb50990bd | 3 | #ifndef WIFI_API_H |
wgd8700 | 6:d68eb50990bd | 4 | #define WIFI_API_H |
wgd8700 | 6:d68eb50990bd | 5 | |
wgd8700 | 6:d68eb50990bd | 6 | #include <stdbool.h> |
wgd8700 | 6:d68eb50990bd | 7 | #include <stdint.h> |
wgd8700 | 6:d68eb50990bd | 8 | |
wgd8700 | 6:d68eb50990bd | 9 | /* @file |
wgd8700 | 6:d68eb50990bd | 10 | * @brief Wi-Fi Connection API for NNN40. |
wgd8700 | 6:d68eb50990bd | 11 | * |
wgd8700 | 6:d68eb50990bd | 12 | * |
wgd8700 | 6:d68eb50990bd | 13 | * @defgroup lib_driver_spi_master Software controlled SPI Master driver |
wgd8700 | 6:d68eb50990bd | 14 | * @{ |
wgd8700 | 6:d68eb50990bd | 15 | * @ingroup nrf_drivers |
wgd8700 | 6:d68eb50990bd | 16 | * @brief Software controlled SPI Master driver. |
wgd8700 | 6:d68eb50990bd | 17 | * |
wgd8700 | 6:d68eb50990bd | 18 | * Supported features: |
wgd8700 | 6:d68eb50990bd | 19 | * - Operate two SPI masters independently or in parallel. |
wgd8700 | 6:d68eb50990bd | 20 | * - Transmit and Receive given size of data through SPI. |
wgd8700 | 6:d68eb50990bd | 21 | * - configure each SPI module separately through @ref spi_master_init. |
wgd8700 | 6:d68eb50990bd | 22 | */ |
wgd8700 | 6:d68eb50990bd | 23 | |
wgd8700 | 6:d68eb50990bd | 24 | #define SSID_MAX_LENGTH 32 |
wgd8700 | 6:d68eb50990bd | 25 | #define SCAN_SSID_MAX_NUM 20 |
wgd8700 | 6:d68eb50990bd | 26 | |
wgd8700 | 6:d68eb50990bd | 27 | #define ticker_internal 60 |
wgd8700 | 6:d68eb50990bd | 28 | #define wait_ms_internal 1 |
wgd8700 | 6:d68eb50990bd | 29 | |
wgd8700 | 6:d68eb50990bd | 30 | /** |
wgd8700 | 6:d68eb50990bd | 31 | * Wi-Fi Init |
wgd8700 | 6:d68eb50990bd | 32 | */ |
wgd8700 | 6:d68eb50990bd | 33 | int wifi_init(void); |
wgd8700 | 6:d68eb50990bd | 34 | int wifi_apConnect(void); |
wgd8700 | 6:d68eb50990bd | 35 | void wifi_ssid_pw_set(uint8_t* SSID, uint8_t* PW, uint8_t priority); |
wgd8700 | 6:d68eb50990bd | 36 | uint8_t wifi_scan(void); |
wgd8700 | 6:d68eb50990bd | 37 | int wifi_connect(unsigned int timeout_ms); |
wgd8700 | 6:d68eb50990bd | 38 | int wifi_static_ip_set(const char * ip, const char * netmask, const char * gateway); |
wgd8700 | 6:d68eb50990bd | 39 | int wifi_disconnect(void); |
wgd8700 | 6:d68eb50990bd | 40 | |
wgd8700 | 6:d68eb50990bd | 41 | int wifi_UDP_server_init(const int port); |
wgd8700 | 6:d68eb50990bd | 42 | int wifi_TCP_server_init(const int port); |
wgd8700 | 6:d68eb50990bd | 43 | int wifi_UDP_client_init(void); |
wgd8700 | 6:d68eb50990bd | 44 | int wifi_TCP_client_init(const char *ipv4_addr, const int port, bool new_socket); |
wgd8700 | 6:d68eb50990bd | 45 | int wifi_send_UDP(char *data, int length, uint8_t cid, const char *ipv4_addr, const int port); |
wgd8700 | 6:d68eb50990bd | 46 | int wifi_send_TCP(char *data, uint8_t cid); |
wgd8700 | 6:d68eb50990bd | 47 | |
wgd8700 | 6:d68eb50990bd | 48 | |
wgd8700 | 6:d68eb50990bd | 49 | |
wgd8700 | 6:d68eb50990bd | 50 | |
wgd8700 | 6:d68eb50990bd | 51 | #ifdef __cplusplus |
wgd8700 | 6:d68eb50990bd | 52 | extern "C" { |
wgd8700 | 6:d68eb50990bd | 53 | #endif |
wgd8700 | 6:d68eb50990bd | 54 | void start_socket_routine(void); |
wgd8700 | 6:d68eb50990bd | 55 | int wifi_receive_UDP_callback(uint8_t *data, uint8_t cid); |
wgd8700 | 6:d68eb50990bd | 56 | int wifi_receive_TCP_callback(uint8_t *data, uint8_t cid); |
wgd8700 | 6:d68eb50990bd | 57 | void Socket_Close_All(void); |
wgd8700 | 6:d68eb50990bd | 58 | int wifi_ipconfig(unsigned int timeout_ms); |
wgd8700 | 6:d68eb50990bd | 59 | |
wgd8700 | 6:d68eb50990bd | 60 | #ifdef __cplusplus |
wgd8700 | 6:d68eb50990bd | 61 | } |
wgd8700 | 6:d68eb50990bd | 62 | #endif |
wgd8700 | 6:d68eb50990bd | 63 | |
wgd8700 | 6:d68eb50990bd | 64 | #endif |
wgd8700 | 6:d68eb50990bd | 65 |