EL4121 Embedded System / mbed-os

Dependents:   cobaLCDJoyMotor_Thread odometry_omni_3roda_v3 odometry_omni_3roda_v1 odometry_omni_3roda_v2 ... more

Committer:
be_bryan
Date:
Mon Dec 11 17:54:04 2017 +0000
Revision:
0:b74591d5ab33
motor ++

Who changed what in which revision?

UserRevisionLine numberNew contents of line
be_bryan 0:b74591d5ab33 1 /* LWIP implementation of NetworkInterfaceAPI
be_bryan 0:b74591d5ab33 2 * Copyright (c) 2015 ARM Limited
be_bryan 0:b74591d5ab33 3 *
be_bryan 0:b74591d5ab33 4 * Licensed under the Apache License, Version 2.0 (the "License");
be_bryan 0:b74591d5ab33 5 * you may not use this file except in compliance with the License.
be_bryan 0:b74591d5ab33 6 * You may obtain a copy of the License at
be_bryan 0:b74591d5ab33 7 *
be_bryan 0:b74591d5ab33 8 * http://www.apache.org/licenses/LICENSE-2.0
be_bryan 0:b74591d5ab33 9 *
be_bryan 0:b74591d5ab33 10 * Unless required by applicable law or agreed to in writing, software
be_bryan 0:b74591d5ab33 11 * distributed under the License is distributed on an "AS IS" BASIS,
be_bryan 0:b74591d5ab33 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
be_bryan 0:b74591d5ab33 13 * See the License for the specific language governing permissions and
be_bryan 0:b74591d5ab33 14 * limitations under the License.
be_bryan 0:b74591d5ab33 15 */
be_bryan 0:b74591d5ab33 16
be_bryan 0:b74591d5ab33 17 #ifndef LWIP_STACK_H
be_bryan 0:b74591d5ab33 18 #define LWIP_STACK_H
be_bryan 0:b74591d5ab33 19
be_bryan 0:b74591d5ab33 20 #include "nsapi.h"
be_bryan 0:b74591d5ab33 21 #include "emac_api.h"
be_bryan 0:b74591d5ab33 22 #include "lwip/opt.h"
be_bryan 0:b74591d5ab33 23 #ifdef __cplusplus
be_bryan 0:b74591d5ab33 24 extern "C" {
be_bryan 0:b74591d5ab33 25 #endif
be_bryan 0:b74591d5ab33 26
be_bryan 0:b74591d5ab33 27 // Access to lwip through the nsapi - be wary of API changes as external 1st-generation EMAC
be_bryan 0:b74591d5ab33 28 // drivers attach through these.
be_bryan 0:b74591d5ab33 29 nsapi_error_t mbed_lwip_init(emac_interface_t *emac);
be_bryan 0:b74591d5ab33 30 nsapi_error_t mbed_lwip_emac_init(emac_interface_t *emac);
be_bryan 0:b74591d5ab33 31 nsapi_error_t mbed_lwip_bringup(bool dhcp, const char *ip, const char *netmask, const char *gw);
be_bryan 0:b74591d5ab33 32 nsapi_error_t mbed_lwip_bringup_2(bool dhcp, bool ppp, const char *ip, const char *netmask, const char *gw, const nsapi_ip_stack_t stack);
be_bryan 0:b74591d5ab33 33 nsapi_error_t mbed_lwip_bringdown(void);
be_bryan 0:b74591d5ab33 34 nsapi_error_t mbed_lwip_bringdown_2(bool ppp);
be_bryan 0:b74591d5ab33 35
be_bryan 0:b74591d5ab33 36 const char *mbed_lwip_get_mac_address(void);
be_bryan 0:b74591d5ab33 37 char *mbed_lwip_get_ip_address(char *buf, nsapi_size_t buflen);
be_bryan 0:b74591d5ab33 38 char *mbed_lwip_get_netmask(char *buf, nsapi_size_t buflen);
be_bryan 0:b74591d5ab33 39 char *mbed_lwip_get_gateway(char *buf, nsapi_size_t buflen);
be_bryan 0:b74591d5ab33 40
be_bryan 0:b74591d5ab33 41 extern nsapi_stack_t lwip_stack;
be_bryan 0:b74591d5ab33 42
be_bryan 0:b74591d5ab33 43 #ifdef __cplusplus
be_bryan 0:b74591d5ab33 44 }
be_bryan 0:b74591d5ab33 45 #endif
be_bryan 0:b74591d5ab33 46
be_bryan 0:b74591d5ab33 47 #endif