BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
d48e86e
Branches
Tags
master
flaneth
firmware
bus.c
header fix
Stefan Schuermans
commited
d48e86e
at 2012-05-02 18:39:39
bus.c
Blame
History
Raw
/* flaneth - flash and ethernet Copyright (C) 2007-2012 Stefan Schuermans <stefan@schuermans.info> Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html a BlinkenArea project - http://www.blinkenarea.org/ */ #include <avr/io.h> #include "bus.h" // initialize void BusInit(void) // (extern) { // address port to output BUS_ADDR = 0x00; // default address BUS_ADDR_DDR = 0xFF; // output // data port to input BUS_DATA = 0x00; // pull-ups off BUS_DATA_DDR = 0x00; // input // read pin to output bit_set(BUS_PORT_nRD, BUS_BIT_nRD); // nRD to high bit_set(BUS_DDR_nRD, BUS_BIT_nRD); // output // write pin to output bit_set(BUS_PORT_nWR, BUS_BIT_nWR); // nWR to high bit_set(BUS_DDR_nWR, BUS_BIT_nWR); // output }