io/InOut/main.cpp

50 lines
937 B
C++

/*
* Copyright (c) by BlackMark 2015-2016
* Date 02/01/2016
* Version 1.2
*/
#include "Clock.h"
#include "InOut.h"
int main()
{
InOutPin cPinRed( InOut::Pin::P_B5 );
InOutPin cPinGreen( InOut::Pin::P_B4 );
InOutPin cPinBlue( InOut::Pin::P_B3 );
cPinRed.setDirection( InOut::Dir::D_OUT );
cPinGreen.setDirection( InOut::Dir::D_OUT );
cPinBlue.setDirection( InOut::Dir::D_OUT );
cPinRed.write( false );
cPinGreen.write( false );
cPinBlue.write( false );
while( true )
{
cPinRed.write( true );
_delay_ms( 1000 );
cPinRed.write( false );
cPinGreen.write( true );
_delay_ms( 1000 );
cPinGreen.write( false );
cPinBlue.write( true );
_delay_ms( 1000 );
cPinBlue.write( false );
cPinRed.write( true );
cPinGreen.write( true );
cPinBlue.write( true );
_delay_ms( 5000 );
cPinRed.write( false );
cPinGreen.write( false );
cPinBlue.write( false );
_delay_ms( 1000 );
}
return 0;
}