Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r933a18d740285e70be9d00696ed0f5a5381bc8e4 -rc672f41061bcd500d6593655641cb27ce3ae58fc --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 933a18d740285e70be9d00696ed0f5a5381bc8e4) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision c672f41061bcd500d6593655641cb27ce3ae58fc) @@ -299,6 +299,7 @@ memset( &fpgaHeader, 0, sizeof(FPGA_HEADER_T) ); memset( &fpgaSensorReadings, 0, sizeof(FPGA_SENSORS_T) ); memset( &fpgaActuatorSetPoints, 0, sizeof(FPGA_ACTUATORS_T) ); + fpgaActuatorSetPoints.AlarmControl = (U08)MAX_ALARM_VOLUME_LEVEL << 2; // start alarm audio volume at maximum // initialize fpga comm buffers memset( &fpgaWriteCmdBuffer, 0, FPGA_WRITE_CMD_BUFFER_LEN ); @@ -1053,6 +1054,31 @@ /*********************************************************************//** * @brief + * The setAlarmAudioState function sets the fpga audio control to the given + * state and volume. + * @details Inputs: none + * @details Outputs: alarm audio state and amplification gain set + * @param state the state of alarm audio to command + * @param volumeLevel the amount of amplification gain to command + * @return none + *************************************************************************/ +void setAlarmAudioState( ALARM_PRIORITY_T state, U32 volumeLevel ) +{ + if ( state < NUM_OF_ALARM_PRIORITIES && volumeLevel <= MAX_ALARM_VOLUME_LEVEL ) + { + U08 audioCmd = (U08)state; + + audioCmd |= ( (U08)volumeLevel << 2 ); + fpgaActuatorSetPoints.AlarmControl = audioCmd; + } + else + { + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_INVALID_ALARM_AUDIO_PARAM, volumeLevel ) + } +} + +/*********************************************************************//** + * @brief * The getFPGABloodFlowSignalStrength function gets the latest blood flow * signal strength reading. * @details Inputs: fpgaSensorReadings2