CODE |
ec1 timeout = 0; loop if(_keytest(RR_UP) && timeout=29){ //do stuff } timeout++; if(timeout==50)timeout=0; endloop c2 |
CODE | ||
ec1 |============================================================================= | VTI detection routine (by Julien Muchembled) | | this routine utilizes a bug in VTI: you can set even non-existing flags in | the status register and query them later! |============================================================================= | C prototype: | short IsVTI(void); .data .globl IsVTI .even IsVTI: Post by: DJ Omnimaga on August 13, 2006, 12:12:00 pm Post by: Ranman on August 14, 2006, 01:08:00 pm
Yes. A for/while loop used simply for a time delay without idling the CPU is just a waste of battery power. ;) ![]() Post by: DJ Omnimaga on August 15, 2006, 09:37:00 am |