io/inout/main.cpp

56 lines
912 B
C++

/*
* Copyright (c) by BlackMark 2015-2018
* Date 26/04/2018
* Version 1.4
*/
#include "clock.h"
#include "inout/inout.h"
int main()
{
InOutPin<InOut::Pin::B5>::setDirection( InOut::Dir::OUT );
InOutPin<InOut::Pin::B5>::write( true );
_delay_ms( 3000 );
InOutPin<InOut::Pin::B5>::write( false );
_delay_ms( 3000 );
InOutPin<InOut::Pin::B5> cLED;
cLED.setDirection( InOut::Dir::OUT );
cLED.write( false );
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 );
}
_delay_ms( 1000 );
}
return 0;
}