Bare Metal Programming Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Static Public Member Functions | List of all members
bmptk::hardware::pin_in Struct Reference

input pin interface More...

#include <pins.h>

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

Public Types

enum  { type = type_pin_in }
 identify this type as a type_pin_in
 
enum  { features = has_none }
 this type has no additional fatures
 

Static Public Member Functions

static void init ()
 initialize the pin as input
 
static bool get ()
 get the current level on the pin
 

Detailed Description

input pin interface

This class defines the interface of an input pin.

This class is to be used as parent class for classes that provide the pin_in interface.

Definition at line 48 of file pins.h.

Member Function Documentation

static bool bmptk::hardware::pin_in::get ( )
static

get the current level on the pin

This method returns the current level on the input pin. When the level is a logic one (high voltage, Vdd) the returned value is true, otherwise (logic zero, low level, Vss) the value false is returned.

The init() method must be called first.

static void bmptk::hardware::pin_in::init ( )
static

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.


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