MAX30001-MAX32630FTHR SYS EvKit
Dependencies: USBDevice max32630fthr
RpcDeclarations.h
00001 /******************************************************************************* 00002 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a 00005 * copy of this software and associated documentation files (the "Software"), 00006 * to deal in the Software without restriction, including without limitation 00007 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00008 * and/or sell copies of the Software, and to permit persons to whom the 00009 * Software is furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included 00012 * in all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00015 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00016 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00017 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES 00018 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00019 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00020 * OTHER DEALINGS IN THE SOFTWARE. 00021 * 00022 * Except as contained in this notice, the name of Maxim Integrated 00023 * Products, Inc. shall not be used except as stated in the Maxim Integrated 00024 * Products, Inc. Branding Policy. 00025 * 00026 * The mere transfer of this software does not imply any licenses 00027 * of trade secrets, proprietary technology, copyrights, patents, 00028 * trademarks, maskwork rights, or any other form of intellectual 00029 * property whatsoever. Maxim Integrated Products, Inc. retains all 00030 * ownership rights. 00031 ******************************************************************************* 00032 */ 00033 #ifndef _RPCDECLARATIONS_H_ 00034 #define _RPCDECLARATIONS_H_ 00035 00036 /// define the parts of a RPC. ObjectName, MethodName and function 00037 struct RPC_registeredProcedure { 00038 const char *objectName; 00039 const char *methodName; 00040 //enum eArgType argTypes[4]; 00041 int (*func)(char args[32][32], char results[32][32]); 00042 struct RPC_registeredProcedure *next; 00043 }; 00044 00045 /// used to keep track of the head of the list and the end of a list 00046 struct RPC_Object { 00047 struct RPC_registeredProcedure *head; 00048 struct RPC_registeredProcedure *last; 00049 }; 00050 00051 //example /I2c/WriteRead 1 A0 3 11 22 33 2 00052 #define System_NAME "System" 00053 00054 /** 00055 * @brief /System/ReadVer 00056 * @details Returns the version string of the FW that is currently running 00057 * @details Example: /System/ReadVer 00058 * @details The command returns a version string similar to this: "HSP FW Version 2.0.1f 8/23/16" 00059 */ 00060 struct RPC_registeredProcedure Define_System_ReadVer = { System_NAME, "ReadVer", System_ReadVer }; 00061 /** 00062 * @brief /System/ReadBuildTime 00063 * @details Returns the build string of the FW that is currently running, this is the time and date that the firmware was built 00064 * @details Example: /System/ReadBuildTime 00065 * @details The command returns a build string similar to this: "Build Time: Fri Jul 1 15:48:31 2016" 00066 */ 00067 struct RPC_registeredProcedure Define_System_ReadBuildTime = { System_NAME, "ReadBuildTime", System_ReadBuildTime }; 00068 00069 #define MAX30001_NAME "MAX30001" 00070 #define MAX30003_NAME "MAX30003" 00071 00072 #define MAX31725_NAME "MAX31725" 00073 #define MAX30205_NAME "MAX30205" 00074 00075 /** 00076 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00077 * @details This function sets up for the SpO2 mode. 00078 * @param fifo_waterlevel_mark 00079 * @param sample_avg 00080 * @param sample_rate 00081 * @param pulse_width 00082 * @param red_led_current 00083 * @param ir_led_current 00084 */ 00085 struct RPC_registeredProcedure Define_MAX30001_WriteReg = { MAX30001_NAME, "WriteReg", MAX30001_WriteReg }; 00086 /** 00087 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00088 * @details This function sets up for the SpO2 mode. 00089 * @param fifo_waterlevel_mark 00090 * @param sample_avg 00091 * @param sample_rate 00092 * @param pulse_width 00093 * @param red_led_current 00094 * @param ir_led_current 00095 */ 00096 struct RPC_registeredProcedure Define_MAX30001_ReadReg = { MAX30001_NAME, "ReadReg", MAX30001_ReadReg }; 00097 /** 00098 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00099 * @details This function sets up for the SpO2 mode. 00100 * @param fifo_waterlevel_mark 00101 * @param sample_avg 00102 * @param sample_rate 00103 * @param pulse_width 00104 * @param red_led_current 00105 * @param ir_led_current 00106 */ 00107 struct RPC_registeredProcedure Define_MAX30001_Start = { MAX30001_NAME, "Start", MAX30001_Start }; 00108 /** 00109 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00110 * @details This function sets up for the SpO2 mode. 00111 * @param fifo_waterlevel_mark 00112 * @param sample_avg 00113 * @param sample_rate 00114 * @param pulse_width 00115 * @param red_led_current 00116 * @param ir_led_current 00117 */ 00118 struct RPC_registeredProcedure Define_MAX30001_Stop = { MAX30001_NAME, "Stop", MAX30001_Stop }; 00119 /** 00120 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00121 * @details This function sets up for the SpO2 mode. 00122 * @param fifo_waterlevel_mark 00123 * @param sample_avg 00124 * @param sample_rate 00125 * @param pulse_width 00126 * @param red_led_current 00127 * @param ir_led_current 00128 */ 00129 struct RPC_registeredProcedure Define_MAX30001_Rbias_FMSTR_Init = { MAX30001_NAME, "Rbias_FMSTR_Init", MAX30001_Rbias_FMSTR_Init }; 00130 /** 00131 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00132 * @details This function sets up for the SpO2 mode. 00133 * @param fifo_waterlevel_mark 00134 * @param sample_avg 00135 * @param sample_rate 00136 * @param pulse_width 00137 * @param red_led_current 00138 * @param ir_led_current 00139 */ 00140 struct RPC_registeredProcedure Define_MAX30001_CAL_InitStart = { MAX30001_NAME, "CAL_InitStart", MAX30001_CAL_InitStart }; 00141 /** 00142 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00143 * @details This function sets up for the SpO2 mode. 00144 * @param fifo_waterlevel_mark 00145 * @param sample_avg 00146 * @param sample_rate 00147 * @param pulse_width 00148 * @param red_led_current 00149 * @param ir_led_current 00150 */ 00151 struct RPC_registeredProcedure Define_MAX30001_ECG_InitStart = { MAX30001_NAME, "ECG_InitStart", MAX30001_ECG_InitStart }; 00152 /** 00153 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00154 * @details This function sets up for the SpO2 mode. 00155 * @param fifo_waterlevel_mark 00156 * @param sample_avg 00157 * @param sample_rate 00158 * @param pulse_width 00159 * @param red_led_current 00160 * @param ir_led_current 00161 */ 00162 struct RPC_registeredProcedure Define_MAX30001_ECGFast_Init = { MAX30001_NAME, "ECGFast_Init", MAX30001_ECGFast_Init }; 00163 /** 00164 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00165 * @details This function sets up for the SpO2 mode. 00166 * @param fifo_waterlevel_mark 00167 * @param sample_avg 00168 * @param sample_rate 00169 * @param pulse_width 00170 * @param red_led_current 00171 * @param ir_led_current 00172 */ 00173 struct RPC_registeredProcedure Define_MAX30001_PACE_InitStart = { MAX30001_NAME, "PACE_InitStart", MAX30001_PACE_InitStart }; 00174 /** 00175 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00176 * @details This function sets up for the SpO2 mode. 00177 * @param fifo_waterlevel_mark 00178 * @param sample_avg 00179 * @param sample_rate 00180 * @param pulse_width 00181 * @param red_led_current 00182 * @param ir_led_current 00183 */ 00184 struct RPC_registeredProcedure Define_MAX30001_BIOZ_InitStart = { MAX30001_NAME, "BIOZ_InitStart", MAX30001_BIOZ_InitStart }; 00185 /** 00186 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00187 * @details This function sets up for the SpO2 mode. 00188 * @param fifo_waterlevel_mark 00189 * @param sample_avg 00190 * @param sample_rate 00191 * @param pulse_width 00192 * @param red_led_current 00193 * @param ir_led_current 00194 */ 00195 struct RPC_registeredProcedure Define_MAX30001_RtoR_InitStart = { MAX30001_NAME, "RtoR_InitStart", MAX30001_RtoR_InitStart }; 00196 /** 00197 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00198 * @details This function sets up for the SpO2 mode. 00199 * @param fifo_waterlevel_mark 00200 * @param sample_avg 00201 * @param sample_rate 00202 * @param pulse_width 00203 * @param red_led_current 00204 * @param ir_led_current 00205 */ 00206 struct RPC_registeredProcedure Define_MAX30001_Stop_ECG = { MAX30001_NAME, "Stop_ECG", MAX30001_Stop_ECG }; 00207 /** 00208 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00209 * @details This function sets up for the SpO2 mode. 00210 * @param fifo_waterlevel_mark 00211 * @param sample_avg 00212 * @param sample_rate 00213 * @param pulse_width 00214 * @param red_led_current 00215 * @param ir_led_current 00216 */ 00217 struct RPC_registeredProcedure Define_MAX30001_Stop_PACE = { MAX30001_NAME, "Stop_PACE", MAX30001_Stop_PACE }; 00218 /** 00219 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00220 * @details This function sets up for the SpO2 mode. 00221 * @param fifo_waterlevel_mark 00222 * @param sample_avg 00223 * @param sample_rate 00224 * @param pulse_width 00225 * @param red_led_current 00226 * @param ir_led_current 00227 */ 00228 struct RPC_registeredProcedure Define_MAX30001_Stop_BIOZ = { MAX30001_NAME, "Stop_BIOZ", MAX30001_Stop_BIOZ }; 00229 /** 00230 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00231 * @details This function sets up for the SpO2 mode. 00232 * @param fifo_waterlevel_mark 00233 * @param sample_avg 00234 * @param sample_rate 00235 * @param pulse_width 00236 * @param red_led_current 00237 * @param ir_led_current 00238 */ 00239 struct RPC_registeredProcedure Define_MAX30001_Stop_RtoR = { MAX30001_NAME, "Stop_RtoR", MAX30001_Stop_RtoR }; 00240 /** 00241 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00242 * @details This function sets up for the SpO2 mode. 00243 * @param fifo_waterlevel_mark 00244 * @param sample_avg 00245 * @param sample_rate 00246 * @param pulse_width 00247 * @param red_led_current 00248 * @param ir_led_current 00249 */ 00250 struct RPC_registeredProcedure Define_MAX30001_Stop_Cal = { MAX30001_NAME, "Stop_Cal", MAX30001_Stop_Cal }; 00251 /** 00252 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00253 * @details This function sets up for the SpO2 mode. 00254 * @param fifo_waterlevel_mark 00255 * @param sample_avg 00256 * @param sample_rate 00257 * @param pulse_width 00258 * @param red_led_current 00259 * @param ir_led_current 00260 */ 00261 struct RPC_registeredProcedure Define_MAX30001_Enable_ECG_LeadON = { MAX30001_NAME, "Enable_ECG_LeadON", MAX30001_Enable_ECG_LeadON }; 00262 /** 00263 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00264 * @details This function sets up for the SpO2 mode. 00265 * @param fifo_waterlevel_mark 00266 * @param sample_avg 00267 * @param sample_rate 00268 * @param pulse_width 00269 * @param red_led_current 00270 * @param ir_led_current 00271 */ 00272 struct RPC_registeredProcedure Define_MAX30001_Enable_BIOZ_LeadON = { MAX30001_NAME, "Enable_BIOZ_LeadON", MAX30001_Enable_BIOZ_LeadON }; 00273 /** 00274 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00275 * @details This function sets up for the SpO2 mode. 00276 * @param fifo_waterlevel_mark 00277 * @param sample_avg 00278 * @param sample_rate 00279 * @param pulse_width 00280 * @param red_led_current 00281 * @param ir_led_current 00282 */ 00283 struct RPC_registeredProcedure Define_MAX30001_Read_LeadON = { MAX30001_NAME, "Read_LeadON", MAX30001_Read_LeadON }; 00284 /** 00285 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00286 * @details This function sets up for the SpO2 mode. 00287 * @param fifo_waterlevel_mark 00288 * @param sample_avg 00289 * @param sample_rate 00290 * @param pulse_width 00291 * @param red_led_current 00292 * @param ir_led_current 00293 */ 00294 struct RPC_registeredProcedure Define_MAX30001_StartTest = { MAX30001_NAME, "StartTest", MAX30001_StartTest }; 00295 /** 00296 * @brief /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current 00297 * @details This function sets up for the SpO2 mode. 00298 * @param fifo_waterlevel_mark 00299 * @param sample_avg 00300 * @param sample_rate 00301 * @param pulse_width 00302 * @param red_led_current 00303 * @param ir_led_current 00304 */ 00305 struct RPC_registeredProcedure Define_MAX30001_INT_assignment = { MAX30001_NAME, "INT_assignment", MAX30001_INT_assignment }; 00306 00307 #define LOGGING_NAME "Logging" 00308 /** 00309 * @brief /Logging/StartMissionDefine 00310 * @details A command to send when you are starting to define a mission 00311 */ 00312 struct RPC_registeredProcedure Define_Logging_StartMissionDefine = { LOGGING_NAME, "StartMissionDefine", Logging_RPC_StartMissionDefine }; 00313 /** 00314 * @brief /Logging/AppendMissionCmd missionString 00315 * @details Specify a RPC command that is part of a mission 00316 */ 00317 struct RPC_registeredProcedure Define_Logging_AppendMissionCmd = { LOGGING_NAME, "AppendMissionCmd", Logging_RPC_AppendMissionCmd }; 00318 /** 00319 * @brief /Logging/EndMissionDefine 00320 * @details RPC command that indicated the end of defining a mission 00321 */ 00322 struct RPC_registeredProcedure Define_Logging_EndMissionDefine = { LOGGING_NAME, "EndMissionDefine", Logging_RPC_EndMissionDefine }; 00323 /** 00324 * @brief /Logging/WriteMission 00325 * @details Write the described mission to flash 00326 */ 00327 struct RPC_registeredProcedure Define_Logging_WriteMission = { LOGGING_NAME, "WriteMission", Logging_RPC_WriteMission }; 00328 /** 00329 * @brief /Logging/ReadMission 00330 * @details Read the mission from flash 00331 */ 00332 struct RPC_registeredProcedure Define_Logging_ReadMission = { LOGGING_NAME, "ReadMission", Logging_RPC_ReadMission }; 00333 /** 00334 * @brief /Logging/EraseMission 00335 * @details Erase the mission in flash 00336 */ 00337 struct RPC_registeredProcedure Define_Logging_EraseMission = { LOGGING_NAME, "EraseMission", Logging_RPC_EraseMission }; 00338 /** 00339 * @brief /Logging/EraseWrittenSectors 00340 * @details Erase the datalog in flash, this erases all of the datalog that has been written to the flash 00341 */ 00342 struct RPC_registeredProcedure Define_Logging_EraseWrittenSectors = { LOGGING_NAME, "EraseWrittenSectors", Logging_EraseWrittenSectors }; 00343 /** 00344 * @brief /Logging/StartLoggingUsb 00345 * @details Start streaming data through USB 00346 */ 00347 struct RPC_registeredProcedure Define_Logging_StartLoggingUsb = { LOGGING_NAME, "StartLoggingUsb", Logging_StartLoggingUsb }; 00348 /** 00349 * @brief /Logging/StartLoggingFlash 00350 * @details Start logging data to flash 00351 */ 00352 struct RPC_registeredProcedure Define_Logging_StartLoggingFlash = { LOGGING_NAME, "StartLoggingFlash", Logging_StartLoggingFlash }; 00353 /** 00354 * @brief /Logging/GetLastWrittenPage 00355 * @details Returns the last page that has been written to flash, this call searchs until it finds an empty flash page 00356 */ 00357 struct RPC_registeredProcedure Define_Logging_GetLastWrittenPage = { LOGGING_NAME, "GetLastWrittenPage", Logging_GetLastWrittenPage }; 00358 /** 00359 * @brief /Logging/Start 00360 * @details Starts a datalogging session into flash, allows the ability to start datalogging via RPC call 00361 */ 00362 struct RPC_registeredProcedure Define_Logging_Start = { LOGGING_NAME, "Start", Logging_Start }; 00363 00364 #define LED_NAME "Led" 00365 /** 00366 * @brief /Led/On 00367 * @details Turn on the HSP onboard LED 00368 */ 00369 struct RPC_registeredProcedure Define_Led_On = { LED_NAME, "On", Led_On }; 00370 /** 00371 * @brief /Led/Off 00372 * @details Turn off the HSP onboard LED 00373 */ 00374 struct RPC_registeredProcedure Define_Led_Off = { LED_NAME, "Off", Led_Off }; 00375 /** 00376 * @brief /Led/Blink mS 00377 * @details Start blinking the HSP onboard LED 00378 * @param mS Blink using a mS period 00379 */ 00380 struct RPC_registeredProcedure Define_Led_BlinkHz = { LED_NAME, "Blink", Led_BlinkHz }; 00381 /** 00382 * @brief /Led/Pattern pattern 00383 * @details Rotate a 32-bit pattern through the LED so that specific blink patterns can be obtained 00384 * @param pattern A 32-bit pattern to rotate through 00385 */ 00386 struct RPC_registeredProcedure Define_Led_BlinkPattern = { LED_NAME, "Pattern", Led_BlinkPattern }; 00387 00388 #define S25FS512_NAME "S25FS512" 00389 #define SDCARD_NAME "SDCard" 00390 /** 00391 * @brief /S25FS512/ReadId 00392 * @details Rotate a 32-bit pattern through the LED so that specific blink patterns can be obtained 00393 * @param pattern A 32-bit pattern to rotate through 00394 */ 00395 struct RPC_registeredProcedure Define_S25FS512_ReadId = { S25FS512_NAME, "ReadId", S25FS512_ReadId }; 00396 /** 00397 * @brief /S25FS512/ReadPagesBinary startPage endPage 00398 * @details Read a page from flash, return the data in binary (non-ascii) 00399 * @param startPage The Starting page to read from 00400 * @param endPage The last page to read from 00401 */ 00402 struct RPC_registeredProcedure Define_S25FS512_ReadPagesBinary = { S25FS512_NAME, "ReadPagesBinary", S25FS512_ReadPagesBinary }; 00403 /** 00404 * @brief /S25FS512/Reset 00405 * @details Issue a soft reset to the flash device 00406 */ 00407 struct RPC_registeredProcedure Define_S25FS512_Reset = { S25FS512_NAME, "Reset", S25FS512_Reset }; 00408 /** 00409 * @brief /S25FS512/EnableHWReset 00410 * @details Enable HW resets to the device 00411 */ 00412 struct RPC_registeredProcedure Define_S25FS512_EnableHWReset = { S25FS512_NAME, "EnableHWReset", S25FS512_EnableHWReset }; 00413 /** 00414 * @brief /S25FS512/SpiWriteRead 00415 * @details Write and read SPI to the flash device using Quad SPI 00416 */ 00417 struct RPC_registeredProcedure Define_S25FS512_SpiWriteRead = { S25FS512_NAME, "SpiWriteRead", S25FS512_SpiWriteRead }; 00418 /** 00419 * @brief /S25FS512/SpiWriteRead4Wire 00420 * @details Write and read SPI to the flash device using 4 wire 00421 */ 00422 struct RPC_registeredProcedure Define_S25FS512_SpiWriteRead4Wire = { S25FS512_NAME, "SpiWriteRead4Wire", S25FS512_SpiWriteRead4Wire }; 00423 /** 00424 * @brief /SDCard/IsReady 00425 * @details Check whether SD Card File System is accessible 00426 */ 00427 struct RPC_registeredProcedure Define_SDCard_IsReady = { SDCARD_NAME, "IsReady", SDCard_IsReady }; 00428 00429 00430 #define TESTING_NAME "Testing" 00431 /** 00432 * @brief /Testing/Test_S25FS512 00433 * @details Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test 00434 */ 00435 struct RPC_registeredProcedure Define_Testing_Test_S25FS512 = { TESTING_NAME, "Test_S25FS512", Test_S25FS512}; 00436 00437 /** 00438 * @brief /Testing/Test_MAX30001 00439 * @details Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test 00440 */ 00441 struct RPC_registeredProcedure Define_Testing_Test_MAX30001 = { TESTING_NAME, "Test_MAX30001", Test_MAX30001 }; 00442 00443 #endif /* _RPCDECLARATIONS_H_ */ 00444
Generated on Tue Jul 12 2022 16:59:43 by 1.7.2