Skip to content

Commit

Permalink
Updated 'network' module
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
loboris committed Apr 15, 2018
1 parent 1996d7b commit 7dd4cba
Show file tree
Hide file tree
Showing 32 changed files with 804 additions and 437 deletions.
10 changes: 10 additions & 0 deletions MicroPython_BUILD/components/micropython/esp32/libs/ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,16 @@ bool ftp_terminate (void) {
return res;
}

//-------------------------
bool ftp_stop_requested() {
if ((FtpTaskHandle == NULL) || (ftp_mutex == NULL)) return false;
if (xSemaphoreTake(ftp_mutex, FTP_MUTEX_TIMEOUT_MS / portTICK_PERIOD_MS) !=pdTRUE) return false;

bool res = (ftp_stop == 1);
xSemaphoreGive(ftp_mutex);
return res;
}

//-------------------------------
int32_t ftp_get_maxstack (void) {
if ((FtpTaskHandle == NULL) || (ftp_mutex == NULL)) return -1;
Expand Down
1 change: 1 addition & 0 deletions MicroPython_BUILD/components/micropython/esp32/libs/ftp.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ bool ftp_disable (void);
bool ftp_reset (void);
int ftp_getstate();
bool ftp_terminate (void);
bool ftp_stop_requested();
int32_t ftp_get_maxstack (void);

#endif
Expand Down
10 changes: 10 additions & 0 deletions MicroPython_BUILD/components/micropython/esp32/libs/telnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,16 @@ bool telnet_terminate (void) {
return true;
}

//----------------------------
bool telnet_stop_requested() {
if ((TelnetTaskHandle == NULL) || (telnet_mutex == NULL)) return false;
if (xSemaphoreTake(telnet_mutex, TELNET_MUTEX_TIMEOUT_MS / portTICK_PERIOD_MS) !=pdTRUE) return false;

bool res = (telnet_stop == 1);
xSemaphoreGive(telnet_mutex);
return res;
}

//----------------------------------
int32_t telnet_get_maxstack (void) {
if ((TelnetTaskHandle == NULL) || (telnet_mutex == NULL)) return -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ bool telnet_isenabled (void);
bool telnet_reset (void);
int telnet_getstate();
bool telnet_terminate (void);
bool telnet_stop_requested();
int32_t telnet_get_maxstack (void);

#endif
Expand Down
Loading

0 comments on commit 7dd4cba

Please sign in to comment.