/* flaneth - flash and ethernet
   Copyright (C) 2007-2012 Stefan Schuermans <stefan@schuermans.info>
   Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html
   a BlinkenArea project - http://www.blinkenarea.org/ */

#ifndef INC_rtl8019
#define INC_rtl8019

// initialize
extern void RtlInit(void);

// re-initialize RT8019 (i.e. if MAC changed)
extern void RtlReinit(void);

// tick procedure - call every 200ms
extern void RtlTick200(void);

// task function to do the work - call from main loop
extern void RtlTask(void);

// write an ethernet frame to the RTL8019
extern void RtlWriteFrame(unsigned char *pData, unsigned short Length);

// read an ethernet frame from the RTL8019
// *pLength must be initialized to the buffer size
extern void RtlReadFrame(unsigned char *pData, unsigned short *pLength);

#endif // #ifndef INC_rtl8019
