Added a flashing status led to pin PB0

master
mandlm 2017-02-19 15:04:43 +01:00
parent 378e31ad9e
commit c7250b33af
2 changed files with 38 additions and 2 deletions

View File

@ -1,10 +1,29 @@
#define F_CPU 1000000
#include <avr/io.h>
#include <util/delay.h>
#include "DeviceLib/ShiftRegister.h"
void setupStatusLedPin()
{
DDRB |= (1 << PB0);
}
void flashStatusLed()
{
PORTB |= (1 << PB0);
_delay_ms(100);
PORTB &= ~(1 << PB0);
}
int main()
{
setupStatusLedPin();
while (true)
{
flashStatusLed();
_delay_ms(400);
}
}

View File

@ -20,12 +20,29 @@
<OverrideVtor>false</OverrideVtor>
<CacheFlash>true</CacheFlash>
<ProgFlashFromRam>true</ProgFlashFromRam>
<RamSnippetAddress />
<RamSnippetAddress>0x20000000</RamSnippetAddress>
<UncachedRange />
<preserveEEPROM>true</preserveEEPROM>
<OverrideVtorValue />
<OverrideVtorValue>exception_table</OverrideVtorValue>
<BootSegment>2</BootSegment>
<eraseonlaunchrule>0</eraseonlaunchrule>
<avrtool>com.atmel.avrdbg.tool.stk500</avrtool>
<avrtoolserialnumber />
<avrdeviceexpectedsignature>0x1E910B</avrdeviceexpectedsignature>
<com_atmel_avrdbg_tool_stk500>
<ToolOptions>
<InterfaceProperties>
<IspClock>125000</IspClock>
</InterfaceProperties>
<InterfaceName>ISP</InterfaceName>
</ToolOptions>
<ToolType>com.atmel.avrdbg.tool.stk500</ToolType>
<ToolNumber>
</ToolNumber>
<ToolName>STK500</ToolName>
</com_atmel_avrdbg_tool_stk500>
<avrtoolinterface>ISP</avrtoolinterface>
<avrtoolinterfaceclock>125000</avrtoolinterfaceclock>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>