XenevaOS
Loading...
Searching...
No Matches
lan7800.h
Go to the documentation of this file.
1//
2// lan7800.h
3//
4// USPi - An USB driver for Raspberry Pi written in C
5// Copyright (C) 2018 R. Stange <rsta2@o2online.de>
6//
7// This program is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19//
20#ifndef _uspi_lan7800_h
21#define _uspi_lan7800_h
22
23#include "uspi/usbfunction.h"
24#include "uspi/usbendpoint.h"
25#include "uspi/usbrequest.h"
26#include "uspi/macaddress.h"
27#include "uspi/types.h"
28
29#define FRAME_BUFFER_SIZE 1600
30
43
44void LAN7800Device (TLAN7800Device *pThis, TUSBFunction *pFunction);
45void _LAN7800Device (TLAN7800Device *pThis);
46
47boolean LAN7800DeviceConfigure (TUSBFunction *pUSBFunction);
48
50
51boolean LAN7800DeviceSendFrame (TLAN7800Device *pThis, const void *pBuffer, unsigned nLength);
52
53// pBuffer must have size FRAME_BUFFER_SIZE
54boolean LAN7800DeviceReceiveFrame (TLAN7800Device *pThis, void *pBuffer, unsigned *pResultLength);
55
56// returns TRUE if PHY link is up
58
59#endif
boolean LAN7800DeviceSendFrame(TLAN7800Device *pThis, const void *pBuffer, unsigned nLength)
Definition lan7800.c:485
boolean LAN7800DeviceReceiveFrame(TLAN7800Device *pThis, void *pBuffer, unsigned *pResultLength)
Definition lan7800.c:506
void _LAN7800Device(TLAN7800Device *pThis)
Definition lan7800.c:262
boolean LAN7800DeviceIsLinkUp(TLAN7800Device *pThis)
Definition lan7800.c:563
void LAN7800Device(TLAN7800Device *pThis, TUSBFunction *pFunction)
Definition lan7800.c:247
TMACAddress * LAN7800DeviceGetMACAddress(TLAN7800Device *pThis)
Definition lan7800.c:478
boolean LAN7800DeviceConfigure(TUSBFunction *pUSBFunction)
Definition lan7800.c:289
uint8_t u8
Definition kernel.h:20
Definition lan7800.h:32
TMACAddress m_MACAddress
Definition lan7800.h:38
u8 * m_pTxBuffer
Definition lan7800.h:40
TUSBFunction m_USBFunction
Definition lan7800.h:33
TUSBEndpoint * m_pEndpointBulkIn
Definition lan7800.h:35
TUSBEndpoint * m_pEndpointBulkOut
Definition lan7800.h:36
Definition macaddress.h:29
Definition usbendpoint.h:41
Definition usbfunction.h:33