[Core] Introduce pointing device specific debug messages (#17663)
This commit is contained in:
parent
d910e8df77
commit
e99ec28f5f
9 changed files with 50 additions and 59 deletions
|
@ -1,8 +1,6 @@
|
|||
// Copyright (c) 2018 Cirque Corp. Restrictions apply. See: www.cirque.com/sw-license
|
||||
#include "cirque_pinnacle.h"
|
||||
#include "i2c_master.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "stdio.h"
|
||||
|
||||
// Masks for Cirque Register Access Protocol (RAP)
|
||||
|
@ -18,9 +16,7 @@ void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
|
|||
if (touchpad_init) {
|
||||
i2c_writeReg(CIRQUE_PINNACLE_ADDR << 1, cmdByte, NULL, 0, CIRQUE_PINNACLE_TIMEOUT);
|
||||
if (i2c_readReg(CIRQUE_PINNACLE_ADDR << 1, cmdByte, data, count, CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) {
|
||||
#ifdef CONSOLE_ENABLE
|
||||
dprintf("error cirque_pinnacle i2c_readReg\n");
|
||||
#endif
|
||||
pd_dprintf("error cirque_pinnacle i2c_readReg\n");
|
||||
touchpad_init = false;
|
||||
}
|
||||
i2c_stop();
|
||||
|
@ -33,9 +29,7 @@ void RAP_Write(uint8_t address, uint8_t data) {
|
|||
|
||||
if (touchpad_init) {
|
||||
if (i2c_writeReg(CIRQUE_PINNACLE_ADDR << 1, cmdByte, &data, sizeof(data), CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) {
|
||||
#ifdef CONSOLE_ENABLE
|
||||
dprintf("error cirque_pinnacle i2c_writeReg\n");
|
||||
#endif
|
||||
pd_dprintf("error cirque_pinnacle i2c_writeReg\n");
|
||||
touchpad_init = false;
|
||||
}
|
||||
i2c_stop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue