Commit bf4576dc authored by Daniel Campora's avatar Daniel Campora
Browse files

cc3200: Clean-up servers enable/disable algorithm.

parent c3e37a0c
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment