[chbot] AVR external interrupt and Makefile example

Col colp at paradise.net.nz
Sat Nov 14 21:58:38 GMT 2009


> Many thanks Col,
> 

No problem.
Actually we need another atomic block.

eg:

ATOMIC_BLOCK( ATOMIC_FORCEON )
{
	temp = count4ms;
}
if ( temp >= 305 )
{
	ATOMIC_BLOCK( ATOMIC_FORCEON )
	{
		count4ms=0;
	}
	seconds++;

I did this as two separate atomic blocks to keep them as short as possible.


Cheers
Col.




More information about the Chchrobotics mailing list