aboutsummaryrefslogtreecommitdiffstats
path: root/src/gadc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gadc')
-rw-r--r--src/gadc/gadc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gadc/gadc.c b/src/gadc/gadc.c
index e297ef7e..c9a4a31b 100644
--- a/src/gadc/gadc.c
+++ b/src/gadc/gadc.c
@@ -236,7 +236,8 @@ void GADC_ISR_ErrorI(ADCDriver *adcp, adcerror_t err) {
}
/* Our module initialiser */
-void _gadcInit(void) {
+void _gadcInit(void)
+{
gadc_lld_init();
gfxSemInit(&gadcsem, GADC_MAX_LOWSPEED_DEVICES, GADC_MAX_LOWSPEED_DEVICES);
gfxMutexInit(&gadcmutex);
@@ -246,6 +247,19 @@ void _gadcInit(void) {
#endif
}
+void _gadcDeinit(void)
+{
+ /* commented stuff is ToDo */
+
+ // gadc_lld_deinit();
+ gfxSemDestroy(&gadcsem);
+ gfxMutexDestroy(&gadcmutex);
+ gtimerDeinit(&LowSpeedGTimer);
+ #if GFX_USE_GEVENT
+ gtimerDeinit(&HighSpeedGTimer);
+ #endif
+}
+
static inline void StartADC(bool_t onNoHS) {
gfxSystemLock();
if (!(gflags & GADC_GFLG_ISACTIVE) || (onNoHS && !curlsdev))