Skip to content

Commit 7dd4cba

Browse files
committed
Updated 'network' module
Operating in STA & AP mode at the same time (APSTA) is now supported Updated 'machine.ADC' module Fixed bug: 'adc.read()' always returns 0 Added support for ADC2 other minor bug fixes and improvements
1 parent 1996d7b commit 7dd4cba

32 files changed

+804
-437
lines changed

MicroPython_BUILD/components/micropython/esp32/libs/ftp.c

+10
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,16 @@ bool ftp_terminate (void) {
13941394
return res;
13951395
}
13961396

1397+
//-------------------------
1398+
bool ftp_stop_requested() {
1399+
if ((FtpTaskHandle == NULL) || (ftp_mutex == NULL)) return false;
1400+
if (xSemaphoreTake(ftp_mutex, FTP_MUTEX_TIMEOUT_MS / portTICK_PERIOD_MS) !=pdTRUE) return false;
1401+
1402+
bool res = (ftp_stop == 1);
1403+
xSemaphoreGive(ftp_mutex);
1404+
return res;
1405+
}
1406+
13971407
//-------------------------------
13981408
int32_t ftp_get_maxstack (void) {
13991409
if ((FtpTaskHandle == NULL) || (ftp_mutex == NULL)) return -1;

MicroPython_BUILD/components/micropython/esp32/libs/ftp.h

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ bool ftp_disable (void);
7979
bool ftp_reset (void);
8080
int ftp_getstate();
8181
bool ftp_terminate (void);
82+
bool ftp_stop_requested();
8283
int32_t ftp_get_maxstack (void);
8384

8485
#endif

MicroPython_BUILD/components/micropython/esp32/libs/telnet.c

+10
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,16 @@ bool telnet_terminate (void) {
723723
return true;
724724
}
725725

726+
//----------------------------
727+
bool telnet_stop_requested() {
728+
if ((TelnetTaskHandle == NULL) || (telnet_mutex == NULL)) return false;
729+
if (xSemaphoreTake(telnet_mutex, TELNET_MUTEX_TIMEOUT_MS / portTICK_PERIOD_MS) !=pdTRUE) return false;
730+
731+
bool res = (telnet_stop == 1);
732+
xSemaphoreGive(telnet_mutex);
733+
return res;
734+
}
735+
726736
//----------------------------------
727737
int32_t telnet_get_maxstack (void) {
728738
if ((TelnetTaskHandle == NULL) || (telnet_mutex == NULL)) return -1;

MicroPython_BUILD/components/micropython/esp32/libs/telnet.h

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ bool telnet_isenabled (void);
7979
bool telnet_reset (void);
8080
int telnet_getstate();
8181
bool telnet_terminate (void);
82+
bool telnet_stop_requested();
8283
int32_t telnet_get_maxstack (void);
8384

8485
#endif

0 commit comments

Comments
 (0)