|
I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
|
MTCH6102 Driver extensions. More...


Data Structures | |
| struct | MTCH6102_raw_sense |
Macros | |
| #define | MTCH_RES_STEP 64U |
| MTCH6102 Resolution of a single RX/TX. | |
| #define | perVal2perReg(ms) |
| Compute reg value for period ms. | |
| #define | perReg2perVal(rv) |
| Get period in ms from register rv. | |
| #define | per10ms 0x0142U |
| example period register value for 10ms | |
| #define | per20ms 0x0284U |
| example period register value for 20ms | |
| #define | per50ms 0x064CU |
| example period register value for 50ms | |
| #define | per100ms 0x0C99U |
| example period register value for 100ms | |
Enumerations | |
| enum | MTCH6102_COMMAND { MTCH_StoreToNV = 0U , MTCH_RestoreDefaults , MTCH_Configure , MTCH_ManufacturingTest , MTCH_ForceBaseline } |
Functions | |
| FctERR | MTCH6102_Set_Mode (const MTCH6102_t *const pCpnt, const MTCH6102_MODE mode) |
| Set MTCH6102 gesture decoding. | |
| FctERR | MTCH6102_Get_Mode (const MTCH6102_t *const pCpnt, MTCH6102_MODE *const mode) |
| Get MTCH6102 gesture decoding. | |
| FctERR | MTCH6102_Command (const MTCH6102_t *const pCpnt, const MTCH6102_COMMAND cmd) |
| Execute MTCH6102 command. | |
| FctERR | MTCH6102_Restore_Defaults (const MTCH6102_t *const pCpnt) |
| Restore MTCH6102 controller to default configuration values. | |
| FctERR | MTCH6102_Store_To_Non_Volatile (const MTCH6102_t *const pCpnt) |
| Write MTCH6102 parameters to non volatile storage. | |
| FctERR | MTCH6102_Configuration_Request (const MTCH6102_t *const pCpnt) |
| Configure MTCH6102controller (after parameters have been changed) | |
| FctERR | MTCH6102_Manufacturing_Test (const MTCH6102_t *const pCpnt) |
| Execute MTCH6102 manufacturing test. | |
| FctERR | MTCH6102_Force_Baseline (const MTCH6102_t *const pCpnt) |
| Force MTCH6102 baseline (re-calibration) to occur. | |
| FctERR | MTCH6102_Set_Active_Period (const MTCH6102_t *const pCpnt, const uint16_t period) |
| Set MTCH6102 active period. | |
| FctERR | MTCH6102_Set_Idle_Period (const MTCH6102_t *const pCpnt, const uint16_t period) |
| Set MTCH6102 idle period. | |
| FctERR | MTCH6102_Set_Idle_Timeout (const MTCH6102_t *const pCpnt, const uint8_t timeout) |
| Set MTCH6102 idle timeout. | |
| FctERR | MTCH6102_Set_Debounce (const MTCH6102_t *const pCpnt, const uint8_t touch, const uint8_t release) |
| Set MTCH6102 debounce period. | |
| FctERR | MTCH6102_Get_Active_Period (const MTCH6102_t *const pCpnt, uint16_t *const period) |
| Get MTCH6102 Active period. | |
| FctERR | MTCH6102_Get_Idle_Period (const MTCH6102_t *const pCpnt, uint16_t *const period) |
| Get MTCH6102 Idle period. | |
| FctERR | MTCH6102_Set_Filter (const MTCH6102_t *const pCpnt, const MTCH6102_FILTER_TYPE type, const uint8_t strength, const bool baseline_filter) |
| Set MTCH6102 raw acquisition filter. | |
| FctERR | MTCH6102_Set_Scan_Count (const MTCH6102_t *const pCpnt, const uint8_t count) |
| Set MTCH6102 scan count. | |
| FctERR | MTCH6102_Set_Touch_Threshold (const MTCH6102_t *const pCpnt, const uint8_t xthr, const uint8_t ythr) |
| Set MTCH6102 touch threshold. | |
| FctERR | MTCH6102_Set_Hysteresis (const MTCH6102_t *const pCpnt, const uint8_t hyst) |
| Set MTCH6102 touch to release hysteresis. | |
| FctERR | MTCH6102_Set_Large_Activation_Threshold (const MTCH6102_t *const pCpnt, const uint16_t thr) |
| Set MTCH6102 large activation threshold. | |
| FctERR | MTCH6102_Set_Base_Interval (const MTCH6102_t *const pCpnt, const uint16_t interval) |
| Set MTCH6102 base interval. | |
| FctERR | MTCH6102_Set_Base_Filter (const MTCH6102_t *const pCpnt, const uint8_t pos, const uint8_t neg) |
| Set MTCH6102 baseline filter thresholds. | |
| FctERR | MTCH6102_Get_Raw (const MTCH6102_t *const pCpnt, MTCH6102_raw_sense *const raw) |
| Get MTCH6102 Raw sensor values data. | |
| FctERR | MTCH6102_Get_Gest (const MTCH6102_t *const pCpnt, MTCH6102_raw_gest *const gest) |
| Get MTCH6102 gesture data. | |
| void | MTCH6102_INT_GPIO_Init (MTCH6102_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active) |
| Interrupt GPIO pin init for MTCH6102. | |
| bool | MTCH6102_INT_GPIO_Get (const MTCH6102_t *const pCpnt) |
| Interrupt GPIO pin getter for MTCH6102. | |
| void | MTCH6102_SYNC_GPIO_Init (MTCH6102_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active) |
| Synchro GPIO pin init for MTCH6102. | |
| bool | MTCH6102_SYNC_GPIO_Get (const MTCH6102_t *const pCpnt) |
| Synchro GPIO pin getter for MTCH6102. | |
MTCH6102 Driver extensions.
MTCH6102: Low-Power Projected Capacitive Touch Controller
| #define MTCH_RES_STEP 64U |
MTCH6102 Resolution of a single RX/TX.
| #define per100ms 0x0C99U |
example period register value for 100ms
| #define per10ms 0x0142U |
example period register value for 10ms
| #define per20ms 0x0284U |
example period register value for 20ms
| #define per50ms 0x064CU |
example period register value for 50ms
| #define perReg2perVal | ( | rv | ) |
Get period in ms from register rv.
| #define perVal2perReg | ( | ms | ) |
Compute reg value for period ms.
| enum MTCH6102_COMMAND |
| FctERR MTCH6102_Command | ( | const MTCH6102_t *const | pCpnt, |
| const MTCH6102_COMMAND | cmd ) |
Execute MTCH6102 command.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | cmd | - Command to execute |


