cc3200: Clean-up servers enable/disable algorithm.

This commit is contained in:
Daniel Campora 2015-04-29 14:25:44 +02:00
parent c3e37a0cde
commit bf4576dc91
1 changed files with 1 additions and 5 deletions

View File

@ -91,16 +91,14 @@ void TASK_Servers (void *pvParameters) {
// now set/clear the flags
servers_data.enabled = true;
servers_data.do_enable = false;
servers_data.do_disable = false;
}
else if (servers_data.enabled && servers_data.do_disable) {
else if (servers_data.do_disable) {
// disable network services
telnet_disable();
ftp_disable();
// now clear the flags
servers_data.do_disable = false;
servers_data.enabled = false;
servers_data.do_enable = false;
}
if (cycle) {
@ -119,13 +117,11 @@ void TASK_Servers (void *pvParameters) {
}
void servers_start (void) {
servers_data.do_disable = false;
servers_data.do_enable = true;
HAL_Delay (SERVERS_CYCLE_TIME_MS * 5);
}
void servers_stop (void) {
servers_data.do_enable = false;
servers_data.do_disable = true;
do {
HAL_Delay (SERVERS_CYCLE_TIME_MS);