summaryrefslogtreecommitdiff
path: root/fw/fe310/test/test.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-09-04 18:39:21 +0200
committerUros Majstorovic <majstor@majstor.org>2022-09-04 18:39:21 +0200
commitd894eb01e9c979d0eb51f9495a7cf7281c213302 (patch)
tree9849af7b4c62cc22e61ff7e51c0169674d073986 /fw/fe310/test/test.c
parentfc98d3809e0db36d634f290417b9152f87f83e3e (diff)
removed old test
Diffstat (limited to 'fw/fe310/test/test.c')
-rw-r--r--fw/fe310/test/test.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/fw/fe310/test/test.c b/fw/fe310/test/test.c
deleted file mode 100644
index fc080d2..0000000
--- a/fw/fe310/test/test.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <eos.h>
-
-#include <soc/i2c.h>
-#include <dev/bq25895.h>
-#include <eve/eve.h>
-#include <eve/eve_kbd.h>
-#include <eve/eve_font.h>
-
-#include <eve/screen/window.h>
-#include <eve/screen/page.h>
-#include <eve/screen/form.h>
-
-#include "app/app_root.h"
-
-#include "test.h"
-
-static int reg_read(uint8_t reg, uint8_t *data) {
- return eos_i2c_read8(BQ25895_ADDR, reg, data, 1);
-}
-
-static int reg_write(uint8_t reg, uint8_t data) {
- return eos_i2c_write8(BQ25895_ADDR, reg, &data, 1);
-}
-
-int app_test_uievt(EVEForm *form, uint16_t evt, void *param) {
- uint8_t data = 0;
- int rv, ret = 0, i;
-
- switch (evt) {
- case EVE_UIEVT_GEST_TOUCH:
- printf("PAGE TOUCH\n");
- printf("BQ25895:\n");
- for (i=0; i<0x15; i++) {
- rv = reg_read(i, &data);
- if (!rv) printf("REG%02x: %02x\n", i, data);
- }
- break;
-
- default:
- ret = eve_form_uievt(form, evt, param);
- break;
- }
- return ret;
-}
-
-void app_test(EVEWindow *window, EVEViewStack *stack) {
- EVEFormSpec spec[] = {
- {
- .widget.type = EVE_WIDGET_TYPE_SPACER,
- .widget.g.h = 1,
- },
- };
- EVEForm *form = eve_form_create(window, stack, spec, 1, app_test_uievt, NULL, app_test_close);
-}
-
-void app_test_close(EVEForm *form) {
- eve_form_destroy(form);
-}