io/InOut/main.cpp

52 lines
737 B
C++
Raw Normal View History

2016-02-25 21:48:49 +01:00
/*
* Copyright (c) by BlackMark 2015-2016
* Date 25/02/2016
* Version 1.3
2016-02-25 21:48:49 +01:00
*/
#include "Clock.h"
#include "InOut.h"
int main()
{
InOutPin cLED( InOut::Pin::P_D7 );
2016-02-25 21:48:49 +01:00
cLED.setDirection( InOut::Dir::D_OUT, false );
2016-02-25 21:48:49 +01:00
cLED.write( false );
2016-02-25 21:48:49 +01:00
while( true )
{
for( uint8_t i = 0; i < 3; ++i )
{
cLED.write( true );
_delay_ms( 100 );
cLED.write( false );
_delay_ms( 100 );
}
_delay_ms( 300 );
for( uint8_t i = 0; i < 3; ++i )
{
cLED.write( true );
_delay_ms( 300 );
cLED.write( false );
_delay_ms( 300 );
}
_delay_ms( 100 );
for( uint8_t i = 0; i < 3; ++i )
{
cLED.write( true );
_delay_ms( 100 );
cLED.write( false );
_delay_ms( 100 );
}
2016-02-25 21:48:49 +01:00
_delay_ms( 1000 );
}
return 0;
}