Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MbedJSONValue mbed-rtos Adafruit_ST7735 Adafruit_GFX EthernetInterface DebouncedInterrupt
network.cpp
- Committer:
- vsoltan
- Date:
- 2020-11-12
- Revision:
- 15:9d90f68e53da
- Parent:
- 13:95d44f7855ca
- Child:
- 17:32ae1f106002
File content as of revision 15:9d90f68e53da:
#include "network.h"
void initEthernet(EthernetInterface *eth, UDPSocket *sock, Endpoint *nist) {
eth->init(); //Use DHCP
eth->connect();
sock->init();
nist->set_address(AWS_IP, PORT);
sock->set_blocking(false, 0);
printf("Connected to %s, port: %i\n\r", AWS_IP, PORT);
}
void cleanupEthernet(EthernetInterface *eth, UDPSocket *sock) {
sock->close();
eth->disconnect();
}
