FastLED 3.9.15
Loading...
Searching...
No Matches

◆ writeBytesValueRaw()

template<uint8_t DATA_PIN, uint8_t CLOCK_PIN, uint32_t SPI_SPEED>
static void AVRSoftwareSPIOutput< DATA_PIN, CLOCK_PIN, SPI_SPEED >::writeBytesValueRaw ( uint8_t value,
int len )
inlinestatic

Write multiple bytes of the given value over SPI, without selecting the interface.

Useful for quickly flushing, say, a line of 0's down the line.

Parameters
valuethe value to write to the bus
lenhow many copies of the value to write

Definition at line 254 of file fastspi_bitbang.h.

254 {
255#ifdef FAST_SPI_INTERRUPTS_WRITE_PINS
256 // TODO: Weird things may happen if software bitbanging SPI output and other pins on the output reigsters are being twiddled. Need
257 // to allow specifying whether or not exclusive i/o access is allowed during this process, and if i/o access is not allowed fall
258 // back to the degenerative code below
259 while(len--) {
261 }
262#else
264
266 // If data and clock are on different ports, then writing a bit will consist of writing the value foor
267 // the bit (hi or low) to the data pin port, and then two writes to the clock port to strobe the clock line
273 while(len--) {
275 }
276
277 } else {
278 // If data and clock are on the same port then we can combine setting the data and clock pins
283
284 while(len--) {
286 }
287 }
288#endif
289 }
static void writeByte(uint8_t b)
Write a single byte over SPI.
FastPin< CLOCK_PIN >::port_t clock_t
FastPin< DATA_PIN >::port_t data_t
FastPin< DATA_PIN >::port_ptr_t data_ptr_t
FastPin< CLOCK_PIN >::port_ptr_t clock_ptr_t
Software SPI (aka bit-banging) support Includes aggressive optimizations for when the clock and data ...
static port_t hival()
Gets the state of the port with this pin HIGH
Definition fastpin.h:260
static port_t loval()
Gets the state of the port with this pin LOW
Definition fastpin.h:262
static port_t mask()
Get the pin mask.
Definition fastpin.h:266
static port_ptr_t port()
Get the output state of the port.
Definition fastpin.h:264

References FASTLED_REGISTER, FastPin< PIN >::hival(), FastPin< PIN >::loval(), FastPin< PIN >::mask(), FastPin< PIN >::port(), and writeByte().

Referenced by LPD8806Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >::LPD8806_ADJUST::postBlock(), and writeBytesValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: