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.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
enet_tasklet.h
00001 /* 00002 * Copyright (c) 2016 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef ENET_TASKLET_H 00018 #define ENET_TASKLET_H 00019 00020 #include "mesh_interface_types.h" 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 /* 00027 * \brief Initialize system. 00028 */ 00029 void enet_tasklet_init(void); 00030 00031 /* 00032 * \brief Create network interface. 00033 * 00034 * \param device_id Registered physical device. 00035 * \return interface ID used to communication with this interface. 00036 */ 00037 int8_t enet_tasklet_network_init(int8_t device_id); 00038 00039 /* 00040 * \brief Create PPP network interface. 00041 * 00042 * \param device_id Registered physical device. 00043 * \return interface ID used to communication with this interface. 00044 */ 00045 int8_t enet_tasklet_ppp_network_init(int8_t device_id); 00046 00047 /* 00048 * \brief Connect to Ethernet network. 00049 * 00050 * \param callback Call when network state changes. 00051 * \param nwk_interface_id To use for networking. 00052 * 00053 */ 00054 int8_t enet_tasklet_connect(void (*)(mesh_connection_status_t mesh_status), int8_t nwk_interface_id); 00055 00056 /* 00057 * \brief Disconnect network interface. 00058 * 00059 * \param send_cb Send possible network status change event if set to `true`. 00060 * \return >= 0 if disconnected successfully. 00061 * \return < 0 if error. 00062 */ 00063 int8_t enet_tasklet_disconnect(bool send_cb); 00064 00065 /* 00066 * \brief Callback to call when the link state changes. 00067 * 00068 * \param up Tells if link is up or down. 00069 */ 00070 void enet_tasklet_link_state_changed(bool up); 00071 00072 #ifdef __cplusplus 00073 } 00074 #endif 00075 00076 #endif // ENET_TASKLET_H
Generated on Tue Jul 12 2022 13:54:18 by
