5#ifndef __INC_FASTSPI_ARM_SAM_H
6#define __INC_FASTSPI_ARM_SAM_H
11FASTLED_NAMESPACE_BEGIN
15template <u
int8_t _DATA_PIN, u
int8_t _CLOCK_PIN, u
int32_t _SPI_CLOCK_DIVIDER>
33 void inline select() __attribute__((always_inline)) {
if(m_pSelect != NULL) { m_pSelect->
select(); } }
36 void inline release() __attribute__((always_inline)) {
if(m_pSelect != NULL) { m_pSelect->
release(); } }
58 template <
class D>
void writeBytes(FASTLED_REGISTER uint8_t *data,
int len) {
59 uint8_t *end = data + len;
74 template <u
int8_t BIT>
inline static void writeBit(uint8_t b) { }
central include file for FastLED, defines the CFastLED class/object
A skeletal implementation of hardware SPI support.
static void writeByte(uint8_t b)
write a byte out via SPI (returns immediately on writing register)
void writePixels(PixelController< RGB_ORDER > pixels, void *context=NULL)
write a block of uint8_ts out in groups of three.
SAMHArdwareSPIOutput(Selectable *pSelect)
Constructor with selectable.
void writeBytes(FASTLED_REGISTER uint8_t *data, int len)
A full cycle of writing a value for len bytes, including select, release, and waiting.
static void writeBit(uint8_t b)
write a single bit out, which bit from the passed in byte is determined by template parameter
SAMHardwareSPIOutput()
Default Constructor.
void writeBytesValue(uint8_t value, int len)
A full cycle of writing a value for len bytes, including select, release, and waiting.
void release()
release the CS select
void setSelect(Selectable *pSelect)
set the object representing the selectable
void select()
latch the CS select
static void writeBytesValueRaw(uint8_t value, int len)
A raw set of writing byte values, assumes setup/init/waiting done elsewhere.
void init()
initialize the SPI subssytem
static void writeWord(uint16_t w)
write a word out via SPI (returns immediately on writing register)
static void waitFully()
wait until all queued up data has been written
void writeBytes(FASTLED_REGISTER uint8_t *data, int len)
A full cycle of writing a value for len bytes, including select, release, and waiting.
Abstract class for "selectable" things.
virtual void release()=0
Release this object.
virtual void select()=0
Select this object.
#define FLAG_START_BIT
Flag for the start of an SPI transaction.
FASTLED_FORCE_INLINE uint8_t loadAndScale1(int lane, uint8_t scale)
non-template alias of loadAndScale<1>()
FASTLED_FORCE_INLINE uint8_t loadAndScale2(int lane, uint8_t scale)
non-template alias of loadAndScale<2>()
FASTLED_FORCE_INLINE uint8_t loadAndScale0(int lane, uint8_t scale)
non-template alias of loadAndScale<0>()
FASTLED_FORCE_INLINE void advanceData()
Advance the data pointer forward, adjust position counter.
FASTLED_FORCE_INLINE void stepDithering()
Step the dithering forward.