BlinkenArea - GitList
Repositories
Blog
Wiki
mips_sys
Code
Commits
Branches
Tags
Search
Tree:
41147d3
Branches
Tags
master
mips_sys
fw
eth.c
implemented ethernet RX frame detection
Stefan Schuermans
commited
41147d3
at 2012-03-03 16:13:53
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 word * @return word received */ unsigned int eth_rx(void) { while (!eth_ptr[0]); unsigned int w = *(volatile unsigned int *)(eth_ptr + 4); return w; }