aboutsummaryrefslogtreecommitdiffstats
path: root/usr/space_light/src/stubs/re_stubs.c
diff options
context:
space:
mode:
authorBernhard Guillon <Bernhard.Guillon@begu.org>2024-12-25 00:34:42 +0100
committerBernhard Guillon <Bernhard.Guillon@begu.org>2024-12-29 19:54:53 +0100
commit1762c56956bafd6fc0636516b494dfa935ff8aec (patch)
tree5b693c0c70400b71c982401fd9693a48991d3c23 /usr/space_light/src/stubs/re_stubs.c
parent40404fb81dfad3f5c5cf567bb053796a9135165e (diff)
downloadwb3s-ble-nebula-galaxy-1762c56956bafd6fc0636516b494dfa935ff8aec.tar.gz
wb3s-ble-nebula-galaxy-1762c56956bafd6fc0636516b494dfa935ff8aec.zip
space_light: first version
TODO: pwm initialization is currently best guess could be wrong active low|high TODO: implement pairing TODO: implement timer TODO: use the button for something TODO: implement a better client
Diffstat (limited to 'usr/space_light/src/stubs/re_stubs.c')
-rw-r--r--usr/space_light/src/stubs/re_stubs.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/usr/space_light/src/stubs/re_stubs.c b/usr/space_light/src/stubs/re_stubs.c
new file mode 100644
index 0000000..ca79e2f
--- /dev/null
+++ b/usr/space_light/src/stubs/re_stubs.c
@@ -0,0 +1,51 @@
+#include "include.h"
+
+#include "attm.h"
+#include "gapm.h"
+#include "gattm.h"
+#include "l2cm.h"
+#include "rwble_hl.h"
+
+void rwble_hl_init(void) {
+ bk_printf("BLE stack init: %s\n", __func__);
+ attm_init(0);
+ gapm_init(0);
+ gattm_init(0);
+ l2cm_init(0);
+}
+
+/*
+0003dca0 <rwble_hl_init>:
+ 3dca0: b508 push {r3, lr}
+ 3dca2: 2000 movs r0, #0
+ 3dca4: f7f0 fc86 bl 2e5b4 <attm_init>
+ 3dca8: 2000 movs r0, #0
+ 3dcaa: f7ec fe3d bl 2a928 <gapm_init>
+ 3dcae: 2000 movs r0, #0
+ 3dcb0: f7ef fdda bl 2d868 <gattm_init>
+ 3dcb4: 2000 movs r0, #0
+ 3dcb6: f006 fa3b bl 44130 <l2cm_init>
+ 3dcba: bd08 pop {r3, pc}
+*/
+
+void rwble_hl_reset(void) {
+ bk_printf("BLE stack reset: %s\n", __func__);
+ attm_init(1);
+ gapm_init(1);
+ gattm_init(1);
+ l2cm_init(1);
+}
+
+/*
+0003dcc8 <rwble_hl_reset>:
+ 3dcc8: b508 push {r3, lr}
+ 3dcca: 2001 movs r0, #1
+ 3dccc: f7f0 fc86 bl 2e5dc <attm_init>
+ 3dcd0: 2001 movs r0, #1
+ 3dcd2: f7ec fe3d bl 2a950 <gapm_init>
+ 3dcd6: 2001 movs r0, #1
+ 3dcd8: f7ef fdda bl 2d890 <gattm_init>
+ 3dcdc: 2001 movs r0, #1
+ 3dcde: f006 fa2d bl 4413c <l2cm_init>
+ 3dce2: bd08 pop {r3, pc}
+*/