X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Farm.git;a=blobdiff_plain;f=betty%2Fdisplay.c;fp=betty%2Fdisplay.c;h=a5db3385ecf6e93dffcb606c0bfa2dd4688781a3;hp=0000000000000000000000000000000000000000;hb=b4ca71fc214ba3c58cec25661ba1f81cf7b1b871;hpb=d6814c7408b23db8a441f731b44d4b638df24c64 diff --git a/betty/display.c b/betty/display.c new file mode 100644 index 0000000..a5db338 --- /dev/null +++ b/betty/display.c @@ -0,0 +1,37 @@ +/* + * display.c - handling the display + * + * author: hackbard@hackdaworld.org + * + */ + +#include "display.h" + +/* + * functions + */ + +void bl_init(void) { + + PINSEL0&=~(1<<9|(1<<8)); + IODIR0|=(1<<4); +} + +void bl_toggle(void) { + + if(IOPIN0&(1<<4)) + IOCLR0=(1<<4); + else + IOSET0=(1<<4); +} + +void bl_on(void) { + + IOCLR0=(1<<4); +} + +void bl_off(void) { + + IOSET0=(1<<4); +} +