#include "board.h"
#include "compiler.h"
#include "gpio.h"
#include "cycle_counter.h"
#include "conf_qt60168.h"
#include "qt60168.h"
#include "spi.h"
Macros | |
#define | _QT60168_C_ |
QT60168 Config | |
#define | QT60168_NTHR 0x06 |
#define | QT60168_NDRIFT 0x0F |
#define | QT60168_NDIL 0x01 |
#define | QT60168_FDIL 0x05 |
#define | QT60168_NRD 0x14 |
#define | QT60168_BL 0x01 |
#define | QT60168_AKS 0x01 |
#define | QT60168_SSYNC 0x00 |
#define | QT60168_MSYNC 0x00 |
#define | QT60168_BS 0x01 |
#define | QT60168_LSL 0x0064 |
#define | QT60168_EEPROM_CRC 0x0A |
Functions | |
static int | qt60168_check_device_ready (void) |
void | qt60168_get_reply (unsigned short *data) |
Get the QT60168 reply. More... | |
void | qt60168_init (U32 cpu_hz) |
Initialize the QT60168 component. More... | |
bool | qt60168_is_key_pressed (U8 key_id) |
Test if no keys are pressed. More... | |
bool | qt60168_is_no_key_pressed (void) |
Test if no keys are pressed. More... | |
int | qt60168_report_all_key (void) |
Report all key status. More... | |
void | qt60168_send_cmd (unsigned char cmd) |
Send a command to the QT60168. More... | |
static void | qt60168_setup (void) |
Init the QT60168 blocks. More... | |
void | qt60168_wait_cmd_received (void) |
Wait for command reception. More... | |
Variables | |
U32 | g_cpu_hz |
#define _QT60168_C_ |
#define QT60168_AKS 0x01 |
#define QT60168_BL 0x01 |
#define QT60168_BS 0x01 |
#define QT60168_EEPROM_CRC 0x0A |
#define QT60168_FDIL 0x05 |
#define QT60168_LSL 0x0064 |
#define QT60168_MSYNC 0x00 |
#define QT60168_NDIL 0x01 |
#define QT60168_NDRIFT 0x0F |
#define QT60168_NRD 0x14 |
#define QT60168_NTHR 0x06 |
#define QT60168_SSYNC 0x00 |
|
static |
References cpu_delay_cy(), cpu_us_2_cy(), g_cpu_hz, gpio_enable_gpio_pin(), gpio_enable_module(), and gpio_get_pin_value().
Referenced by qt60168_wait_cmd_received().
|
static |
Init the QT60168 blocks.
References i, QT60168_CMD_ENTER_SETUPS_MODE, qt60168_get_reply(), QT60168_MAX_NUMBER_OF_KEYS, QT60168_REPLY_ENTER_SETUPS_MODE, and qt60168_send_cmd().
Referenced by qt60168_init().
void qt60168_wait_cmd_received | ( | void | ) |
Wait for command reception.
References cpu_delay_cy(), cpu_us_2_cy(), g_cpu_hz, and qt60168_check_device_ready().
Referenced by qt60168_get_reply(), and qt60168_send_cmd().
U32 g_cpu_hz |
Referenced by qt60168_check_device_ready(), qt60168_init(), and qt60168_wait_cmd_received().