EFR32 Blue Gecko 12 Software Documentation  efr32bg12-doc-5.1.2
cpt112s_i2c.c File Reference

Detailed Description

helper functions for managing capsense inputs

Version
5.1.1

License

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 cpt112s_i2c.c.

#include "cpt112s_i2c.h"
#include "cpt112s_config.h"
#include "em_chip.h"
#include "em_cmu.h"
#include "em_i2c.h"
#include "em_gpio.h"
#include "em_device.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>

Go to the source code of this file.

Functions

uint16_t CPT112S_getCapsenseCurrent (void)
 
uint16_t CPT112S_getCapsensePrevious (void)
 
uint16_t CPT112S_getSliderCurrent (void)
 
uint16_t CPT112S_getSliderPrevious (void)
 
void CPT112S_init (void)
 
void CPT112S_update (void)
 
static void parseI2C (void)
 
static void performI2CTransfer (void)
 Transmitting I2C data. Will busy-wait until the transfer is complete.
 
static void setupI2C (void)
 Setup I2C.
 
static void setupOscillators (void)
 Starting oscillators and enabling clocks.
 

Variables

static uint16_t capsenseCurrent
 
static uint16_t capsensePrevious
 
static uint8_t i2c_rxBuffer [CPT112S_I2C_RXBUFFER_SIZE]
 
static volatile bool i2c_rxInProgress
 
static volatile bool i2c_startTx
 
static uint16_t sliderCurrent
 
static uint16_t sliderPrevious