\hypertarget{fingersensors_8h}{
\section{fingersensors.h File Reference}
\label{fingersensors_8h}\index{fingersensors.h@{fingersensors.h}}
}
{\tt \#include \char`\"{}t89c51cc02.h\char`\"{}}\par
{\tt \#include \char`\"{}datatypes.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{fingersensors_8h_1f0714e3cb1f81638977ae18d0ee51b9}{FINGERSENSOR\_\-COLUMN\_\-SELECT0}~P1\_\-6
\item 
\#define \hyperlink{fingersensors_8h_b714c0bd6183050a2c2161db24671ad3}{FINGERSENSOR\_\-COLUMN\_\-SELECT1}~P1\_\-7
\item 
\#define \hyperlink{fingersensors_8h_a8e9c1f4064fdf818618bd690573428c}{Fingersensors\_\-Power\-Off}()~FINGERSENSOR\_\-COLUMN\_\-SELECT0=0; FINGERSENSOR\_\-COLUMN\_\-SELECT1=0
\item 
\#define \hyperlink{fingersensors_8h_1b91cc7f368384fc368286d556a260c5}{Fingersensors\_\-Select\-Bank1}()~FINGERSENSOR\_\-COLUMN\_\-SELECT0=1; FINGERSENSOR\_\-COLUMN\_\-SELECT1=0
\item 
\#define \hyperlink{fingersensors_8h_bce5ecbe910d850e2984e1431fdeb416}{Fingersensors\_\-Select\-Bank2}()~FINGERSENSOR\_\-COLUMN\_\-SELECT0=0; FINGERSENSOR\_\-COLUMN\_\-SELECT1=1
\item 
\#define \hyperlink{fingersensors_8h_11a0c1e864a1532fe8809a17f293c355}{FINGERSENSORS\_\-NR}~4
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{fingersensors_8h_f3147831b11feeafb571a4a9df910632}{Fingersensors\_\-init} (void)
\begin{CompactList}\small\item\em initializes fingersensors subsystem \item\end{CompactList}\item 
void \hyperlink{fingersensors_8h_e04cbfeddab7b4d110d03ceee68962b8}{Fingersensors\_\-read} (void)
\begin{CompactList}\small\item\em read all finger mounted force sensing resistors \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD} idata \hyperlink{fingersensors_8h_dc4b2ee15227750ad9a91160bdabb146}{fingersensors} \mbox{[}FINGERSENSORS\_\-NR\mbox{]}
\begin{CompactList}\small\item\em storage buffer for current fingersensor values \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}


Definition in file \hyperlink{fingersensors_8h-source}{fingersensors.h}.

