File tree Expand file tree Collapse file tree 3 files changed +36
-4
lines changed
features/nanostack/mbed-mesh-api/source Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,5 @@ nsapi_error_t NanostackEthernetInterface::do_initialize()
97
97
98
98
nsapi_error_t Nanostack::EthernetInterface::bringdown ()
99
99
{
100
- enet_tasklet_disconnect ();
101
- return 0 ;
100
+ return enet_tasklet_disconnect (true );
102
101
}
Original file line number Diff line number Diff line change 24
24
#include "ns_event_loop.h"
25
25
#include "mesh_interface_types.h"
26
26
#include "eventOS_event.h"
27
+ #include "enet_tasklet.h"
27
28
28
29
// For tracing we need to define flag, have include and define group
29
30
#include "ns_trace.h"
Original file line number Diff line number Diff line change 22
22
extern "C" {
23
23
#endif
24
24
25
+ /*
26
+ * \brief Initialize system.
27
+ */
25
28
void enet_tasklet_init (void );
26
- uint8_t enet_tasklet_network_init (int8_t );
29
+
30
+ /*
31
+ * \brief Create network interface.
32
+ *
33
+ * \param device_id Registered physical device.
34
+ * \return interface ID used to communication with this interface.
35
+ */
36
+ int8_t enet_tasklet_network_init (int8_t device_id );
37
+
38
+ /*
39
+ * \brief Connect to Ethernet network.
40
+ *
41
+ * \param callback Call when network state changes.
42
+ * \param nwk_interface_id To use for networking.
43
+ *
44
+ */
27
45
int8_t enet_tasklet_connect (void (* )(mesh_connection_status_t mesh_status ), int8_t nwk_interface_id );
28
- void enet_tasklet_disconnect ();
46
+
47
+ /*
48
+ * \brief Disconnect network interface.
49
+ *
50
+ * \param send_cb Send possible network status change event if set to `true`.
51
+ * \return >= 0 if disconnected successfully.
52
+ * \return < 0 if error.
53
+ */
54
+ int8_t enet_tasklet_disconnect (bool send_cb );
55
+
56
+ /*
57
+ * \brief Callback to call when the link state changes.
58
+ *
59
+ * \param up Tells if link is up or down.
60
+ */
29
61
void enet_tasklet_link_state_changed (bool up );
30
62
31
63
#ifdef __cplusplus
You can’t perform that action at this time.
0 commit comments