Added the setup of the DDR for the relay.
This commit is contained in:
parent
e3cd70448b
commit
9e41bdc578
|
@ -45,6 +45,10 @@ void setup_relays(Relay *arr) {
|
|||
arr[0].input_port = &PORTA.IN;
|
||||
arr[0].input_pin = RELAY0_INPIN;
|
||||
|
||||
// Set the directions for the input and output pins/ports
|
||||
PORTA.DDR |= RELAY0_ENPIN;
|
||||
PORTA.DDR &= ~RELAY1_ENPIN;
|
||||
|
||||
for (int i = 0; i < N_RELAYS; i++) {
|
||||
Relay_MeasureMakeTime(&arr[0]);
|
||||
Relay_MeasureBreakTime(&arr[0]);
|
||||
|
|
Loading…
Reference in New Issue