Bare Metal Programming Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Enumerations | Functions
bmptk::hardware Namespace Reference

hardware: pins, ports More...

Classes

class  i2c_interface
 i2c interface class More...
 
class  i2c_master
 simple I2C bus master More...
 
struct  pin_in
 input pin interface More...
 
struct  pin_out
 output pin interface More...
 
struct  pin_in_out
 input-output pin interface More...
 
struct  pin_oc
 open_collector input-output pin interface More...
 
class  pin_configurable_pullup
 interface for configuring a pull-up pin More...
 
class  pin_ad
 interface for an anlog (A/D) input pin More...
 
struct  pin_in_out_from
 create a pin_in_out from another pin More...
 
struct  pin_oc_from
 create a pin_oc from another pin More...
 
struct  pin_out_from
 create a pin_out from another pin More...
 
struct  pin_in_from
 create a pin_in from another pin More...
 
class  invert
 invert the polarity of a pin or port More...
 
struct  flipable
 add the flip() method to a pin class More...
 
struct  rising_edge
 detect a rising edge on a pin that can be converted to pin_in More...
 
struct  debounce
 debounce a pin_in More...
 
class  tee
 one out_pin that represents any number of pin_out's More...
 
struct  port_in
 input port interface More...
 
struct  port_out
 output port interface More...
 
struct  port_in_out
 input-output port interface More...
 
struct  port_oc
 open-collector port interface More...
 
class  port_out_from_pins
 create a port_out from a list of pins More...
 
class  port_in_from_pins
 create a port_in from a list of pins More...
 
class  port_in_out_from_pins
 create a port_in_out from a list of pins More...
 
class  port_oc_from_pins
 create a port_oc from a list of pins More...
 
class  port_out_from
 
class  port_buffered_out_channel
 chip interface for a buffered output-only port More...
 
class  port_buffer_out
 template for a buffered 8-bit output_only port More...
 
class  port_buffered_oc_channel
 chip interface for a buffered open-collector port More...
 
class  port_buffer_oc
 template for a buffered 8-bit open-collector port More...
 
class  port_buffered_in_channel
 chip interface for a buffered input port More...
 
class  port_buffer_in
 template for a buffered 8-bit input port More...
 
class  port_buffered_in_out_channel
 chip interface for a buffered input-output port More...
 
class  port_buffer_in_out
 template for a buffered 8-bit input-output port More...
 
struct  spi_bus_sclk_mosi_miso
 bit-banged spi bus More...
 
class  spi_channel
 a spi channel to a specific peripheral chip More...
 

Enumerations

enum  spi_mode { spi_mode_0 = 0, spi_mode_1 = 1, spi_mode_2 = 2, spi_mode_3 = 3 }
 specifies the mode of a spi channel More...
 

Functions

template<typename arg_pin , int flavour = arg_pin::type>
void blink (time t=200 *bmptk::ms)
 blink a LED
 
template<typename arg_pin , int flavour = arg_pin::type>
void beep (unsigned long long int period=1 *bmptk::ms, unsigned long long int duration=500 *bmptk::ms)
 beep
 
template<typename arg_port , int flavour = arg_port::type>
void kitt (bmptk::time t=200 *bmptk::ms)
 

Detailed Description

hardware: pins, ports

This namespace contains abstractions for I/O pins and ports, for interfaces like i2c and spi.

Enumeration Type Documentation

specifies the mode of a spi channel

Enumerator:
spi_mode_0 

SPI mode 0.

In this mode the clock is low when idle, and data is present before first clock edge.

spi_mode_1 

SPI mode 1.

In this mode the clock is low when idle, and data is presented at the first clock edge.

spi_mode_2 

SPI mode 2.

In this mode the clock is high when idle, and data is present before first clock edge.

spi_mode_3 

SPI mode 3.

In this mode the clock is high when idle, and data is presented at the first clock edge.

Definition at line 103 of file spi.h.

Function Documentation

template<typename arg_port , int flavour = arg_port::type>
void bmptk::hardware::kitt ( bmptk::time  t = 200 * bmptk::ms)

kitt-style display [kitt]

Definition at line 86 of file demos.h.