Skip to content

Commit a076486

Browse files
committed
add LlReset
1 parent 715cb70 commit a076486

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Libraries/Cordio/controller/sources/ble/lhci/lhci_cmd_vs.c

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "bb_ble_api.h"
4141
#include "flc.h"
4242
#include "mxc_delay.h"
43+
#include "pal_uart.h"
4344
#include <string.h>
4445

4546
/**************************************************************************************************
@@ -69,7 +70,9 @@
6970
//this is the callback function to the Msg
7071
void device_reset(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
7172
{
73+
/*This delay is necessary here to let UART transfer the status back to hci*/
7274
MXC_Delay(3000);
75+
7376
NVIC_SystemReset();
7477
return;
7578
}
@@ -101,6 +104,7 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
101104

102105

103106
case LHCI_OPCODE_VS_DEVICE_RESET: {
107+
LlReset();
104108
char* pMsg = WsfMsgDataAlloc(1,1);
105109
wsfHandlerId_t handlerId;
106110
handlerId = WsfOsSetNextHandler(device_reset);

0 commit comments

Comments
 (0)