#include <lpc21xx.h>
#include <types.h>
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 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 |
void irc_init | ( | ) |
update IRC1, IRC2 deglitchers' state structs, initialize IRC1,2 as GPIO inputs
int irc_read | ( | ) |
-!- to be called @ approx.
100kHz fixed period -!-
read IRC1,2 inputs, deglitch signal, update irc*_count variables increments on falling edge
volatile int32_t irc1_count |
volatile int32_t irc2_count |