本文整理汇总了C++中port_to_gser函数的典型用法代码示例。如果您正苦于以下问题:C++ port_to_gser函数的具体用法?C++ port_to_gser怎么用?C++ port_to_gser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了port_to_gser函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gser_connect
static void gser_connect(struct gserial *port)
{
struct f_gser *gser = port_to_gser(port);
gser->serial_state |= ACM_CTRL_DSR | ACM_CTRL_DCD;
gser_notify_serial_state(gser);
}
示例2: gser_send_modem_ctrl_bits
static int gser_send_modem_ctrl_bits(struct gserial *port, int ctrl_bits)
{
struct f_gser *gser = port_to_gser(port);
gser->serial_state = ctrl_bits;
return gser_notify_serial_state(gser);
}
示例3: gser_get_rts
unsigned int gser_get_rts(struct gserial *port)
{
struct f_gser *gser = port_to_gser(port);
if (gser->port_handshake_bits & ACM_CTRL_RTS)
return 1;
else
return 0;
}
示例4: gser_send_break
static int gser_send_break(struct gserial *port, int duration)
{
struct f_gser *gser = port_to_gser(port);
u16 state;
state = gser->serial_state;
state &= ~ACM_CTRL_BRK;
if (duration)
state |= ACM_CTRL_BRK;
gser->serial_state = state;
return gser_notify_serial_state(gser);
}
示例5: gser_send_ring_indicator
unsigned int gser_send_ring_indicator(struct gserial *port, unsigned int yes)
{
struct f_gser *gser = port_to_gser(port);
u16 state;
state = gser->serial_state;
state &= ~ACM_CTRL_RI;
if (yes)
state |= ACM_CTRL_RI;
gser->serial_state = state;
return gser_notify_serial_state(gser);
}
示例6: gser_send_carrier_detect
unsigned int gser_send_carrier_detect(struct gserial *port, unsigned int yes)
{
struct f_gser *gser = port_to_gser(port);
u16 state;
state = gser->serial_state;
state &= ~ACM_CTRL_DCD;
if (yes)
state |= ACM_CTRL_DCD;
gser->serial_state = state;
return gser_notify_serial_state(gser);
}