Defines | Functions | Variables

irc.h File Reference

#include <lpc21xx.h>
#include <types.h>
Include dependency graph for irc.h:
This graph shows which files directly or indirectly include this file:

Defines

#define IRC1PIN   IO0PIN
#define IRC1DIR   IO0DIR
#define IRC1BIT   15
#define IRC1PINSEL   PINSEL0
#define IRC1PINBIT   (2*IRC1BIT)
#define IRC2PIN   IO0PIN
#define IRC2DIR   IO0DIR
#define IRC2BIT   18
#define IRC2PINSEL   PINSEL1
#define IRC2PINBIT   (2*2)

Functions

void irc_init ()
 update IRC1, IRC2 deglitchers' state structs, initialize IRC1,2 as GPIO inputs
int irc_read ()
 -!- to be called @ approx.

Variables

volatile int32_t irc1_count
volatile int32_t irc2_count

Define Documentation

#define IRC1BIT   15
#define IRC1DIR   IO0DIR
#define IRC1PIN   IO0PIN
#define IRC1PINBIT   (2*IRC1BIT)
#define IRC1PINSEL   PINSEL0
#define IRC2BIT   18
#define IRC2DIR   IO0DIR
#define IRC2PIN   IO0PIN
#define IRC2PINBIT   (2*2)
#define IRC2PINSEL   PINSEL1

Function Documentation

void irc_init (  ) 

update IRC1, IRC2 deglitchers' state structs, initialize IRC1,2 as GPIO inputs

Here is the call graph for this function:

Here is the caller graph for this function:

int irc_read (  ) 

-!- to be called @ approx.

100kHz fixed period -!-

read IRC1,2 inputs, deglitch signal, update irc*_count variables increments on falling edge

Returns:
r; r==0: no change, r&1: IRC1 increment, r&2: IRC2 increment

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

volatile int32_t irc1_count
volatile int32_t irc2_count