Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r66c624837b7b915415810e67249048ce5a46c163 -r5e0cd9b5be11ff4b2acaadbdcafc4ffe05172aa1 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 66c624837b7b915415810e67249048ce5a46c163) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 5e0cd9b5be11ff4b2acaadbdcafc4ffe05172aa1) @@ -24,132 +24,137 @@ #include "Comm.h" #include "SystemCommMessages.h" #include "Utilities.h" + +/** + * @addtogroup FPGA + * @{ + */ // ********** private definitions ********** - + +///< List of FPGA states. typedef enum FPGA_States { - FPGA_STATE_START = 0, - FPGA_STATE_READ_HEADER, - FPGA_STATE_RCV_HEADER, - FPGA_STATE_WRITE_ALL_ACTUATORS, - FPGA_STATE_RCV_ALL_SENSORS, - FPGA_STATE_FAILED, - NUM_OF_FPGA_STATES + FPGA_STATE_START = 0, ///< FPGA start state + FPGA_STATE_READ_HEADER, ///< FPGA read header state + FPGA_STATE_RCV_HEADER, ///< FPGA receive header state + FPGA_STATE_WRITE_ALL_ACTUATORS, ///< FPGA write all actuators state + FPGA_STATE_RCV_ALL_SENSORS, ///< FPGA receive all sensors state + FPGA_STATE_FAILED, ///< FPGA failed state + NUM_OF_FPGA_STATES ///< Number of FPGA states } FPGA_STATE_T; -#define FPGA_PAGE_SIZE 256 -#define FPGA_EXPECTED_ID 0x60 +#define FPGA_PAGE_SIZE 256 ///< FPGA page size. +#define FPGA_EXPECTED_ID 0x60 ///< FPGA expected ID. -#define FPGA_HEADER_START_ADDR 0x0000 -#define FPGA_BULK_READ_START_ADDR 0x0100 +#define FPGA_HEADER_START_ADDR 0x0000 ///< FPGA header start address. +#define FPGA_BULK_READ_START_ADDR 0x0100 ///< FPGA bulk read start address. +#define FPGA_BULK_WRITE_START_ADDR 0x000C ///< FPGA bulk write start address. -#define FPGA_BULK_WRITE_START_ADDR 0x000C +#define FPGA_WRITE_CMD_BUFFER_LEN ( FPGA_PAGE_SIZE + 8 ) ///< FPGA write command buffer length. +#define FPGA_READ_CMD_BUFFER_LEN 8 ///< FPGA read command buffer length. +#define FPGA_WRITE_RSP_BUFFER_LEN 8 ///< FPGA write response buffer length. +#define FPGA_READ_RSP_BUFFER_LEN ( FPGA_PAGE_SIZE + 8 ) ///< FPGA read response buffer length. -#define FPGA_WRITE_CMD_BUFFER_LEN (FPGA_PAGE_SIZE+8) -#define FPGA_READ_CMD_BUFFER_LEN 8 -#define FPGA_WRITE_RSP_BUFFER_LEN 8 -#define FPGA_READ_RSP_BUFFER_LEN (FPGA_PAGE_SIZE+8) +#define FPGA_WRITE_CMD_CODE 0x55 ///< FPGA write command code. +#define FPGA_READ_CMD_CODE 0x5A ///< FPGA read command code. +#define FPGA_WRITE_CMD_ACK 0xA5 ///< FPGA write command ack. +#define FPGA_READ_CMD_ACK 0xAA ///< FPGA read command ack. +#define FPGA_CMD_NAK 0xEE ///< FPGA command nack. -#define FPGA_WRITE_CMD_CODE 0x55 -#define FPGA_READ_CMD_CODE 0x5A -#define FPGA_WRITE_CMD_ACK 0xA5 -#define FPGA_READ_CMD_ACK 0xAA -#define FPGA_CMD_NAK 0xEE +#define FPGA_CRC_LEN 2 ///< FPGA crc length. +#define FPGA_WRITE_CMD_HDR_LEN 4 ///< FPGA write command header length. +#define FPGA_READ_CMD_HDR_LEN 4 ///< FPGA read command header length. +#define FPGA_WRITE_RSP_HDR_LEN 3 ///< FPGA write response header length. +#define FPGA_READ_RSP_HDR_LEN 3 ///< FPGA read response header length. -#define FPGA_CRC_LEN 2 -#define FPGA_WRITE_CMD_HDR_LEN 4 -#define FPGA_READ_CMD_HDR_LEN 4 -#define FPGA_WRITE_RSP_HDR_LEN 3 -#define FPGA_READ_RSP_HDR_LEN 3 +#define SCI2_RECEIVE_DMA_REQUEST 28 ///< SCI2 receive DMA request +#define SCI2_TRANSMIT_DMA_REQUEST 29 ///< SCI2 transmit DMA request -#define SCI2_RECEIVE_DMA_REQUEST 28 -#define SCI2_TRANSMIT_DMA_REQUEST 29 +#define MAX_COMM_ERROR_RETRIES 5 ///< Maximum number of communication error retries -#define MAX_COMM_ERROR_RETRIES 5 +#define DRAIN_PUMP_DAC_SHIFT_BITS 4 ///< Drain pump DAC shift bits. -#define MASK_OFF_U32_MSB 0x00FFFFFF -#define DRAIN_PUMP_DAC_SHIFT_BITS 4 - -// FPGA Sensors Record +// FPGA header struct. #pragma pack(push,1) typedef struct { - U08 fpgaId; ///< Reg 0. FPGA ID code. Checked against expected value at power up to verify basic FPGA communication and operation. - U08 fpgaRev; ///< Reg 1. FPGA revision being reported. - U08 fpgaRevLab; ///< Reg 2. FPGA lab rev number. - U08 fpgaRevMajor; ///< Reg 3. FPGA minor rev number. + U08 fpgaId; ///< Reg 0. FPGA ID code. Checked against expected value at power up to verify basic FPGA communication and operation + U08 fpgaRev; ///< Reg 1. FPGA revision being reported + U08 fpgaRevLab; ///< Reg 2. FPGA lab rev number + U08 fpgaRevMajor; ///< Reg 3. FPGA minor rev number } FPGA_HEADER_T; // read only on FPGA - + +///< FPGA sensors' readings struct. typedef struct // TODO - add all sensor readings to this structure per FPGA register map { - U32 fpgaLCA1; ///< Reg 256. ADC1 channel 0 - load cell A1. - U32 fpgaLCB1; ///< Reg 260. ADC1 channel 1 - load cell B1. - U32 fpgaADC1Temp; ///< Reg 264. ADC1 channel 2 - internal temperature. + U32 fpgaLCA1; ///< Reg 256. ADC1 channel 0 - load cell A1 + U32 fpgaLCB1; ///< Reg 260. ADC1 channel 1 - load cell B1 + U32 fpgaADC1Temp; ///< Reg 264. ADC1 channel 2 - internal temperature - U32 fpgaLCA2; ///< Reg 268. ADC2 channel 0 - load cell A2. - U32 fpgaLCB2; ///< Reg 272. ADC2 channel 1 - load cell B2. - U32 fpgaADC2Temp; ///< Reg 276. ADC2 channel 2 - internal temperature. + U32 fpgaLCA2; ///< Reg 268. ADC2 channel 0 - load cell A2 + U32 fpgaLCB2; ///< Reg 272. ADC2 channel 1 - load cell B2 + U32 fpgaADC2Temp; ///< Reg 276. ADC2 channel 2 - internal temperature - U32 fpgaCD1Temp; ///< Reg 280. ADC RTD channel 0 - conductivity sensor 1 temperature. - U32 fpgaCD2Temp; ///< Reg 284. ADC RTD channel 1 - conductivity sensor 2 temperature. + U32 fpgaCD1Temp; ///< Reg 280. ADC RTD channel 0 - conductivity sensor 1 temperature + U32 fpgaCD2Temp; ///< Reg 284. ADC RTD channel 1 - conductivity sensor 2 temperature - U32 fpgaTPoTemp; ///< Reg 288. ADC RTD channel 2 - conductivity sensor CPo temperature. - U32 fpgaTPiTemp; ///< Reg 292. ADC RTD channel 3 - conductivity sensor CPi temperature. - U32 fpgaRTDTemp; ///< Reg 296. ADC RTD channel 4 - internal temperature. + U32 fpgaTPoTemp; ///< Reg 288. ADC RTD channel 2 - conductivity sensor CPo temperature + U32 fpgaTPiTemp; ///< Reg 292. ADC RTD channel 3 - conductivity sensor CPi temperature + U32 fpgaRTDTemp; ///< Reg 296. ADC RTD channel 4 - internal temperature - U32 fpgaTHDo; ///< Reg 300. ADC THDo channel 0 - temperature. - U32 fpgaTHDoTemp; ///< Reg 304. ADC THDo channel 1 - internal temperature. + U32 fpgaTHDo; ///< Reg 300. ADC THDo channel 0 - temperature + U32 fpgaTHDoTemp; ///< Reg 304. ADC THDo channel 1 - internal temperature - U32 fpgaTDi; ///< Reg 308. ADC TDi channel 0 - temperature. - U32 fpgaTDiTemp; ///< Reg 312. ADC TDi channel 1 - internal temperature. + U32 fpgaTDi; ///< Reg 308. ADC TDi channel 0 - temperature + U32 fpgaTDiTemp; ///< Reg 312. ADC TDi channel 1 - internal temperature - U32 fpgaCPo; ///< Reg 316. Conductivity CPo. - U32 fpgaCPi; ///< Reg 320. Conductivity CPi. + U32 fpgaCPo; ///< Reg 316. CPo conductivity sensor value + U32 fpgaCPi; ///< Reg 320. CPi conductivity sensor value - U16 fpgaPrimaryHeaterIntTemp; ///< Reg 324. Primary heater temperature. - U16 fpgaPrimaryHeaterIntJunctionTemp; ///< Reg 326. Primary heater internal temperature. - U16 fpgaTrimmerHeaterIntTemp; ///< Reg 328. Trimmer heater temperature. - U16 fpgaTrimmerHeaterIntJunctionTemp; ///< Reg 330. Trimmer heater internal temperature. + U16 fpgaPrimaryHeaterIntTemp; ///< Reg 324. Primary heater temperature + U16 fpgaPrimaryHeaterIntJunctionTemp; ///< Reg 326. Primary heater internal temperature + U16 fpgaTrimmerHeaterIntTemp; ///< Reg 328. Trimmer heater temperature + U16 fpgaTrimmerHeaterIntJunctionTemp; ///< Reg 330. Trimmer heater internal temperature - U16 fpgaDrainPumpSpeed; ///< Reg 332. Drain pump speed feedback. - U16 fpgaROFlowRate; ///< Reg 334. RO flow. + U16 fpgaDrainPumpSpeed; ///< Reg 332. Drain pump speed feedback + U16 fpgaROFlowRate; ///< Reg 334. RO flow - U16 accelX; ///< Reg 336. Accelerometer X axis data. - U16 accelY; ///< Reg 338. Accelerometer Y axis data. - U16 accelZ; ///< Reg 340. Accelerometer Z axis data. - U16 accelXMax; ///< Reg 342. Accelerometer X axis max data (since last read). - U16 accelYMax; ///< Reg 344. Accelerometer Y axis max data (since last read). - U16 accelZMax; ///< Reg 346. Accelerometer Z axis max data (since last read). - U16 accelFaultRegister; ///< Reg 348. Accelerometer fault register. - U16 accelSampleCounter; ///< Reg 350. Accelerometer sample count. + U16 accelX; ///< Reg 336. Accelerometer X axis data + U16 accelY; ///< Reg 338. Accelerometer Y axis data + U16 accelZ; ///< Reg 340. Accelerometer Z axis data + U16 accelXMax; ///< Reg 342. Accelerometer X axis max data (since last read) + U16 accelYMax; ///< Reg 344. Accelerometer Y axis max data (since last read) + U16 accelZMax; ///< Reg 346. Accelerometer Z axis max data (since last read) + U16 accelFaultRegister; ///< Reg 348. Accelerometer fault register + U16 accelSampleCounter; ///< Reg 350. Accelerometer sample count - U08 fpgaIOErrorCntProcessor; ///< Reg 352. - U08 fpgaIOErrorCntPC; ///< Reg 353. + U08 fpgaIOErrorCntProcessor; ///< Reg 352. Error count for processor communications + U08 fpgaIOErrorCntPC; ///< Reg 353. Error count for PC communications U08 fpgaADC1ReadCnt; ///< Reg 354. U08 fpgaADC1ErrorCnt; ///< Reg 355. U08 fpgaADC2ReadCnt; ///< Reg 356. U08 fpgaADC2ErrorCnt; ///< Reg 357. - U08 fpgaRTDReadCnt; ///< Reg 358. - U08 fpgaRTDErrorCnt; ///< Reg 359. - U08 fpgaTHDoReadCnt; ///< Reg 360. - U08 fpgaTHDoErrorCnt; ///< Reg 361. - U08 fpgaTDiReadCnt; ///< Reg 362. - U08 fpgaTDiErrorCnt; ///< Reg 363. - U08 fpgaPrimaryHeaterFlags; ///< Reg 364. - U08 fpgaPrimaryHeaterReadCnt; ///< Reg 365. - U08 fpgaTrimmerHeaterFlags; ///< Reg 366. - U08 fpgaTrimmerHeaterReadCnt; ///< Reg 367. - U08 fpgaCPoFault; ///< Reg 368. - U08 fpgaCPoReadCnt; ///< Reg 369. - U08 fpgaCPoErrorCnt; ///< Reg 370. - U08 fpgaCPiFault; ///< Reg 371. - U08 fpgaCPiReadCnt; ///< Reg 372. - U08 fpgaCPiErrorCnt; ///< Reg 373. - U08 fpgaCP1CP2Fault; ///< Reg 374. - U08 fpgaReserved1; ///< Reg 375. + U08 fpgaRTDReadCnt; ///< Reg 358. Temperature sensors read count + U08 fpgaRTDErrorCnt; ///< Reg 359. Temperature sensors error count + U08 fpgaTHDoReadCnt; ///< Reg 360. Redundant outlet temperature sensor read count + U08 fpgaTHDoErrorCnt; ///< Reg 361. Redundant outlet temperature sensor error count + U08 fpgaTDiReadCnt; ///< Reg 362. Dialysate inlet temperature sensor read count + U08 fpgaTDiErrorCnt; ///< Reg 363. Dialysate inlet temperature sensor error count + U08 fpgaPrimaryHeaterFlags; ///< Reg 364. Primary heater flags + U08 fpgaPrimaryHeaterReadCnt; ///< Reg 365. Primary heater read count + U08 fpgaTrimmerHeaterFlags; ///< Reg 366. Trimmer heater flags + U08 fpgaTrimmerHeaterReadCnt; ///< Reg 367. Trimmer heater read count + U08 fpgaCPoFault; ///< Reg 368. CPo conductivity sensor fault + U08 fpgaCPoReadCnt; ///< Reg 369. CPo conductivity sensor read count + U08 fpgaCPoErrorCnt; ///< Reg 370. CPo conductivity sensor error count + U08 fpgaCPiFault; ///< Reg 371. CPi conductivity sensor fault + U08 fpgaCPiReadCnt; ///< Reg 372. CPi conductivity sensor read count + U08 fpgaCPiErrorCnt; ///< Reg 373. CPi conductivity sensor error count + U08 fpgaCP1CP2Fault; ///< Reg 374. Concentrate pump fault register for CP1 and CP2 + U08 fpgaReserved1; ///< Reg 375. Reserved - U16 fpgaValveStates; ///< Reg 376. + U16 fpgaValveStates; ///< Reg 376. Valves states } DG_FPGA_SENSORS_T; typedef struct @@ -166,33 +171,33 @@ // ********** private data ********** // FPGA state -static FPGA_STATE_T fpgaState = FPGA_STATE_START; +static FPGA_STATE_T fpgaState = FPGA_STATE_START; ///< FPGA current state. -static U32 fpgaCommRetryCount = 0; -static U32 fpgaReceiptCounter = 0; -static U32 fpgaTransmitCounter = 0; -static BOOL fpgaWriteCommandInProgress = FALSE; -static BOOL fpgaReadCommandInProgress = FALSE; -static BOOL fpgaBulkWriteAndReadInProgress = FALSE; -static BOOL fpgaWriteCommandResponseReceived = FALSE; -static BOOL fpgaReadCommandResponseReceived = FALSE; +static U32 fpgaCommRetryCount = 0; ///< FPGA communication retry count. +static U32 fpgaReceiptCounter = 0; ///< FPGA receipt completed counter. +static U32 fpgaTransmitCounter = 0; ///< FPGA transmit completed counter. +static BOOL fpgaWriteCommandInProgress = FALSE; ///< Flag indicates whether a FPGA write command is in progress. +static BOOL fpgaReadCommandInProgress = FALSE; ///< Flag indicates whether a FPGA read command is in progress. +static BOOL fpgaBulkWriteAndReadInProgress = FALSE; ///< Flag indicates whether a FPGA bulk write and read is in progress. +static BOOL fpgaWriteCommandResponseReceived = FALSE; ///< Flag indicates whether a FPGA write command response has been received. +static BOOL fpgaReadCommandResponseReceived = FALSE; ///< Flag indicates whether a FPGA read command response has been received. // FPGA comm buffers -static U08 fpgaWriteCmdBuffer[ FPGA_WRITE_CMD_BUFFER_LEN ]; -static U08 fpgaReadCmdBuffer[ FPGA_READ_CMD_BUFFER_LEN ]; -static U08 fpgaWriteResponseBuffer[ FPGA_WRITE_RSP_BUFFER_LEN ]; -static U08 fpgaReadResponseBuffer[ FPGA_READ_RSP_BUFFER_LEN ]; +static U08 fpgaWriteCmdBuffer[ FPGA_WRITE_CMD_BUFFER_LEN ]; ///< FPGA write command buffer. +static U08 fpgaReadCmdBuffer[ FPGA_READ_CMD_BUFFER_LEN ]; ///< FPGA read command buffer. +static U08 fpgaWriteResponseBuffer[ FPGA_WRITE_RSP_BUFFER_LEN ]; ///< FPGA write response buffer. +static U08 fpgaReadResponseBuffer[ FPGA_READ_RSP_BUFFER_LEN ]; ///< FPGA read response buffer. // DMA control records -static g_dmaCTRL fpgaDMAWriteControlRecord; -static g_dmaCTRL fpgaDMAWriteRespControlRecord; -static g_dmaCTRL fpgaDMAReadControlRecord; -static g_dmaCTRL fpgaDMAReadRespControlRecord; +static g_dmaCTRL fpgaDMAWriteControlRecord; ///< FPGA DMA write control record. +static g_dmaCTRL fpgaDMAWriteRespControlRecord; ///< FPGA DMA write response control record. +static g_dmaCTRL fpgaDMAReadControlRecord; ///< FPGA DMA read control record. +static g_dmaCTRL fpgaDMAReadRespControlRecord; ///< FPGA DMA read response control record. // FPGA data -static FPGA_HEADER_T fpgaHeader; -static DG_FPGA_SENSORS_T fpgaSensorReadings; -static FPGA_ACTUATORS_T fpgaActuatorSetPoints; +static FPGA_HEADER_T fpgaHeader; ///< FPGA header structure. +static DG_FPGA_SENSORS_T fpgaSensorReadings; ///< DG FPGA sensors structure. +static FPGA_ACTUATORS_T fpgaActuatorSetPoints; ///< FPGA actuator set points structure. // ********** private function prototypes ********** @@ -330,8 +335,7 @@ /*********************************************************************//** * @brief - * The resetFPGACommFlags function resets the various fpga comm flags and \n - * counters. + * The resetFPGACommFlags function resets the various fpga comm flags and counters. * @details * Inputs : none * Outputs : fpga comm flags & counters reset @@ -350,7 +354,7 @@ /*********************************************************************//** * @brief - * The signalFPGAReceiptCompleted function increments a counter to indicate \n + * The signalFPGAReceiptCompleted function increments a counter to indicate * that another DMA receipt from the FPGA has completed. * @details * Inputs : none @@ -385,7 +389,7 @@ /*********************************************************************//** * @brief - * The signalFPGATransmitCompleted function increments a counter to indicate \n + * The signalFPGATransmitCompleted function increments a counter to indicate * that another DMA transmit to the FPGA has completed. * @details * Inputs : none @@ -492,7 +496,7 @@ /*********************************************************************//** * @brief - * The handleFPGAReadHeaderState function handles the FPGA state where \n + * The handleFPGAReadHeaderState function handles the FPGA state where * the read header registers command is sent to the FPGA. * @details * Inputs : none @@ -524,7 +528,7 @@ /*********************************************************************//** * @brief - * The handleFPGAReceiveHeaderState function handles the FPGA state \n + * The handleFPGAReceiveHeaderState function handles the FPGA state * where the header registers read response should be ready to take in. * @details * Inputs : none @@ -576,7 +580,7 @@ /*********************************************************************//** * @brief - * The handleFPGAWriteAllActuatorsState function handles the FPGA state \n + * The handleFPGAWriteAllActuatorsState function handles the FPGA state * where the bulk write command is sent to the FPGA. * @details * Inputs : actuator set points @@ -627,7 +631,7 @@ /*********************************************************************//** * @brief - * The handleFPGAReceiveAllSensorsState function handles the FPGA state \n + * The handleFPGAReceiveAllSensorsState function handles the FPGA state * where the bulk read response should be ready to parse. * @details * Inputs : none @@ -685,7 +689,7 @@ /*********************************************************************//** * @brief - * The execFPGATest function executes the FPGA self-test. \n + * The execFPGATest function executes the FPGA self-test. * @details * Inputs : fpgaHeader * Outputs : none @@ -715,7 +719,7 @@ /*********************************************************************//** * @brief - * The setupDMAForWriteCmd function sets the byte count for the next DMA \n + * The setupDMAForWriteCmd function sets the byte count for the next DMA * write command to the FPGA. * @details * Inputs : none @@ -738,7 +742,7 @@ /*********************************************************************//** * @brief - * The startDMAWriteCmd function initiates the DMA transmit for the next \n + * The startDMAWriteCmd function initiates the DMA transmit for the next * DMA write command to the FPGA. * @details * Inputs : none @@ -754,11 +758,11 @@ /*********************************************************************//** * @brief - * The setupDMAForWriteResp function sets the expected byte count for the \n + * The setupDMAForWriteResp function sets the expected byte count for the * next DMA write command response from the FPGA. * @details * Inputs : none - * Outputs : # of expected bytes for next FPGA write command response is set + * Outputs : number of expected bytes for next FPGA write command response is set * @param bytes2Receive number of bytes expected to be transmitted via DMA from the FPGA. * @return none *************************************************************************/ @@ -777,7 +781,7 @@ /*********************************************************************//** * @brief - * The startDMAReceiptOfWriteResp function initiates readiness of the DMA \n + * The startDMAReceiptOfWriteResp function initiates readiness of the DMA * receiver for the next DMA write command response from the FPGA. * @details * Inputs : none @@ -793,11 +797,11 @@ /*********************************************************************//** * @brief - * The setupDMAForReadCmd function sets the byte count for the next DMA \n + * The setupDMAForReadCmd function sets the byte count for the next DMA * read command to the FPGA. * @details * Inputs : none - * Outputs : # of bytes for next FPGA read command is set + * Outputs : number of bytes for next FPGA read command is set * @param bytes2Transmit number of bytes to be transmitted via DMA to the FPGA. * @return none *************************************************************************/ @@ -816,7 +820,7 @@ /*********************************************************************//** * @brief - * The startDMAReadCmd function initiates the DMA transmit for the next \n + * The startDMAReadCmd function initiates the DMA transmit for the next * DMA read command to the FPGA. * @details * Inputs : none @@ -832,11 +836,11 @@ /*********************************************************************//** * @brief - * The setupDMAForReadResp function sets the expected byte count for the \n + * The setupDMAForReadResp function sets the expected byte count for the * next DMA read command response from the FPGA. * @details * Inputs : none - * Outputs : # of expected bytes for next FPGA read command response is set + * Outputs : number of expected bytes for next FPGA read command response is set * @param bytes2Receive number of expected bytes to be transmitted via DMA from the FPGA. * @return none *************************************************************************/ @@ -855,7 +859,7 @@ /*********************************************************************//** * @brief - * The startDMAReceiptOfReadResp function initiates readiness of the DMA \n + * The startDMAReceiptOfReadResp function initiates readiness of the DMA * receiver for the next DMA read command response from the FPGA. * @details * Inputs : none @@ -871,7 +875,7 @@ /*********************************************************************//** * @brief - * The consumeUnexpectedData function checks to see if a byte is sitting in \n + * The consumeUnexpectedData function checks to see if a byte is sitting in * the SCI2 received data register. * @details * Inputs : fpgaHeader @@ -891,9 +895,9 @@ /*********************************************************************//** * @brief - * The setFPGAValveStates function sets the DG valve states with a 16-bit \n - * set of states - one bit per valve, with a 1 meaning "energized" and a 0 \n - * meaning "de-energized". The bit positions for these bit states are as follows: \n + * The setFPGAValveStates function sets the DG valve states with a 16-bit + * set of states - one bit per valve, with a 1 meaning "energized" and a 0 + * meaning "de-energized". The bit positions for these bit states are as follows: * 0 - VRf.\n * 1 - VRi.\n * 2 - VRd.\n @@ -920,7 +924,7 @@ /*********************************************************************//** * @brief - * The setFPGADrainPumpSpeed function sets the drain pump target speed. \n + * The setFPGADrainPumpSpeed function sets the drain pump target speed. * The drain pump DAC value should be set to 1 count for each 12.94 RPM desired. * @details * Inputs : none @@ -954,7 +958,7 @@ /*********************************************************************//** * @brief - * The getFPGAId function gets the version read from the Id register \n + * The getFPGAId function gets the version read from the Id register * of the FPGA. * @details * Inputs : fpgaHeader @@ -968,7 +972,7 @@ /*********************************************************************//** * @brief - * The getFPGARev function gets the revision read from the Rev register \n + * The getFPGARev function gets the revision read from the Rev register * of the FPGA. * @details * Inputs : fpgaHeader @@ -1050,7 +1054,7 @@ /*********************************************************************//** * @brief - * The getFPGAValveStates function gets the latest sensed valve states. \n + * The getFPGAValveStates function gets the latest sensed valve states. * See setFPGAValveStates for valve state bit positions. * @details * Inputs : fpgaSensorReadings.fpgaValveStates @@ -1090,8 +1094,7 @@ /*********************************************************************//** * @brief - * The getFPGATPiTemp function gets the latest primary heater inlet \n - * temperature reading. + * The getFPGATPiTemp function gets the latest primary heater inlet temperature reading. * @details * Inputs : fpgaSensorReadings.fpgaTPiTemp * Outputs : none @@ -1104,8 +1107,7 @@ /*********************************************************************//** * @brief - * The getFPGATPoTemp function gets the latest primary heater outlet \n - * temperature reading. + * The getFPGATPoTemp function gets the latest primary heater outlet temperature reading. * @details * Inputs : fpgaSensorReadings.fpgaTPoTemp * Outputs : none @@ -1118,7 +1120,7 @@ /*********************************************************************//** * @brief - * The getFPGATD1Temp function gets the latest conductivity sensor 1 \n + * The getFPGATD1Temp function gets the latest conductivity sensor 1 * temperature reading in ADC. * @details * Inputs : fpgaSensorReadings.fpgaCD1Temp @@ -1132,7 +1134,7 @@ /*********************************************************************//** * @brief - * The getFPGATD2Temp function gets the latest conductivity sensor 2 \n + * The getFPGATD2Temp function gets the latest conductivity sensor 2 * temperature reading in ADC. * @details * Inputs : fpgaSensorReadings.fpgaCD2Temp @@ -1146,12 +1148,12 @@ /*********************************************************************//** * @brief - * The getFPGARTDErrorCount function gets error count of the RTD. It covers \n - * all the four conductivity sensors which include temperature sensors + * The getFPGARTDErrorCount function gets error count of the RTD. It covers + * all the four temperature sensors associates with conductivity sensors. * @details * Inputs : fpgaSensorReadings.fpgaRTDErrorCnt * Outputs : none - * @return Last error count of the RTD conductivity sensors + * @return Last error count of the RTD temperature sensors *************************************************************************/ U08 getFPGARTDErrorCount( void ) { @@ -1160,12 +1162,13 @@ /*********************************************************************//** * @brief - * The getFPGARTDReadCount function gets the read count of the RTD \n - * conductivity sensors. It covers all the 4 conductivity sensors + * The getFPGARTDReadCount function gets the read count of the RTD + * temperature sensors. It covers all the four temperature sensors associates + * with conductivity sensors. * @details * Inputs : fpgaSensorReadings.fpgaRTDReadCnt * Outputs : none - * @return Last read count of the RTC conductivity sensors + * @return Last read count of the RTC temperature sensors *************************************************************************/ U08 getFPGARTDReadCount( void ) { @@ -1174,7 +1177,7 @@ /*********************************************************************//** * @brief - * The getFPGATRoTemp function gets the latest redundant sensor outlet \n + * The getFPGATRoTemp function gets the latest redundant sensor outlet * temperature reading in ADC. * @details * Inputs : fpgaSensorReadings.fpgaTHDoTemp @@ -1188,8 +1191,7 @@ /*********************************************************************//** * @brief - * The getFPGATHDoErrorCount gets the error count of the THDo (redundant) \n - * temperature sensor + * The getFPGATHDoErrorCount gets the error count of the THDo (redundant) temperature sensor. * @details * Inputs : fpgaSensorReadings.fpgaTHDoErrorCnt * Outputs : none @@ -1202,7 +1204,7 @@ /*********************************************************************//** * @brief - * The getFPGATHDoReadCount gets the read count of the THDo (redundant) \n + * The getFPGATHDoReadCount gets the read count of the THDo (redundant) temperature sensor. * @details * Inputs : fpgaSensorReadings.fpgaTHDoReadCnt * Outputs : none @@ -1215,8 +1217,7 @@ /*********************************************************************//** * @brief - * The getFPGATDiTemp function gets the latest dialysate inlet \n - * temperature reading in ADC. + * The getFPGATDiTemp function gets the latest dialysate inlet temperature reading in ADC. * @details * Inputs : fpgaSensorReadings.fpgaTDiTemp * Outputs : none @@ -1229,8 +1230,7 @@ /*********************************************************************//** * @brief - * The getFPGATDiErrorCount function gets the latest dialysate inlet \n - * temperature error count. + * The getFPGATDiErrorCount function gets the latest dialysate inlet temperature error count. * @details * Inputs : fpgaSensorReadings.fpgaTDiErrorCnt * Outputs : none @@ -1243,8 +1243,7 @@ /*********************************************************************//** * @brief - * The getFPGATDiReadCount function gets the latest dialysate inlet \n - * temperature read count. + * The getFPGATDiReadCount function gets the latest dialysate inlet temperature read count. * @details * Inputs : fpgaSensorReadings.fpgaTDiReadCnt * Outputs : none @@ -1257,7 +1256,7 @@ /*********************************************************************//** * @brief - * The getFPGAPrimaryHeaterTemp function gets the latest primary heater \n + * The getFPGAPrimaryHeaterTemp function gets the latest primary heater * internal temperature reading. * @details * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterIntTemp @@ -1271,8 +1270,8 @@ /*********************************************************************//** * @brief - * The getFPGAPrimaryHeaterFlags function gets the latest primary heater \n - * internal temperature sensor flags read + * The getFPGAPrimaryHeaterFlags function gets the latest primary heater + * internal temperature sensor flags read. * @details * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterFlags * Outputs : none @@ -1285,8 +1284,8 @@ /*********************************************************************//** * @brief - * The geetFPGAPrimaryHeaterReadCount function gets the latest primary heater \n - * internal temperature sensor read count + * The geetFPGAPrimaryHeaterReadCount function gets the latest primary heater + * internal temperature sensor read count. * @details * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterReadCnt * Outputs : none @@ -1299,7 +1298,7 @@ /*********************************************************************//** * @brief - * The getFPGATrimmerHeaterTemp function gets the latest trimmer heater \n + * The getFPGATrimmerHeaterTemp function gets the latest trimmer heater * internal temperature sensor reading. * @details * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterIntTemp @@ -1313,7 +1312,7 @@ /*********************************************************************//** * @brief - * The getFPGATrimmerHeaterFlags function gets the latest trimmer heater \n + * The getFPGATrimmerHeaterFlags function gets the latest trimmer heater * internal temperature flags read. * @details * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterFlags @@ -1327,7 +1326,7 @@ /*********************************************************************//** * @brief - * The getFPGATrimmerHeaterReadCount function gets the latest trimmer heater \n + * The getFPGATrimmerHeaterReadCount function gets the latest trimmer heater * internal temperature read count. * @details * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterReadCnt @@ -1341,8 +1340,7 @@ /*********************************************************************//** * @brief - * The getFPGAPrimaryColdJunctionTemp function gets primary cold junction - * temperature + * The getFPGAPrimaryColdJunctionTemp function gets primary cold junction temperature. * @details * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterIntJunctionTemp * Outputs : none @@ -1355,8 +1353,7 @@ /*********************************************************************//** * @brief - * The getFPGATrimmerColdJunctionTemp function gets trimmer cold junction - * temperature + * The getFPGATrimmerColdJunctionTemp function gets trimmer cold junction temperature. * @details * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterIntJunctionTemp * Outputs : none @@ -1369,7 +1366,7 @@ /*********************************************************************//** * @brief - * The getFPGAAccelAxes function gets the accelerometer axis readings. \n + * The getFPGAAccelAxes function gets the accelerometer axis readings. * Axis readings are in ADC counts. 0.004 g per LSB. * @details * Inputs : fpgaSensorReadings @@ -1388,9 +1385,8 @@ /*********************************************************************//** * @brief - * The getFPGAAccelMaxes function gets the maximum accelerometer axis readings. \n - * from last FPGA read (every 10ms). \n - * Axis readings are in ADC counts. 0.004 g per LSB. + * The getFPGAAccelMaxes function gets the maximum accelerometer axis readings from + * last FPGA read (every 10ms). Axis readings are in ADC counts. 0.004 g per LSB. * @details * Inputs : fpgaSensorReadings * Outputs : none @@ -1408,7 +1404,7 @@ /*********************************************************************//** * @brief - * The getFPGAAccelStatus function gets the accelerometer reading count \n + * The getFPGAAccelStatus function gets the accelerometer reading count * and error register values. * @details * Inputs : fpgaSensorReadings @@ -1423,9 +1419,9 @@ *err = fpgaSensorReadings.accelFaultRegister; } -/************************************************************************* +/*********************************************************************//** * @brief - * The getFPGACPiFault function gets CPi conductivity sensor fault + * The getFPGACPiFault function gets CPi conductivity sensor fault. * @details * Inputs : fpgaSensorReadings.fpgaCPiFault * Outputs : none @@ -1437,9 +1433,9 @@ return fpgaSensorReadings.fpgaCPiFault; } -/************************************************************************* +/*********************************************************************//** * @brief - * The getFPGACPiReadCount function gets CPi conductivity sensor read count + * The getFPGACPiReadCount function gets CPi conductivity sensor read count. * @details * Inputs : fpgaSensorReadings.fpgaCPiReadCnt * Outputs : none @@ -1451,9 +1447,9 @@ return fpgaSensorReadings.fpgaCPiReadCnt; } -/************************************************************************* +/*********************************************************************//** * @brief - * The getFPGACPiErrorCount function gets CPi conductivity sensor error count + * The getFPGACPiErrorCount function gets CPi conductivity sensor error count. * @details * Inputs : fpgaSensorReadings.fpgaCPiErrorCnt * Outputs : none @@ -1465,9 +1461,9 @@ return fpgaSensorReadings.fpgaCPiErrorCnt; } -/************************************************************************* +/*********************************************************************//** * @brief - * The getFPGACPi function gets CPi conductivity sensor value + * The getFPGACPi function gets CPi conductivity sensor value. * @details * Inputs : fpgaSensorReadings.fpgaCPi * Outputs : none @@ -1479,9 +1475,9 @@ return fpgaSensorReadings.fpgaCPi; } -/************************************************************************* +/*********************************************************************//** * @brief - * The getFPGACPoFault function gets CPo conductivity sensor fault + * The getFPGACPoFault function gets CPo conductivity sensor fault. * @details * Inputs : fpgaSensorReadings.fpgaCPoFault * Outputs : none @@ -1493,9 +1489,9 @@ return fpgaSensorReadings.fpgaCPoFault; } -/************************************************************************* +/*********************************************************************//** * @brief - * The getFPGACPoReadCount function gets CPo conductivity sensor read count + * The getFPGACPoReadCount function gets CPo conductivity sensor read count. * @details * Inputs : fpgaSensorReadings.fpgaCPoReadCnt * Outputs : none @@ -1507,9 +1503,9 @@ return fpgaSensorReadings.fpgaCPoReadCnt; } -/************************************************************************* +/*********************************************************************//** * @brief - * The getFPGACPoErrorCount function gets outlet water conductivity sensor + * The getFPGACPoErrorCount function gets CPo conductivity sensor error count. * error count * @details * Inputs : fpgaSensorReadings.fpgaCPoErrorCnt @@ -1522,9 +1518,9 @@ return fpgaSensorReadings.fpgaCPoErrorCnt; } -/************************************************************************* +/*********************************************************************//** * @brief - * The getFPGACPo function gets outlet water conductivity value + * The getFPGACPo function gets CPo conductivity sensor value. * @details * Inputs : fpgaSensorReadings.fpgaCPo * Outputs : none @@ -1535,3 +1531,5 @@ { return fpgaSensorReadings.fpgaCPo; } + +/**@}*/