\section{kernel/kmain.c File Reference}
\label{kmain_8c}\index{kernel/kmain.c@{kernel/kmain.c}}
Implementaion: Main kernel loop. 

{\tt \#include $<$sys/mm.h$>$}\par
{\tt \#include $<$sys/time.h$>$}\par
{\tt \#include $<$sys/tm.h$>$}\par
{\tt \#include $<$sys/irq.h$>$}\par
{\tt \#include $<$sys/lcd.h$>$}\par
{\tt \#include $<$sys/dsensor.h$>$}\par
{\tt \#include $<$sys/dmotor.h$>$}\par
{\tt \#include $<$sys/dsound.h$>$}\par
{\tt \#include $<$sys/lnp.h$>$}\par
{\tt \#include $<$sys/lnp-logical.h$>$}\par
{\tt \#include $<$sys/program.h$>$}\par
{\tt \#include $<$rom/system.h$>$}\par
{\tt \#include $<$dbutton.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$conio.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf main} (int argc, char $\ast$$\ast$argv)
\begin{CompactList}\small\item\em the user {\bf main()}{\rm (p.\,\pageref{fontdesign_8c_a1})} \item\end{CompactList}\item 
void {\bf show\_\-on} (void)
\begin{CompactList}\small\item\em show ON string \item\end{CompactList}\item 
void {\bf show\_\-off} (void)
\begin{CompactList}\small\item\em show OFF string \item\end{CompactList}\item 
void {\bf kmain} (void)
\begin{CompactList}\small\item\em the beginning of everything \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
unsigned char $\ast$ {\bf firmware\_\-string} = \char`\"{}Do you byte, when I knock?\char`\"{}
\begin{CompactList}\small\item\em firmware recognition string \item\end{CompactList}\item 
char {\bf \_\-\_\-bss}
\begin{CompactList}\small\item\em the start of the uninitialized data segment \item\end{CompactList}\item 
char {\bf \_\-\_\-bss\_\-end}
\begin{CompactList}\small\item\em the end of the uninitialized data segment \item\end{CompactList}\item 
char {\bf \_\-\_\-text\_\-hi}
\begin{CompactList}\small\item\em the high memory segment \item\end{CompactList}\item 
char {\bf \_\-\_\-etext\_\-hi}
\begin{CompactList}\small\item\em the high memory segment \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Implementaion: Main kernel loop. 

\begin{Desc}
\item[Author:]Markus L. Noga $<${\tt markus@noga.de}$>$\end{Desc}


Definition in file {\bf kmain.c}.

\subsection{Function Documentation}
\index{kmain.c@{kmain.c}!kmain@{kmain}}
\index{kmain@{kmain}!kmain.c@{kmain.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void kmain (void)}\label{kmain_8c_a8}


the beginning of everything 

initially called by ROM 

Definition at line 142 of file kmain.c.

References \_\-\_\-bss, \_\-\_\-bss\_\-end, \_\-\_\-etext\_\-hi, \_\-\_\-text\_\-hi, BUTTON\_\-ONOFF, BUTTON\_\-PROGRAM, cls, dbutton(), DEFAULT\_\-STACK\_\-SIZE, delay(), lcd\_\-clear(), lcd\_\-init(), lcd\_\-power\_\-off(), lcd\_\-refresh(), lcd\_\-show(), main(), man\_\-run, memcpy(), memset(), power\_\-init(), power\_\-off(), PRESSED, PRIO\_\-NORMAL, reset\_\-vector, rom\_\-reset(), show\_\-off(), show\_\-on(), and shutoff\_\-init().\index{kmain.c@{kmain.c}!main@{main}}
\index{main@{main}!kmain.c@{kmain.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int main (int {\em argc}, char $\ast$$\ast$ {\em argv})}\label{kmain_8c_a5}


the user {\bf main()}{\rm (p.\,\pageref{fontdesign_8c_a1})} 



Definition at line 44 of file active\-Sensor.C.\index{kmain.c@{kmain.c}!show_off@{show\_\-off}}
\index{show_off@{show\_\-off}!kmain.c@{kmain.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void show\_\-off (void)\hspace{0.3cm}{\tt  [inline]}}\label{kmain_8c_a7}


show OFF string 



Definition at line 116 of file kmain.c.

References cls, lcd\_\-digit, and lcd\_\-refresh().

Referenced by kmain().\index{kmain.c@{kmain.c}!show_on@{show\_\-on}}
\index{show_on@{show\_\-on}!kmain.c@{kmain.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void show\_\-on (void)\hspace{0.3cm}{\tt  [inline]}}\label{kmain_8c_a6}


show ON string 



Definition at line 87 of file kmain.c.

References cls, delay(), lcd\_\-digit, and lcd\_\-refresh().

Referenced by kmain().

\subsection{Variable Documentation}
\index{kmain.c@{kmain.c}!__bss@{\_\-\_\-bss}}
\index{__bss@{\_\-\_\-bss}!kmain.c@{kmain.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char {\bf \_\-\_\-bss}}\label{kmain_8c_a1}


the start of the uninitialized data segment 



Referenced by kmain().\index{kmain.c@{kmain.c}!__bss_end@{\_\-\_\-bss\_\-end}}
\index{__bss_end@{\_\-\_\-bss\_\-end}!kmain.c@{kmain.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char {\bf \_\-\_\-bss\_\-end}}\label{kmain_8c_a2}


the end of the uninitialized data segment 



Referenced by kmain().\index{kmain.c@{kmain.c}!__etext_hi@{\_\-\_\-etext\_\-hi}}
\index{__etext_hi@{\_\-\_\-etext\_\-hi}!kmain.c@{kmain.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char {\bf \_\-\_\-etext\_\-hi}}\label{kmain_8c_a4}


the high memory segment 



Referenced by kmain().\index{kmain.c@{kmain.c}!__text_hi@{\_\-\_\-text\_\-hi}}
\index{__text_hi@{\_\-\_\-text\_\-hi}!kmain.c@{kmain.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char {\bf \_\-\_\-text\_\-hi}}\label{kmain_8c_a3}


the high memory segment 



Referenced by kmain().\index{kmain.c@{kmain.c}!firmware_string@{firmware\_\-string}}
\index{firmware_string@{firmware\_\-string}!kmain.c@{kmain.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ {\bf firmware\_\-string} = \char`\"{}Do you byte, when I knock?\char`\"{}}\label{kmain_8c_a0}


firmware recognition string 

the ROM checks for this string when validating new firmware 

Definition at line 58 of file kmain.c.