\section{aversive\_\-10-03-12/modules/base/scheduler/scheduler\_\-add.c File Reference}
\label{scheduler__add_8c}\index{aversive\_\-10-03-12/modules/base/scheduler/scheduler\_\-add.c@{aversive\_\-10-03-12/modules/base/scheduler/scheduler\_\-add.c}}
{\tt \#include $<$aversive.h$>$}\par
{\tt \#include $<$scheduler\_\-config.h$>$}\par
{\tt \#include $<$scheduler\_\-private.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
int8\_\-t {\bf scheduler\_\-add\_\-event} (uint8\_\-t unicity, void($\ast$f)(void $\ast$), void $\ast$data, uint16\_\-t period, uint8\_\-t priority)
\end{CompactItemize}


\subsection{Function Documentation}
\index{scheduler\_\-add.c@{scheduler\_\-add.c}!scheduler\_\-add\_\-event@{scheduler\_\-add\_\-event}}
\index{scheduler\_\-add\_\-event@{scheduler\_\-add\_\-event}!scheduler_add.c@{scheduler\_\-add.c}}
\subsubsection[scheduler\_\-add\_\-event]{\setlength{\rightskip}{0pt plus 5cm}int8\_\-t scheduler\_\-add\_\-event (uint8\_\-t {\em unicity}, \/  void($\ast$)(void $\ast$) {\em f}, \/  void $\ast$ {\em data}, \/  uint16\_\-t {\em period}, \/  uint8\_\-t {\em priority})}\label{scheduler__add_8c_360d73e3218aa385300aeb2d74b79f2a}


Alloc an event, and fill its field, then mark it as active. return its index in the table, or -1 if no evt is available 

Definition at line 50 of file scheduler\_\-add.c.

References event\_\-t::current\_\-time, event\_\-t::data, parse\_\-symbols::f, event\_\-t::f, g\_\-tab\_\-event, IRQ\_\-LOCK, IRQ\_\-UNLOCK, event\_\-t::period, event\_\-t::priority, SCHEDULER\_\-EVENT\_\-ACTIVE, and event\_\-t::state.