Aguijón Software Libraries  1.0
Documentation for the included Libraries
 All Files Functions Variables Typedefs Enumerations Enumerator Macros
inputs.c File Reference
#include <p24FJ128GB106.h>
#include <GenericTypeDefs.h>
#include "definitions.h"
#include "inputs.h"

Go to the source code of this file.

Functions

void DIPconfig (unsigned char cfg)
 
unsigned char readDIP (void)
 
BOOL DebounceKeyb (void)
 
BOOL DebounceOpto (void)
 
unsigned char getActiveSW (void)
 
unsigned char readSW (void)
 
unsigned char readOI (void)
 

Function Documentation

BOOL DebounceKeyb ( void  )

Function: DebounceKeyb

Preconditions: Key pressed.

Overview: Debounces the pressed key.

Arguments: None.

Returns: TRUE if success, FALSE if failure.

Definition at line 120 of file inputs.c.

BOOL DebounceOpto ( void  )

Function: DebounceOPTO

Preconditions: Input activated.

Overview: Debounces the active input.

Arguments: None.

Returns: TRUE if success, FALSE if failure.

Definition at line 143 of file inputs.c.

void DIPconfig ( unsigned char  cfg)

Function: DIPconfig

Preconditions: None.

Overview: Enables/Disables the DIP switch.

Arguments: Configuration macro, see "definitions.h".

Returns: None.

Definition at line 40 of file inputs.c.

unsigned char getActiveSW ( void  )

Function: getActiveSW

Preconditions: Key pressed.

Overview: Handles pressed keys.

Arguments: None.

Returns: The number of the key that was pressed.

Definition at line 166 of file inputs.c.

unsigned char readDIP ( void  )

Function: readDIP

Preconditions: DIP switch enabled.

Overview: Returns the DIP switch value.

Arguments: None.

Returns: HEX value.

Definition at line 69 of file inputs.c.

unsigned char readOI ( void  )

Function: readOI

Preconditions: Key pressed.

Overview: Reads the Opto Isolated inputs state.

Arguments: None.

Returns: Number of the active input if any.

Definition at line 230 of file inputs.c.

unsigned char readSW ( void  )

Function: readSW

Preconditions: None.

Overview: Reads the keyboard state.

Arguments: None.

Returns: Number of the key that was pressed if any.

Definition at line 195 of file inputs.c.