Bare Metal Programming Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
List of all members
bmptk::hardware::port_out_from_pins<> Class Template Reference

create a port_out from a list of pins More...

#include <ports.h>

Inheritance diagram for bmptk::hardware::port_out_from_pins<>:
bmptk::hardware::port_out

Additional Inherited Members

- Public Types inherited from bmptk::hardware::port_out
enum  { type = type_port_out }
 identify this type as a type_port_out
 
enum  { features = has_none }
 this type has no additional fatures
 
- Static Public Member Functions inherited from bmptk::hardware::port_out
static void init ()
 initialize the port as output
 
static int n_pins ()
 the number of pins in the port, can be 0..32.
 
static void set (unsigned int d)
 set the curret level on the pins in the port
 

Detailed Description

template<typename...>
class bmptk::hardware::port_out_from_pins<>

create a port_out from a list of pins

This class template accepts a list of pins and combines them into a port_out. The first pint in the list becomes pin 0 in the port, etc.

The pins must be acceptable to pin_out_from.

Example (examples/db103/kitt/main.cpp):

// show a kitt-style display on 12 LEDs
#include "bmptk.h"
bmptk::target::gpio_0_4,
bmptk::target::gpio_0_5,
bmptk::target::gpio_0_6,
bmptk::target::gpio_0_7,
bmptk::target::gpio_1_0,
bmptk::target::gpio_1_1,
bmptk::target::gpio_1_2,
bmptk::target::gpio_1_3,
bmptk::target::gpio_1_4,
bmptk::target::gpio_1_5,
bmptk::target::gpio_1_8,
bmptk::target::gpio_1_9
> leds;
int main( void ){
bmptk::hardware::kitt< leds >( 50 * bmptk::ms );
}

Definition at line 230 of file ports.h.


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