summaryrefslogtreecommitdiff
path: root/fw
diff options
context:
space:
mode:
Diffstat (limited to 'fw')
-rw-r--r--fw/fe310/eos/eve/eve_text.c10
-rw-r--r--fw/fe310/eos/eve/eve_text.h4
-rwxr-xr-xfw/fe310/test/modembin134292 -> 0 bytes
-rw-r--r--fw/fe310/test/modem.c5
4 files changed, 15 insertions, 4 deletions
diff --git a/fw/fe310/eos/eve/eve_text.c b/fw/fe310/eos/eve/eve_text.c
index 2ad4f6f..9b8dcc0 100644
--- a/fw/fe310/eos/eve/eve_text.c
+++ b/fw/fe310/eos/eve/eve_text.c
@@ -102,7 +102,7 @@ uint8_t eve_text_draw(EVEText *box) {
return box->tag;
}
-int eve_text_putc(EVEText *box, int c) {
+void eve_text_putc(EVEText *box, int c) {
int line_c, line_n;
switch (c) {
@@ -124,7 +124,13 @@ int eve_text_putc(EVEText *box, int c) {
if ((line_c != line_n) && (LINE_IDX_DIFF(line_n, box->line0, box->line_size) == box->h)) scroll1(box);
break;
}
- return EVE_OK;
+}
+
+void eve_text_puts(EVEText *box, char *s) {
+ while (*s) {
+ eve_text_putc(box, *s);
+ s++;
+ }
}
void eve_text_update(EVEText *box) {
diff --git a/fw/fe310/eos/eve/eve_text.h b/fw/fe310/eos/eve/eve_text.h
index 141816c..a76e659 100644
--- a/fw/fe310/eos/eve/eve_text.h
+++ b/fw/fe310/eos/eve/eve_text.h
@@ -22,7 +22,9 @@ typedef struct EVEText {
void eve_text_init(EVEText *box, EVERect *g, uint16_t w, uint16_t h, uint8_t tag, uint16_t line_size, uint32_t mem_addr, uint32_t *mem_next);
int eve_text_touch(EVEText *box, uint8_t tag0, int touch_idx);
uint8_t eve_text_draw(EVEText *box);
-int eve_text_putc(EVEText *box, int c);
+
+void eve_text_putc(EVEText *box, int c);
+void eve_text_puts(EVEText *box, char *s);
void eve_text_update(EVEText *box);
void eve_text_newline(EVEText *box);
void eve_text_backspace(EVEText *box);
diff --git a/fw/fe310/test/modem b/fw/fe310/test/modem
deleted file mode 100755
index e7a3c4a..0000000
--- a/fw/fe310/test/modem
+++ /dev/null
Binary files differ
diff --git a/fw/fe310/test/modem.c b/fw/fe310/test/modem.c
index de6394d..e89112b 100644
--- a/fw/fe310/test/modem.c
+++ b/fw/fe310/test/modem.c
@@ -95,10 +95,13 @@ static void handle_cell_msg(unsigned char _type, unsigned char *buffer, uint16_t
eos_net_send(EOS_NET_MTYPE_CELL, buffer, 1, 0);
eos_uart_rxwm_set(0);
printf("\nREADY.\n");
+ eos_spi_dev_start(EOS_DEV_DISP);
+ eve_text_puts(&box, "READY.\n");
+ eos_spi_dev_stop();
break;
case EOS_CELL_MTYPE_UART_DATA:
- eos_spi_dev_start(EOS_DEV_DISP);
+ eos_spi_dev_start(EOS_DEV_DISP);
for (i=1; i<len; i++) {
if (buffer[i] != '\r') eve_text_putc(&box, buffer[i]);
}