Mbed OS Reference
Loading...
Searching...
No Matches
EthernetInterface.h
1/* LWIP implementation of NetworkInterfaceAPI
2 * Copyright (c) 2015 ARM Limited
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef ETHERNET_INTERFACE_H
19#define ETHERNET_INTERFACE_H
20
21#include "nsapi.h"
22#include "EMACInterface.h"
23
24
25/** Implementation of the NetworkStack for an EMAC-based Ethernet driver.
26 */
28public:
29 /** Create an EMAC-based Ethernet interface.
30 *
31 * The default arguments obtain the default EMAC, which will be target-
32 * dependent (and the target may have some JSON option to choose which
33 * is the default, if there are multiple). The default stack is configured
34 * by JSON option nsapi.default-stack.
35 *
36 * Due to inability to return errors from the constructor, no real
37 * work is done until the first call to connect().
38 *
39 * @param emac Reference to EMAC to use.
40 * @param stack Reference to onboard-network stack to use.
41 */
44};
45
46#endif
This interface should be used to abstract low level access to networking hardware All operations rece...
Definition: EMAC.h:33
static EMAC & get_default_instance()
Return the default on-board EMAC.
EMACInterface class Implementation of the NetworkInterface for an EMAC-based driver.
Definition: EMACInterface.h:42
Common interface between Ethernet hardware.
Definition: EthInterface.h:30
Implementation of the NetworkStack for an EMAC-based Ethernet driver.
EthernetInterface(EMAC &emac=EMAC::get_default_instance(), OnboardNetworkStack &stack=OnboardNetworkStack::get_default_instance())
Create an EMAC-based Ethernet interface.
mbed OS API for onboard IP stack abstraction
static OnboardNetworkStack & get_default_instance()
Return the default on-board network stack.