Changes in uspace/drv/char/i8042/i8042.h [0851a3d:7ee7e6a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/i8042/i8042.h
r0851a3d r7ee7e6a 2 2 * Copyright (c) 2006 Josef Cejka 3 3 * Copyright (c) 2011 Jan Vesely 4 * Copyright (c) 2017 Jiri Svoboda5 4 * All rights reserved. 6 5 * … … 41 40 #define i8042_H_ 42 41 43 #include <adt/circ_buf.h>44 42 #include <io/chardev_srv.h> 45 43 #include <ddi.h> 46 44 #include <fibril_synch.h> 47 45 #include <ddf/driver.h> 46 #include "buffer.h" 48 47 49 48 #define NAME "i8042" … … 60 59 /** i8042 Port. */ 61 60 typedef struct { 62 /** Controller */ 63 struct i8042 *ctl; 64 /** Device function */ 65 ddf_fun_t *fun; 66 /** Character device server data */ 67 chardev_srvs_t cds; 68 /** Circular buffer */ 69 circ_buf_t cbuf; 70 /** Buffer data space */ 71 uint8_t buf_data[BUFFER_SIZE]; 72 /** Protect buffer */ 73 fibril_mutex_t buf_lock; 74 /** Signal new data in buffer */ 75 fibril_condvar_t buf_cv; 61 struct i8042 *ctl; /**< Controller */ 62 chardev_srvs_t cds; /**< Character device server data */ 76 63 } i8042_port_t; 77 64 78 65 /** i8042 Controller. */ 79 66 typedef struct i8042 { 80 /**< I/O registers. */ 81 i8042_regs_t *regs; 82 /** Keyboard port */ 67 i8042_regs_t *regs; /**< I/O registers. */ 68 ddf_fun_t *kbd_fun; /**< Pirmary port device function. */ 69 ddf_fun_t *aux_fun; /**< Auxiliary port device function. */ 70 buffer_t kbd_buffer; /**< Primary port buffer. */ 71 buffer_t aux_buffer; /**< Aux. port buffer. */ 72 uint8_t aux_data[BUFFER_SIZE]; /**< Primary port buffer space. */ 73 uint8_t kbd_data[BUFFER_SIZE]; /**< Aux. port buffer space. */ 83 74 i8042_port_t *kbd; 84 /** AUX port */85 75 i8042_port_t *aux; 86 /** Prevents simultanous port writes.*/ 87 fibril_mutex_t write_guard; 76 fibril_mutex_t write_guard; /**< Prevents simultanous port writes.*/ 88 77 } i8042_t; 78 89 79 90 80 extern int i8042_init(i8042_t *, addr_range_t *, int, int, ddf_dev_t *);
Note:
See TracChangeset
for help on using the changeset viewer.