diff options
| author | Daniel Campora | 2015-03-25 13:29:50 +0100 |
|---|---|---|
| committer | Daniel Campora | 2015-03-25 15:22:21 +0100 |
| commit | 684dba40f03e3b78cabf3a20c563d2913384edc2 (patch) | |
| tree | fdff73cc17d75b2cf293fc536d211131ad57d0d8 /cc3200/mods | |
| parent | e15f8198bc9efa85bfb9ec50ce7a0a0166e69989 (diff) | |
cc3200: Roll back to the previous telnet and ftp timeouts.
Unfortunately, these timeouts are the only realiable way (for now), to
be able to detect broken connections due to half-open sockets. Such a
thing occurs when getting out of the WiFi coverage area or when
disconnecting from the AP (sometimes the client doesn't send the
disconnect packet).
Diffstat (limited to 'cc3200/mods')
| -rw-r--r-- | cc3200/mods/modwlan.c | 12 | ||||
| -rw-r--r-- | cc3200/mods/pybadc.c | 4 |
2 files changed, 4 insertions, 12 deletions
diff --git a/cc3200/mods/modwlan.c b/cc3200/mods/modwlan.c index c6edea240..965016176 100644 --- a/cc3200/mods/modwlan.c +++ b/cc3200/mods/modwlan.c @@ -93,7 +93,6 @@ typedef struct _wlan_obj_t { uint8_t mac[SL_MAC_ADDR_LEN]; uint8_t ssid[33]; uint8_t bssid[6]; - volatile uint8_t stasconnected; } wlan_obj_t; @@ -163,7 +162,6 @@ STATIC wlan_obj_t wlan_obj = { .ssid = {0}, .bssid = {0}, .mac = {0}, - .stasconnected = 0, }; STATIC const mp_cb_methods_t wlan_cb_methods; @@ -222,16 +220,10 @@ void SimpleLinkWlanEventHandler(SlWlanEvent_t *pWlanEvent) } break; case SL_WLAN_STA_CONNECTED_EVENT: - wlan_obj.stasconnected++; + // TODO break; case SL_WLAN_STA_DISCONNECTED_EVENT: - if (wlan_obj.stasconnected > 0) { - if (--wlan_obj.stasconnected == 0) { - #if (MICROPY_PORT_HAS_TELNET || MICROPY_PORT_HAS_FTP) - servers_reset(); - #endif - } - } + // TODO break; case SL_WLAN_P2P_DEV_FOUND_EVENT: // TODO diff --git a/cc3200/mods/pybadc.c b/cc3200/mods/pybadc.c index 446fb4003..c377d5108 100644 --- a/cc3200/mods/pybadc.c +++ b/cc3200/mods/pybadc.c @@ -83,8 +83,8 @@ typedef struct { DEFINE PUBLIC FUNCTIONS ******************************************************************************/ STATIC void pybadc_init (pyb_adc_obj_t *self) { - // enable the ADC channel - MAP_ADCChannelEnable(ADC_BASE, self->channel); + // enable the ADC channel + MAP_ADCChannelEnable(ADC_BASE, self->channel); // enable and configure the timer MAP_ADCTimerConfig(ADC_BASE, (1 << 17) - 1); MAP_ADCTimerEnable(ADC_BASE); |
