mirror of
git://projects.qi-hardware.com/antorcha.git
synced 2024-11-29 11:58:26 +02:00
30 lines
529 B
C
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);
|
|
}
|