Bare Metal Programming Tool Kit
|
create a port_in_out from a list of pins More...
#include <ports.h>
Additional Inherited Members | |
Public Types inherited from bmptk::hardware::port_in_out | |
enum | { type = type_port_in_out } |
identify this type as a type_port_in_out | |
enum | { features = has_none } |
this type has no additional fatures | |
Static Public Member Functions inherited from bmptk::hardware::port_in_out | |
static void | init () |
initialize the port as input | |
static int | n_pins () |
the number of pins in the port, can be 0..32. | |
static void | direction_set_input () |
set the direction of the port to input | |
static void | direction_set_output () |
set the direction of the port to output | |
static void | set (unsigned int d) |
set the curret level on the pins in the port | |
static unsigned int | get () |
get the current values of the pins in the port | |
create a port_in_out from a list of pins
This class template accepts a list of pins and combines them into a port_in_out. The first pin in the list becomes pin 0 in the port, etc.
The pins must be acceptable to pin_in_out_from.