Move Intercom temp sensor initialisation from mendel.c to temp.c.

This commit is contained in:
Markus Hitter 2014-11-03 15:51:19 +01:00
parent a9f1d00865
commit f6115688c5
2 changed files with 12 additions and 14 deletions

View File

@ -186,14 +186,6 @@ void io_init(void) {
WRITE(MISO, 1); SET_INPUT(MISO);
#endif
#ifdef TEMP_INTERCOM
// Enable the RS485 transceiver
SET_OUTPUT(RX_ENABLE_PIN);
SET_OUTPUT(TX_ENABLE_PIN);
WRITE(RX_ENABLE_PIN,0);
disable_transmit();
#endif
#ifdef DEBUG_LED_PIN
WRITE(DEBUG_LED_PIN, 0);
SET_OUTPUT(DEBUG_LED_PIN);

18
temp.c
View File

@ -97,12 +97,18 @@ void temp_init() {
break;*/
#endif
#ifdef TEMP_INTERCOM
case TT_INTERCOM:
intercom_init();
send_temperature(0, 0);
break;
#endif
#ifdef TEMP_INTERCOM
case TT_INTERCOM:
// Enable the RS485 transceiver
SET_OUTPUT(RX_ENABLE_PIN);
SET_OUTPUT(TX_ENABLE_PIN);
WRITE(RX_ENABLE_PIN,0);
disable_transmit();
intercom_init();
send_temperature(0, 0);
// Intentionally no break.
#endif
default: /* prevent compiler warning */
break;