Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -ra60ec05d359c0d3f014015e9080b6dbcef0fea28 -rffb9960f7b97e71ba78844c60158d344c909db94 --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision a60ec05d359c0d3f014015e9080b6dbcef0fea28) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision ffb9960f7b97e71ba78844c60158d344c909db94) @@ -16,6 +16,8 @@ * **************************************************************************/ +#include "mibspi.h" + #include "AlarmLamp.h" #include "OperationModes.h" #include "SystemCommMessages.h" @@ -123,6 +125,12 @@ /// A blank alarm data record for alarms that do not include alarm data when triggered. const ALARM_DATA_T blankAlarmData = { ALARM_DATA_TYPE_NONE, 0 }; +// pin assignment for backup alarm audio enable +#define BACKUP_AUDIO_ENABLE_SPI3_PORT_MASK 0x00000001 // (SPI3-CS0 - re-purposed as output GPIO) +// backup alarm audio enable/disable macros +#define SET_BACKUP_AUDIO_ENABLE() {mibspiREG3->PC3 |= BACKUP_AUDIO_ENABLE_SPI3_PORT_MASK;} +#define CLR_BACKUP_AUDIO_ENABLE() {mibspiREG3->PC3 &= ~BACKUP_AUDIO_ENABLE_SPI3_PORT_MASK;} + // ********** private data ********** /// interval (in ms) at which to publish alarm status to CAN bus @@ -167,6 +175,9 @@ ALARM_PRIORITY_T p; ALARM_ID_T a; + // disable backup audio + CLR_BACKUP_AUDIO_ENABLE(); + // initialize alarm states and start time stamps for ( a = ALARM_ID_NO_ALARM; a < NUM_OF_ALARM_IDS; a++ ) {