aboutsummaryrefslogtreecommitdiffstats
path: root/usr/space_light/src/experimental.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/experimental.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/experimental.c')
-rw-r--r--usr/space_light/src/experimental.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/usr/space_light/src/experimental.c b/usr/space_light/src/experimental.c
new file mode 100644
index 0000000..6d6ad4a
--- /dev/null
+++ b/usr/space_light/src/experimental.c
@@ -0,0 +1,51 @@
+
+#include "RomCallFlash.h"
+#include "ble_reg_access.h"
+#include "common_hci.h"
+#include "common_llcp.h"
+#include "common_utils.h"
+#include "ea.h"
+#include "ecc_p256.h"
+#include "em_buf.h"
+#include "em_map_ble.h"
+#include "lld.h"
+#include "lld_evt.h"
+#include "lld_pdu.h"
+#include "lld_util.h"
+#include "llm.h"
+#include "llm_util.h"
+#include "reg_ble_em_cs.h"
+#include "reg_ble_em_rx_buffer.h"
+#include "reg_ble_em_rx_desc.h"
+#include "reg_ble_em_tx_buffer_cntl.h"
+#include "reg_ble_em_tx_buffer_data.h"
+#include "reg_ble_em_tx_desc.h"
+#include "reg_blecore.h"
+#include "rwip.h"
+#include "rwip_config.h"
+
+int func1(int);
+int func2(int);
+
+static int (*(farray[2]))(int) = {func1, func2};
+
+struct st {
+ void *str;
+ uint32_t a;
+};
+
+struct st arr[2] = {{"A1", 0}, {"A2", 0}};
+
+int func1(int inp) { return inp * inp; }
+
+int func2(int inp) {
+ uint32_t clk2, clk1;
+
+ clk1 = 2 * inp;
+ clk2 = inp + 1;
+
+ clk1 = CLK_ADD_3(clk1, 3, clk2) & SYNC_TRAIN_TO_MAX;
+ return clk1 + arr[inp].a;
+}
+
+int func3(int i) { return farray[i](11); }