FastLED 3.9.15
Loading...
Searching...
No Matches
REFHardwareSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER > Class Template Reference

Detailed Description

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
class REFHardwareSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >

A skeletal implementation of hardware SPI support.

Fill in the necessary code for init, waiting, and writing. The rest of the method implementations should provide a starting point, even if they're not the most efficient to start with

Definition at line 16 of file fastspi_ref.h.

#include <fastspi_ref.h>

+ Collaboration diagram for REFHardwareSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >:

Public Member Functions

void init ()
 initialize the SPI subssytem
 
void release ()
 release the CS select
 
 SAMHArdwareSPIOutput (Selectable *pSelect)
 Constructor with selectable.
 
 SAMHardwareSPIOutput ()
 Default Constructor.
 
void select ()
 latch the CS select
 
void setSelect (Selectable *pSelect)
 set the object representing the selectable
 
template<class D>
void writeBytes (FASTLED_REGISTER uint8_t *data, int len)
 A full cycle of writing a value for len bytes, including select, release, and waiting.
 
void writeBytes (FASTLED_REGISTER uint8_t *data, int len)
 A full cycle of writing a value for len bytes, including select, release, and waiting.
 
void writeBytesValue (uint8_t value, int len)
 A full cycle of writing a value for len bytes, including select, release, and waiting.
 
template<uint8_t FLAGS, class D, EOrder RGB_ORDER>
void writePixels (PixelController< RGB_ORDER > pixels, void *context=NULL)
 write a block of uint8_ts out in groups of three.
 

Static Public Member Functions

static void waitFully ()
 wait until all queued up data has been written
 
template<uint8_t BIT>
static void writeBit (uint8_t b)
 write a single bit out, which bit from the passed in byte is determined by template parameter
 
static void writeByte (uint8_t b)
 write a byte out via SPI (returns immediately on writing register)
 
static void writeBytesValueRaw (uint8_t value, int len)
 A raw set of writing byte values, assumes setup/init/waiting done elsewhere.
 
static void writeWord (uint16_t w)
 write a word out via SPI (returns immediately on writing register)
 

Private Attributes

Selectablem_pSelect
 

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