Silicon Labs / EFM32_CapSenseSlider

Dependents:   EFM32 RDA5807M RDS Radio EMF32-Segment-Touch-Demo EFM32_Bugs MFALHIMOHAMMED ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers caplesense.h Source File

caplesense.h

Go to the documentation of this file.
00001 /**************************************************************************//**
00002  * @file
00003  * @brief Capacitive sense driver
00004  * @version 3.20.9
00005  ******************************************************************************
00006  * @section License
00007  * <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b>
00008  *******************************************************************************
00009  *
00010  * This file is licensensed under the Silabs License Agreement. See the file
00011  * "Silabs_License_Agreement.txt" for details. Before using this software for
00012  * any purpose, you must agree to the terms of that agreement.
00013  *
00014  ******************************************************************************/
00015 
00016 
00017 
00018 #ifndef __CAPLESENSE_H_
00019 #define __CAPLESENSE_H_
00020 
00021 #include <stdint.h>
00022 #include <stdbool.h>
00023 
00024 #if defined(TARGET_EFM32GG_STK3700)
00025 #include "capsenseconfig_gg_stk.h"
00026 #elif defined(TARGET_EFM32TG_STK3300)
00027 #include "capsenseconfig_tg_stk.h"
00028 #elif defined(TARGET_EFM32LG_STK3600)
00029 #include "capsenseconfig_lg_stk.h"
00030 #elif defined(TARGET_EFM32WG_STK3800)
00031 #include "capsenseconfig_wg_stk.h"
00032 #else
00033 #error "Unknown target for EFM32 CapSenseSlider driver."
00034 #endif
00035 
00036 /***************************************************************************//**
00037  * @addtogroup Drivers
00038  * @{
00039  ******************************************************************************/
00040 
00041 /***************************************************************************//**
00042  * @addtogroup CapSense
00043  * @{
00044  ******************************************************************************/
00045 
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #endif
00049 
00050 uint8_t  CAPLESENSE_getSegmentChannel(uint8_t capSegment);
00051 uint32_t CAPLESENSE_getVal(uint8_t channel);
00052 uint32_t CAPLESENSE_getNormalizedVal(uint8_t channel);
00053 int32_t CAPLESENSE_getSliderPosition(void);
00054 void CAPLESENSE_Init(bool sleep);
00055 void CAPLESENSE_setupLESENSE(bool sleep);
00056 void CAPLESENSE_setupCallbacks(void (*scanCb)(void), void (*chCb)(void));
00057 void CAPLESENSE_Sleep(void);
00058 
00059 #ifdef __cplusplus
00060 }
00061 #endif
00062 
00063 /** @} (end group CapSense) */
00064 /** @} (end group Drivers) */
00065 
00066 #endif /* __CAPSENSE_H_ */