GEX thesis source code, full text, references

ch.unit.do.tex 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. \section{Digital Output}
  2. The digital output unit provides a write access to one or more pins of a \gls{GPIO} port. This unit additionally supports pulse generation on any of its pins; this is implemented in software, with timing derived from the system timebase, in order to support pulses on all pins regardless of hardware \gls{PWM} support. Pins in commands are expressed in the packed format (\cref{sec:packedpins}).
  3. \subsection{Digital Output Configuration}
  4. \begin{inicode}
  5. [DO:out@1]
  6. # Port name
  7. port=A
  8. # Pins (comma separated, supports ranges)
  9. pins=0
  10. # Initially high pins
  11. initial=
  12. # Open-drain pins
  13. open-drain=
  14. \end{inicode}
  15. \subsection{Digital Output Commands}
  16. \begin{cmdlist}
  17. 0 & \cname{WRITE} Write to all pins
  18. & \begin{cmdreq}
  19. \cfield{u16} new value
  20. \end{cmdreq} \\
  21. 1 & \cname{SET} Set selected pins to 1
  22. & \begin{cmdreq}
  23. \cfield{u16} pins to set
  24. \end{cmdreq} \\
  25. 2 & \cname{CLEAR} Set selected pins to 0
  26. & \begin{cmdreq}
  27. \cfield{u16} pins to clear
  28. \end{cmdreq} \\
  29. 3 & \cname{TOGGLE} Toggle selected pins
  30. & \begin{cmdreq}
  31. \cfield{u16} pins to toggle
  32. \end{cmdreq} \\
  33. 4 & \cname{PULSE}
  34. Generate a pulse on the selected pins. The microsecond scale may be used only for 0--999\,$\mu$s.
  35. & \begin{cmdreq}
  36. \cfield{u16} pins to pulse
  37. \cfield{bool} active level
  38. \cfield{u8} scale: 0--ms, 1--$\mu$s
  39. \cfield{u16} duration
  40. \end{cmdreq}
  41. \end{cmdlist}