40 const uint32_t
FREQ = 10000;
42 void error (
const PropWare::ErrorCode err);
52 int16_t gyroValues[3];
64 gyro.always_set_spi_mode(1);
67 gyro.read_all(gyroValues);
76 waitcnt(50*MILLISECOND + CNT);
82 void error (
const PropWare::ErrorCode err) {
87 debugLEDs.write((uint32_t) err);
88 waitcnt(CLKFREQ / 5 + CNT);
90 waitcnt(CLKFREQ / 5 + CNT);
The PropWare::SimplePort is the recommended way to use data ports on the Propeller. All pins are consecutive, which allows for some simple shortcuts in reading, writing, and initialization.
const PropWare::Port::Mask SCLK
L3G gyroscope driver using SPI communication for the Parallax Propeller.
const PropWare::Printer pwOut
Most common use of printing in PropWare applications (not thread safe; see PropWare::pwSyncOut for mu...
const PropWare::Port::Mask MISO
const PropWare::Port::Mask CS
const PropWare::Port::Mask MOSI
SPI serial communications library; Core functionality comes from a dedicated assembly cog...
static SPI * get_instance()
Best way to use SPI is through here, where you can get a shared instance of the SPI module (not threa...