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.
Fork of WIZnet_Library by
WIZnetInterface Class Reference
Interface using Wiznet chip to connect to an IP-based network. More...
#include <WIZnetInterface.h>
Inherits WIZnet_Chip.
Public Member Functions | |
WIZnetInterface (PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset) | |
Constructor. | |
int | init (uint8_t *mac) |
Initialize the interface with DHCP. | |
int | init (uint8_t *mac, const char *ip, const char *mask, const char *gateway) |
Initialize the interface with a static IP address. | |
int | connect () |
Connect Bring the interface up, start DHCP if needed. | |
int | disconnect () |
Disconnect Bring the interface down. | |
char * | getIPAddress () |
Get IP address & MAC address. |
Detailed Description
Interface using Wiznet chip to connect to an IP-based network.
Definition at line 25 of file WIZnetInterface.h.
Constructor & Destructor Documentation
WIZnetInterface | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sclk, | ||
PinName | cs, | ||
PinName | reset | ||
) |
Constructor.
- Parameters:
-
mosi mbed pin to use for SPI miso mbed pin to use for SPI sclk mbed pin to use for SPI cs chip select of the WIZnet_Chip reset reset pin of the WIZnet_Chip
Definition at line 22 of file WIZnetInterface.cpp.
Member Function Documentation
int connect | ( | ) |
Connect Bring the interface up, start DHCP if needed.
- Returns:
- 0 on success, a negative number on failure
Definition at line 60 of file WIZnetInterface.cpp.
int disconnect | ( | ) |
Disconnect Bring the interface down.
- Returns:
- 0 on success, a negative number on failure
Definition at line 74 of file WIZnetInterface.cpp.
char * getIPAddress | ( | ) |
Get IP address & MAC address.
@ returns ip address
Definition at line 80 of file WIZnetInterface.cpp.
int init | ( | uint8_t * | mac, |
const char * | ip, | ||
const char * | mask, | ||
const char * | gateway | ||
) |
Initialize the interface with a static IP address.
Initialize the interface and configure it with the following static configuration (no connection at this point).
- Parameters:
-
ip the IP address to use mask the IP address mask gateway the gateway to use
- Returns:
- 0 on success, a negative number on failure
Definition at line 44 of file WIZnetInterface.cpp.
int init | ( | uint8_t * | mac ) |
Initialize the interface with DHCP.
Initialize the interface and configure it to use DHCP (no connection at this point).
- Returns:
- 0 on success, a negative number on failure
Definition at line 34 of file WIZnetInterface.cpp.
Generated on Thu Jul 14 2022 08:03:44 by
