概述
/*
* This structure describes all the operations that can be done on the
* physical hardware. See
Documentation/serial/driver for details.
*/
struct
uart_ops {
unsigned int
(*tx_empty)(struct uart_port *);
void
(*set_mctrl)(struct uart_port *, unsigned int mctrl);
unsigned int
(*get_mctrl)(struct uart_port *);
void
(*stop_tx)(struct uart_port *);
void
(*start_tx)(struct uart_port *);
void
(*throttle)(struct uart_port *);
void
(*unthrottle)(struct uart_port *);
void
(*send_xchar)(struct uart_port *, char ch);
void
(*stop_rx)(struct uart_port *);
void
(*enable_ms)(struct uart_port *);
void
(*break_ctl)(struct uart_port *, int ctl);
int (*startup)(struct uart_port *);
void
(*shutdown)(struct uart_port *);
void
(*flush_buffer)(struct uart_port *);
void
(*set_termios)(struct uart_port *, struct ktermios *new,
struct ktermios *old);
void
(*set_ldisc)(struct uart_port *, int new);
void
(*pm)(struct uart_port *, unsigned int state,
unsigned int oldstate);
int
(*set_wake)(struct uart_port *, unsigned int state);
/*
* Return a string describing the type of the port
*/
const char
*(*type)(struct uart_port *);
/*
* Release IO and memory resources used by the port.
* This includes iounmap if necessary.
*/
void
(*release_port)(struct uart_port *);
/*
* Request IO and memory resources used by the port.
* This includes iomapping the port if necessary.
*/
int
(*request_port)(struct uart_port *);
void
(*config_port)(struct uart_port *, int);
int
(*verify_port)(struct uart_port *, struct serial_struct *);
int
(*ioctl)(struct uart_port *, unsigned int, unsigned long);
#ifdef CONFIG_CONSOLE_POLL
int
(*poll_init)(struct uart_port *);
void
(*poll_put_char)(struct uart_port *, unsigned char);
int
(*poll_get_char)(struct uart_port *);
#endif
};
static struct uart_ops atmel_pops = {
.tx_empty = atmel_tx_empty,
.set_mctrl = atmel_set_mctrl,
.get_mctrl = atmel_get_mctrl,
.stop_tx = atmel_stop_tx,
.start_tx = atmel_start_tx,
.stop_rx = atmel_stop_rx,
.enable_ms = atmel_enable_ms,
.break_ctl = atmel_break_ctl,
.startup = atmel_startup,
.shutdown = atmel_shutdown,
.flush_buffer = atmel_flush_buffer,
.set_termios = atmel_set_termios,
.set_ldisc = atmel_set_ldisc,
.type = atmel_type,
.release_port = atmel_release_port,
.request_port = atmel_request_port,
.config_port = atmel_config_port,
.verify_port = atmel_verify_port,
.pm = atmel_serial_pm,
.ioctl = atmel_ioctl,
#ifdef CONFIG_CONSOLE_POLL
.poll_get_char = atmel_poll_get_char,
.poll_put_char = atmel_poll_put_char,
#endif
};
最后
以上就是贪玩发夹为你收集整理的linux-at91——struct uart_ops的全部内容,希望文章能够帮你解决linux-at91——struct uart_ops所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复