BlinkenArea - GitList
Repositories
Blog
Wiki
mips_sys
Code
Commits
Branches
Tags
Search
Tree:
47f05ce
Branches
Tags
master
mips_sys
fw
eth.c
begin of ethernet RX implementation, so far only test interface to core, does not meet timing
Stefan Schuermans
commited
47f05ce
at 2012-02-20 21:16:03
eth.c
Blame
History
Raw
#include "eth.h" static volatile unsigned char *const eth_ptr = (volatile unsigned char *)0x80000400; /** * @brief check if receiving a character is possible * @return if receiving a character is possible */ int eth_can_rx(void) { return eth_ptr[0]; } /** * @brief receive a character * @return character received */ unsigned char eth_rx(void) { while (!eth_ptr[0]); /* wait for data */ unsigned char chr = eth_ptr[4]; /* read data */ eth_ptr[4] = 0; /* remove data from FIFO */ return chr; }