|
inline |
Configure MTCH6102controller (after parameters have been changed)
| [in] | pCpnt | - Pointer to MTCH6102 component |


|
inline |
Force MTCH6102 baseline (re-calibration) to occur.
| [in] | pCpnt | - Pointer to MTCH6102 component |

| FctERR MTCH6102_Get_Active_Period | ( | const MTCH6102_t *const | pCpnt, |
| uint16_t *const | period ) |
Get MTCH6102 Active period.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | period | - Pointer to active period result |

|
inline |
Get MTCH6102 gesture data.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | gest | - Pointer to gesture data result |


| FctERR MTCH6102_Get_Idle_Period | ( | const MTCH6102_t *const | pCpnt, |
| uint16_t *const | period ) |
Get MTCH6102 Idle period.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | period | - Pointer to idle period result |

|
inline |
Get MTCH6102 gesture decoding.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in,out] | mode | - Gesture decoding mode |


|
inline |
Get MTCH6102 Raw sensor values data.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | raw | - Pointer to raw data result |


| bool MTCH6102_INT_GPIO_Get | ( | const MTCH6102_t *const | pCpnt | ) |
Interrupt GPIO pin getter for MTCH6102.
| [in] | pCpnt | - Pointer to MTCH6102 component |


| void MTCH6102_INT_GPIO_Init | ( | MTCH6102_t *const | pCpnt, |
| GPIO_TypeDef *const | GPIOx, | ||
| const uint16_t | GPIO_Pin, | ||
| const GPIO_PinState | GPIO_Active ) |
Interrupt GPIO pin init for MTCH6102.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | GPIOx | - INT port |
| [in] | GPIO_Pin | - INT pin |
| [in] | GPIO_Active | INT pin active state |

|
inline |
Execute MTCH6102 manufacturing test.
| [in] | pCpnt | - Pointer to MTCH6102 component |


|
inline |
Restore MTCH6102 controller to default configuration values.
| [in] | pCpnt | - Pointer to MTCH6102 component |

| FctERR MTCH6102_Set_Active_Period | ( | const MTCH6102_t *const | pCpnt, |
| const uint16_t | period ) |
Set MTCH6102 active period.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | period | - Active period |

|
inline |
Set MTCH6102 baseline filter thresholds.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | pos | - Positive filter value |
| [in] | neg | - Negative filter value |

|
inline |
Set MTCH6102 base interval.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | interval | - Time interval between baselines |

|
inline |
Set MTCH6102 debounce period.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | touch | - Debounce for touch |
| [in] | release | - Debounce for release |

| FctERR MTCH6102_Set_Filter | ( | const MTCH6102_t *const | pCpnt, |
| const MTCH6102_FILTER_TYPE | type, | ||
| const uint8_t | strength, | ||
| const bool | baseline_filter ) |
Set MTCH6102 raw acquisition filter.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | type | - Filter type |
| [in] | strength | - Filter strength |
| [in] | baseline_filter | - 0: Acquisition filter, 1: Baseline filter |

|
inline |
Set MTCH6102 touch to release hysteresis.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | hyst | - Hysteresis |

| FctERR MTCH6102_Set_Idle_Period | ( | const MTCH6102_t *const | pCpnt, |
| const uint16_t | period ) |
Set MTCH6102 idle period.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | period | - Idle period |

|
inline |
Set MTCH6102 idle timeout.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | timeout | - Idle timeout |

|
inline |
Set MTCH6102 large activation threshold.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | thr | - Large activation threshold |

| FctERR MTCH6102_Set_Mode | ( | const MTCH6102_t *const | pCpnt, |
| const MTCH6102_MODE | mode ) |
Set MTCH6102 gesture decoding.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | mode | - Gesture decoding mode |


|
inline |
Set MTCH6102 scan count.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | count | - Scan count |

|
inline |
Set MTCH6102 touch threshold.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | xthr | - Rx lines touch threshold |
| [in] | ythr | - Tx lines touch threshold |

|
inline |
Write MTCH6102 parameters to non volatile storage.
| [in] | pCpnt | - Pointer to MTCH6102 component |


| bool MTCH6102_SYNC_GPIO_Get | ( | const MTCH6102_t *const | pCpnt | ) |
Synchro GPIO pin getter for MTCH6102.
| [in] | pCpnt | - Pointer to MTCH6102 component |

| void MTCH6102_SYNC_GPIO_Init | ( | MTCH6102_t *const | pCpnt, |
| GPIO_TypeDef *const | GPIOx, | ||
| const uint16_t | GPIO_Pin, | ||
| const GPIO_PinState | GPIO_Active ) |
Synchro GPIO pin init for MTCH6102.
| [in] | pCpnt | - Pointer to MTCH6102 component |
| [in] | GPIOx | - SYNC port |
| [in] | GPIO_Pin | - SYNC pin |
| [in] | GPIO_Active | SYNC pin active state |
