Subversion Repositories HelenOS

Rev

Rev 4042 | Rev 4148 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4042 Rev 4094
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
/** @addtogroup genarch
29
/** @addtogroup genarch
30
 * @{
30
 * @{
31
 */
31
 */
32
/** @file
32
/** @file
33
 */
33
 */
34
 
34
 
Line 38... Line 38...
38
#include <ddi/irq.h>
38
#include <ddi/irq.h>
39
#include <arch/types.h>
39
#include <arch/types.h>
40
#include <console/chardev.h>
40
#include <console/chardev.h>
41
#include <typedefs.h>
41
#include <typedefs.h>
42
 
42
 
43
struct i8042 {
43
typedef struct {
44
    ioport8_t data;
44
    ioport8_t data;
45
    uint8_t pad[3];
45
    uint8_t pad[3];
46
    ioport8_t status;
46
    ioport8_t status;
47
} __attribute__ ((packed));
47
} __attribute__ ((packed)) i8042_t;
48
typedef struct i8042 i8042_t;
-
 
49
 
48
 
50
typedef struct i8042_instance {
49
typedef struct {
51
    devno_t devno;
50
    devno_t devno;
52
    irq_t irq;
51
    irq_t irq;
53
    i8042_t *i8042;
52
    i8042_t *i8042;
54
    chardev_t *devout;
53
    indev_t kbrdin;
55
} i8042_instance_t;
54
} i8042_instance_t;
56
 
55
 
57
extern bool i8042_init(i8042_t *, devno_t, inr_t, chardev_t *);
56
extern indev_t *i8042_init(i8042_t *, devno_t, inr_t);
58
 
57
 
59
#endif
58
#endif
60
 
59
 
61
/** @}
60
/** @}
62
 */
61
 */