diff options
| author | Bernhard Guillon <Bernhard.Guillon@begu.org> | 2024-12-25 00:34:42 +0100 |
|---|---|---|
| committer | Bernhard Guillon <Bernhard.Guillon@begu.org> | 2024-12-29 19:54:53 +0100 |
| commit | 1762c56956bafd6fc0636516b494dfa935ff8aec (patch) | |
| tree | 5b693c0c70400b71c982401fd9693a48991d3c23 /usr/space_light/src/stubs/other_stubs.c | |
| parent | 40404fb81dfad3f5c5cf567bb053796a9135165e (diff) | |
| download | wb3s-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/other_stubs.c')
| -rw-r--r-- | usr/space_light/src/stubs/other_stubs.c | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/usr/space_light/src/stubs/other_stubs.c b/usr/space_light/src/stubs/other_stubs.c new file mode 100644 index 0000000..f224183 --- /dev/null +++ b/usr/space_light/src/stubs/other_stubs.c @@ -0,0 +1,107 @@ +#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 "app.h" +#include "include.h" +#include "mem_pub.h" +#include "rwnx_config.h" + +#if (NX_POWERSAVE) +#include "ps.h" +#endif //(NX_POWERSAVE) + +#include "main_none.h" +#include "sa_ap.h" +#include "sa_station.h" +#include "sm.h" +#include "uart_pub.h" + +#include "hostapd_intf_pub.h" +#include "lwip/pbuf.h" +#include "mcu_ps_pub.h" +#include "param_config.h" +#include "power_save_pub.h" +#include "ps_debug_pub.h" +#include "rtos_error.h" +#include "rtos_pub.h" +#include "rw_msdu.h" +#include "rw_msg_rx.h" +#include "rw_pub.h" +#include "rxl_cntrl.h" +#include "txu_cntrl.h" +#include "wlan_ui_pub.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"); + } +} |
