Microchip® Advanced Software Framework

qt_i2c.c File Reference

QTouch component driver with I2C interface.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "qt_i2c.h"
#include "delay.h"
#include "ioport.h"
#define QT_COMM_TIMEOUT   10000
 Timeout for communication with QTouch device. More...
 
#define QT_CONTINUE_RW_DELAY   50
 Delay between two continue I2C read or write operation in microsecond. More...
 
void qt_hardware_reset (void)
 Perform a hardware reset of the QT device. More...
 
enum status_code qt_get_comm_ready (void)
 Check communication is ready and able to read Chip ID. More...
 
enum status_code qt_read_setup_block (struct qt_setup_block *setup_block)
 Read entire setup block from QT device. More...
 
enum status_code qt_write_setup_block (struct qt_setup_block *setup_block)
 Write entire setup block to QT device. More...
 
enum status_code qt_get_status (struct qt_status *qt_status)
 Get all status from QT device. More...
 
bool qt_is_change_line_low (void)
 Check if the CHANGE line is low level. More...
 
enum status_code qt_read_regs (uint8_t reg_addr, uint8_t *read_buffer, uint8_t length)
 Read registers content from QT device. More...
 
enum status_code qt_write_regs (uint8_t reg_addr, uint8_t *write_buffer, uint8_t length)
 Write content to QT device registers. More...