Changeset ac307b2 in mainline for uspace/drv/char/i8042/i8042.h
- Timestamp:
- 2017-11-25T11:12:23Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 98cb5e0d
- Parents:
- f571ca49 (diff), 0851a3d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/i8042/i8042.h
rf571ca49 rac307b2 2 2 * Copyright (c) 2006 Josef Cejka 3 3 * Copyright (c) 2011 Jan Vesely 4 * Copyright (c) 2017 Jiri Svoboda 4 5 * All rights reserved. 5 6 * … … 40 41 #define i8042_H_ 41 42 43 #include <adt/circ_buf.h> 42 44 #include <io/chardev_srv.h> 43 45 #include <ddi.h> 44 46 #include <fibril_synch.h> 45 47 #include <ddf/driver.h> 46 #include "buffer.h"47 48 48 49 #define NAME "i8042" … … 59 60 /** i8042 Port. */ 60 61 typedef struct { 61 struct i8042 *ctl; /**< Controller */ 62 chardev_srvs_t cds; /**< Character device server data */ 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; 63 76 } i8042_port_t; 64 77 65 78 /** i8042 Controller. */ 66 79 typedef struct i8042 { 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. */ 80 /**< I/O registers. */ 81 i8042_regs_t *regs; 82 /** Keyboard port */ 74 83 i8042_port_t *kbd; 84 /** AUX port */ 75 85 i8042_port_t *aux; 76 fibril_mutex_t write_guard; /**< Prevents simultanous port writes.*/ 86 /** Prevents simultanous port writes.*/ 87 fibril_mutex_t write_guard; 77 88 } i8042_t; 78 79 89 80 90 extern int i8042_init(i8042_t *, addr_range_t *, int, int, ddf_dev_t *);
Note:
See TracChangeset
for help on using the changeset viewer.