Mistake on this page?
Report an issue in GitHub or email us
enet_tasklet.h
1 /*
2  * Copyright (c) 2016 ARM Limited. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  * Licensed under the Apache License, Version 2.0 (the License); you may
5  * not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ENET_TASKLET_H
18 #define ENET_TASKLET_H
19 
20 #include "mesh_interface_types.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 /*
27  * \brief Initialize system.
28  */
29 void enet_tasklet_init(void);
30 
31 /*
32  * \brief Create network interface.
33  *
34  * \param device_id Registered physical device.
35  * \return interface ID used to communication with this interface.
36  */
37 int8_t enet_tasklet_network_init(int8_t device_id);
38 
39 /*
40  * \brief Create PPP network interface.
41  *
42  * \param device_id Registered physical device.
43  * \return interface ID used to communication with this interface.
44  */
45 int8_t enet_tasklet_ppp_network_init(int8_t device_id);
46 
47 /*
48  * \brief Connect to Ethernet network.
49  *
50  * \param callback Call when network state changes.
51  * \param nwk_interface_id To use for networking.
52  *
53  */
54 int8_t enet_tasklet_connect(void (*)(mesh_connection_status_t mesh_status), int8_t nwk_interface_id);
55 
56 /*
57  * \brief Disconnect network interface.
58  *
59  * \param send_cb Send possible network status change event if set to `true`.
60  * \return >= 0 if disconnected successfully.
61  * \return < 0 if error.
62  */
63 int8_t enet_tasklet_disconnect(bool send_cb);
64 
65 /*
66  * \brief Callback to call when the link state changes.
67  *
68  * \param up Tells if link is up or down.
69  */
70 void enet_tasklet_link_state_changed(bool up);
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif // ENET_TASKLET_H
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.