//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
/// @file   main.c
/// @brief  LED Flash Application, Main File
/// @author brannon.wells@gmail.com
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
//  MODULE INCLUDES
//----------------------------------------------------------------------------//
    #include <avr/io.h>
    #include <stdint.h>

//----------------------------------------------------------------------------//
int main(void)
//----------------------------------------------------------------------------//
/// MAIN Application Function
///
/// Timing Application Main Routine.
//----------------------------------------------------------------------------//
{
	// Initialize the ports
    PORTB = 0x00;
    DDRB  = 0x02;

    // Main Loop
    for(;;)
    {
        // Set LED based on state of input
		if (PINB & 0x01)
		{
			//(PORTB |=  (1<<PINB1));
			__asm("SBI 0x18,0x02");
		}
		else
		{
			//(PORTB &= ~(1<<PINB1));
			__asm("CBI 0x18,0x02");
		}
    }

    return 0;
}

//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
//  END: main.c
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
