cc3200: Clean-up servers enable/disable algorithm.
This commit is contained in:
parent
c3e37a0cde
commit
bf4576dc91
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue