1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2024-11-29 09:50:39 +02:00
antorcha/tornado/fw/boot.c

30 lines
529 B
C
Raw Normal View History

#include <stdint.h>
#define F_CPU 8000000UL
#include <util/delay.h>
#include "io.h"
#define HIGH(port) \
(MASK(port, CARD_nPWR) | \
MASK(port, SW_N) | MASK(port, SW_E) | MASK(port, SW_S) | \
MASK(port, SW_W) | MASK(port, SW_SW))
#define OUTPUTS(port) \
(MASK(port, CARD_nPWR) | MASK(port, CARD_CLK) | \
MASK(port, LED_DS) | MASK(port, LED_LCLK) | MASK(port, LED_SCLK))
int main(void)
{
PORTB = HIGH(B);
PORTC = HIGH(C);
PORTD = HIGH(D);
DDRB = OUTPUTS(B);
DDRC = OUTPUTS(C);
DDRD = OUTPUTS(D);
while (1);
}