1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2024-11-25 18:32:49 +02:00
antorcha/tornado/fw/boot.c
2012-11-19 12:30:57 -03:00

30 lines
529 B
C

#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);
}