Statistics
| Branch: | Revision:

scoutece / paintboard / code / sol.c @ 351481ed

History | View | Annotate | Download (492 Bytes)

1
#include "sol.h"
2
#include <avr/io.h>
3

    
4
void sol_init() {
5
  DDRD |= _BV(DDD7);
6
  DDRB |= _BV(DDB7) | _BV(DDB6) | _BV(DDB0);
7
}
8

    
9
void set_sol1(char on) {
10
  if (on)
11
    PORTD |= _BV(PD7);
12
  else
13
    PORTD &= ~_BV(PD7);
14
}
15

    
16
void set_sol2(char on) {
17
  if (on)
18
    PORTB |= _BV(PB0);
19
  else
20
    PORTB &= ~_BV(PB0);
21
}
22

    
23
void set_sol3(char on) {
24
  if (on)
25
    PORTB |= _BV(PB6);
26
  else
27
    PORTB &= ~_BV(PB6);
28
}
29

    
30
void set_sol4(char on) {
31
  if (on)
32
    PORTB |= _BV(PB7);
33
  else
34
    PORTB &= ~_BV(PB7);
35
}