PiPower  ac0ff3c (Mon Feb 11 21:44:30 2019 -0500)
Functions
/home/travis/build/larsks/pipower/input.c File Reference
#include "bool.h"
#include <stdint.h>
#include <stdlib.h>
#include <avr/io.h>
#include "input.h"

Functions

void input_new (Input *input, int pin, bool pullup)
 Create a new Input object.
 
void input_update (Input *input)
 Read the state of the pin.
 
bool input_went_high (Input *input)
 Return true if the pin state has gone high. More...
 
bool input_went_low (Input *input)
 Return true if the pin state has gone low. More...
 
bool input_is_high (Input *input)
 Return true if the pin is high.
 
bool input_is_low (Input *input)
 Return true if the pin is low.
 

Function Documentation

bool input_went_high ( Input input)

Return true if the pin state has gone high.

This checks if the pin state has changed since a previous call to went_high() or went_low().

bool input_went_low ( Input input)

Return true if the pin state has gone low.

This checks if the pin state has changed since a previous call to went_high() or went_low().