redone all command tables

master
Ondřej Hruška 6 years ago
parent ae130bf35f
commit b2d9498850
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 5
      ch.unit.1wire.tex
  2. 70
      ch.unit.di.tex
  3. 64
      ch.unit.do.tex
  4. 178
      ch.unit.fcap.tex
  5. 80
      ch.unit.i2c.tex
  6. 76
      ch.unit.npx.tex
  7. 54
      ch.unit.sipo.tex
  8. 56
      ch.unit.spi.tex
  9. 47
      ch.unit.usart.tex
  10. 7
      ctuth-pkg.tex
  11. 297
      document_config.tex
  12. 204
      mytabto.sty
  13. 60
      pre.ctuthesis_config.tex
  14. 88
      pre.gex_command_tables.tex
  15. 7
      pre.minted.tex
  16. 43
      pre.spacing_config.tex
  17. 24
      pre.utils.tex
  18. 0
      thesis.abstract.tex
  19. 0
      thesis.declaration.tex
  20. BIN
      thesis.pdf
  21. 6
      thesis.tex
  22. 0
      thesis.thanks.tex

@ -16,14 +16,9 @@ pin=A0
parasitic=N
\end{inicode}
\subsection{1-Wire Events}
This unit generates no events.
\subsection{1-Wire Commands}
\begin{cmdlist}
0 & \cname{CHECK\_PRESENCE}
Test if there are any devices attached to the bus.
& \begin{cmdresp}

@ -31,49 +31,37 @@ hold-off=100
\subsection{Digital Input Events}
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Meaning} & \textbf{Payload} \\
\midrule
\begin{cmdlist}
0 & \flname{PIN\_CHANGE}
0 & \cname{PIN\_CHANGE}
A pin change event. The payload includes a snapshot of all configured pins captured immediately after the change was registered.
& \makecell[tl]{
\fld{u16} changed pins \\
\fld{u16} port snapshot
} \\
\bottomrule
\end{tabularx}
& \begin{cmdpld}
\cfield{u16} changed pins
\cfield{u16} port snapshot
\end{cmdpld}
\end{cmdlist}
\subsection{Digital Input Commands}
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Payload} \\
\midrule
0 & \flname{READ} Read the pins
& \makecell[tl]{
\fldresp
\fld{u16} pin states
} \\
1 & \flname{ARM\_SINGLE} Arm for a single event
& \makecell[tl]{
\fldreq
\fld{u16} pins to arm
} \\
2 & \flname{ARM\_AUTO} Arm with automatic re-arming after each event
& \makecell[tl]{
\fldreq
\fld{u16} pins to arm
} \\
3 & \flname{DISARM} Dis-arm selected pins
& \makecell[tl]{
\fldreq
\fld{u16} pins to dis-arm
} \\
\bottomrule
\end{tabularx}
\begin{cmdlist}
0 & \cname{READ} Read the pins
& \begin{cmdresp}
\cfield{u16} pin states
\end{cmdresp} \\
1 & \cname{ARM\_SINGLE} Arm for a single event
& \begin{cmdreq}
\cfield{u16} pins to arm
\end{cmdreq} \\
2 & \cname{ARM\_AUTO} Arm with automatic re-arming after each event
& \begin{cmdreq}
\cfield{u16} pins to arm
\end{cmdreq} \\
3 & \cname{DISARM} Dis-arm selected pins
& \begin{cmdreq}
\cfield{u16} pins to dis-arm
\end{cmdreq}
\end{cmdlist}

@ -16,49 +16,37 @@ initial=
open-drain=
\end{inicode}
\subsection{Digital Output Events}
This unit generates no events.
\subsection{Digital Output Commands}
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Payload} \\
\midrule
\begin{cmdlist}
0 & \flname{WRITE} Write to all pins
& \makecell[tl]{
\fldreq
\fld{u16} new value
} \\
0 & \cname{WRITE} Write to all pins
& \begin{cmdreq}
\cfield{u16} new value
\end{cmdreq} \\
1 & \flname{SET} Set selected pins to 1
& \makecell[tl]{
\fldreq
\fld{u16} pins to set
} \\
1 & \cname{SET} Set selected pins to 1
& \begin{cmdreq}
\cfield{u16} pins to set
\end{cmdreq} \\
2 & \flname{CLEAR} Set selected pins to 0
& \makecell[tl]{
\fldreq
\fld{u16} pins to clear
} \\
2 & \cname{CLEAR} Set selected pins to 0
& \begin{cmdreq}
\cfield{u16} pins to clear
\end{cmdreq} \\
3 & \flname{TOGGLE} Toggle selected pins
& \makecell[tl]{
\fldreq
\fld{u16} pins to toggle
} \\
3 & \cname{TOGGLE} Toggle selected pins
& \begin{cmdreq}
\cfield{u16} pins to toggle
\end{cmdreq} \\
4 & \flname{PULSE}
4 & \cname{PULSE}
Generate a pulse on the selected pins. The $\mu$s scale may be used only for 0--999\,$\mu$s.
& \makecell[tl]{
\fldreq
\fld{u16} pins to pulse \\
\fld{u8} active level (0, 1) \\
\fld{u8} scale: 0-ms, 1-$\mu$s \\
\fld{u16} duration
} \\
\bottomrule
\end{tabularx}
& \begin{cmdreq}
\cfield{u16} pins to pulse
\cfield{u8} active level (0, 1)
\cfield{u8} scale: 0-ms, 1-$\mu$s
\cfield{u16} duration
\end{cmdreq}
\end{cmdlist}

@ -59,129 +59,115 @@ initial-mode=N
Some commands include optional parameter setting. Using 0 in the field keeps the previous value. Those fields are marked with *.
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Payload} \\
\midrule
\begin{cmdlist}
0 & \flname{STOP} Stop all measurements, go idle & \\
0 & \cname{STOP} Stop all measurements, go idle & \\
1 & \flname{INDIRECT\_CONT\_START}
1 & \cname{INDIRECT\_CONT\_START}
Start a repeated reciprocal measurement
& \\
2 & \flname{INDIRECT\_BUTST\_START}
2 & \cname{INDIRECT\_BUTST\_START}
Start a burst of reciprocal measurements
& \makecell[tl]{
\fldreq
\fld{u16} number of periods \\
\fldresp
\fld{u16} core speed (MHz) \\
\fld{u16} number of periods \\
\fld{u64} sum of all periods (ticks) \\
\fld{u16} sum of on-times (ticks)
} \\
3 & \flname{DIRECT\_CONT\_START}
& \begin{cmdreq}
\cfield{u16} number of periods
\end{cmdreq}
\cjoin
\begin{cmdresp}
\cfield{u16} core speed (MHz)
\cfield{u16} number of periods
\cfield{u64} sum of all periods (ticks)
\cfield{u16} sum of on-times (ticks)
\end{cmdresp} \\
3 & \cname{DIRECT\_CONT\_START}
Start a repeated direct measurement
& \makecell[tl]{
\fldreq
\fld{u16} *measurement time \\
\fld{u8} *prescaller (1, 2, 4, 8) \\
} \\
& \begin{cmdreq}
\cfield{u16} *measurement time
\cfield{u8} *prescaller (1, 2, 4, 8)
\end{cmdreq} \\
4 & \flname{DIRECT\_BURST\_START}
4 & \cname{DIRECT\_BURST\_START}
Start a single direct measurement. Longer capture time may help increase accuracy for stable signals.
& \makecell[tl]{
\fldreq
\fld{u16} *measurement time (ms) \\
\fld{u8} *prescaller (1, 2, 4, 8) \\
\fldresp
\fld{u8} prescaller \\
\fld{u16} measurement time (ms) \\
\fld{u32} pulse count
} \\
5 & \flname{FREECOUNT\_START}
& \begin{cmdreq}
\cfield{u16} *measurement time (ms)
\cfield{u8} *prescaller (1, 2, 4, 8)
\end{cmdreq}
\cjoin
\begin{cmdresp}
\cfield{u8} prescaller
\cfield{u16} measurement time (ms)
\cfield{u32} pulse count
\end{cmdresp} \\
5 & \cname{FREECOUNT\_START}
Clear and start the pulse counter
& \makecell[tl]{
\fldreq
\fld{u8} *prescaller (1,2,4,8) \\
} \\
& \begin{cmdreq}
\cfield{u8} *prescaller (1,2,4,8)
\end{cmdreq} \\
6 & \flname{MEASURE\_SINGLE\_PULSE}
6 & \cname{MEASURE\_SINGLE\_PULSE}
Measure a single pulse of the active level. Waits for a rising edge.
& \makecell[tl]{
\fldresp
\fld{u16} core speed (MHz) \\
\fld{u32} pulse length (ticks) \\
} \\
& \begin{cmdresp}
\cfield{u16} core speed (MHz)
\cfield{u32} pulse length (ticks)
\end{cmdresp} \\
7 & \flname{FREECOUNT\_CLEAR}
7 & \cname{FREECOUNT\_CLEAR}
Read and clear the pulse counter.
& \makecell[tl]{
\fldresp
\fld{u32} previous counter value \\
} \\
& \begin{cmdresp}
\cfield{u32} previous counter value
\end{cmdresp} \\
10 & \flname{INDIRECT\_CONT\_READ}
10 & \cname{INDIRECT\_CONT\_READ}
Read the latest value from the continuous reciprocal measurement, if running.
& \makecell[tl]{
\fldresp
\fld{u16} core speed (MHz) \\
\fld{u32} period length (ticks) \\
\fld{u32} on-time (ticks) \\
} \\
11 & \flname{DIRECT\_CONT\_READ}
& \begin{cmdresp}
\cfield{u16} core speed (MHz)
\cfield{u32} period length (ticks)
\cfield{u32} on-time (ticks)
\end{cmdresp} \\
11 & \cname{DIRECT\_CONT\_READ}
Read the latest value from the continuous direct measurement, if running.
& \makecell[tl]{
\fldresp
\fld{u8} prescaller \\
\fld{u16} measurement time (ms) \\
\fld{u32} pulse count
} \\
12 & \flname{FREECOUNT\_READ}
& \begin{cmdresp}
\cfield{u8} prescaller
\cfield{u16} measurement time (ms)
\cfield{u32} pulse count
\end{cmdresp} \\
12 & \cname{FREECOUNT\_READ}
Read the pulse counter value
& \makecell[tl]{
\fldresp
\fld{u32} pulse count
} \\
& \begin{cmdresp}
\cfield{u32} pulse count
\end{cmdresp} \\
20 & \flname{SET\_POLARITY}
20 & \cname{SET\_POLARITY}
Set pulse polarity (active level)
& \makecell[tl]{
\fldresp
\fld{u8} polarity (0,1)
} \\
& \begin{cmdresp}
\cfield{u8} polarity (0,1)
\end{cmdresp} \\
21 & \flname{SET\_PRESCALLER}
21 & \cname{SET\_PRESCALLER}
Set prescaller for the direct mode
& \makecell[tl]{
\fldresp
\fld{u8} prescaller (1,2,4,8) \\
} \\
& \begin{cmdresp}
\cfield{u8} prescaller (1,2,4,8)
\end{cmdresp} \\
22 & \flname{SET\_INPUT\_FILTER}
22 & \cname{SET\_INPUT\_FILTER}
Set input filtering (a hardware feature designed to ignore glitches)
& \makecell[tl]{
\fldresp
\fld{u8} filtering factor (0-15, 0=off) \\
} \\
& \begin{cmdresp}
\cfield{u8} filtering factor (0-15, 0=off)
\end{cmdresp} \\
23 & \flname{SET\_DIR\_MSEC}
23 & \cname{SET\_DIR\_MSEC}
Set direct measurement time
& \makecell[tl]{
\fldresp
\fld{u16} measurement time (ms) \\
} \\
& \begin{cmdresp}
\cfield{u16} measurement time (ms)
\end{cmdresp} \\
30 & \flname{RESTORE\_DEFAULTS}
30 & \cname{RESTORE\_DEFAULTS}
Restore all run-time adjustable parameters to their configured default values
& \\
\bottomrule
\end{tabularx}
\todo[inline]{split table to improve page layout}
\end{cmdlist}

@ -23,57 +23,45 @@ digital-filter=0
\subsection{I2C Commands}
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Payload} \\
\midrule
\begin{cmdlist}
0 & \flname{WRITE}
0 & \cname{WRITE}
Raw write transaction
& \makecell[tl]{
\fldreq
\fld{u16} slave address \\
\fld{u8[]} bytes to write \\
} \\
& \begin{cmdreq}
\cfield{u16} slave address
\cfield{u8[]} bytes to write
\end{cmdreq} \\
1 & \flname{READ}
1 & \cname{READ}
Raw read transaction
& \makecell[tl]{
\fldreq
\fld{u16} slave address \\
\fld{u16} number of read bytes \\
\fldresp
\fld{u8[]} received bytes \\
} \\
2 & \flname{WRITE\_REG}
& \begin{cmdreq}
\cfield{u16} slave address
\cfield{u16} number of read bytes
\end{cmdreq}
\cjoin
\begin{cmdresp}
\cfield{u8[]} received bytes
\end{cmdresp} \\
2 & \cname{WRITE\_REG}
Write to a slave register. Sends the register number and the data in the same I2C transaction. Multiple registers can be written to slaves supporting auto-increment.
& \makecell[tl]{
\fldreq
\fld{u16} slave address \\
\fld{u8} register number \\
\fld{u8[]} bytes to write \\
} \\
& \begin{cmdreq}
\cfield{u16} slave address
\cfield{u8} register number
\cfield{u8[]} bytes to write
\end{cmdreq} \\
3 & \flname{READ\_REG}
3 & \cname{READ\_REG}
Read from a slave register. Writes the register number and issues a read transaction of the given length. Multiple registers can be read from slaves supporting auto-increment.
& \makecell[tl]{
\fldreq
\fld{u16} slave address \\
\fld{u8} register number \\
\fld{u16} number of read bytes \\
\fldresp
\fld{u8[]} received bytes \\
} \\
\bottomrule
\end{tabularx}
& \begin{cmdreq}
\cfield{u16} slave address
\cfield{u8} register number
\cfield{u16} number of read bytes
\end{cmdreq}
\cjoin
\begin{cmdresp}
\cfield{u8[]} received bytes
\end{cmdresp} \\
\end{cmdlist}

@ -16,60 +16,52 @@ pixels=32
\subsection{NeoPixel Commands}
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Payload} \\
\midrule
0 & \flname{CLEAR}
\begin{cmdlist}
0 & \cname{CLEAR}
Switch all LEDs off (sets them to black) & \\
1 & \flname{LOAD}
1 & \cname{LOAD}
Load a sequence of R,G,B bytes
& \makecell[tl]{
\fldreq
\tabitem For each LED: \\
~~\fldo{u8} red \\
~~\fldo{u8} green \\
~~\fldo{u8} blue \\
} \\
4 & \flname{LOAD\_U32\_ZRGB}
& \begin{cmdreq}
\item For each LED:
\begin{pldlist}
\cfield{u8} red
\cfield{u8} green
\cfield{u8} blue
\end{pldlist}
\end{cmdreq} \\
4 & \cname{LOAD\_U32\_ZRGB}
Load 32-bit big-endian 0xRRGGBB (0,R,G,B)
& \makecell[tl]{
\fldreq
\fld{u32[]} color data BE
} \\
& \begin{cmdreq}
\cfield{u32[]} color data BE
\end{cmdreq} \\
5 & \flname{LOAD\_U32\_ZBGR}
5 & \cname{LOAD\_U32\_ZBGR}
Load 32-bit big-endian 0xBBGGRR (0,B,G,R)
& \makecell[tl]{
\fldreq
\fld{u32[]} color data BE
} \\
& \begin{cmdreq}
\cfield{u32[]} color data BE
\end{cmdreq} \\
6 & \flname{LOAD\_U32\_RGBZ}
6 & \cname{LOAD\_U32\_RGBZ}
Load 32-bit little-endian 0xBBGGRR (R,G,B,0)
& \makecell[tl]{
\fldreq
\fld{u32[]} color data LE
} \\
& \begin{cmdreq}
\cfield{u32[]} color data LE
\end{cmdreq} \\
7 & \flname{LOAD\_U32\_BGRZ}
7 & \cname{LOAD\_U32\_BGRZ}
Load 32-bit little-endian 0xRRGGBB (B,G,R,0)
& \makecell[tl]{
\fldreq
\fld{u32[]} color data LE
} \\
& \begin{cmdreq}
\cfield{u32[]} color data LE
\end{cmdreq} \\
10 & \flname{GET\_LEN}
10 & \cname{GET\_LEN}
Get number of LEDs in the strip
& \makecell[tl]{
\fldresp
\fld{u16} number of LEDs
} \\
\bottomrule
\end{tabularx}
& \begin{cmdresp}
\cfield{u16} number of LEDs
\end{cmdresp} \\
\end{cmdlist}

@ -25,32 +25,38 @@ data-pins=3
\subsection{SIPO Commands}
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Payload} \\
\midrule
0 & \flname{WRITE}
\begin{cmdlist}
0 & \cname{WRITE}
Load the shift registers and leave the data outputs in the "trailing data" state before sending the Store pulse.
& \makecell[tl]{
\fldreq
\fld{u16} trailing data \\
\tabitem For each output: \\
~~\fldo{u8[]} data to load
} \\
1 & \flname{DIRECT\_DATA}
&
\begin{cmdreq}
\cfield{u16} trailing data
\item For each output (same size)
\begin{pldlist}
\cfield{u8[]} data to load
\end{pldlist}
\end{cmdreq}
\\
1 & \cname{DIRECT\_DATA}
Directly write to the data pins (same like the DO unit's WRITE command)
& \makecell[tl]{
\fldreq
\fld{u16} values to write
} \\
2 & \flname{DIRECT\_CLEAR} Pulse the Clear pin, erasing the registers' data & \\
3 & \flname{DIRECT\_SHIFT} Pulse the Shift pin & \\
4 & \flname{DIRECT\_STORE} Pulse the Store pin & \\
\bottomrule
\end{tabularx}
&
\begin{cmdreq}
\cfield{u16} values to write
\end{cmdreq} \\
2 &
\cname{DIRECT\_CLEAR}
Pulse the Clear pin, erasing the registers' data & \\
3 &
\cname{DIRECT\_SHIFT}
Pulse the Shift pin & \\
4 &
\cname{DIRECT\_STORE}
Pulse the Store pin & \\
\end{cmdlist}

@ -40,44 +40,26 @@ pins=0
\subsection{SPI Commands}
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Payload} \\
\midrule
0 & \flname{QUERY}
\begin{cmdlist}
0 & \cname{QUERY}
Exchange bytes with a slave device
& \makecell[tl]{
\fldreq
\fld{u8} slave number 0--16 \\
\fld{u16} response padding \\
\fld{u16} response length \\
\fld{u8[]} bytes to write \\
\fldresp
\fld{u8[]} received bytes \\
} \\
1 & \flname{MULTICAST}
& \begin{cmdreq}
\cfield{u8} slave number 0--16
\cfield{u16} response padding
\cfield{u16} response length
\cfield{u8[]} bytes to write
\end{cmdreq}
\cjoin
\begin{cmdresp}
\cfield{u8[]} received bytes
\end{cmdresp} \\
1 & \cname{MULTICAST}
Send a message to multiple slaves at once. The address is a bit map (e.g. 0x8002 = slaves 1 and 15).
& \makecell[tl]{
\fldreq
\fld{u16} addressed slaves \\
\fld{u8[]} bytes to write
} \\
\bottomrule
\end{tabularx}
& \begin{cmdreq}
\cfield{u16} addressed slaves
\cfield{u8[]} bytes to write
\end{cmdreq} \\
\end{cmdlist}

@ -49,45 +49,38 @@ de-assert-time=8
de-clear-time=8
\end{inicode}
\subsection{USART Events}
\subsection{USART Events}
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Meaning} & \textbf{Payload} \\
\midrule
\begin{cmdlist}
0 & \flname{DATA\_RECEIVED}
0 & \cname{DATA\_RECEIVED}
Data was received on the serial port.
& \makecell[tl]{
\fld{u8[]} received bytes
} \\
\bottomrule
\end{tabularx}
&
\begin{cmdpld}
\cfield{u8[]} received bytes
\end{cmdpld} \\
\end{cmdlist}
\subsection{USART Commands}
\begin{tabularx}{\textwidth}{p{\fldwcode}Xp{\fldwpld}}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Payload} \\
\midrule
\begin{cmdlist}
0 & \flname{WRITE}
0 & \cname{WRITE}
Add data to the transmit buffer. Sending is asynchronous, but the command may wait for free space in the DMA buffer.
& \makecell[tl]{
\fldreq
\fld{u8[]} bytes to write
} \\
& \begin{cmdreq}
\cfield{u8[]} bytes to write
\end{cmdreq} \\
1 & \flname{WRITE\_SYNC}
1 & \cname{WRITE\_SYNC}
Add data to the transmit buffer and wait for the transmission to complete.
& \makecell[tl]{
\fldreq
\fld{u8[]} bytes to write
} \\
& \begin{cmdreq}
\cfield{u8[]} bytes to write
\end{cmdreq} \\
\bottomrule
\end{tabularx}
\end{cmdlist}

@ -728,7 +728,7 @@
\iffalse
%%% LISTS
@ -798,9 +798,8 @@
% Redefine the enumerate labels. The first two levels are boxed,
% the other two are not.
%\def\labelenumi{{\normalfont\itembox[ctubluedarkbg][white]{\bfseries\theenumi.}}}
\def\labelenumi{{\normalfont\itembox[ctubluedarkbg][white]{\bfseries\theenumi.}}}
% CUSTOM XXX removed the enumi boxes
\iffalse
\def\labelenumi{{\normalfont\itembox{\theenumi.}}}
@ -814,7 +813,7 @@
\labelsep6pt
\fi

@ -1,11 +1,13 @@
% extra balíky a jejich nastavení
\usepackage{todonotes} % todos
\usepackage{minted} % code listings
\usepackage{blindtext} % lorem
\usepackage{csquotes} % quotes
\usepackage{wrapfig}
\usepackage{svg}
\svgpath{img/}
\usepackage[all]{nowidow} % fix for orphaned lines of text
\usepackage{fancyvrb}
\usepackage{siunitx}
@ -18,249 +20,42 @@
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{tabu} % longtabu
\usepackage{pmboxdraw}
\usepackage{xcolor}
\definecolor{RubineRed}{HTML}{C30067}
\usepackage{flafter} % ensures embeds won't go before their references
\usepackage{enumitem} % better list spacing
\usepackage{bigfoot} % verbatin in footnote
\usepackage{makecell} % cells with custom align in tabular
\usepackage{tabto} % tabs, but kinda buggy
\usepackage{ragged2e} % this was supposed to improve text alignment
\usepackage{makecell}
\newminted{ini}{frame=leftline,autogobble=true}
% Deprecated crap
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\newcommand{\tabitemo}{~~\llap{\textopenbullet}~~}
\newcommand\fld[1]{\tabitem \texttt{#1}:}
\newcommand\fldo[1]{\tabitemo \texttt{#1}:}
\newcommand{\fldwcode}{2.2em}
\newcommand{\fldwpld}{.35\textwidth}
\newcommand{\fldreq}{\textit{Request}\newline}
\newcommand{\fldresp}{\textit{Response}\newline}
\newcommand\flname[1]{\textbf{#1}\newline}
\usepackage{mytabto} % customized tabto that does not break to a new line
\newcommand{\cfield}[1]{\item \texttt{#1}\tabto{.8cm}}
\newcommand{\cname}[1]{\textbf{#1}\newline}
\usepackage{ragged2e}
% https://tex.stackexchange.com/questions/157389/how-to-center-column-values-in-a-table
% P will be a centered column that can have width
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
% this is put before a response that follows a request
% this is needed because the request has a negative gap after itself
\newcommand*{\cjoin}{\null\vspace*{-2pt}}
% This is a table of commands of events
\newenvironment{cmdlist}
{
% \tabulinesep=3pt
\tabulinesep=7pt
\begin{longtabu} to \textwidth {P{\fldwcode} X[3] X[3,l]}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Payload} \\
\midrule
\endhead
\bottomrule
\endfoot
}
{
\end{longtabu}
}
% a list of generic payload fields
\newenvironment{cmdpldlist}
{
%topsep=0pt,partopsep=0pt,
\begin{itemize}[
leftmargin=.7cm,
nosep,
%after = \vspace{-\baselineskip}
]
}
{
\end{itemize}
}
% a list of request fields, with a caption
\newenvironment{cmditemlistenv}[1]
{
\begin{minipage}[t]{\linewidth}
% \begin{flushleft} % fix weird spacing in wrapped lines
\textit{#1} \begin{cmdpldlist}
}
{
\end{cmdpldlist}
% \end{flushleft}
\end{minipage}
}
% a list of request fields, with a caption
\newenvironment{cmdreq}
{
\begin{cmditemlistenv}{Request:}
}
{
\end{cmditemlistenv}
}
% a list of request fields, with a caption
\newenvironment{cmdresp}
{
\begin{cmditemlistenv}{Response:}
}
{
\end{cmditemlistenv}
}
% a list of payload fields, with a caption
\newenvironment{cmdpld}
{
\begin{cmditemlistenv}{Payload:}
}
{
\end{cmditemlistenv}
}
\newcommand{\uF}{\micro\farad}
\newcommand{\nF}{\nano\farad}
\newcommand{\cm}{\centi\metre}
\newcommand{\VperA}{\V/\A}
%nobreak dash
%\usepackage{lmodern}
%\usepackage{cfr-lm}
% some symbols. skip integrals because asmmath also defines them and is loaded by the thesis class
\usepackage[nointegrals]{wasysym}
\usepackage[style=numeric,backend=biber,sorting=none]{biblatex}
\usepackage{xpatch,letltxmacro}
\LetLtxMacro{\cminted}{\minted}
\let\endcminted\endminted
\xpretocmd{\cminted}{\RecustomVerbatimEnvironment{Verbatim}{BVerbatim}{}}{}{}
% More space in table cells
\renewcommand{\arraystretch}{1.4}
% Fix overful hbox
\setlength{\emergencystretch}{.5em}
%\setsvg{svgpath=img/}
\svgpath{img/}
% Nastavení ctuthesis
\ctusetup{
xdoctype = M,
front-list-of-tables = false,
mainlanguage = english,
%
author = {Ondřej Hruška},
supervisor = {doc. Ing. Radislav Šmíd, Ph.D.},
%
title-english = {Learning and automation GPIO platform},
title-czech = {Výuková a automatizační GPIO platforma},
%
xfaculty = F3,
department-czech = {Katedra měření},
fieldofstudy-czech = {Kybernetika a~robotika},
subfieldofstudy-czech = {Senzory a~přístrojová technika},
%
department-english = {Department of Measurement},
fieldofstudy-english = {Cybernetics and Robotics},
subfieldofstudy-english = {Sensors and Instrumentation},
front-specification = true,
specification-file = {zadani-zakryto.pdf},
%specification-file = {zadani-doc.pdf},
%specification-file = {zadani-doc.pdf},
%
keywords-czech = {},
keywords-english = {},
%
day = 0, % ???
month = 0, % ???
year = 2018, % ???
}
\ctuprocess
\hypersetup{
pdftitle = {Learning and automation GPIO platform},
pdfauthor = {Ondřej Hruška}
}
% Extra info na titulní stránce
\addto\ctucaptionsczech{%
\def\supervisorname{Vedoucí}%
\def\subfieldofstudyname{Studijní program}%
}
% Abstrakt, poděkování atd
\ctutemplateset{maketitle twocolumn default}{
\begin{twocolumnfrontmatterpage}
\ctutemplate{twocolumn.thanks}
\ctutemplate{twocolumn.declaration}
\ctutemplate{twocolumn.abstract.in.titlelanguage}
\ctutemplate{twocolumn.abstract.in.secondlanguage}
\ctutemplate{twocolumn.tableofcontents}
\ctutemplate{twocolumn.listoffigures}
\end{twocolumnfrontmatterpage}
}
% Uvozovky v češtině
% \DeclareQuoteStyle{czech}
% {\quotedblbase}
% {\textquotedblleft}
% {\textquoteleft}
% {\textquoteright}
% ??? what does this do
\makeatletter
\newcommand*{\centerfloat}{%
\parindent \z@
\leftskip \z@ \@plus 1fil \@minus \textwidth
\rightskip\leftskip
\parfillskip \z@skip}
\makeatother
% makro pro uvozovky
% \renewcommand\uv[1]{\enquote{#1}}
% monospace
\newcommand\mono[1]{\texttt{#1}}
% library name
\newcommand\lib[1]{\textit{#1}}
% add blank page unless current is left
%\newcommand*\cleartoleftpage{%
% \clearpage
% \ifodd\value{page}\hbox{}\newpage\fi
%}
% \newcommand\zdroj[1]{\textit{Zdroj: #1}}
% -- odstavce --
\setlength\parskip{1.5ex plus 1pt minus 1 pt}
%\setlength{\parskip}{1.5ex plus 0.2ex minus 0.1ex} % po změně je potřeba doladit nadpisy
%\renewcommand{\baselinestretch}{1.1}
\setlength\parindent{.5cm}
% -- set link colors ---
\usepackage{xcolor}
\iffalse
% makro pro uvozovky
\renewcommand\uv[1]{\enquote{#1}}
% \DeclareQuoteStyle{czech}
{\quotedblbase}
{\textquotedblleft}
{\textquoteleft}
{\textquoteright}
\fi
\input{pre.minted}
\input{pre.ctuthesis_config}
\input{pre.spacing_config}
%% LINK COLORS
\hypersetup{
colorlinks,
linkcolor={red!50!black},
@ -268,36 +63,6 @@
urlcolor={blue!80!black}
}
\input{pre.utils}
% název listing figure
% \renewcommand\listingscaption{Program}
% don't clear page before chapter
%\renewcommand{\cleardoublepage}{\clearpage}
% -- section on new page, except first --
%\pretocmd{\section}{%
% \ifnum\value{section}=0 \else\clearpage\fi
%}{}{}
\usepackage{wasysym} % some symbols
% Pretty mono font
%\usepackage[scaled=.9]{beramono}
%\usepackage{cm}
\newcommand\nobr[1]{\mbox{#1}}
\usepackage{pmboxdraw}
% ---- Booktabs config ----
%\setlength{\heavyrulewidth}{0.11em}
%\setlength{\lightrulewidth}{0.05em}
%\setlength{\cmidrulewidth}{0.03em}
\setlength{\heavyrulewidth}{0.5mm}
\setlength{\lightrulewidth}{0.25mm}
\setlength{\cmidrulewidth}{0.25mm}
\input{pre.gex_command_tables}

@ -1,204 +0,0 @@
% tabto.sty
%
% version 1.3 (Mar 2013)
%
% Tabbing to fixed positions in a paragraph.
%
% Copyright 2006,2009,2012,2013 by
% Donald Arseneau, Vancouver, Canada (asnd@triumf.ca)
% Permission to use, distribute and modify this software is granted
% under the conditions of the LaTeX Project Public License, either
% version 1.3 or (at your option) any later version. The license is
% found at http://www.latex-project.org/lppl.txt, and is part of all
% recent distributions of LaTeX.
%
% This work has the LPPL maintenance status `maintained' (by author).
%
% Two new text positioning commands are defined: \tabto and \tab.
%
% \tabto{<length>}
% Tab to a position relative to the left margin in a paragraph (any
% indentation due to a list or \leftskip is part of the `margin' in
% this context). If the text on the line already goes past the desired
% position, the tab starts a new line and moves to the requested
% horizontal position.
%
% \tabto*{<length>}
% Similar to \tabto, except it will perform backspacing, and over-
% print previous text on the line whenever that text is already
% longer than the specified length (i.e., no linebreak is produced).
% Line-breaks are suppressed immediately after \tabto or \tabto*.
%
% The length register "\CurrentLineWidth" will report the width
% of the existing text on the line, and it may be used in the
% <length> argument (using calc.sty, for example). Also, there
% is "\TabPrevPos" which gives the "\CurrentLineWidth" from the
% previous tab command, and can be used to return to that position
% if no line breaks have occurred in between.
%
% \tab
% Tab to the next tab-stop chosen from a list of tab positions, in
% the traditional style of typewriters. A \tab will always move
% to the next tab stop (or the next line), even if it is already
% exactly at a tab stop. Thus, "\tab" at the beginning of a line,
% or "\tab\tab" elsewhere skips a position. A linebreak is permitted
% immediately following a \tab, in case the ensuing text does not
% fit well in the remaining space.
%
% If you do not want to skip positions, use "\tabto{\NextTabStop}"
% instead of "\tab". This is particularly useful when you want to
% use \tab in some other command, but do not want to skip a column
% for the first item.
%
% The tab-stop positions are declared using either \TabPositions
% or \NumTabs:
%
% \TabPositions{<length>, <length>,...<length>}
% Declares the tab stops as a comma-separated list of positions
% relative to the left margin. A tab-stop at 0pt is implicit, and
% need not be listed.
%
% \NumTabs{<number>}
% Declares a list of <number> equally-spaced tabs, starting at the
% left margin and spanning \linewidth. For example \NumTabs{2}
% declares tab-stops at 0pt and 0.5\linewidth, the same as
% \TabPositions{0pt, 0.5\linewidth} or \TabPositions{0.5\linewidth}
%
% After these declarations, the list of tab positions is saved in
% \TabStopList, and the next tab position, relative to the current
% position, is given by \NextTabStop. You do not normally need
% to access them, but they are available.
%
% Problems:
%
% Tall objects after a tab stop may overlap the line above, rather
% than forcing a greater separation between lines.
\ProvidesPackage{tabto}[2013/03/25 \space v 1.3 \space
Another tabbing mechanism]\relax
\newdimen\CurrentLineWidth
\let\TabPrevPos\z@
\newcommand\tabto[1]{%
\leavevmode
\begingroup
\def\@tempa{*}\def\@tempb{#1}%
\ifx\@tempa\@tempb % \tab*
\endgroup
\TTo@overlaptrue % ... set a flag and re-issue \tabto to get argument
\expandafter\tabto
\else
\ifinner % in a \hbox, so ignore
\else % unrestricted horizontal mode
\null% \predisplaysize will tell the position of this box (must be box)
\parfillskip\fill
\everydisplay{}\everymath{}%
\predisplaypenalty\@M \postdisplaypenalty\@M
$$% math display so we can test \predisplaysize
\lineskiplimit=-999pt % so we get pure \baselineskip
\abovedisplayskip=-\baselineskip \abovedisplayshortskip=-\baselineskip
\belowdisplayskip\z@skip \belowdisplayshortskip\z@skip
\halign{##\cr\noalign{%
% get the width of the line above
\ifdim\predisplaysize=\maxdimen %\message{Mixed R and L, so say the line is full. }%
\CurrentLineWidth\linewidth
\else
\ifdim\predisplaysize=-\maxdimen
% \message{Not in a paragraph, so call the line empty. }%
\CurrentLineWidth\z@
\else
\ifnum\TTo@Direction<\z@
\CurrentLineWidth\linewidth \advance\CurrentLineWidth\predisplaysize
\else
\CurrentLineWidth\predisplaysize
\fi
% Correct the 2em offset
\advance\CurrentLineWidth -2em
\advance\CurrentLineWidth -\displayindent
\advance\CurrentLineWidth -\leftskip
\fi\fi
\ifdim\CurrentLineWidth<\z@ \CurrentLineWidth\z@\fi
% Enshrine the tab-to position; #1 might reference \CurrentLineWidth
\@tempdimb=#1\relax
%\message{*** Tab to \the\@tempdimb, previous width is \the\CurrentLineWidth. ***}%
% Save width for possible return use
\xdef\TabPrevPos{\the\CurrentLineWidth}%
% Build the action to perform
\protected@xdef\TTo@action{%
\vrule\@width\z@\@depth\the\prevdepth
\ifdim\CurrentLineWidth>\@tempdimb
\protect\hskip\the\CurrentLineWidth\hskip5pt\relax
\else
\protect\nobreak
\protect\hskip\the\@tempdimb\relax
\fi
}%
%\message{\string\TTo@action: \meaning \TTo@action. }%
% get back to the baseline, regardless of its depth.
\vskip-\prevdepth
\prevdepth-99\p@
\vskip\prevdepth
}}%
$$
% Don't count the display as lines in the paragraph
\count@\prevgraf \advance\count@-4 \prevgraf\count@
\TTo@action
%% \penalty\@m % to allow a penalized line break
\fi
\endgroup
\TTo@overlapfalse
\ignorespaces
\fi
}
% \tab -- to the next position
% \hskip so \tab\tab moves two positions
% Allow a (penalized but flexible) line-break right after the tab.
%
\newcommand\tab{\leavevmode\hskip2sp\tabto{\NextTabStop}%
\nobreak\hskip\z@\@plus 30\p@\penalty4000\hskip\z@\@plus-30\p@\relax}
% Expandable macro to select the next tab position from the list
\newcommand\NextTabStop{%
\expandafter \TTo@nexttabstop \TabStopList,\maxdimen,>%
}
\def\TTo@nexttabstop #1,{%
\ifdim#1<\CurrentLineWidth
\expandafter\TTo@nexttabstop
\else
\ifdim#1<0.9999\linewidth#1\else\z@\fi
\expandafter\strip@prefix
\fi
}
\def\TTo@foundtabstop#1>{}
\newcommand\TabPositions[1]{\def\TabStopList{\z@,#1}}
\newcommand\NumTabs[1]{%
\def\TabStopList{}%
\@tempdimb\linewidth
\divide\@tempdimb by#1\relax
\advance\@tempdimb 1sp % counteract rounding-down by \divide
\CurrentLineWidth\z@
\@whiledim\CurrentLineWidth<\linewidth\do {%
\edef\TabStopList{\TabStopList\the\CurrentLineWidth,}%
\advance\CurrentLineWidth\@tempdimb
}%
\edef\TabStopList{\TabStopList\linewidth}%
}
% default setting of tab positions:
\TabPositions{\parindent,.5\linewidth}
\newif\ifTTo@overlap \TTo@overlapfalse
\@ifundefined{predisplaydirection}{
\let\TTo@Direction\predisplaysize
\let\predisplaydirection\@undefined
}{
\let\TTo@Direction\predisplaydirection
}

@ -0,0 +1,60 @@
%% CTUTHESIS CONFIG
\ctusetup{
xdoctype = M,
front-list-of-tables = false,
mainlanguage = english,
%
author = {Ondřej Hruška},
supervisor = {doc. Ing. Radislav Šmíd, Ph.D.},
%
title-english = {Learning and automation GPIO platform},
title-czech = {Výuková a automatizační GPIO platforma},
%
xfaculty = F3,
department-czech = {Katedra měření},
fieldofstudy-czech = {Kybernetika a~robotika},
subfieldofstudy-czech = {Senzory a~přístrojová technika},
%
department-english = {Department of Measurement},
fieldofstudy-english = {Cybernetics and Robotics},
subfieldofstudy-english = {Sensors and Instrumentation},
front-specification = true,
specification-file = {zadani-zakryto.pdf},
%specification-file = {zadani-doc.pdf},
%specification-file = {zadani-doc.pdf},
%
keywords-czech = {},
keywords-english = {},
%
day = 0, % ???
month = 0, % ???
year = 2018, % ???
}
\ctuprocess
\hypersetup{
pdftitle = {Learning and automation GPIO platform},
pdfauthor = {Ondřej Hruška}
}
% Extra info na titulní stránce
\addto\ctucaptionsczech{%
\def\supervisorname{Vedoucí}%
\def\subfieldofstudyname{Studijní program}%
}
% Abstrakt, poděkování atd
\ctutemplateset{maketitle twocolumn default}{
\begin{twocolumnfrontmatterpage}
\ctutemplate{twocolumn.thanks}
\ctutemplate{twocolumn.declaration}
\ctutemplate{twocolumn.abstract.in.titlelanguage}
\ctutemplate{twocolumn.abstract.in.secondlanguage}
\ctutemplate{twocolumn.tableofcontents}
\ctutemplate{twocolumn.listoffigures}
\end{twocolumnfrontmatterpage}
}

@ -0,0 +1,88 @@
\newcommand{\cfield}[1]{\item {\color{RubineRed} \texttt{#1}\,}} % \tabto{1cm}
\newcommand{\cname}[1]{\textbf{#1}\newline}
% https://tex.stackexchange.com/questions/157389/how-to-center-column-values-in-a-table
% P will be a centered column that can have width
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
% this is put before a response that follows a request
% this is needed for nice looking spacing
\newcommand*{\cjoin}{\null\vspace*{-2pt}}
% This is a table of commands of events
\newenvironment{cmdlist}
{
\tabulinesep=5pt
\begin{longtabu} to \textwidth {P{2.2em} X[3] X[3,l]}
\toprule
\textbf{Code} & \textbf{Function} & \textbf{Structure} \\
\midrule
\endhead
\bottomrule
\endfoot
}{
\end{longtabu}
}
% a list of generic payload fields
\newenvironment{pldlist}
{
\begin{itemize}[
leftmargin=.7cm,
nosep
]
}
{
\end{itemize}
}
% a list of request fields, with a caption
\newenvironment{cmditemlistenv}[1]
{
\begin{minipage}[t]{\linewidth}
\begin{flushleft} % fix weird spacing in wrapped lines
\textit{#1} % the caption, like Request: or Response:
\begin{pldlist}
}
{
\end{pldlist}
\end{flushleft}
% the minipage somehow fixes vertical alignment
% and also removes mysterious spacing around the itemize
\end{minipage}
}
% a list of request fields, with a caption
\newenvironment{cmdreq}
{
\begin{cmditemlistenv}{Request:}
}
{
\end{cmditemlistenv}
}
% a list of request fields, with a caption
\newenvironment{cmdresp}
{
\begin{cmditemlistenv}{Response:}
}
{
\end{cmditemlistenv}
}
% a list of payload fields, with a caption
\newenvironment{cmdpld}
{
\begin{cmditemlistenv}{Payload:}
}
{
\end{cmditemlistenv}
}

@ -0,0 +1,7 @@
%% MINTED
\usepackage{minted} % code listings
\usepackage{xpatch,letltxmacro}
\LetLtxMacro{\cminted}{\minted}
\let\endcminted\endminted
\xpretocmd{\cminted}{\RecustomVerbatimEnvironment{Verbatim}{BVerbatim}{}}{}{}
\newminted{ini}{frame=leftline,autogobble=true}

@ -0,0 +1,43 @@
%% SPACING
% Booktabs
\setlength{\heavyrulewidth}{0.5mm}
\setlength{\lightrulewidth}{0.25mm}
\setlength{\cmidrulewidth}{0.25mm}
% More space in table cells
\renewcommand{\arraystretch}{1.4}
% Fix overful hbox
\setlength{\emergencystretch}{.5em}
% -- odstavce --
\setlength\parskip{1.5ex plus 1pt minus 1 pt}
%\setlength{\parskip}{1.5ex plus 0.2ex minus 0.1ex} % po změně je potřeba doladit nadpisy
%\renewcommand{\baselinestretch}{1.1}
\setlength\parindent{.5cm}
% add blank page unless current is left
%\newcommand*\cleartoleftpage{%
% \clearpage
% \ifodd\value{page}\hbox{}\newpage\fi
%}
% don't clear page before chapter
%\renewcommand{\cleardoublepage}{\clearpage}
% section on new page, except first
%\pretocmd{\section}{%
% \ifnum\value{section}=0 \else\clearpage\fi
%}{}{}
% ??? what does this do
\makeatletter
\newcommand*{\centerfloat}{%
\parindent \z@
\leftskip \z@ \@plus 1fil \@minus \textwidth
\rightskip\leftskip
\parfillskip \z@skip}
\makeatother

@ -0,0 +1,24 @@
%% HELPER MACROS
\newcommand\nobr[1]{\mbox{#1}}
% monospace
\newcommand\mono[1]{\texttt{#1}}
% library name
\newcommand\lib[1]{\textit{#1}}
% název listing figure
% \renewcommand\listingscaption{Program}
% \newcommand\zdroj[1]{\textit{Zdroj: #1}}
%% UNITS
\newcommand{\uF}{\micro\farad}
\newcommand{\nF}{\nano\farad}
\newcommand{\cm}{\centi\metre}
\newcommand{\VperA}{\V/\A}

Binary file not shown.

@ -4,9 +4,9 @@
% --- obsah zvláštních oddílů ---
\input{sec_abstract}
\input{sec_thanks}
\input{sec_declaration}
\input{thesis.abstract}
\input{thesis.thanks}
\input{thesis.declaration}
\addbibresource{thesis.bib}

Loading…
Cancel
Save