itercom: Enable the RS485 transceiver on the host.

This commit is contained in:
Markus Amsler 2011-02-13 21:22:29 +01:00 committed by Michael Moon
parent b1a48994dd
commit b7f84a1812
1 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#include "pinio.h" #include "pinio.h"
#include "arduino.h" #include "arduino.h"
#include "clock.h" #include "clock.h"
#include "intercom.h"
void io_init(void) { void io_init(void) {
// disable modules we don't use // disable modules we don't use
@ -120,6 +121,13 @@ void io_init(void) {
WRITE(MOSI, 1); SET_OUTPUT(MOSI); WRITE(MOSI, 1); SET_OUTPUT(MOSI);
WRITE(MISO, 1); SET_INPUT(MISO); WRITE(MISO, 1); SET_INPUT(MISO);
WRITE(SS, 1); SET_OUTPUT(SS); WRITE(SS, 1); SET_OUTPUT(SS);
#ifdef TEMP_INTERCOM
// Enable the RS485 transceiver
SET_OUTPUT(RX_ENABLE_PIN);
SET_OUTPUT(TX_ENABLE_PIN);
disable_transmit();
#endif
} }
void init(void) { void init(void) {