\subsection{Define Documentation}
\hypertarget{fingersensors_8h_1f0714e3cb1f81638977ae18d0ee51b9}{
\index{fingersensors.h@{fingersensors.h}!FINGERSENSOR_COLUMN_SELECT0@{FINGERSENSOR\_\-COLUMN\_\-SELECT0}}
\index{FINGERSENSOR_COLUMN_SELECT0@{FINGERSENSOR\_\-COLUMN\_\-SELECT0}!fingersensors.h@{fingersensors.h}}
\subsubsection[FINGERSENSOR\_\-COLUMN\_\-SELECT0]{\setlength{\rightskip}{0pt plus 5cm}\#define FINGERSENSOR\_\-COLUMN\_\-SELECT0~P1\_\-6}}
\label{fingersensors_8h_1f0714e3cb1f81638977ae18d0ee51b9}


port pin to access sensor matrix column 0 

Definition at line 5 of file fingersensors.h.\hypertarget{fingersensors_8h_b714c0bd6183050a2c2161db24671ad3}{
\index{fingersensors.h@{fingersensors.h}!FINGERSENSOR_COLUMN_SELECT1@{FINGERSENSOR\_\-COLUMN\_\-SELECT1}}
\index{FINGERSENSOR_COLUMN_SELECT1@{FINGERSENSOR\_\-COLUMN\_\-SELECT1}!fingersensors.h@{fingersensors.h}}
\subsubsection[FINGERSENSOR\_\-COLUMN\_\-SELECT1]{\setlength{\rightskip}{0pt plus 5cm}\#define FINGERSENSOR\_\-COLUMN\_\-SELECT1~P1\_\-7}}
\label{fingersensors_8h_b714c0bd6183050a2c2161db24671ad3}


port pin to access sensor matrix column 1 

Definition at line 7 of file fingersensors.h.\hypertarget{fingersensors_8h_11a0c1e864a1532fe8809a17f293c355}{
\index{fingersensors.h@{fingersensors.h}!FINGERSENSORS_NR@{FINGERSENSORS\_\-NR}}
\index{FINGERSENSORS_NR@{FINGERSENSORS\_\-NR}!fingersensors.h@{fingersensors.h}}
\subsubsection[FINGERSENSORS\_\-NR]{\setlength{\rightskip}{0pt plus 5cm}\#define FINGERSENSORS\_\-NR~4}}
\label{fingersensors_8h_11a0c1e864a1532fe8809a17f293c355}


number of mounted finger sensors 

Definition at line 16 of file fingersensors.h.

Referenced by Fingersensors\_\-init(), and main().\hypertarget{fingersensors_8h_a8e9c1f4064fdf818618bd690573428c}{
\index{fingersensors.h@{fingersensors.h}!Fingersensors_PowerOff@{Fingersensors\_\-PowerOff}}
\index{Fingersensors_PowerOff@{Fingersensors\_\-PowerOff}!fingersensors.h@{fingersensors.h}}
\subsubsection[Fingersensors\_\-PowerOff]{\setlength{\rightskip}{0pt plus 5cm}\#define Fingersensors\_\-Power\-Off()~FINGERSENSOR\_\-COLUMN\_\-SELECT0=0; FINGERSENSOR\_\-COLUMN\_\-SELECT1=0}}
\label{fingersensors_8h_a8e9c1f4064fdf818618bd690573428c}


disables finger mounted sensors 

Definition at line 10 of file fingersensors.h.

Referenced by Fingersensors\_\-init(), and Fingersensors\_\-read().\hypertarget{fingersensors_8h_1b91cc7f368384fc368286d556a260c5}{
\index{fingersensors.h@{fingersensors.h}!Fingersensors_SelectBank1@{Fingersensors\_\-SelectBank1}}
\index{Fingersensors_SelectBank1@{Fingersensors\_\-SelectBank1}!fingersensors.h@{fingersensors.h}}
\subsubsection[Fingersensors\_\-SelectBank1]{\setlength{\rightskip}{0pt plus 5cm}\#define Fingersensors\_\-Select\-Bank1()~FINGERSENSOR\_\-COLUMN\_\-SELECT0=1; FINGERSENSOR\_\-COLUMN\_\-SELECT1=0}}
\label{fingersensors_8h_1b91cc7f368384fc368286d556a260c5}


selects Bank 1 of the finger mounted sensors 

Definition at line 12 of file fingersensors.h.

Referenced by Fingersensors\_\-read().\hypertarget{fingersensors_8h_bce5ecbe910d850e2984e1431fdeb416}{
\index{fingersensors.h@{fingersensors.h}!Fingersensors_SelectBank2@{Fingersensors\_\-SelectBank2}}
\index{Fingersensors_SelectBank2@{Fingersensors\_\-SelectBank2}!fingersensors.h@{fingersensors.h}}
\subsubsection[Fingersensors\_\-SelectBank2]{\setlength{\rightskip}{0pt plus 5cm}\#define Fingersensors\_\-Select\-Bank2()~FINGERSENSOR\_\-COLUMN\_\-SELECT0=0; FINGERSENSOR\_\-COLUMN\_\-SELECT1=1}}
\label{fingersensors_8h_bce5ecbe910d850e2984e1431fdeb416}


selects Bank 2 of the finger mounted sensors 

Definition at line 14 of file fingersensors.h.

Referenced by Fingersensors\_\-read().

\subsection{Function Documentation}
\hypertarget{fingersensors_8h_f3147831b11feeafb571a4a9df910632}{
\index{fingersensors.h@{fingersensors.h}!Fingersensors_init@{Fingersensors\_\-init}}
\index{Fingersensors_init@{Fingersensors\_\-init}!fingersensors.h@{fingersensors.h}}
\subsubsection[Fingersensors\_\-init]{\setlength{\rightskip}{0pt plus 5cm}void Fingersensors\_\-init (void)}}
\label{fingersensors_8h_f3147831b11feeafb571a4a9df910632}


initializes fingersensors subsystem 

P1.1 and P1.2 are configured as valid analogue inputs for the subsystem. 

Definition at line 33 of file fingersensors.c.

References fingersensors, FINGERSENSORS\_\-NR, and Fingersensors\_\-Power\-Off.

Referenced by main().\hypertarget{fingersensors_8h_e04cbfeddab7b4d110d03ceee68962b8}{
\index{fingersensors.h@{fingersensors.h}!Fingersensors_read@{Fingersensors\_\-read}}
\index{Fingersensors_read@{Fingersensors\_\-read}!fingersensors.h@{fingersensors.h}}
\subsubsection[Fingersensors\_\-read]{\setlength{\rightskip}{0pt plus 5cm}void Fingersensors\_\-read (void)}}
\label{fingersensors_8h_e04cbfeddab7b4d110d03ceee68962b8}


read all finger mounted force sensing resistors 

The samples are saved into the buffer. (see \hyperlink{fingersensors_8h_dc4b2ee15227750ad9a91160bdabb146}{fingersensors} ) 

Definition at line 49 of file fingersensors.c.

References ADC(), fingersensors, Fingersensors\_\-Power\-Off, Fingersensors\_\-Select\-Bank1, and Fingersensors\_\-Select\-Bank2.

Referenced by main().

\subsection{Variable Documentation}
\hypertarget{fingersensors_8h_dc4b2ee15227750ad9a91160bdabb146}{
\index{fingersensors.h@{fingersensors.h}!fingersensors@{fingersensors}}
\index{fingersensors@{fingersensors}!fingersensors.h@{fingersensors.h}}
\subsubsection[fingersensors]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD} idata \hyperlink{fingersensors_8h_dc4b2ee15227750ad9a91160bdabb146}{fingersensors}\mbox{[}FINGERSENSORS\_\-NR\mbox{]}}}
\label{fingersensors_8h_dc4b2ee15227750ad9a91160bdabb146}


storage buffer for current fingersensor values 

The buffer is located in indirect addressable IRAM of the T89C51CC02 

Definition at line 26 of file fingersensors.c.

Referenced by Fingersensors\_\-init(), Fingersensors\_\-read(), and main().