|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Go to the documentation of this file.
37 static const Port::Mask
MOSI = Port::Mask::P0;
39 static const Port::Mask
MISO = Port::Mask::P1;
41 static const Port::Mask
SCLK = Port::Mask::P2;
43 static const Port::Mask
CS = Port::Mask::P6;
46 static const uint32_t
FREQ = 100000;
48 static const SPI::Mode
MODE = SPI::Mode::MODE_0;
50 static const SPI::BitMode
BITMODE = SPI::BitMode::MSB_FIRST;
60 char string[] =
"Hello world!\n";
63 SPI spi = SPI::get_instance();
76 Pin cs(
CS, Pin::Dir::OUT);
78 SimplePort debugLEDs(Port::P16, 8, Pin::Dir::OUT);
87 spi.shift_out(8, (uint32_t) *s);
95 in = (
char) spi.shift_in(8);
static const Port::Mask MISO
SPI serial communications library; Core functionality comes from a dedicated assembly cog.
Utility class to handle general purpose I/O pins.
Flexible port that can have any pin enabled or disabled. Pins are independent of each other.
static const Port::Mask CS
#define CLKFREQ
Returns the current clock frequency.
static const Port::Mask MOSI
PropWare::Printer pwOut
Most common use of printing in PropWare applications (not thread safe; see PropWare::pwSyncOut for mu...
#define waitcnt(a)
Wait until system counter reaches a value.
static const SPI::Mode MODE
#define CNT
The system clock count.
The PropWare::SimplePort is the recommended way to use data ports on the Propeller....
void toggle() const
Toggle the output value of a port.
static const Port::Mask SCLK
static const uint32_t FREQ
static const SPI::BitMode BITMODE
void put_char(const char c) const
Print a single character.