Turn down WIFI_API_DEBUG_LOG in wifi_api.h

Fork of WIFI_API_32kRAM by Delta

Committer:
gillwei7
Date:
Tue Jan 26 09:30:40 2016 +0000
Revision:
27:40ec92889c3c
Parent:
25:47b20177ef04
Turn down WIFI_API_DEBUG_LOG in wifi_api.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wgd8700 12:be75c06cb491 1
wgd8700 12:be75c06cb491 2
wgd8700 12:be75c06cb491 3 #ifndef WIFI_API_H
wgd8700 12:be75c06cb491 4 #define WIFI_API_H
wgd8700 12:be75c06cb491 5
wgd8700 12:be75c06cb491 6 #include <stdbool.h>
wgd8700 12:be75c06cb491 7 #include <stdint.h>
wgd8700 12:be75c06cb491 8
wgd8700 12:be75c06cb491 9 /* @file
wgd8700 12:be75c06cb491 10 * @brief Wi-Fi Connection API for NNN40.
wgd8700 12:be75c06cb491 11 *
wgd8700 12:be75c06cb491 12 *
wgd8700 12:be75c06cb491 13 * @defgroup lib_driver_spi_master Software controlled SPI Master driver
wgd8700 12:be75c06cb491 14 * @{
wgd8700 12:be75c06cb491 15 * @ingroup nrf_drivers
wgd8700 12:be75c06cb491 16 * @brief Software controlled SPI Master driver.
wgd8700 12:be75c06cb491 17 *
wgd8700 12:be75c06cb491 18 * Supported features:
wgd8700 12:be75c06cb491 19 * - Operate two SPI masters independently or in parallel.
wgd8700 12:be75c06cb491 20 * - Transmit and Receive given size of data through SPI.
wgd8700 12:be75c06cb491 21 * - configure each SPI module separately through @ref spi_master_init.
wgd8700 12:be75c06cb491 22 */
wgd8700 12:be75c06cb491 23
gillwei7 27:40ec92889c3c 24 #define WIFI_API_DEBUG_LOG 0
wgd8700 19:a11db6055532 25 #define WIFI_API_DEBUG_TX_PIN USBTX
wgd8700 19:a11db6055532 26 #define WIFI_API_DEBUG_BAUDRATE 115200
wgd8700 19:a11db6055532 27
wgd8700 12:be75c06cb491 28 #define SSID_MAX_LENGTH 32
wgd8700 12:be75c06cb491 29 #define SCAN_SSID_MAX_NUM 20
wgd8700 12:be75c06cb491 30
wgd8700 19:a11db6055532 31 #if defined(TARGET_DELTA_DFCM_NNN40)
wgd8700 19:a11db6055532 32 #define ticker_internal 25//Tsungt, 2015/09/21, it was 60, if set to 30 or 20 somehow receive_all will go wrong (return 0)
wgd8700 19:a11db6055532 33 #else
wgd8700 19:a11db6055532 34
wgd8700 19:a11db6055532 35 #if defined(WIFI_API_DEBUG_LOG)
wgd8700 19:a11db6055532 36 #define ticker_internal 15//Tsungt, used for NUCLEO-F446RE
wgd8700 19:a11db6055532 37 #else
wgd8700 19:a11db6055532 38 #define ticker_internal 5//Tsungt, used for NUCLEO-F446RE
wgd8700 19:a11db6055532 39 #endif
wgd8700 19:a11db6055532 40
wgd8700 19:a11db6055532 41 #endif
wgd8700 19:a11db6055532 42
wgd8700 12:be75c06cb491 43 #define wait_ms_internal 1
wgd8700 12:be75c06cb491 44
wgd8700 12:be75c06cb491 45 /**
wgd8700 12:be75c06cb491 46 * Wi-Fi Init
wgd8700 12:be75c06cb491 47 */
wgd8700 12:be75c06cb491 48 int wifi_init(void);
wgd8700 12:be75c06cb491 49 int wifi_apConnect(void);
wgd8700 12:be75c06cb491 50 void wifi_ssid_pw_set(uint8_t* SSID, uint8_t* PW, uint8_t priority);
wgd8700 12:be75c06cb491 51 uint8_t wifi_scan(void);
wgd8700 12:be75c06cb491 52 int wifi_connect(unsigned int timeout_ms);
wgd8700 12:be75c06cb491 53 int wifi_static_ip_set(const char * ip, const char * netmask, const char * gateway);
wgd8700 12:be75c06cb491 54 int wifi_disconnect(void);
wgd8700 12:be75c06cb491 55
wgd8700 12:be75c06cb491 56 int wifi_UDP_server_init(const int port);
wgd8700 12:be75c06cb491 57 int wifi_TCP_server_init(const int port);
wgd8700 12:be75c06cb491 58 int wifi_UDP_client_init(void);
wgd8700 12:be75c06cb491 59 int wifi_TCP_client_init(const char *ipv4_addr, const int port, bool new_socket);
wgd8700 12:be75c06cb491 60 int wifi_send_UDP(char *data, int length, uint8_t cid, const char *ipv4_addr, const int port);
wgd8700 12:be75c06cb491 61 int wifi_send_TCP(char *data, uint8_t cid);
wgd8700 12:be75c06cb491 62
wgd8700 12:be75c06cb491 63
wgd8700 12:be75c06cb491 64
wgd8700 12:be75c06cb491 65
wgd8700 12:be75c06cb491 66 #ifdef __cplusplus
wgd8700 12:be75c06cb491 67 extern "C" {
wgd8700 12:be75c06cb491 68 #endif
wgd8700 12:be75c06cb491 69 void start_socket_routine(void);
wgd8700 25:47b20177ef04 70 int wifi_receive_UDP_callback(uint8_t *data, int size, char* ipaddr, int port);
wgd8700 25:47b20177ef04 71 int wifi_receive_TCP_callback(uint8_t *data, int size, char* ipaddr, int port);
wgd8700 12:be75c06cb491 72 void Socket_Close_All(void);
wgd8700 12:be75c06cb491 73 int wifi_ipconfig(unsigned int timeout_ms);
wgd8700 12:be75c06cb491 74
wgd8700 12:be75c06cb491 75 #ifdef __cplusplus
wgd8700 12:be75c06cb491 76 }
wgd8700 12:be75c06cb491 77 #endif
wgd8700 12:be75c06cb491 78
wgd8700 12:be75c06cb491 79 #endif
wgd8700 12:be75c06cb491 80
wgd8700 19:a11db6055532 81