void dg_bright_setcurlcd(int arg) { // Changes the current brightness, does not change if brightness is already // set to this value (for some reason, it cannot be changed after setting // the already-set value) short currentvalue; short newvalue; volatile short *addr = (volatile short *) 0xC0910080; // FIXME S5 only, make it a lib function somewhere // Clean up first if(dgconf_br_curlcd < 0) dgconf_br_curlcd = 0; if(dgconf_br_curlcd > 0xFF) dgconf_br_curlcd = 0xFF; if(dgconf_br_curlcd != 0) { newvalue = ((dgconf_br_curlcd & 0xFF) << 8) | 0xFF; } else { newvalue = ((dgconf_br_curlcd & 0xFF) << 8); } currentvalue = *addr; if(newvalue != currentvalue) *addr = newvalue; }
volatile short *addr = (volatile short *) 0xC0910080; // FIXME S5 only, make it a lib function somewhere
Started by sonicsonic Feature Requests
Started by hiker_jon RAW Shooting and Processing
Started by zcream Script Writing
Started by vostok Creative Uses of CHDK
Started by srsa_4c « 1 2 » Hotwire! Hardware Mods, Accessories and Insights