capsense.c File Reference
Capacitive sense driver.
License
Copyright 2018 Silicon Laboratories Inc. www.silabs.com
SPDX-License-Identifier: Zlib
The licensor of this software is Silicon Laboratories Inc.
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.
Definition in file capsense.c
.
#include "em_device.h"
#include "em_acmp.h
"
#include "em_cmu.h
"
#include "em_emu.h
"
#include "capsense.h
"
Functions | |
uint32_t | CAPSENSE_getNormalizedVal (uint8_t channel) |
Get the current normalized channelValue for a channel. | |
bool | CAPSENSE_getPressed (uint8_t channel) |
Get the state of the Gecko Button. | |
int32_t | CAPSENSE_getSliderPosition (void) |
Get the position of the slider. | |
uint32_t | CAPSENSE_getVal (uint8_t channel) |
Get the current channelValue for a channel. | |
void | CAPSENSE_Init (void) |
Initializes the capacitive sense system. | |
static void | CAPSENSE_Measure (ACMP_Channel_TypeDef channel) |
Start a capsense measurement of a specific channel and waits for it to complete. | |
void | CAPSENSE_Sense (void) |
This function iterates through all the capsensors and reads and initiates a reading. Uses EM1 while waiting for the result from each sensor. | |
void | TIMER0_IRQHandler (void) |
TIMER0 interrupt handler. | |