summaryrefslogtreecommitdiff
path: root/cesar/host
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/host')
-rw-r--r--cesar/host/station/src/station.c24
-rw-r--r--cesar/host/station/station.h4
2 files changed, 21 insertions, 7 deletions
diff --git a/cesar/host/station/src/station.c b/cesar/host/station/src/station.c
index b46000fd4b..16bc1b67e0 100644
--- a/cesar/host/station/src/station.c
+++ b/cesar/host/station/src/station.c
@@ -97,12 +97,26 @@ int station_init(station_ctx_t *station)
return 0;
}
-/**
- * station context to clean and reset, with pipe closing
- * \param station pointer to station context to stop
- */
-void station_down(station_ctx_t *station)
+void
+station_uninit (station_ctx_t *station)
{
+ DBG_ASSERT(station);
+
+ /* Return to first state. */
+ station->status = STATION_STATUS_INIT;
+
+ /* Unload modules. */
+ station->ecos_tick_cb = NULL;
+ /* TODO: system_uninit (station->system); */
+ station->system = NULL;
+ /* TODO: probe_uninit (station->probe); */
+ station->probe = NULL;
+ /* TODO: fcall_uninit (station->fcall); */
+ station->fcall = NULL;
+ /* TODO: netclock_uninit (station->netclock); */
+ station->netclock = NULL;
+ /* TODO: sci_uninit (station->sci); */
+ station->sci = NULL;
}
/**
diff --git a/cesar/host/station/station.h b/cesar/host/station/station.h
index 85a831d3d3..7a7d931a0d 100644
--- a/cesar/host/station/station.h
+++ b/cesar/host/station/station.h
@@ -124,10 +124,10 @@ void station_free(station_ctx_t *station);
int station_init(station_ctx_t *station);
/**
- * station context to clean and reset, with pipe closing
+ * Free station resources.
* \param station pointer to station context to stop
*/
-void station_down(station_ctx_t *station);
+void station_uninit (station_ctx_t *station);
/**
* station is into idle state; it sends a sci 'idle' message and waits for sci message reception