EFM32 Happy Gecko Software Documentation
efm32hg-doc-5.1.2
|
Capacitive sense driver.
Copyright 2015 Silicon Labs, Inc. http://www.silabs.com
This file is licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.
Definition in file caplesense.c.
#include "em_device.h"
#include "caplesense.h"
#include "em_emu.h"
#include "em_acmp.h"
#include "em_assert.h"
#include "em_cmu.h"
#include "em_gpio.h"
#include "em_core.h"
#include "em_lesense.h"
#include "caplesenseconfig.h"
Go to the source code of this file.
Functions | |
uint32_t | CAPLESENSE_getNormalizedVal (uint8_t channel) |
Get the current normalized channelValue for a channel. More... | |
uint8_t | CAPLESENSE_getSegmentChannel (uint8_t capSegment) |
Get the channelValue for a sensor segment. More... | |
int32_t | CAPLESENSE_getSliderPosition (void) |
Get the position of the slider. More... | |
uint32_t | CAPLESENSE_getVal (uint8_t channel) |
Get the current channelValue for a channel. More... | |
void | CAPLESENSE_Init (bool sleep) |
Initializes the capacative sense system without LESENSE. More... | |
void | CAPLESENSE_setupACMP (void) |
Setup the ACMP. | |
void | CAPLESENSE_setupCallbacks (void(*scanCb)(void), void(*chCb)(void)) |
LESENSE callback setup. More... | |
void | CAPLESENSE_setupCMU (void) |
Setup the CMU. More... | |
void | CAPLESENSE_setupGPIO (void) |
Setup the GPIO. | |
void | CAPLESENSE_setupLESENSE (bool sleep) |
Setup the LESENSE for capavitive sensing. More... | |
void | CAPLESENSE_Sleep (void) |
Send the capacative sense system to sleep mode. | |
void | LESENSE_IRQHandler (void) |
LESENSE interrupt handler. | |
Variables | |
static volatile uint32_t | channelMaxValues [LESENSE_CHANNELS] |
This stores the maximum values seen by a channel. More... | |
static const bool | channelsInUse [LESENSE_CHANNELS] = LESENSE_CAPSENSE_CH_IN_USE |
A bit vector which represents the channels to iterate through. More... | |
static volatile uint32_t | channelValues [LESENSE_CHANNELS] |
This vector stores the latest read values from LESENSE. More... | |
static volatile uint8_t | currentChannel |
static void(* | lesenseChCb )(void) |
static void(* | lesenseScanCb )(void) |
void CAPLESENSE_setupCMU | ( | void | ) |
Setup the CMU.
Prototypes
Definition at line 88 of file caplesense.c.
References CMU_ClockDivSet(), CMU_ClockEnable(), CMU_ClockSelectSet(), cmuClkDiv_1, cmuClock_ACMP0, cmuClock_GPIO, cmuClock_HF, cmuClock_HFPER, cmuClock_LFA, cmuClock_LFB, cmuSelect_Disabled, cmuSelect_HFRCO, cmuSelect_LFRCO, and SystemCoreClockUpdate().
Referenced by CAPLESENSE_Init().
|
static |
This stores the maximum values seen by a channel.
LESENSE_CHANNELS | Vector of channels. |
Definition at line 50 of file caplesense.c.
Referenced by CAPLESENSE_getNormalizedVal(), CAPLESENSE_getSliderPosition(), CAPSENSE_getNormalizedVal(), CAPSENSE_getPressed(), CAPSENSE_getSliderPosition(), LESENSE_IRQHandler(), and TIMER0_IRQHandler().
|
static |
A bit vector which represents the channels to iterate through.
LESENSE_CHANNELS | Vector of channels. |
Definition at line 62 of file caplesense.c.
Referenced by CAPLESENSE_setupLESENSE(), CAPSENSE_Sense(), and LESENSE_IRQHandler().
|
static |
This vector stores the latest read values from LESENSE.
LESENSE_CHANNELS | Vector of channels. |
Definition at line 37 of file caplesense.c.
Referenced by CAPLESENSE_getNormalizedVal(), CAPLESENSE_getSliderPosition(), CAPLESENSE_getVal(), CAPSENSE_getNormalizedVal(), CAPSENSE_getPressed(), CAPSENSE_getSliderPosition(), CAPSENSE_getVal(), LESENSE_IRQHandler(), and TIMER0_IRQHandler().
|
static |
The current channel we are sensing
Definition at line 81 of file caplesense.c.
Referenced by CAPSENSE_Sense(), LESENSE_IRQHandler(), and TIMER0_IRQHandler().
|
static |
Callback function for LESENSE interrupts.
Definition at line 78 of file caplesense.c.
Referenced by CAPLESENSE_setupCallbacks(), and LESENSE_IRQHandler().
|
static |
Local variablesCallback function for LESENSE interrupts.
Definition at line 76 of file caplesense.c.
Referenced by CAPLESENSE_setupCallbacks(), and LESENSE_IRQHandler().