From 5d4a70f81d1896ede119e0dfe42392c4506a2a34 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 15 Nov 2013 19:59:19 +0100 Subject: added comments --- hardware.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'hardware.c') diff --git a/hardware.c b/hardware.c index 846a390..9f56847 100644 --- a/hardware.c +++ b/hardware.c @@ -1,8 +1,15 @@ +// Thanks to SimonLothar, cfxm and all the other hackers! + #include "global.h" #include "hardware.h" +// here are some functions for direct hardware access +// they are splitted to support different calculators + char *vram, *vram2; +// backlight funcions: on, off, switch, check +// if it's unknown hardware we should do nothing void BacklightOn() { if(!IsEmulator) @@ -59,6 +66,7 @@ int BacklightIsOn() } } +// change contrast only for known calcs void set_contrast(int contrast) { if(!getCalc() == UNKNOWN && !IsEmulator) @@ -69,6 +77,7 @@ void set_contrast(int contrast) } } +// update the display, if secure; otherwise use syscalls (sloooow!) void display_vram() { if(getCalc() == UNKNOWN && !IsEmulator) @@ -92,6 +101,7 @@ void display_vram() } } +// clear video ram void clear_vram() { int i, end; @@ -108,6 +118,7 @@ void clear_vram() for(i=0 ; i