![]() |
MSPM0_ValvanoWare
1.0
ECE445L starter code
|
ESP8266 interface. More...
#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | ESP8266_ENCRYPT_MODE_OPEN 0 |
| Encryption modes. | |
| #define | ESP8266_ENCRYPT_MODE_WEP 1 |
| #define | ESP8266_ENCRYPT_MODE_WPA_PSK 2 |
| #define | ESP8266_ENCRYPT_MODE_WPA2_PSK 3 |
| #define | ESP8266_ENCRYPT_MODE_WPA_WPA2_PSK 4 |
| #define | ESP8266_WIFI_MODE_CLIENT 1 |
| ESP8266 modes Client, AP, AP/Client. | |
| #define | ESP8266_WIFI_MODE_AP 2 |
| #define | ESP8266_WIFI_MODE_AP_AND_CLIENT 3 |
Functions | |
| int | ESP8266_Init (int rx_echo, int tx_echo) |
| Initializes ESP8266. More... | |
| int | ESP8266_Connect (int verbose) |
| Connects ESP8266. More... | |
| int | ESP8266_StartServer (uint16_t port, uint16_t timeout) |
| Start server. More... | |
| int | ESP8266_StopServer (void) |
| Stop server. More... | |
| int | ESP8266_Reset (void) |
| Reset the esp8266. More... | |
| int | ESP8266_Restore (void) |
| Restore default settings. More... | |
| int | ESP8266_GetVersionNumber (void) |
| Version number. More... | |
| int | ESP8266_GetMACAddress (void) |
| MAC address. More... | |
| int | ESP8266_SetWifiMode (uint8_t mode) |
| Set mode. More... | |
| int | ESP8266_SetConnectionMux (uint8_t enabled) |
| Set mode. More... | |
| int | ESP8266_ListAccessPoints (void) |
| Access Points. More... | |
| int | ESP8266_JoinAccessPoint (const char *ssid, const char *password) |
| Join AP. More... | |
| int | ESP8266_QuitAccessPoint (void) |
| Quit AP. More... | |
| int | ESP8266_ConfigureAccessPoint (const char *ssid, const char *password, uint8_t channel, uint8_t encryptMode) |
| Configure AP. More... | |
| int | ESP8266_GetIPAddress (void) |
| Get IP address. More... | |
| int | ESP8266_SetSSLClientConfiguration (int verifyClient, int verifyServer) |
| Set SSL. More... | |
| int | ESP8266_SetSSLBufferSize (uint16_t bufferSize) |
| SSL buffer size. More... | |
| int | ESP8266_MakeTCPConnection (char *IPaddress, uint16_t port, uint16_t keepalive, int ssl) |
| Make connection. More... | |
| int | ESP8266_Send (const char *fetch) |
| Send TCP. More... | |
| int | ESP8266_SendBuffered (const char *fetch) |
| Send buffered TCP. More... | |
| int | ESP8266_SendBufferedStatus (void) |
| Check status. More... | |
| int | ESP8266_Receive (char *fetch, uint32_t max) |
| Receive TCP. More... | |
| int | ESP8266_CloseTCPConnection (void) |
| Close TCP socket. More... | |
| int | ESP8266_SetDataTransmissionMode (uint8_t mode) |
| Set transmission mode. More... | |
| int | ESP8266_GetStatus (void) |
| Get status. More... | |
| int | ESP8266_EnableServer (uint16_t port) |
| Enable server. More... | |
| int | ESP8266_SetServerTimeout (uint16_t timeout) |
| Set server timeout. More... | |
| int | ESP8266_WaitForConnection (void) |
| Wait for connection. More... | |
| int | ESP8266_DisableServer (void) |
| Disable server. More... | |
| void | ESP8266_StartReceiveSearch (char *search) |
| Set search string. More... | |
| char * | ESP8266_GetReceiveBuffer (void) |
| Get search string. More... | |
ESP8266 interface.
Driver for ESP8266 module to act as a WiFi client or server. Vcc is a separate regulated 3.3V supply with at least 215mA. Currently restricted to one incoming or outgoing connection at a time.
| Pin | ESP8266 | MSPM0 | Motor board version 7.1 or 7.2 |
|---|---|---|---|
| 1 | URxD | PB17 | UART2 out of MSPM0, into ESP8266 115200 baud |
| 2 | GPIO0 | +3.3V for normal operation (ground to flash) | |
| 3 | GPIO2 | PB19 | GPIO, high/float on startup, has internal pullup, can be used for I/O |
| 4 | GND | Gnd | GND (215mA) |
| 5 | UTxD | PB18 | UART out of ESP8266, UART2 into MSPM0 115200 baud |
| 6 | Ch_PD | chip select, 10k resistor to 3.3V | |
| 7 | Reset | PA25 | MSPM0 GPIO output, can issue output low to cause hardware reset |
| 8 | Vcc | regulated 3.3V supply with at least 215mA |