📄 usb.h
字号:
/* ***********************************************************************
**
** Copyright (C) 2002 Jesper Hansen <jesperh@telia.com> and
** Romuald Bialy (MIS) <romek_b@o2.pl>.
**
**
** Yampp-3/USB - low level support library
**
**
*************************************************************************
**
** This file is part of the yampp system.
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software Foundation,
** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
*************************************************************************
**
** Revision History
**
** when what who why
**
** 2002-09-01 1.0 MIS initial public release
**
*********************************************************************** */
#define USB_PORT PORTD
#define USB_TXRDY PD4
#define USB_RXRDY PD5
#define USB_WR PD6
#define USB_RD PD7
#define USB_ADDR 0x8000
#ifndef USB_ASM
#define usb_rxready bit_is_clear(PIN(USB_PORT), USB_RXRDY)
#define usb_txfree bit_is_clear(PIN(USB_PORT), USB_TXRDY)
void usb_init(void);
u08 usb_readbyte(void);
void usb_writebyte(u08 b);
u08 usb_readblock(u08* ptr, u16 length);
u08 usb_writeblock(u08* ptr, u16 length);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -