URL
https://opencores.org/ocsvn/opb_usblite/opb_usblite/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
| Line No. |
Rev |
Author |
Line |
| 1 |
2 |
rehnmaak |
/*
|
| 2 |
|
|
--
|
| 3 |
|
|
-- opb_usblite - opb_uartlite replacement
|
| 4 |
|
|
--
|
| 5 |
|
|
-- opb_usblite is using components from Rudolf Usselmann see
|
| 6 |
|
|
-- http://www.opencores.org/cores/usb_phy/
|
| 7 |
|
|
-- and Joris van Rantwijk see http://www.xs4all.nl/~rjoris/fpga/usb.html
|
| 8 |
|
|
--
|
| 9 |
|
|
-- Copyright (C) 2010 Ake Rehnman
|
| 10 |
|
|
--
|
| 11 |
|
|
-- This program is free software: you can redistribute it and/or modify
|
| 12 |
|
|
-- it under the terms of the GNU General Public License as published by
|
| 13 |
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
| 14 |
|
|
-- (at your option) any later version.
|
| 15 |
|
|
--
|
| 16 |
|
|
-- This program is distributed in the hope that it will be useful,
|
| 17 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 18 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 19 |
|
|
-- GNU General Public License for more details.
|
| 20 |
|
|
--
|
| 21 |
|
|
-- You should have received a copy of the GNU General Public License
|
| 22 |
|
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 23 |
|
|
--
|
| 24 |
|
|
*/
|
| 25 |
|
|
#include "usblite_l.h"
|
| 26 |
|
|
|
| 27 |
|
|
/******************************************************************************/
|
| 28 |
|
|
void usblite_SendByte(unsigned int base, unsigned char data)
|
| 29 |
|
|
{
|
| 30 |
|
|
while (usblite_mIsTransmitFull(base));
|
| 31 |
|
|
|
| 32 |
|
|
usblite_out32(base + XUL_TX_FIFO_OFFSET, data);
|
| 33 |
|
|
}
|
| 34 |
|
|
|
| 35 |
|
|
|
| 36 |
|
|
/****************************************************************************/
|
| 37 |
|
|
unsigned char usblite_RecvByte(unsigned int base)
|
| 38 |
|
|
{
|
| 39 |
|
|
while (usblite_mIsReceiveEmpty(base));
|
| 40 |
|
|
|
| 41 |
|
|
return (unsigned char)usblite_in32(base + XUL_RX_FIFO_OFFSET);
|
| 42 |
|
|
}
|
| 43 |
|
|
|
© copyright 1999-2026
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.