aboutsummaryrefslogtreecommitdiffstats
path: root/usr/ble_tst/src/experimental.c
diff options
context:
space:
mode:
authorBernhard Guillon <Bernhard.Guillon@begu.org>2024-12-22 20:12:21 +0100
committerBernhard Guillon <Bernhard.Guillon@begu.org>2024-12-22 20:12:21 +0100
commit7754ef7204e873aa33d55ebe5002257e3941e942 (patch)
tree873dc17f83c61f56e452330c2d1d2d0343305f67 /usr/ble_tst/src/experimental.c
downloadwb3s-ble-nebula-galaxy-7754ef7204e873aa33d55ebe5002257e3941e942.tar.gz
wb3s-ble-nebula-galaxy-7754ef7204e873aa33d55ebe5002257e3941e942.zip
Import bk_ble from elektroda forum
https://www.elektroda.com/rtvforum/topic3989434.html\#20742145
Diffstat (limited to 'usr/ble_tst/src/experimental.c')
-rw-r--r--usr/ble_tst/src/experimental.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/usr/ble_tst/src/experimental.c b/usr/ble_tst/src/experimental.c
new file mode 100644
index 0000000..fdc2581
--- /dev/null
+++ b/usr/ble_tst/src/experimental.c
@@ -0,0 +1,62 @@
+
+#include "rwip_config.h"
+#include "rwip.h"
+#include "ble_reg_access.h"
+#include "reg_blecore.h"
+#include "em_map_ble.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_desc.h"
+#include "reg_ble_em_tx_buffer_data.h"
+#include "ecc_p256.h"
+#include "llm.h"
+#include "llm_util.h"
+#include "lld.h"
+#include "lld_evt.h"
+#include "lld_pdu.h"
+#include "lld_util.h"
+#include "RomCallFlash.h"
+#include "em_buf.h"
+#include "ea.h"
+#include "common_utils.h"
+#include "common_hci.h"
+#include "common_llcp.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);
+}