LibDriver TTP229
Loading...
Searching...
No Matches
driver_ttp229.h File Reference

driver ttp229 header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for driver_ttp229.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ttp229_handle_s
 ttp229 handle structure definition More...
struct  ttp229_info_s
 ttp229 information structure definition More...

Macros

#define DRIVER_TTP229_LINK_INIT(HANDLE, STRUCTURE)
 initialize ttp229_handle_t structure
#define DRIVER_TTP229_LINK_IIC_INIT(HANDLE, FUC)
 link iic_init function
#define DRIVER_TTP229_LINK_IIC_DEINIT(HANDLE, FUC)
 link iic_deinit function
#define DRIVER_TTP229_LINK_IIC_READ_CMD(HANDLE, FUC)
 link iic_read_cmd function
#define DRIVER_TTP229_LINK_SPI_INIT(HANDLE, FUC)
 link spi_init function
#define DRIVER_TTP229_LINK_SPI_DEINIT(HANDLE, FUC)
 link spi_deinit function
#define DRIVER_TTP229_LINK_SPI_READ_CMD(HANDLE, FUC)
 link spi_read_cmd function
#define DRIVER_TTP229_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_TTP229_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function

Typedefs

typedef struct ttp229_handle_s ttp229_handle_t
 ttp229 handle structure definition
typedef struct ttp229_info_s ttp229_info_t
 ttp229 information structure definition

Enumerations

enum  ttp229_interface_t { TTP229_INTERFACE_IIC = 0x00 , TTP229_INTERFACE_SPI = 0x01 }
 ttp229 interface enumeration definition More...
enum  ttp229_active_t { TTP229_ACTIVE_LOW = 0x00 , TTP229_ACTIVE_HIGH = 0x01 }
 ttp229 active enumeration definition More...

Functions

uint8_t ttp229_info (ttp229_info_t *info)
 get chip's information
uint8_t ttp229_set_interface (ttp229_handle_t *handle, ttp229_interface_t interface)
 set the interface
uint8_t ttp229_get_interface (ttp229_handle_t *handle, ttp229_interface_t *interface)
 get the interface
uint8_t ttp229_init (ttp229_handle_t *handle)
 initialize the chip
uint8_t ttp229_deinit (ttp229_handle_t *handle)
 close the chip
uint8_t ttp229_set_active (ttp229_handle_t *handle, ttp229_active_t active_level)
 set the active level
uint8_t ttp229_get_active (ttp229_handle_t *handle, ttp229_active_t *active_level)
 get the active level
uint8_t ttp229_read_16_keys (ttp229_handle_t *handle, uint8_t keys[16])
 read 16 keys
uint8_t ttp229_read_8_keys (ttp229_handle_t *handle, uint8_t keys[8])
 read 8 keys
uint8_t ttp229_get_reg (ttp229_handle_t *handle, uint8_t *buf, uint16_t len)
 get the chip register

Detailed Description

driver ttp229 header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2024-07-30

history

Date Version Author Description
2024/07/30 1.0 Shifeng Li first upload

Definition in file driver_ttp229.h.