summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/apps
diff options
context:
space:
mode:
authorHarald Welte2010-03-21 16:45:27 +0100
committerHarald Welte2010-03-21 16:45:27 +0100
commit5dee3dc42a6100ef55ca8c78c74751b60c234f84 (patch)
tree7c27d81d19a5bb06d38292ae9b5b2ddc0c35415a /src/target/firmware/apps
parentL1A/L23 interface (L1CTL) cleanup (diff)
downloadosmocom-5dee3dc42a6100ef55ca8c78c74751b60c234f84.tar.gz
osmocom-5dee3dc42a6100ef55ca8c78c74751b60c234f84.tar.xz
osmocom-5dee3dc42a6100ef55ca8c78c74751b60c234f84.zip
hello_world app: print L1CTL messages as hexdump to console
Diffstat (limited to 'src/target/firmware/apps')
-rw-r--r--src/target/firmware/apps/hello_world/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/target/firmware/apps/hello_world/main.c b/src/target/firmware/apps/hello_world/main.c
index 5eb36af..2a6a65b 100644
--- a/src/target/firmware/apps/hello_world/main.c
+++ b/src/target/firmware/apps/hello_world/main.c
@@ -73,6 +73,17 @@ static void console_rx_cb(uint8_t dlci, struct msgb *msg)
msgb_free(msg);
}
+static void l1a_l23_rx_cb(uint8_t dlci, struct msgb *msg)
+{
+ {
+ int i;
+ puts("l1a_l23_rx_cb: ");
+ for (i = 0; i < msg->len; i++)
+ printf("%02x ", msg->data[i]);
+ puts("\n");
+ }
+}
+
int main(void)
{
board_init();
@@ -104,6 +115,7 @@ int main(void)
display_puts("Hello World");
sercomm_register_rx_cb(SC_DLCI_CONSOLE, console_rx_cb);
+ sercomm_register_rx_cb(SC_DLCI_L1A_L23, l1a_l23_rx_cb);
/* beyond this point we only react to interrupts */
puts("entering interrupt loop\n");