Bare Metal Programming Tool Kit
|
template for a buffered 8-bit output_only port More...
#include <ports.h>
Public Types | |
typedef single_pin< 0 > | pin_0 |
pin 0, output-only | |
typedef single_pin< 1 > | pin_1 |
pin 1, output-only | |
typedef single_pin< 2 > | pin_2 |
pin 2, output-only | |
typedef single_pin< 3 > | pin_3 |
pin 3, output-only | |
typedef single_pin< 4 > | pin_4 |
pin 4, output-only | |
typedef single_pin< 5 > | pin_5 |
pin 5, output-only | |
typedef single_pin< 6 > | pin_6 |
pin 6, output-only | |
typedef single_pin< 7 > | pin_7 |
pin 7, output-only | |
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 | |
static void | init () |
initialize the port as output | |
static void | set (unsigned int x) |
set the curret level on the pins in the port | |
static int | n_pins () |
return the number of pins in this port (8) | |
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 | |
template for a buffered 8-bit output_only port
This template must be instantiated with a port_buffered_out_channel that implements the access to the chip that has the pins.
|
inlinestatic |
|
inlinestatic |
set the curret level on the pins in the port
This method sets the current level output by each pin that makes up the port, encoded in the bits in parameter value. The value pin of pin N is determined by the Nth bit.When the value is true a logic one (high voltage, Vdd) will appear on the pin, when the value if false a the pin will output a logic zero (low voltage, Vss).The init() method must be called first.