Contiki 2.6
|
00001 #ifndef __RTL8019DEV_H__ 00002 #define __RTL8019DEV_H__ 00003 00004 /***************************************************************************** 00005 * Module Name: Realtek 8019AS Driver Interface for uIP-AVR Port 00006 * 00007 * Created By: Louis Beaudoin (www.embedded-creations.com) 00008 * 00009 * Original Release: September 21, 2002 00010 * 00011 * Module Description: 00012 * Provides three functions to interface with the Realtek 8019AS driver 00013 * These functions can be called directly from the main uIP control loop 00014 * to send packets from uip_buf and uip_appbuf, and store incoming packets to 00015 * uip_buf 00016 * 00017 * September 30, 2002 - Louis Beaudoin 00018 * Modifications required to handle the packet receive function changes in 00019 * rtl8019.c. There is no longer a need to poll for an empty buffer or 00020 * an overflow. 00021 * Added support for the Imagecraft Compiler 00022 * 00023 *****************************************************************************/ 00024 00025 #include "net/uip.h" 00026 #include "dev/rtl8019.h" 00027 00028 /***************************************************************************** 00029 * RTL8019dev_init() 00030 * Created By: Louis Beaudoin 00031 * Date: September 21, 2002 00032 * Description: Power-up initialization of the RTL8019 00033 *****************************************************************************/ 00034 void RTL8019dev_init(void); 00035 00036 00037 /***************************************************************************** 00038 * RTL8019dev_send() 00039 * Created By: Louis Beaudoin 00040 * Date: September 21, 2002 00041 * Description: Sends the packet contained in uip_buf and uip_appdata over 00042 * the network 00043 *****************************************************************************/ 00044 void RTL8019dev_send(void); 00045 00046 00047 /***************************************************************************** 00048 * unsigned char/int RTL8019dev_poll() 00049 * Returns: Length of the packet retreived, or zero if no packet retreived 00050 * Created By: Louis Beaudoin 00051 * Date: September 21, 2002 00052 * Description: Polls the RTL8019 looking for an overflow condition or a new 00053 * packet in the receive buffer. If a new packet exists and 00054 * will fit in uip_buf, it is retreived, and the length is 00055 * returned. A packet bigger than the buffer is discarded 00056 *****************************************************************************/ 00057 unsigned int RTL8019dev_poll(void); 00058 00059 00060 /***************************************************************************** 00061 * RTL8019dev_exit() 00062 * Created By: - 00063 * Date: - 00064 * Description: Final shutdown of the RTL8019 00065 *****************************************************************************/ 00066 void RTL8019dev_exit(void); 00067 00068 00069 #endif /* __RTL8019DEV_H__ */