aboutsummaryrefslogtreecommitdiffstats
path: root/src/gadc/gadc.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-02-03 18:23:53 +1000
committerinmarket <andrewh@inmarket.com.au>2014-02-03 18:23:53 +1000
commitf26581dc7e85f77393143a44c0c3eb3eef0da8b4 (patch)
tree9a83c5eaf1abe2cc61b216012f997e6891840a19 /src/gadc/gadc.c
parentb6daaabf32bf2092689e0732ca4486f25e80317f (diff)
parentd869d9b3b80cb9ab2314840b2fa274e89e5342db (diff)
downloaduGFX-f26581dc7e85f77393143a44c0c3eb3eef0da8b4.tar.gz
uGFX-f26581dc7e85f77393143a44c0c3eb3eef0da8b4.tar.bz2
uGFX-f26581dc7e85f77393143a44c0c3eb3eef0da8b4.zip
Merge branch 'master' into freertos
Diffstat (limited to 'src/gadc/gadc.c')
-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))