code clean up!
[my-code/arm.git] / betty / display.c
1 /*
2  * display.c - handling the display
3  *
4  * author: hackbard@hackdaworld.org
5  *
6  */
7
8 #include "display.h"
9
10 /*
11  * functions
12  */
13
14 void bl_init(void) {
15
16         PINSEL0&=~(1<<9|(1<<8));
17         IODIR0|=(1<<4);
18 }
19
20 void bl_toggle(void) {
21
22         if(IOPIN0&(1<<4))
23                 IOCLR0=(1<<4);
24         else
25                 IOSET0=(1<<4);
26 }
27
28 void bl_on(void) {
29
30         IOCLR0=(1<<4);
31 }
32
33 void bl_off(void) {
34
35         IOSET0=(1<<4);
36 }
37