FastLED 3.7.8
Loading...
Searching...
No Matches
NOPSPIOutput< _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 NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >

A nop/stub class, mostly to show the SPI methods that are needed/used by the various SPI chipset implementations.

Should be used as a definition for the set of methods that the spi implementation classes should use (since C++ doesn't support the idea of interfaces - it's possible this could be done with virtual classes, need to decide if i want that overhead)

Definition at line 18 of file fastspi_nop.h.

#include <fastspi_nop.h>

Public Member Functions

 NOPSPIOutput ()
 Default Constructor.
 
 NOPSPIOutput (Selectable *pSelect)
 Constructor with selectable.
 
void setSelect (Selectable *pSelect)
 set the object representing the selectable
 
void init ()
 initialize the SPI subssytem
 
void select ()
 latch the CS select
 
void release ()
 release the CS select
 
void waitFully ()
 wait until all queued up data has been written
 
void writeByte (uint8_t b)
 write a byte out via SPI (returns immediately on writing register)
 
void writeWord (uint16_t w)
 write a word out via SPI (returns immediately on writing register)
 
void writeBytesValue (uint8_t value, int len)
 A full cycle of writing a value for len bytes, including select, release, and waiting.
 
void writeBytes (uint8_t *data, int len)
 A full cycle of writing a raw block of data out, including select, release, and waiting.
 
template<uint8_t FLAGS, class D , EOrder RGB_ORDER>
void writePixels (PixelController< RGB_ORDER > pixels, void *context=NULL)
 write out pixel data from the given PixelController object
 

Static Public Member Functions

template<uint8_t BIT>
static void writeBit (uint8_t b)
 not the most efficient mechanism in the world - but should be enough for sm16716 and friends
 
static void writeBytesValueRaw (uint8_t value, int len)
 A raw set of writing byte values, assumes setup/init/waiting done elsewhere (static for use by adjustment classes)
 
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
 

Constructor & Destructor Documentation

◆ NOPSPIOutput() [1/2]

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::NOPSPIOutput ( )
inline

Default Constructor.

Definition at line 23 of file fastspi_nop.h.

◆ NOPSPIOutput() [2/2]

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::NOPSPIOutput ( Selectable * pSelect)
inline

Constructor with selectable.

Definition at line 26 of file fastspi_nop.h.

Member Function Documentation

◆ init()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::init ( )
inline

initialize the SPI subssytem

Definition at line 32 of file fastspi_nop.h.

◆ release()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::release ( )
inline

release the CS select

Definition at line 38 of file fastspi_nop.h.

◆ select()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::select ( )
inline

latch the CS select

Definition at line 35 of file fastspi_nop.h.

◆ setSelect()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::setSelect ( Selectable * pSelect)
inline

set the object representing the selectable

Definition at line 29 of file fastspi_nop.h.

◆ writeBit() [1/2]

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
template<uint8_t BIT>
static void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::writeBit ( uint8_t b)
inlinestatic

not the most efficient mechanism in the world - but should be enough for sm16716 and friends

Definition at line 44 of file fastspi_nop.h.

◆ writeBit() [2/2]

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
template<uint8_t BIT>
static void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::writeBit ( uint8_t b)
inlinestatic

write a single bit out, which bit from the passed in byte is determined by template parameter

Definition at line 61 of file fastspi_nop.h.

◆ writeByte()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::writeByte ( uint8_t b)
inline

write a byte out via SPI (returns immediately on writing register)

Definition at line 47 of file fastspi_nop.h.

◆ writeBytes()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::writeBytes ( uint8_t * data,
int len )
inline

A full cycle of writing a raw block of data out, including select, release, and waiting.

Definition at line 58 of file fastspi_nop.h.

◆ writeBytesValue()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::writeBytesValue ( uint8_t value,
int len )
inline

A full cycle of writing a value for len bytes, including select, release, and waiting.

Definition at line 55 of file fastspi_nop.h.

◆ writeBytesValueRaw()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
static void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::writeBytesValueRaw ( uint8_t value,
int len )
inlinestatic

A raw set of writing byte values, assumes setup/init/waiting done elsewhere (static for use by adjustment classes)

Definition at line 52 of file fastspi_nop.h.

◆ writePixels()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
template<uint8_t FLAGS, class D , EOrder RGB_ORDER>
void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::writePixels ( PixelController< RGB_ORDER > pixels,
void * context = NULL )
inline

write out pixel data from the given PixelController object

Definition at line 64 of file fastspi_nop.h.

◆ writeWord()

template<uint8_t _DATA_PIN, uint8_t _CLOCK_PIN, uint32_t _SPI_CLOCK_DIVIDER>
void NOPSPIOutput< _DATA_PIN, _CLOCK_PIN, _SPI_CLOCK_DIVIDER >::writeWord ( uint16_t w)
inline

write a word out via SPI (returns immediately on writing register)

Definition at line 49 of file fastspi_nop.h.


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