Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

FT6X36 Touch Controller Library

Single-file C library for FT6X36 capacitive touch controllers.

Setup

Copy ft6x36.h and ft6x36.c into your project.

Include the driver:

#include"ft6x36.h"

Implement the necessary platform-specific functions:

boolread_int_pin(void) {
// Return INT pin state (active low)
}
voidreset_chip(void) {
// Reset the FT6X36 chip
}
voidi2c_read(uint32_taddr, uint32_treg, void*data, intlen) {
// I2C read implementation
}
voidi2c_write(uint32_taddr, uint32_treg, void*data, intlen) {
// I2C write implementation
}

Initialize the driver:

// InitializeFT6X36Config_tconfig= {
.fnReadIntPin=read_int_pin,
.fnResetChip=reset_chip,
.fnSerialRead=i2c_read,
.fnSerialWrite=i2c_write
};
ft6326_init(&config);

Example Usage

You're now ready to start using the device:

// Check for touchesif (ft6x36_touched()) {
FT6X36Touchpoint_ttouches[FT6X36_MAX_TOUCH_POINTS];
intcount=ft6x36_get_touches(touches);
for (inti=0; i<count; i++) {
printf("Touch %d: x=%d, y=%d\n", i, touches[i].x, touches[i].y);
}
}

API

  • ft6326_init(config) - Initialize the driver with platform callbacks
  • ft6x36_touched() - Check if screen is touched
  • ft6x36_get_touches(array) - Get touch coordinates and details

About

Touch panel driver for FT6x36 series capacitive touch panel controllers

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages