projects
/
osmocom-bb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bee6315
)
hello_world app: print L1CTL messages as hexdump to console
author
Harald Welte
<laforge@gnumonks.org>
Sun, 21 Mar 2010 15:45:27 +0000
(23:45 +0800)
committer
Harald Welte
<laforge@gnumonks.org>
Sun, 21 Mar 2010 15:45:27 +0000
(23:45 +0800)
src/target/firmware/apps/hello_world/main.c
patch
|
blob
|
history
diff --git
a/src/target/firmware/apps/hello_world/main.c
b/src/target/firmware/apps/hello_world/main.c
index
5eb36af
..
2a6a65b
100644
(file)
--- 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");