Deleted Added
full compact
iiconf.h (43301) iiconf.h (43346)
1/*-
2 * Copyright (c) 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: iiconf.h,v 1.3 1999/01/09 18:08:24 nsouch Exp $
26 * $Id: iiconf.h,v 1.4 1999/01/27 21:49:53 dillon Exp $
27 */
28#ifndef __IICONF_H
29#define __IICONF_H
30
31#include <sys/queue.h>
32
33#define IICPRI (PZERO+8) /* XXX sleep/wakeup queue priority */
34

--- 66 unchanged lines hidden (view full) ---

101extern int iicbus_release_bus(device_t, device_t);
102extern device_t iicbus_alloc_bus(device_t);
103
104extern void iicbus_intr(device_t, int, char *);
105
106extern int iicbus_null_repeated_start(device_t, u_char);
107extern int iicbus_null_callback(device_t, int, caddr_t);
108
27 */
28#ifndef __IICONF_H
29#define __IICONF_H
30
31#include <sys/queue.h>
32
33#define IICPRI (PZERO+8) /* XXX sleep/wakeup queue priority */
34

--- 66 unchanged lines hidden (view full) ---

101extern int iicbus_release_bus(device_t, device_t);
102extern device_t iicbus_alloc_bus(device_t);
103
104extern void iicbus_intr(device_t, int, char *);
105
106extern int iicbus_null_repeated_start(device_t, u_char);
107extern int iicbus_null_callback(device_t, int, caddr_t);
108
109#define iicbus_repeated_start(bus,slave,timeout) \
110 (IICBUS_REPEATED_START(device_get_parent(bus), slave, timeout))
111#define iicbus_reset(bus,speed,addr,oldaddr) \
112 (IICBUS_RESET(device_get_parent(bus), speed, addr, oldaddr))
113
114/* basic I2C operations */
115extern int iicbus_started(device_t);
116extern int iicbus_start(device_t, u_char, int);
117extern int iicbus_stop(device_t);
109#define iicbus_reset(bus,speed,addr,oldaddr) \
110 (IICBUS_RESET(device_get_parent(bus), speed, addr, oldaddr))
111
112/* basic I2C operations */
113extern int iicbus_started(device_t);
114extern int iicbus_start(device_t, u_char, int);
115extern int iicbus_stop(device_t);
116extern int iicbus_repeated_start(device_t, u_char, int);
118extern int iicbus_write(device_t, char *, int, int *, int);
119extern int iicbus_read(device_t, char *, int, int *, int, int);
120
117extern int iicbus_write(device_t, char *, int, int *, int);
118extern int iicbus_read(device_t, char *, int, int *, int, int);
119
120/* single byte read/write functions, start/stop not managed */
121extern int iicbus_write_byte(device_t, char, int);
122extern int iicbus_read_byte(device_t, char *, int);
123
121/* Read/write operations with start/stop conditions managed */
122extern int iicbus_block_write(device_t, u_char, char *, int, int *);
123extern int iicbus_block_read(device_t, u_char, char *, int, int *);
124
125extern u_char iicbus_get_addr(device_t);
126
127#endif
124/* Read/write operations with start/stop conditions managed */
125extern int iicbus_block_write(device_t, u_char, char *, int, int *);
126extern int iicbus_block_read(device_t, u_char, char *, int, int *);
127
128extern u_char iicbus_get_addr(device_t);
129
130#endif