Wifly Driver
V1.0
|
#include "LPC17xx.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "Type.h"
#include "Config.h"
#include "WiFly.h"
#include "Arpalab.h"
#include "FreeRTOS.h"
#include "semphr.h"
Go to the source code of this file.
Macros | |
#define | GET_SEND "GET$/rest/stats?nid=%d&ip=%s&app=%s&data=%d" |
#define | GET_RECEIVE "GET$/rest/feed" |
#define | IP_REMOTE 80 |
#define | IP_PROTO 18 |
#define | BUFSIZE (BUFSIZE_WIFLY) |
Functions | |
uint8_t | Arpalab_start (char *ssid, uint32_t AuthMode, char *passw) |
uint8_t | Arpalab_sendValue (char *dnsAddress, uint32_t id, char *app, uint32_t value) |
int32_t | Arpalab_receiveValue (char *dnsAddress) |
Variables | |
xSemaphoreHandle | xMutexArpalab |
char | resp [BUFSIZE] |
#define BUFSIZE (BUFSIZE_WIFLY) |
#define GET_RECEIVE "GET$/rest/feed" |
Definition at line 22 of file Arpalab.c.
Referenced by Arpalab_receiveValue().
#define GET_SEND "GET$/rest/stats?nid=%d&ip=%s&app=%s&data=%d" |
Definition at line 21 of file Arpalab.c.
Referenced by Arpalab_sendValue().
#define IP_PROTO 18 |
Definition at line 25 of file Arpalab.c.
Referenced by Arpalab_receiveValue(), and Arpalab_sendValue().
#define IP_REMOTE 80 |
Definition at line 24 of file Arpalab.c.
Referenced by Arpalab_receiveValue(), and Arpalab_sendValue().
int32_t Arpalab_receiveValue | ( | char * | dnsAddress | ) |
Send a HTTP command an Get a random value.
dnsAddress | Destination DNS or IP address. |
Definition at line 80 of file Arpalab.c.
References GET_RECEIVE, IP_PROTO, IP_REMOTE, resp, string, Wifly_HTTPReceive(), Wifly_WLANConnectPing(), WLAN_PING_CHECK, and xMutexArpalab.
uint8_t Arpalab_sendValue | ( | char * | dnsAddress, |
uint32_t | id, | ||
char * | app, | ||
uint32_t | value | ||
) |
Send a HTTP command and receive the server response.
dnsAddress | Destination DNS or IP address. |
id | Information id. |
app | Name of the app. |
value | Numerical value to send. |
Definition at line 62 of file Arpalab.c.
References FALSE, GET_SEND, IP_PROTO, IP_REMOTE, Wifly_getIp(), Wifly_HTTPSend(), Wifly_WLANConnectPing(), WLAN_PING_CHECK, and xMutexArpalab.
uint8_t Arpalab_start | ( | char * | ssid, |
uint32_t | AuthMode, | ||
char * | passw | ||
) |
Start Arpalab settings
ssid | SSID name. |
AuthMode | Authentication mode: |
passw | password |
Definition at line 43 of file Arpalab.c.
References FALSE, NULL, and xMutexArpalab.
char resp[BUFSIZE] |
Definition at line 32 of file Arpalab.c.
Referenced by Arpalab_receiveValue(), Tcp_receiveValue(), and Udp_receiveValue().
xSemaphoreHandle xMutexArpalab |
Definition at line 28 of file Arpalab.c.
Referenced by Arpalab_receiveValue(), Arpalab_sendValue(), and Arpalab_start().