summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/drv/gt911.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/dev/drv/gt911.c')
-rw-r--r--fw/fe310/eos/dev/drv/gt911.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fw/fe310/eos/dev/drv/gt911.c b/fw/fe310/eos/dev/drv/gt911.c
index cd71d9a..8eb4358 100644
--- a/fw/fe310/eos/dev/drv/gt911.c
+++ b/fw/fe310/eos/dev/drv/gt911.c
@@ -124,6 +124,10 @@ void gt911_wake(void) {
drv_gpio_set(GPIO_INPUT_EN, GT911_PIN_INT);
}
+int gt911_running(void) {
+ return drv_gpio_get(GPIO_INPUT_EN, GT911_PIN_INT);
+}
+
int gt911_cfg_read(uint8_t *cfg_buf) {
int rv;
@@ -148,20 +152,20 @@ int gt911_cfg_print(void) {
rv = gt911_cfg_read(cfg_buf);
if (rv) return rv;
- printf("GT911 CFG:\n");
+ DRV_LOG(DRV_LOG_INFO, "GT911 CFG:\n");
for (i=0; i<GT911_SIZE_CFG-2; i++) {
- printf("%.2X", cfg_buf[i]);
+ DRV_LOG(DRV_LOG_INFO, "%.2X", cfg_buf[i]);
if (i % 8 == 7) {
- printf("\n");
+ DRV_LOG(DRV_LOG_INFO, "\n");
} else {
- printf(" ");
+ DRV_LOG(DRV_LOG_INFO, " ");
}
}
rv = gt911_fw_ver(cfg_buf);
if (rv) return rv;
- printf("GT911 FW VER:%.2X%.2X\n", cfg_buf[1], cfg_buf[0]);
+ DRV_LOG(DRV_LOG_INFO, "GT911 FW VER:%.2X%.2X\n", cfg_buf[1], cfg_buf[0]);
return DRV_OK;
}