BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
e8658d5
Branches
Tags
master
flaneth
firmware
bus.c
initial commit after making CF identify work
Stefan Schuermans
commited
e8658d5
at 2012-04-15 19:57:57
bus.c
Blame
History
Raw
/* flaneth - flash and ethernet version 0.2 date 2008-11-08 Copyright (C) 2007-2008 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 }