Advantech RSB-4210 Evaluation Kit Manual do Utilizador Página 70

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 104
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 69
RSB-4210 User Manual 62
set_termios() Called on termios change, serialized against itself by a sema-
phore. May sleep.
set_ldisc() Notifier for discipline change. At the point this is done the disci-
pline is not yet usable. Can now sleep (I think)
throttle() Called by the ldisc to ask the driver to do flow control. Serializa-
tion including with unthrottle is the job of the ldisc layer.
unthrottle() Called by the ldisc to ask the driver to stop flow control.
stop() Ldisc notifier to the driver to stop output. As with throttle the seri-
alizations with start() are down to the ldisc layer.
start() Ldisc notifier to the driver to start output.
hangup() Ask the tty driver to cause a hangup initiated from the host side.
[Can sleep ??]
break_ctl()- Send RS232 break. Can sleep. Can get called in parallel, driver
must serialize (for now), and with write calls.
wait_until_sent() Wait for characters to exit the hardware queue of the driver. Can
sleep
send_xchar() Send XON/XOFF and if possible jump the queue with it in order
to get fast flow control responses.
3.11.3.2 Line Discipline Methods
(A). Flags
Line discipline methods have access to tty->flags field containing the following inter-
esting flags:
TTY_THROTTLED Driver input is throttled. The ldisc should call tty-
>driver->unthrottle() in order to resume reception
when it is ready to process more data.
TTY_DO_WRITE_WAKEUP If set, causes the driver to call the ldisc's
write_wakeup() method in order to resume transmis-
sion when it can accept more data to transmit.
TTY_IO_ERROR If set, causes all subsequent userspace read/write
calls on the tty to fail, returning -EIO.
TTY_OTHER_CLOSED Device is a pty and the other side has closed.
TTY_NO_WRITE_SPLIT Prevent driver from splitting up writes into smaller
chunks.
(B). Locking
Callers to the line discipline functions from the tty layer are required to take line disci-
pline locks. The same is true of calls from the driver side but not yet enforced.
Three calls are now provided
ldisc = tty_ldisc_ref(tty);
Takes a handle to the line discipline in the tty and returns
it. If no ldisc is currently attached or the ldisc is being
closed and re-opened at this point then NULL is returned. While
this handle is held the ldisc will not change or go away.
tty_ldisc_deref(ldisc)
Vista de página 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 103 104

Comentários a estes Manuais

Sem comentários