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

Go to the source code of this file.

Data Structures

struct  Input
 

Typedefs

typedef struct Input Input
 

Functions

void input_new (Input *input, int pin, bool pullup)
 Create a new Input object.
 
void input_delete (Input *)
 
void input_update (Input *)
 Read the state of the pin.
 
bool input_went_high (Input *)
 Return true if the pin state has gone high. More...
 
bool input_went_low (Input *)
 Return true if the pin state has gone low. More...
 
bool input_is_high (Input *)
 Return true if the pin is high.
 
bool input_is_low (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().