This file is indexed.

/usr/include/simavr/avr_usb.h is in libsimavr-dev 1.5+dfsg1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* vim: set sts=4:sw=4:ts=4:noexpandtab
	avr_usb.h

	Copyright 2012 Torbjorn Tyridal <ttyridal@gmail.com>

 	This file is part of simavr.

	simavr 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 3 of the License, or
	(at your option) any later version.

	simavr 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 simavr.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __AVR_USB_H__
#define __AVR_USB_H__

#ifdef __cplusplus
extern "C" {
#endif

#include "sim_avr.h"

enum {
	USB_IRQ_ATTACH = 0,
	USB_IRQ_COUNT
};

// add port number to get the real IRQ
#define AVR_IOCTL_USB_WRITE AVR_IOCTL_DEF('u','s','b','w')
#define AVR_IOCTL_USB_READ AVR_IOCTL_DEF('u','s','b','r')
#define AVR_IOCTL_USB_SETUP AVR_IOCTL_DEF('u','s','b','s')
#define AVR_IOCTL_USB_RESET AVR_IOCTL_DEF('u','s','b','R')
#define AVR_IOCTL_USB_VBUS AVR_IOCTL_DEF('u','s','b','V')
#define AVR_IOCTL_USB_GETIRQ() AVR_IOCTL_DEF('u','s','b',' ')

struct avr_io_usb {
	uint8_t pipe;	//[in]
	uint32_t  sz;		//[in/out]
	uint8_t * buf;	//[in/out]
};
#define AVR_IOCTL_USB_NAK -2
#define AVR_IOCTL_USB_STALL -3
#define AVR_IOCTL_USB_OK 0

typedef struct avr_usb_t {
	avr_io_t	io;
	char name;
	avr_regbit_t	disabled;	// bit in the PRR
	avr_regbit_t	usbrf;		// bit in the MCUSR
	avr_io_addr_t	r_usbcon;	// every usb reg is an offset of this.
	avr_io_addr_t	r_pllcsr;


	uint8_t usb_com_vect;
	uint8_t usb_gen_vect;

	struct usb_internal_state * state;
} avr_usb_t;

void avr_usb_init(avr_t * avr, avr_usb_t * port);

#ifdef __cplusplus
};
#endif

#endif /*__AVR_USB_H__*/