File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -535,9 +535,6 @@ void WiFiClass::end()
535
535
{
536
536
if (_mode == WL_AP_MODE) {
537
537
m2m_wifi_disable_ap ();
538
-
539
- _status = WL_IDLE_STATUS;
540
- _mode = WL_RESET_MODE;
541
538
} else {
542
539
if (_mode == WL_PROV_MODE) {
543
540
m2m_wifi_stop_provision_mode ();
@@ -549,6 +546,14 @@ void WiFiClass::end()
549
546
// WiFi led OFF (rev A then rev B).
550
547
m2m_periph_gpio_set_val (M2M_PERIPH_GPIO15, 1 );
551
548
m2m_periph_gpio_set_val (M2M_PERIPH_GPIO4, 1 );
549
+
550
+ m2m_wifi_deinit (NULL );
551
+
552
+ nm_bsp_deinit ();
553
+
554
+ _mode = WL_RESET_MODE;
555
+ _status = WL_NO_SHIELD;
556
+ _init = 0 ;
552
557
}
553
558
554
559
uint8_t *WiFiClass::macAddress (uint8_t *mac)
Original file line number Diff line number Diff line change @@ -93,6 +93,17 @@ static void init_chip_pins(void)
93
93
}
94
94
}
95
95
96
+ static void deinit_chip_pins (void )
97
+ {
98
+ digitalWrite (gi8Winc1501ResetPin , LOW );
99
+ pinMode (gi8Winc1501ResetPin , INPUT );
100
+
101
+ if (gi8Winc1501ChipEnPin > -1 )
102
+ {
103
+ pinMode (gi8Winc1501ChipEnPin , INPUT );
104
+ }
105
+ }
106
+
96
107
/*
97
108
* @fn nm_bsp_init
98
109
* @brief Initialize BSP
@@ -122,6 +133,8 @@ sint8 nm_bsp_init(void)
122
133
*/
123
134
sint8 nm_bsp_deinit (void )
124
135
{
136
+ deinit_chip_pins ();
137
+
125
138
return M2M_SUCCESS ;
126
139
}
127
140
You can’t perform that action at this time.
0 commit comments