+/rtos

git clone https://git.julia.blue/+/rtos

Joseph RyanFinish remote interpreter fixesfa38042

master
2.1 KiB77 linesraw
1// Driver originally written by Steven Prickett (steven.prickett@gmail.com)
2// Modified by Dung Nguyen, Wally Guzman, and Jonathan Valvano
3// Consolidated by Andreas Gerstlauer
4
5#pragma once
6
7#include <stdbool.h>
8#include <stdint.h>
9
10// Initializes the module
11bool ESP8266_Init(bool rx_echo, bool tx_echo);
12
13// Bring interface up and connect to Wifi
14bool ESP8266_Connect(bool verbose);
15
16// Start server on specific port (timeout is in seconds)
17bool ESP8266_StartServer(uint16_t port, uint16_t timeout);
18
19// Stop server
20bool ESP8266_StopServer(void);
21
22// soft resets the esp8266 module
23bool ESP8266_Reset(void);
24
25// restore the ESP8266 module to default values
26bool ESP8266_Restore(void);
27
28// get version number
29bool ESP8266_GetVersionNumber(void);
30
31// get MAC address
32bool ESP8266_GetMACAddress(void);
33
34typedef enum { CLIENT = 1, AP, BOTH } ESP8266_WIFI_MODE;
35
36// configures the esp8266 to operate as a wifi client, access point, or both
37bool ESP8266_SetWifiMode(ESP8266_WIFI_MODE mode);
38
39// lists available wifi access points
40bool ESP8266_ListAccessPoints(void);
41
42// joins a wifi access point using specified ssid and password
43bool ESP8266_JoinAccessPoint(const char* ssid, const char* password);
44
45// disconnects from currently connected wifi access point
46bool ESP8266_QuitAccessPoint(void);
47
48// Get local IP address
49bool ESP8266_GetIPAddress(void);
50
51// Establish TCP connection
52// takes IP address or URL and a port number
53bool ESP8266_MakeTCPConnection(char* address, uint16_t port);
54
55// Send a packet to server
56bool ESP8266_Send(const char* str);
57
58// Send a string to server using ESP TCP-send buffer
59bool ESP8266_SendBuffered(const char* str);
60
61// Reads from data input until end of line or max length is reached
62bool ESP8266_Receive(char* buf, uint32_t max);
63
64// Echos from data input until EOT is reached
65bool ESP8266_ReceiveEcho();
66
67// Close TCP connection
68bool ESP8266_CloseTCPConnection(void);
69
70// get network connection status
71bool ESP8266_GetStatus(void);
72
73// set connection timeout for tcp server, 0-28800 seconds
74bool ESP8266_SetServerTimeout(uint16_t timeout);
75
76// wait for incoming connection on server
77bool ESP8266_WaitForConnection(void);