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 Connect to Ethernet network.
41  *
42  * \param callback Call when network state changes.
43  * \param nwk_interface_id To use for networking.
44  *
45  */
46 int8_t enet_tasklet_connect(void (*)(mesh_connection_status_t mesh_status), int8_t nwk_interface_id);
47 
48 /*
49  * \brief Disconnect network interface.
50  *
51  * \param send_cb Send possible network status change event if set to `true`.
52  * \return >= 0 if disconnected successfully.
53  * \return < 0 if error.
54  */
55 int8_t enet_tasklet_disconnect(bool send_cb);
56 
57 /*
58  * \brief Callback to call when the link state changes.
59  *
60  * \param up Tells if link is up or down.
61  */
62 void enet_tasklet_link_state_changed(bool up);
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #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.