diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/host/layer23/include/osmocom/bb/common/l1ctl.h | 4 | ||||
-rw-r--r-- | src/host/layer23/src/common/l1ctl.c | 9 | ||||
-rw-r--r-- | src/host/layer23/src/ui/ui.c | 3 | ||||
-rw-r--r-- | src/target/firmware/layer1/l23_api.c | 11 |
4 files changed, 22 insertions, 5 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/l1ctl.h b/src/host/layer23/include/osmocom/bb/common/l1ctl.h index d05c64d8..a3406fbc 100644 --- a/src/host/layer23/include/osmocom/bb/common/l1ctl.h +++ b/src/host/layer23/include/osmocom/bb/common/l1ctl.h @@ -77,6 +77,8 @@ int l1ctl_tx_neigh_pm_req(struct osmocom_ms *ms, int num, uint16_t *arfcn); /* Transmit L1CTL_RINGER_REQ */ int l1ctl_tx_ringer_req(struct osmocom_ms *ms, uint8_t volume); -int l1ctl_tx_display_req(struct osmocom_ms *ms, int x, int y, char *text); +int l1ctl_tx_display_req(struct osmocom_ms *ms, uint8_t x, uint8_t y, + uint8_t fg, uint8_t bg, uint8_t font, uint8_t clear, uint8_t flush, + char *text); #endif diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index 3804aae7..66469eaf 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -965,7 +965,9 @@ static int rx_l1_keypad_ind(struct osmocom_ms *ms, struct msgb *msg) } /* Transmit L1CTL_NEIGH_PM_REQ */ -int l1ctl_tx_display_req(struct osmocom_ms *ms, int x, int y, char *text) +int l1ctl_tx_display_req(struct osmocom_ms *ms, uint8_t x, uint8_t y, + uint8_t fg, uint8_t bg, uint8_t font, uint8_t clear, uint8_t flush, + char *text) { struct msgb *msg; struct l1ctl_display_req *dr; @@ -977,6 +979,11 @@ int l1ctl_tx_display_req(struct osmocom_ms *ms, int x, int y, char *text) dr = (struct l1ctl_display_req *) msgb_put(msg, sizeof(*dr)); dr->x = x; dr->y = y; + dr->fg = fg; + dr->bg = bg; + dr->font = font; + dr->clear = clear; + dr->flush = flush; strncpy(dr->text, text, sizeof(dr->text) - 1); return osmo_send_l1(ms, msg); diff --git a/src/host/layer23/src/ui/ui.c b/src/host/layer23/src/ui/ui.c index 5956b233..3e025805 100644 --- a/src/host/layer23/src/ui/ui.c +++ b/src/host/layer23/src/ui/ui.c @@ -106,7 +106,8 @@ int ui_flush(struct ui_inst *ui) // HACK struct gsm_ui *gui = container_of(ui, struct gsm_ui, ui); struct osmocom_ms *ms = container_of(gui, struct osmocom_ms, gui); - l1ctl_tx_display_req(ms, 0, i, ui->buffer + (UI_COLS + 1) * i); + l1ctl_tx_display_req(ms, 0, 8 + i * 8, 0, 0, 0, i == 0, i == UI_ROWS - 1, ui->buffer + (UI_COLS + 1) * i); + printf("%s\n", ui->buffer + (UI_COLS + 1) * i); } ui_telnet_puts(ui, line); } diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c index b186eac1..40d0e584 100644 --- a/src/target/firmware/layer1/l23_api.c +++ b/src/target/firmware/layer1/l23_api.c @@ -674,8 +674,15 @@ static void l1ctl_display_req(struct msgb *msg) struct l1ctl_display_req *dr = (struct l1ctl_display_req *) l1h->data; printf("DISPLAY (%d) %s\n", dr->y, dr->text); -// display_goto_xy(dr->x, dr->y); - display_puts(dr->text); + if (dr->clear) + fb_clear(); + fb_setfg(FB_COLOR_GREEN); + fb_setbg(FB_COLOR_WHITE); + fb_setfont(FB_FONT_C64); + fb_gotoxy(dr->x, dr->y); + fb_putstr(dr->text, 100); + if (dr->flush) + fb_flush(); } static struct llist_head l23_rx_queue = LLIST_HEAD_INIT(l23_rx_queue); |