OpenCores
URL https://opencores.org/ocsvn/opb_usblite/opb_usblite/trunk

Subversion Repositories opb_usblite

[/] [opb_usblite/] [trunk/] [drivers/] [opb_usblite_v1_00_a/] [src/] [usblite_l.c] - Blame information for rev 6

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 6 rehnmaak
--    it under the terms of the GNU Lesser General Public License as published by
13 2 rehnmaak
--    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 6 rehnmaak
--    GNU Lesser General Public License for more details.
20 2 rehnmaak
--
21 6 rehnmaak
--    You should have received a copy of the GNU Lesser General Public License
22 2 rehnmaak
--    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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.