10 #define CSLIB_FW_VERSION 0x1300
30 #define DEF_SENSOR_BUFFER_SIZE 2
34 #define DEBOUNCE_ACTIVE_MASK 0x80
37 #define SINGLE_ACTIVE_MASK 0x40
void CSLIB_initHardware(void)
signed char baselineAccumulator
Tracks trend of CS values to determine whether baseline rises or falls.
uint8_t CSLIB_anySensorDebounceActive(void)
void CSLIB_resetSensorStruct(uint8_t sensorIndex, uint16_t fillValue)
uint8_t activeIndicator
Bit array showing whether touch is qualified on sensor, uses DEBOUNCE_ACTIVE_MASK.
void CSLIB_nodePushRaw(uint8_t index, uint16_t newValue)
void CSLIB_initLibrary(void)
uint8_t CSLIB_sensorBufferSize
Size of raw data buffers within sensor node struct elements, should not be changed.
uint16_t currentBaseline
Runtime estimate of untouched or inactive state of CS sensor input.
uint32_t s32
The 4-byte value as a 32-bit signed integer.
uint16_t scanSensor(uint8_t index)
uint8_t disable_sleep_and_stall
Bit that can be set to disable entrance to sleep, overriding timers.
uint16_t CSLIB_getNoiseAdjustedSensorData(uint8_t index)
SI_UU32_t expValue
Filtered CS value with 16 bits of LSBs.
uint16_t CSLIB_getUnpackedTouchDelta(uint8_t index)
uint16_t CSLIB_sleepModePeriod
Sets the scan period in ms for sleep mode scanning. Defaults to DEF_ACTIVE_MODE_PERIOD.
uint16_t CSLIB_activeModePeriod
Sets the scan period in ms for active mode scanning. Defaults to DEF_ACTIVE_MODE_PERIOD.
uint8_t CSLIB_sleepModeEnable
Sets whether the system is allowed to ever use sleep mode scanning. If set to 0, the system will alwa...
void CSLIB_lowPowerUpdate(void)
uint8_t debounceCounts
Stores consecutive CS values above or below active or inactive threshold.
uint32_t u32
The 4-byte value as a 32-bit unsigned integer.
uint8_t noise_level
Stores interference characterization level, 0 being lowest and 3 being highest.
SensorStruct_t CSLIB_node[]
Sensor node data structure.
uint16_t CSLIB_countsBeforeSleep
Sets the number of consecutive scans without a single qualified touch before entering sleep mode...
uint8_t CSLIB_isSensorDebounceActive(uint8_t index)
uint16_t CSLIB_nodeGetRaw(uint8_t sensorIndex, uint8_t bufferIndex)
uint16_t uu16[2]
The 4-byte value as a SI_UU16_t.
union SI_UU32 SI_UU32_t
Union used to address upper bytes of 32-bit exponential average easily.
uint8_t touchDeltaDiv16
Describes the expected difference between untouched and touched CS value.
Union used to address upper bytes of 32-bit exponential average easily.
uint8_t CSLIB_anySensorSingleActive(void)
uint8_t CSLIB_freeRunSetting
Configures whether system goes to sleep between scans in active mode. 1 means that the system is in f...
uint8_t CSLIB_buttonDebounce
Sets the number of consecutive values above/below threshold before button is qualified/disqualified. Defaults to DEF_BUTTON_DEBOUNCE.
uint16_t CSLIB_systemNoiseAverage
Describes average interference seen as a percentage of the average touch delta. 100 would mean that a...
uint8_t CSLIB_isSensorSingleActive(uint8_t index)
uint8_t CSLIB_numSensors
Size of the sensor node struct, should only be changed at compile time by editing DEF_NUM_SENSORS...
#define DEF_SENSOR_BUFFER_SIZE
Defines the depth of the raw buffer. Note: this value should not be changed.
Stores all runtime values for an enabled capacitive sensor.