1outb(9F) Kernel Functions for Drivers outb(9F)
2
3
4
6 outb, outw, outl, repoutsb, repoutsw, repoutsd - write to an I/O port
7
9 #include <sys/ddi.h>
10 #include <sys/sunddi.h>
11
12 void outb(int port, unsigned char value);
13
14
15 void outw(int port, unsigned short value);
16
17
18 void outl(int port, unsigned long value);
19
20
21 void repoutsb(int port, unsigned char *addr, int count);
22
23
24 void repoutsw(int port, unsigned short *addr, int count);
25
26
27 void repoutsd(int port, unsigned long *addr, int count);
28
29
31 The functions described here are obsolete. For the outb(), outw(), and
32 outl() functions use, respectively, ddi_put8(9F), ddi_put8(9F), and
33 ddi_put8(9F) instead. For repoutsb(), repoutsw(), andrepoutsl(), use,
34 respectively, ddi_rep_put8(9F), ddi_rep_put8(9F), and ddi_rep_put8(9F)
35 instead.
36
38 port A valid I/O port address.
39
40
41 value The data to be written to the I/O port.
42
43
44 addr The address of a buffer from which the values will be fetched.
45
46
47 count The number of values to be written to the I/O port.
48
49
51 These routines write data of various sizes to the I/O port with the
52 address specified by port.
53
54
55 The outb(), outw(), and outl() functions write 8 bits, 16 bits, and 32
56 bits of data respectively, writing the data specified by value.
57
58
59 The repoutsb(), repoutsw(), and repoutsd() functions write multiple
60 8-bit, 16-bit, and 32-bit values, respectively. count specifies the
61 number of values to be written. addr is a pointer to a buffer from
62 which the output values are fetched.
63
65 These functions may be called from user, interrupt, or kernel context.
66
68 See attributes(5) for descriptions of the following attributes:
69
70
71
72
73 ┌─────────────────────────────┬─────────────────────────────┐
74 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │Architecture │x86 │
77 ├─────────────────────────────┼─────────────────────────────┤
78 │Interface Stability │Obsolete │
79 └─────────────────────────────┴─────────────────────────────┘
80
82 isa(4), attributes(5), ddi_put8(9F), ddi_put8(9F), ddi_put8(9F),
83 ddi_rep_put8(9F), ddi_rep_put8(9F), ddi_rep_put8(9F), inb(9F)
84
85
86 Writing Device Drivers
87
88
89
90SunOS 5.11 16 Jan 2006 outb(9F)