Firmware enhancements for HSP_RPC_GUI 3.0.1
Fork of HSP_RPC_GUI by
This command can be used to import the project to your local environment
Quote:
mbed import http://mbed.org/users/jbradshaw/code/HSP_RPC_GUI_3_0_1/
This command can be used to compile the code and produce the HSP_RPC_GUI_3_0_1.bin
Quote:
mbed compile -t GCC_ARM -m MAX32620HSP
This link may be used to install the mbed command-line-interface (cli) if needed
Diff: HSP/RpcServer/RpcServer.cpp
- Revision:
- 3:8e9b9f5818aa
- Parent:
- 1:9490836294ea
--- a/HSP/RpcServer/RpcServer.cpp Fri Apr 21 18:10:37 2017 -0500 +++ b/HSP/RpcServer/RpcServer.cpp Tue Apr 25 10:47:10 2017 -0500 @@ -72,6 +72,10 @@ /// and loggin status Device_Logging *MAX30205_1_Logging; +///Defines a timer to detect if a series of binary pages are being transfered via RPC +Timer rpcFlashPagesTransferTimer; +bool rpcFlashPagesTransferTimer_running; + //****************************************************************************** fifo_t *GetUSBIncomingFifo(void) { return &fifo; } @@ -86,6 +90,28 @@ } //****************************************************************************** +bool RPC_IsTransferingFlashPages(void) { + if (rpcFlashPagesTransferTimer_running == true) { + if (rpcFlashPagesTransferTimer.read_ms() < 200) { + return true; + } else { + rpcFlashPagesTransferTimer.stop(); + rpcFlashPagesTransferTimer_running = false; + } + } + return false; +} + +//****************************************************************************** +void RPC_TransferingFlashPages(void) { + if (rpcFlashPagesTransferTimer_running == false) { + rpcFlashPagesTransferTimer.start(); + rpcFlashPagesTransferTimer_running = true; + } + rpcFlashPagesTransferTimer.reset(); +} + +//****************************************************************************** int System_ReadBuildTime(char argStrs[32][32], char replyStrs[32][32]) { // strcpy(replyStrs[0],buildTime); // strcpy(replyStrs[1],"\0"); @@ -127,6 +153,8 @@ MAX30205_0_Logging = new Device_Logging(); MAX30205_1_Logging = new Device_Logging(); + rpcFlashPagesTransferTimer_running = false; + fifo_init(&fifo, fifoBuffer, sizeof(fifoBuffer)); fifo_init(&fifoStreamOut, streamOutBuffer, sizeof(streamOutBuffer) / sizeof(uint32_t));