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 256 of file fastspi_bitbang.h.

256 {
257#ifdef FAST_SPI_INTERRUPTS_WRITE_PINS
258 // TODO: Weird things may happen if software bitbanging SPI output and other pins on the output reigsters are being twiddled. Need
259 // to allow specifying whether or not exclusive i/o access is allowed during this process, and if i/o access is not allowed fall
260 // back to the degenerative code below
261 while(len--) {
263 }
264#else
266
268 // If data and clock are on different ports, then writing a bit will consist of writing the value foor
269 // the bit (hi or low) to the data pin port, and then two writes to the clock port to strobe the clock line
275 while(len--) {
277 }
278
279 } else {
280 // If data and clock are on the same port then we can combine setting the data and clock pins
285
286 while(len--) {
288 }
289 }
290#endif
291 }
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:262
static port_t loval()
Gets the state of the port with this pin LOW
Definition fastpin.h:264
static port_t mask()
Get the pin mask.
Definition fastpin.h:268
static port_ptr_t port()
Get the output state of the port.
Definition fastpin.h:266

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: