Exemple #1
0
int main( void )
{
	init();

	// main program
	while (1)
	{
		switch ( action() )
		{
			case CTRL_OK_ACTION:
				menu();
				break;

			case CTRL_DN_ACTION:
				COUNT_DN
				enterProgram( program.number, true );
				break;

			case CTRL_UP_ACTION:
				COUNT_UP
				enterProgram( program.number, true );
				break;

			case COM_ACTION:
				execCMD( receive_com( 10 ) );
				break;

			default:
				continue;
		}
	}

	return 0;
}
Exemple #2
0
void init( void )
{
	// configure in-/out- ports
	configPorts();

	// initialize variables
	state.progChange = 0;

	// fetch dump command to sync COM interface
	receive_com( 1 );
}