I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
MTCH6102.c File Reference

MTCH6102 Driver. More...

#include "MTCH6102.h"
Include dependency graph for MTCH6102.c:

Macros

#define MTCH6102_TIME_BETWEEN_TRANSACTIONS   1
 1ms delay between every MTCH6102 transactions
 

Functions

FctERR MTCH6102_Init (const uint8_t idx, I2C_HandleTypeDef *const hi2c, const uint16_t devAddress)
 Initialization for MTCH6102 peripheral.
 
FctERR MTCH6102_Init_Single (void)
 Initialization for MTCH6102 peripheral.
 
FctERR MTCH6102_Write (I2C_slave_t *const pSlave, const uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Write function for MTCH6102.
 
FctERR MTCH6102_Read (I2C_slave_t *const pSlave, uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Read function for MTCH6102.
 

Detailed Description

MTCH6102 Driver.

Author
SMFSW

MTCH6102: Low-Power Projected Capacitive Touch Controller

Macro Definition Documentation

◆ MTCH6102_TIME_BETWEEN_TRANSACTIONS

#define MTCH6102_TIME_BETWEEN_TRANSACTIONS   1

1ms delay between every MTCH6102 transactions

Function Documentation

◆ MTCH6102_Init()

FctERR MTCH6102_Init ( const uint8_t idx,
I2C_HandleTypeDef *const hi2c,
const uint16_t devAddress )

Initialization for MTCH6102 peripheral.

Warning
When MTCH6102 is powering up, you should wait around 100ms before you address the first transaction to it
write rx/tx number if needed other than default (9,6), (by implementing your own init sequence)
Note
set MTCH6102_Set_Centered_Coord(true) if 0,0 point needs to be centered on the pad (by implementing your own init sequence)
Parameters
[in]idx- MTCH6102 index
[in]hi2c- pointer to MTCH6102 I2C instance
[in]devAddress- MTCH6102 device address
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MTCH6102_Init_Single()

FctERR MTCH6102_Init_Single ( void )

Initialization for MTCH6102 peripheral.

Warning
When MTCH6102 is powering up, you should wait around 100ms before you address the first transaction to it
In case multiple devices (defined by I2C_MTCH6102_NB > 1), you shall use MTCH6102_Init instead
Returns
FctERR - error code
Here is the call graph for this function:

◆ MTCH6102_Read()

FctERR MTCH6102_Read ( I2C_slave_t *const pSlave,
uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Read function for MTCH6102.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in,out]data- pointer to read to
[in]addr- Address to read from
[in]nb- Number of bytes to read
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MTCH6102_Write()

FctERR MTCH6102_Write ( I2C_slave_t *const pSlave,
const uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Write function for MTCH6102.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in]data- pointer to write from
[in]addr- Address to write to
[in]nb- Number of bytes to write
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: