% Generated from json/card_source.json by tools/render_card.py.
% Do not edit manually; update the JSON and regenerate.

\documentclass[12pt,a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[polish]{babel}
\usepackage{csquotes}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xcolor}
\usepackage[a4paper,left=2.15cm,right=2.15cm,top=0.5cm,bottom=0.5cm,headheight=24mm,headsep=3mm,includehead]{geometry}
\usepackage{eso-pic}
\usepackage{marginnote}
\usepackage{array}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage{float}
\usepackage{silence}
\WarningFilter{soulutf8}{This package is obsolete}
\usepackage{pdfcomment}
\usepackage{enumitem}
\usepackage{needspace}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{microtype}
\usepackage[most]{tcolorbox}
\usepackage{qrcode}
\IfFileExists{references.bib}{%
  \usepackage[backend=biber,style=numeric,sorting=none]{biblatex}%
  \addbibresource{references.bib}%
}{}

\hypersetup{hidelinks}

\IfFileExists{build-meta.tex}{%
  \input{build-meta.tex}%
}{%
  \newcommand{\BuildCommit}{lokalna}%
}

\newcommand{\DocumentAuthor}{M. Pabiszczak}
\newcommand{\DocumentYear}{2026}
\newcommand{\CardSeries}{freertos-cpp}
\newcommand{\CardNumber}{14}
\newcommand{\CardCount}{16}
\newcommand{\CardSlug}{sw-timer}
\newcommand{\CardVersion}{v00.01}
\newcommand{\DocumentUUID}{78db37df-63e5-4c5b-80ce-f73a411f0b50}

\newcommand{\EmptyCheck}{\(\square\)}
\newcommand{\EscAnswerLines}[1][3]{\par\noindent\dotfill\par\noindent\dotfill\par\noindent\dotfill}
\newcommand{\EscWriteRow}[1][2.8em]{\rule{0pt}{#1}}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0.45em}
\setlength{\headheight}{24mm}
\setlength{\headsep}{3mm}
\setlength{\footskip}{8mm}
\setlength{\marginparwidth}{1.5cm}
\setlength{\marginparsep}{0.25cm}
\renewcommand{\arraystretch}{1.22}
% Margin separator lines disabled for layout trial.

\newcommand{\ESCPageResourceHeader}{%
  \begingroup%
  \setlength{\parskip}{0pt}%
  \setlength{\fboxsep}{0pt}%
  \setlength{\fboxrule}{0.35pt}%
  \setlength{\arrayrulewidth}{0.35pt}%
  \noindent\fbox{%
    \begin{minipage}[c][23.5mm][c]{\dimexpr\textwidth-2\fboxrule\relax}%
      \begin{minipage}[c][23mm][c]{\dimexpr\linewidth-24mm-0.35pt\relax}%
        \setlength{\tabcolsep}{0pt}%
        \renewcommand{\arraystretch}{0}%
        \begin{tabularx}{\linewidth}{@{}p{\dimexpr0.50000000\linewidth-\arrayrulewidth\relax}|p{\dimexpr0.15126050\linewidth-\arrayrulewidth\relax}|X@{}}%
          \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.45mm}{\fontsize{3.2}{3.4}\selectfont\ttfamily\bfseries TITLE}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{7.7}{7.9}\selectfont\ttfamily\bfseries Software Timer and the Timer Daemon Task}\hspace{0.45mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.45mm}{\fontsize{3.2}{3.4}\selectfont\ttfamily\bfseries VER.}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{6.6}{6.8}\selectfont\ttfamily\bfseries v00.01}\hspace{0.45mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.45mm}{\fontsize{3.2}{3.4}\selectfont\ttfamily\bfseries DATETIME}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{6.4}{6.6}\selectfont\ttfamily\bfseries 2026-07-19T00:00:00+02:00}\hspace{0.45mm}}\par} \\%
        \end{tabularx}%
        \par\nointerlineskip%
        \hrule height0.35pt%
        \nointerlineskip%
        \begin{tabularx}{\linewidth}{@{}p{\dimexpr0.50000000\linewidth-\arrayrulewidth\relax}|p{\dimexpr0.25210084\linewidth-\arrayrulewidth\relax}|p{\dimexpr0.14285714\linewidth-\arrayrulewidth\relax}|X@{}}%
          \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.45mm}{\fontsize{3.2}{3.4}\selectfont\ttfamily\bfseries PROJECT}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{7.7}{7.9}\selectfont\ttfamily\bfseries Freestanding C++ nad FreeRTOS}\hspace{0.45mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.45mm}{\fontsize{3.2}{3.4}\selectfont\ttfamily\bfseries SERIES}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{6.4}{6.6}\selectfont\ttfamily\bfseries FreeRTOS C++}\hspace{0.45mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.45mm}{\fontsize{3.2}{3.4}\selectfont\ttfamily\bfseries CARD}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{6.4}{6.6}\selectfont\ttfamily\bfseries 14/16}\hspace{0.45mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.45mm}{\fontsize{3.2}{3.4}\selectfont\ttfamily\bfseries SHEET}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{6.4}{6.6}\selectfont\ttfamily\bfseries \thepage/\pageref{LastPage}}\hspace{0.45mm}}\par} \\%
        \end{tabularx}%
        \par\nointerlineskip%
        \hrule height0.35pt%
        \nointerlineskip%
        \begin{tabularx}{\linewidth}{@{}p{\dimexpr0.05882353\linewidth-\arrayrulewidth\relax}|p{\dimexpr0.05042017\linewidth-\arrayrulewidth\relax}|p{\dimexpr0.14705882\linewidth-\arrayrulewidth\relax}|p{\dimexpr0.09243697\linewidth-\arrayrulewidth\relax}|p{\dimexpr0.07563025\linewidth-\arrayrulewidth\relax}|p{\dimexpr0.07563025\linewidth-\arrayrulewidth\relax}|X@{}}%
          \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.15mm}{\fontsize{2.85}{3}\selectfont\ttfamily\bfseries SUBJ.}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{4.45}{4.65}\selectfont\ttfamily\bfseries Inf.}\hspace{0.15mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.15mm}{\fontsize{2.85}{3}\selectfont\ttfamily\bfseries PROG.}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{4.45}{4.65}\selectfont\ttfamily\bfseries —}\hspace{0.15mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.15mm}{\fontsize{2.85}{3}\selectfont\ttfamily\bfseries CORE}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{4.45}{4.65}\selectfont\ttfamily\bfseries —}\hspace{0.15mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.15mm}{\fontsize{2.85}{3}\selectfont\ttfamily\bfseries SCOPE}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{4.45}{4.65}\selectfont\ttfamily\bfseries —}\hspace{0.15mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.15mm}{\fontsize{2.85}{3}\selectfont\ttfamily\bfseries LEVEL}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{4.45}{4.65}\selectfont\ttfamily\bfseries —}\hspace{0.15mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hspace{0.15mm}{\fontsize{2.85}{3}\selectfont\ttfamily\bfseries POS.}\par\nointerlineskip\vspace{0.12mm}\noindent\makebox[\linewidth][r]{{\fontsize{4.45}{4.65}\selectfont\ttfamily\bfseries —}\hspace{0.15mm}}\par} & \parbox[c][5.19414mm][c]{\linewidth}{\hbox to\linewidth{\hspace{0.35mm}{\fontsize{3.4}{3.75}\selectfont\ttfamily\bfseries GITEA UUID}\hfill{\fontsize{3.4}{3.75}\selectfont\ttfamily 78db37df-63e5-4c5b-80ce-f73a411f0b50}\hspace{0.35mm}}\par\nointerlineskip\hbox to\linewidth{\hspace{0.35mm}{\fontsize{3.4}{3.75}\selectfont\ttfamily\bfseries CARD UUID} {\fontsize{3.4}{3.75}\selectfont\ttfamily 78db37df-63e5-4c5b-80ce-f73a411f0b50}\hfill{\fontsize{3.4}{3.75}\selectfont\ttfamily\bfseries AUTHOR M. Pabiszczak}\hspace{0.35mm}}} \\%
        \end{tabularx}%
        \par\nointerlineskip%
        \hrule height0.35pt%
        \nointerlineskip%
        \begin{tabularx}{\linewidth}{@{}X@{}}%
          \parbox[c][3.46276mm][c]{\linewidth}{\hspace{0.45mm}{\fontsize{4.5}{4.85}\selectfont\ttfamily\bfseries GITEA} {\fontsize{4.5}{4.85}\selectfont\ttfamily\href{https://zsl-gitea.mpabi.pl/edu-freertos-cpp/lab-rv32i-freertos-sw-timer}{\nolinkurl{https://zsl-gitea.mpabi.pl/edu-freertos-cpp/lab-rv32i-freertos-sw-timer}}}} \\%
        \end{tabularx}%
        \par\nointerlineskip%
        \hrule height0.35pt%
        \nointerlineskip%
        \begin{tabularx}{\linewidth}{@{}X@{}}%
          \parbox[c][3.46276mm][c]{\linewidth}{\hspace{0.45mm}{\fontsize{4.5}{4.85}\selectfont\ttfamily\bfseries HTML} {\fontsize{4.5}{4.85}\selectfont\ttfamily\href{}{\nolinkurl{}}}} \\%
        \end{tabularx}%
      \end{minipage}%
      \vrule width0.35pt%
      \begin{minipage}[c][23mm][c]{24mm}\centering%
        {\tiny QR wyłączony}%
      \end{minipage}%
    \end{minipage}%
  }%
  \endgroup%
}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{\ESCPageResourceHeader}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

\newcommand{\ESCMarginTag}[4]{%
  \hspace*{#1}\textcolor{#2}{#3~#4}%
}
\newcommand{\ESCSectionBlockStart}{%
  \Needspace{8\baselineskip}%
  \par\vspace{0.35em}%
  \noindent\textcolor{black!28}{\rule{\textwidth}{0.35pt}}%
  \par\vspace{0.15em}%
}
\newcommand{\ESCSectionBlockEnd}{%
  \par\vspace{0.25em}%
  \noindent\textcolor{black!18}{\rule{\textwidth}{0.25pt}}%
  \par\vspace{0.45em}%
}
\newcommand{\ESCTinyStepSeparator}{%
  \par\vspace{0.10em}%
  \noindent{\color{black!18}\leaders\hbox{\rule{0.60em}{0.22pt}\hspace{0.38em}}\hfill\kern0pt}%
  \par\vspace{0.10em}%
}
\newtcolorbox{ESCTaskFrame}[1]{enhanced,breakable,arc=0pt,boxrule=0.35pt,colback=white,colframe=black,boxsep=0pt,left=1.4mm,right=1.4mm,top=0.8mm,bottom=0.8mm,colbacktitle=black!7,coltitle=black,title={\ttfamily\bfseries TASK\quad #1}}
\newtcolorbox{ESCBlockFrame}[1]{enhanced,breakable,arc=0pt,boxrule=0.35pt,colback=white,colframe=black!55,boxsep=0pt,left=1.0mm,right=1.0mm,top=0.6mm,bottom=0.6mm,colbacktitle=black!4,coltitle=black,title={\ttfamily\bfseries BLOCK\quad #1}}
\newtcolorbox{ESCStepFrame}[1]{enhanced,breakable,arc=0pt,boxrule=0.35pt,colback=white,colframe=black!28,boxsep=0pt,left=0.8mm,right=0.8mm,top=0.45mm,bottom=0.45mm,colbacktitle=black!2,coltitle=black,title={\ttfamily STEP\quad #1}}
\newtcolorbox{ESCConclusionFrame}{enhanced,breakable,arc=0pt,boxrule=0.45pt,colback=blue!2,colframe=blue!45!black,boxsep=0pt,left=1.2mm,right=1.2mm,top=0.7mm,bottom=0.7mm,colbacktitle=blue!7,coltitle=black,title={\ttfamily\bfseries WNIOSEK}}

\newcommand{\ESCLearningTreeWidget}{%
  \reversemarginpar
  \marginnote[%
    \begin{minipage}{\marginparwidth}%
    \raggedright
    {\fontsize{3.55}{3.95}\selectfont\ttfamily
      \begin{minipage}[t]{\marginparwidth}%
      \raggedright
      {\bfseries\textcolor{black!65}{TECH}\par}%
      \vspace{0.08em}%
      \hspace*{0.00em}\textcolor{red}{WE~01}\textcolor{black!48}{}\par%
      \hspace*{0.28em}\textcolor{orange!85!black}{EK~LOCAL~DBG.TIMER}\textcolor{black!48}{\pdftooltip[width=\textwidth]{.01}{Mierzy expiry ticks, activity, daemon handle/name, stack i heap.}}\par%
      \hspace*{0.54em}\textcolor{blue!70!black}{KW~LOCAL~DBG.TIMER}\textcolor{black!48}{\pdftooltip[width=\textwidth]{.01}{Pokazuje ticks 2/4/6/7, inactive after expiry/stop, Tmr Svc i PASS.}}\par%
      \end{minipage}%
    }%
    \end{minipage}%
  ]{}
  \normalmarginpar

  \marginnote{%
    \begin{minipage}{\marginparwidth}%
    \raggedright
    {\fontsize{3.55}{3.95}\selectfont\ttfamily
    \hspace*{0.06cm}%
      \begin{minipage}[t]{\dimexpr\marginparwidth-0.06cm\relax}%
      \raggedright
      {\bfseries\textcolor{black!65}{OG}\par}%
      \vspace{0.08em}%
      \hspace*{0.00em}\textcolor{red}{WE~01}\textcolor{black!48}{}\par%
      \hspace*{0.28em}\textcolor{green!50!black}{EN~LOCAL~EN~RTOS.TIMER}\textcolor{black!48}{\pdftooltip[width=\textwidth]{.01}{Analizuje kolejkę, daemon, blocking callback i lifetime contextu.}}\par%
      \hspace*{0.54em}\textcolor{blue!70!black}{KW~LOCAL~KW~RTOS.TIMER}\textcolor{black!48}{\pdftooltip[width=\textwidth]{.01}{Nie utożsamia pdPASS z callback completion i chroni storage/context przed premature\textCR destruction.}}\par%
      \end{minipage}%
    }%
    \end{minipage}%
  }

}

\begin{document}
\sloppy

\vspace{1.0em}
\noindent{\Large\bfseries Cel karty}\par
\vspace{0.35em}
Uczeń rozdziela przyjęcie polecenia do timer queue od wykonania callbacku, mierzy one-shot/periodic timeline i dowodzi kontekstu timer daemon task.

\vspace{0.8em}
\noindent\textcolor{black!25}{\rule{\textwidth}{0.35pt}}
\vspace{0.7em}
\noindent{\Large\bfseries Zakres karty}\par
\vspace{0.35em}
Software timer nie jest ISR. Callback współdzieli daemon task z innymi timerami; storage i typed context muszą przeżyć wszystkie pending commands i callbacks.

\vspace{0.8em}
\noindent\textcolor{black!25}{\rule{\textwidth}{0.35pt}}

\clearpage

\ESCSectionBlockStart
\section{Typed policy i command queue}
\reversemarginpar
\marginnote[%
  \begin{minipage}{\marginparwidth}%
  \raggedright
  {\fontsize{3.55}{3.95}\selectfont\ttfamily
    \begin{minipage}[t]{\marginparwidth}%
    \raggedright
    {\bfseries\textcolor{black!65}{TECH}\par}%
    \vspace{0.08em}%
    \hspace*{0.00em}\textcolor{red}{WE~01}\textcolor{black!48}{}\par%
    \end{minipage}%
  }%
  \end{minipage}%
]{}[-3.1em]
\normalmarginpar

\marginnote{%
  \begin{minipage}{\marginparwidth}%
  \raggedright
  {\fontsize{3.55}{3.95}\selectfont\ttfamily
  \hspace*{0.06cm}%
    \begin{minipage}[t]{\dimexpr\marginparwidth-0.06cm\relax}%
    \raggedright
    {\bfseries\textcolor{black!65}{OG}\par}%
    \vspace{0.08em}%
    \hspace*{0.00em}\textcolor{red}{WE~01}\textcolor{black!48}{}\par%
    \end{minipage}%
  }%
  \end{minipage}%
}[-3.1em]


\begingroup
\scriptsize\ttfamily\color{black!60}\sloppy
\noindent drzewka: \pdftooltip[width=\textwidth]{D1}{K14.WE01.TECH.LOCAL.DBG.TIMER.01 | WE 01: Software timer i daemon. Implementacja i dowód\textCR typed software timers na współdzielonym timer daemon tasku. | EK LOCAL DBG.TIMER.01: Mierzy\textCR expiry ticks, activity, daemon handle/name, stack i heap. | KW LOCAL DBG.TIMER.01: Pokazuje\textCR ticks 2/4/6/7, inactive after expiry/stop, Tmr Svc i PASS.}\par
\vspace{0.10em}%
\noindent K1: Potwierdź dwa accepted commands i zero callbacków przy return.\quad D1\par
\ESCTinyStepSeparator
\noindent K2: Zmierz initial periodic expiries 2 i 4.\quad D1\par
\par\vspace{0.18em}%
\endgroup

Utwórz static OneShotTimer i PeriodicTimer, wyłącz copy/move, wykonaj explicit start przed schedulerem i zapisz callback snapshot.
\ESCSectionBlockEnd

\ESCSectionBlockStart
\section{Reset, change-period i stop}
\reversemarginpar
\marginnote[%
  \begin{minipage}{\marginparwidth}%
  \raggedright
  {\fontsize{3.55}{3.95}\selectfont\ttfamily
    \begin{minipage}[t]{\marginparwidth}%
    \raggedright
    {\bfseries\textcolor{black!65}{TECH}\par}%
    \vspace{0.08em}%
    \hspace*{0.00em}\textcolor{red}{WE~01}\textcolor{black!48}{}\par%
    \end{minipage}%
  }%
  \end{minipage}%
]{}[-3.1em]
\normalmarginpar

\marginnote{%
  \begin{minipage}{\marginparwidth}%
  \raggedright
  {\fontsize{3.55}{3.95}\selectfont\ttfamily
  \hspace*{0.06cm}%
    \begin{minipage}[t]{\dimexpr\marginparwidth-0.06cm\relax}%
    \raggedright
    {\bfseries\textcolor{black!65}{OG}\par}%
    \vspace{0.08em}%
    \hspace*{0.00em}\textcolor{red}{WE~01}\textcolor{black!48}{}\par%
    \end{minipage}%
  }%
  \end{minipage}%
}[-3.1em]


\begingroup
\scriptsize\ttfamily\color{black!60}\sloppy
\noindent drzewka: \pdftooltip[width=\textwidth]{D1}{K14.WE01.TECH.LOCAL.DBG.TIMER.01 | WE 01: Software timer i daemon. Implementacja i dowód\textCR typed software timers na współdzielonym timer daemon tasku. | EK LOCAL DBG.TIMER.01: Mierzy\textCR expiry ticks, activity, daemon handle/name, stack i heap. | KW LOCAL DBG.TIMER.01: Pokazuje\textCR ticks 2/4/6/7, inactive after expiry/stop, Tmr Svc i PASS.}\par
\vspace{0.10em}%
\noindent K1: Pokaż one-shot expiry 6 i periodic expiry 7.\quad D1\par
\ESCTinyStepSeparator
\noindent K2: Pokaż brak czwartego callbacku po stop.\quad D1\par
\par\vspace{0.18em}%
\endgroup

Resetuj one-shot w ticku 1, zmień periodic z 2 na 3 w ticku 4, a po trzecim callbacku wyślij stop i potwierdź inactive.
\ESCSectionBlockEnd

\ESCSectionBlockStart
\section{Daemon context, storage i lifetime}
\reversemarginpar
\marginnote[%
  \begin{minipage}{\marginparwidth}%
  \raggedright
  {\fontsize{3.55}{3.95}\selectfont\ttfamily
    \begin{minipage}[t]{\marginparwidth}%
    \raggedright
    {\bfseries\textcolor{black!65}{TECH}\par}%
    \vspace{0.08em}%
    \hspace*{0.00em}\textcolor{red}{WE~01}\textcolor{black!48}{}\par%
    \end{minipage}%
  }%
  \end{minipage}%
]{}[-3.1em]
\normalmarginpar

\marginnote{%
  \begin{minipage}{\marginparwidth}%
  \raggedright
  {\fontsize{3.55}{3.95}\selectfont\ttfamily
  \hspace*{0.06cm}%
    \begin{minipage}[t]{\dimexpr\marginparwidth-0.06cm\relax}%
    \raggedright
    {\bfseries\textcolor{black!65}{OG}\par}%
    \vspace{0.08em}%
    \hspace*{0.00em}\textcolor{red}{WE~01}\textcolor{black!48}{}\par%
    \end{minipage}%
  }%
  \end{minipage}%
}[-3.1em]


\begingroup
\scriptsize\ttfamily\color{black!60}\sloppy
\noindent drzewka: \pdftooltip[width=\textwidth]{D1}{K14.WE01.OG.LOCAL.RTOS.TIMER.01 | WE 01: Software timer i daemon. Implementacja i dowód\textCR typed software timers na współdzielonym timer daemon tasku. | EN LOCAL RTOS.TIMER.01:\textCR Analizuje kolejkę, daemon, blocking callback i lifetime contextu. | KW LOCAL RTOS.TIMER.01:\textCR Nie utożsamia pdPASS z callback completion i chroni storage/context przed premature\textCR destruction.}\par
\vspace{0.10em}%
\noindent K1: Udowodnij Tmr Svc, osobny stack i heap delta 0.\quad D1\par
\ESCTinyStepSeparator
\noindent K2: Wyjaśnij zakaz blocking callback i premature destruction.\quad D1\par
\par\vspace{0.18em}%
\endgroup

Porównaj current task z timer daemon handle/name, stos callbacku ze stosem verifiera oraz heap przed/po static create; sformułuj lifetime contract.
\ESCSectionBlockEnd

\end{document}
