Skip to content

Commit

Permalink
Fix data dropping occurring during re-init
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-rabault committed Apr 18, 2023
1 parent 55db06e commit f0a2b39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion engine/IO/src/msg_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,17 @@ _CRITICAL static inline void MsgAlloc_FindNewOldestMsg(void);
void MsgAlloc_Init(memory_stats_t *memory_stats)
{
//******** Init global vars pointers **********
data_ptr = (uint8_t *)&msg_buffer[0];
msg_tasks_stack_id = 0;
memset((void *)msg_tasks, 0, sizeof(msg_tasks));
luos_tasks_stack_id = 0;
memset((void *)luos_tasks, 0, sizeof(luos_tasks));
tx_tasks_stack_id = 0;
memset((void *)tx_tasks, 0, sizeof(tx_tasks));
LuosHAL_SetIrqState(false);
data_ptr = (uint8_t *)&msg_buffer[0];
used_msg = NULL;
oldest_msg = (msg_t *)INT_MAX;
LuosHAL_SetIrqState(true);
if (memory_stats != NULL)
{
mem_stat = memory_stats;
Expand Down
1 change: 0 additions & 1 deletion engine/core/inc/struct_luos.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ typedef enum
BOOTLOADER_CMD,
BOOTLOADER_RESP,


// compatibility area
// LUOS_LAST_RESERVED_CMD = 42
} reserved_luos_cmd_t;
Expand Down

0 comments on commit f0a2b39

Please sign in to comment.