Bare Metal Programming Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Static Public Member Functions | List of all members
bmptk::hardware::rising_edge< arg_pin, flavour > Struct Template Reference

detect a rising edge on a pin that can be converted to pin_in More...

#include <pins.h>

Inheritance diagram for bmptk::hardware::rising_edge< arg_pin, flavour >:
bmptk::hardware::pin_in

Static Public Member Functions

static void init ()
 initialize the pin as input
 
static bool get ()
 get (detect) a rising edge
 
- Static Public Member Functions inherited from bmptk::hardware::pin_in
static void init ()
 initialize the pin as input
 
static bool get ()
 get the current level on the pin
 

Additional Inherited Members

- Public Types inherited from bmptk::hardware::pin_in
enum  { type = type_pin_in }
 identify this type as a type_pin_in
 
enum  { features = has_none }
 this type has no additional fatures
 

Detailed Description

template<class arg_pin, int flavour = arg_pin::type>
struct bmptk::hardware::rising_edge< arg_pin, flavour >

detect a rising edge on a pin that can be converted to pin_in

Definition at line 657 of file pins.h.

Member Function Documentation

template<class arg_pin , int flavour = arg_pin::type>
static bool bmptk::hardware::rising_edge< arg_pin, flavour >::get ( )
inlinestatic

get (detect) a rising edge

This method will return 1 if and only if the underlying pin now reads 1 and did read 0 on the previos call. In other words: it retruns 1 only on a rising edge on the underlying pin.

Definition at line 684 of file pins.h.

template<class arg_pin , int flavour = arg_pin::type>
static void bmptk::hardware::rising_edge< arg_pin, flavour >::init ( )
inlinestatic

initialize the pin as input

This method initializes the pin as input pin. This might involve configuring the pin as gpio, and disabling analog or other special functions.

Definition at line 674 of file pins.h.


The documentation for this struct was generated from the following file: