Changeset 83a2f43 in mainline for uspace/drv/ns8250
- Timestamp:
- 2011-02-15T19:43:50Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- af6b5157
- Parents:
- 34588a80
- File:
-
- 1 edited
-
uspace/drv/ns8250/ns8250.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ns8250/ns8250.c
r34588a80 r83a2f43 94 94 typedef struct ns8250 { 95 95 /** DDF device node */ 96 d evice_t *dev;96 ddf_dev_t *dev; 97 97 /** DDF function node */ 98 function_t *fun;98 ddf_fun_t *fun; 99 99 /** Is there any client conntected to the device? */ 100 100 bool client_connected; … … 189 189 * error number otherwise. 190 190 */ 191 static int ns8250_read( function_t *fun, char *buf, size_t count)191 static int ns8250_read(ddf_fun_t *fun, char *buf, size_t count) 192 192 { 193 193 ns8250_t *ns = NS8250(fun); … … 223 223 * @return Zero on success 224 224 */ 225 static int ns8250_write( function_t *fun, char *buf, size_t count)225 static int ns8250_write(ddf_fun_t *fun, char *buf, size_t count) 226 226 { 227 227 ns8250_t *ns = NS8250(fun); … … 234 234 } 235 235 236 static d evice_ops_t ns8250_dev_ops;236 static ddf_dev_ops_t ns8250_dev_ops; 237 237 238 238 /** The character interface's callbacks. */ … … 242 242 }; 243 243 244 static int ns8250_add_device(d evice_t *dev);244 static int ns8250_add_device(ddf_dev_t *dev); 245 245 246 246 /** The serial port device driver's standard operations. */ … … 675 675 * @param dev The serial port device. 676 676 */ 677 static inline void ns8250_interrupt_handler(d evice_t *dev, ipc_callid_t iid,677 static inline void ns8250_interrupt_handler(ddf_dev_t *dev, ipc_callid_t iid, 678 678 ipc_call_t *icall) 679 679 { … … 706 706 * @param dev The serial port device. 707 707 */ 708 static int ns8250_add_device(d evice_t *dev)708 static int ns8250_add_device(ddf_dev_t *dev) 709 709 { 710 710 ns8250_t *ns = NULL; 711 function_t *fun = NULL;711 ddf_fun_t *fun = NULL; 712 712 bool need_cleanup = false; 713 713 int rc; … … 777 777 ns->fun = fun; 778 778 779 add_function_to_class(fun, "serial");779 ddf_fun_add_to_class(fun, "serial"); 780 780 781 781 printf(NAME ": the %s device has been successfully initialized.\n", … … 800 800 * @param dev The device. 801 801 */ 802 static int ns8250_open( function_t *fun)802 static int ns8250_open(ddf_fun_t *fun) 803 803 { 804 804 ns8250_t *data = (ns8250_t *) fun->dev->driver_data; … … 824 824 * @param dev The device. 825 825 */ 826 static void ns8250_close( function_t *fun)826 static void ns8250_close(ddf_fun_t *fun) 827 827 { 828 828 ns8250_t *data = (ns8250_t *) fun->dev->driver_data; … … 848 848 */ 849 849 static void 850 ns8250_get_props(d evice_t *dev, unsigned int *baud_rate, unsigned int *parity,850 ns8250_get_props(ddf_dev_t *dev, unsigned int *baud_rate, unsigned int *parity, 851 851 unsigned int *word_length, unsigned int* stop_bits) 852 852 { … … 875 875 * @param stop_bits The number of stop bits to be used. 876 876 */ 877 static int ns8250_set_props(d evice_t *dev, unsigned int baud_rate,877 static int ns8250_set_props(ddf_dev_t *dev, unsigned int baud_rate, 878 878 unsigned int parity, unsigned int word_length, unsigned int stop_bits) 879 879 { … … 902 902 * Configure the parameters of the serial communication. 903 903 */ 904 static void ns8250_default_handler( function_t *fun, ipc_callid_t callid,904 static void ns8250_default_handler(ddf_fun_t *fun, ipc_callid_t callid, 905 905 ipc_call_t *call) 906 906 { … … 950 950 printf(NAME ": HelenOS serial port driver\n"); 951 951 ns8250_init(); 952 return d river_main(&ns8250_driver);952 return ddf_driver_main(&ns8250_driver); 953 953 } 954 954
Note:
See TracChangeset
for help on using the changeset viewer.
