aboutsummaryrefslogtreecommitdiffstats
path: root/usr/ble_tst/src/stubs/other_stubs.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/stubs/other_stubs.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/stubs/other_stubs.c')
-rw-r--r--usr/ble_tst/src/stubs/other_stubs.c132
1 files changed, 132 insertions, 0 deletions
diff --git a/usr/ble_tst/src/stubs/other_stubs.c b/usr/ble_tst/src/stubs/other_stubs.c
new file mode 100644
index 0000000..3d79d13
--- /dev/null
+++ b/usr/ble_tst/src/stubs/other_stubs.c
@@ -0,0 +1,132 @@
+#include "rw_pub.h"
+
+unsigned char mhdr_get_station_status(){
+ return RW_EVT_STA_IDLE;
+}
+
+#include "td.h"
+void td_pck_ps_ind(uint8_t vif_index, bool rx){
+};
+
+void td_timer_end(void *env){
+};
+
+struct td_env_tag td_env[NX_VIRT_DEV_MAX] = {{{{0}}}};
+
+#include "vif_mgmt.h"
+
+struct vif_info_tag vif_info_tab[NX_VIRT_DEV_MAX] = {{{0}}};
+struct vif_mgmt_env_tag vif_mgmt_env = {{0}};
+
+void rwnx_printf( char *fmt, ...) {
+
+}
+
+#include "rwnx.h"
+bool rwnxl_sleep(IDLE_FUNC wait_func,IDLE_FUNC do_func) {
+ return true;
+};
+
+void rwnxl_wakeup(IDLE_FUNC wait_func){
+};
+
+bool rwnxl_get_status_in_doze(void){
+ return true;
+};
+
+void tpc_init(void){
+};
+
+void tpc_deinit(void){
+};
+
+#include "chan.h"
+bool chan_is_on_channel(struct vif_info_tag *vif_entry){
+ return false;
+}
+
+#include "mm_timer.h"
+void mm_timer_set(struct mm_timer_tag *timer, uint32_t value){
+};
+
+
+//from app_bk.c
+#include "include.h"
+#include "mem_pub.h"
+#include "rwnx_config.h"
+#include "app.h"
+
+#if (NX_POWERSAVE)
+#include "ps.h"
+#endif //(NX_POWERSAVE)
+
+#include "sa_ap.h"
+#include "sa_station.h"
+#include "main_none.h"
+#include "sm.h"
+#include "uart_pub.h"
+
+#include "rtos_pub.h"
+#include "rtos_error.h"
+#include "param_config.h"
+#include "rxl_cntrl.h"
+#include "lwip/pbuf.h"
+#include "rw_pub.h"
+#include "rw_msg_rx.h"
+#include "hostapd_intf_pub.h"
+#include "wlan_ui_pub.h"
+#include "ps_debug_pub.h"
+#include "power_save_pub.h"
+#include "mcu_ps_pub.h"
+#include "rw_msdu.h"
+#include "txu_cntrl.h"
+
+#include "app_music_pub.h"
+#include "bk7011_cal_pub.h"
+
+WIFI_CORE_T g_wifi_core = {0};
+
+void bmsg_null_sender(void)
+{
+ OSStatus ret;
+ BUS_MSG_T msg;
+
+ msg.type = BMSG_NULL_TYPE;
+ msg.arg = 0;
+ msg.len = 0;
+ msg.sema = NULL;
+
+ if(!rtos_is_queue_empty(&g_wifi_core.io_queue))
+ {
+ return;
+ }
+
+ ret = rtos_push_to_queue(&g_wifi_core.io_queue, &msg, BEKEN_NO_WAIT);
+ if(kNoErr != ret)
+ {
+ os_printf("bmsg_null_sender_failed\r\n");
+ }
+}
+
+void bmsg_ps_sender(uint8_t arg)
+{
+ OSStatus ret;
+ BUS_MSG_T msg;
+ if(g_wifi_core.io_queue)
+ {
+ msg.type = BMSG_STA_PS_TYPE;
+ msg.arg = (uint32_t)arg;
+ msg.len = 0;
+ msg.sema = NULL;
+
+ ret = rtos_push_to_queue(&g_wifi_core.io_queue, &msg, BEKEN_NO_WAIT);
+ if(kNoErr != ret)
+ {
+ os_printf("bmsg_ps_sender failed\r\n");
+ }
+ }
+ else
+ {
+ os_printf("g_wifi_core.io_queue null\r\n");
+ }
+}