Rev 3 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
/**************************************************************************//**
* \file helloworld.c
******************************************************************************/
/******************************************************************************
* Header file inclusions.
******************************************************************************/
#include <digital_io/digital_io.h>
#include <avr/io.h>
#include <util/delay.h>
/******************************************************************************
* Public function definitions.
******************************************************************************/
/**************************************************************************//**
* \fn int main(void)
*
* \brief Main function.
******************************************************************************/
int
main
(
void
){
// Declare pin.
digital_io__pin_position_t pin = DIGITAL_IO__PORT_B | DIGITAL_IO__PIN_5;
// Configure pin as output.
digital_io__configure_pin(pin, DIGITAL_IO__DIRECTION__OUTPUT);
while (1)
{
// Set pin level.
digital_io__set_pin_level(pin, DIGITAL_IO__LEVEL__HIGH);
_delay_ms(1000);
// Reset pin level.
digital_io__set_pin_level(pin, DIGITAL_IO__LEVEL__LOW);
_delay_ms(1000);
}
return 0;
}