41147d391f30f2357048efbf73b98abcf5fdfed8
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

1) #include "eth.h"
2) 
3) static volatile unsigned char *const eth_ptr =
4)   (volatile unsigned char *)0x80000400;
5) 
6) /**
7)  * @brief check if receiving a character is possible
8)  * @return if receiving a character is possible
9)  */
10) int eth_can_rx(void)
11) {
12)   return eth_ptr[0];
13) }
14) 
15) /**
Stefan Schuermans implemented ethernet RX fra...

Stefan Schuermans authored 12 years ago

16)  * @brief receive a word
17)  * @return word received
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

18)  */
Stefan Schuermans implemented ethernet RX fra...

Stefan Schuermans authored 12 years ago

19) unsigned int eth_rx(void)
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

20) {
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

21)   while (!eth_ptr[0]);
Stefan Schuermans implemented ethernet RX fra...

Stefan Schuermans authored 12 years ago

22)   unsigned int w = *(volatile unsigned int *)(eth_ptr + 4);
23)   return w;