37
37
#include "sl_wifi_types.h"
38
38
#include "sl_rsi_utility.h"
39
39
#include "cmsis_os2.h" // CMSIS RTOS2
40
+ #include "cmsis_types.h"
40
41
#include "sl_si91x_types.h"
41
42
#include "sl_si91x_core_utilities.h"
42
43
#ifdef SLI_SI91X_OFFLOAD_NETWORK_STACK
90
91
/// Task register ID to save firmware status
91
92
#define SLI_FW_STATUS_STORAGE_INVALID_INDEX 0xFF // Invalid index for firmware status storage
92
93
94
+ static uint8_t __aligned (8 ) bus_thread_stack [SL_SI91X_BUS_THREAD_STACK_SIZE ];
95
+ static uint8_t __aligned (8 ) event_handler_stack [SL_SI91X_EVENT_HANDLER_STACK_SIZE ];
96
+
97
+ static struct cmsis_rtos_thread_cb bus_thread_cb ;
98
+ static struct cmsis_rtos_thread_cb event_thread_cb ;
99
+
93
100
/******************************************************
94
101
* Local Type Declarations
95
102
******************************************************/
@@ -1055,10 +1062,10 @@ sl_status_t sl_si91x_platform_init(void)
1055
1062
1056
1063
.name = "si91x_bus" ,
1057
1064
.priority = osPriorityRealtime ,
1058
- .stack_mem = 0 ,
1059
- .stack_size = 1636 ,
1060
- .cb_mem = 0 ,
1061
- .cb_size = 0 ,
1065
+ .stack_mem = bus_thread_stack ,
1066
+ .stack_size = SL_SI91X_BUS_THREAD_STACK_SIZE ,
1067
+ .cb_mem = & bus_thread_cb ,
1068
+ .cb_size = sizeof ( bus_thread_cb ) ,
1062
1069
.attr_bits = 0u ,
1063
1070
.tz_module = 0u ,
1064
1071
};
@@ -1070,10 +1077,10 @@ sl_status_t sl_si91x_platform_init(void)
1070
1077
const osThreadAttr_t attr = {
1071
1078
.name = "si91x_event" ,
1072
1079
.priority = osPriorityRealtime1 ,
1073
- .stack_mem = 0 ,
1080
+ .stack_mem = event_handler_stack ,
1074
1081
.stack_size = SL_SI91X_EVENT_HANDLER_STACK_SIZE ,
1075
- .cb_mem = 0 ,
1076
- .cb_size = 0 ,
1082
+ .cb_mem = & event_thread_cb ,
1083
+ .cb_size = sizeof ( event_thread_cb ) ,
1077
1084
.attr_bits = 0u ,
1078
1085
.tz_module = 0u ,
1079
1086
};
0 commit comments