FastLED 3.9.7
Loading...
Searching...
No Matches
fastspi_bitbang.h File Reference

Detailed Description

Software SPI (aka bit-banging) support.

Definition in file fastspi_bitbang.h.

#include "FastLED.h"
#include "fastled_delay.h"
#include "fl/force_inline.h"

Go to the source code of this file.

Classes

class  AVRSoftwareSPIOutput< DATA_PIN, CLOCK_PIN, SPI_SPEED >
 Software SPI (aka bit-banging) support Includes aggressive optimizations for when the clock and data pin are on the same port. More...
 

Macros

#define MIN_DELAY   ((NS(35)>3) ? (NS(35) - 3) : 1)
 We want to make sure that the clock pulse is held high for a minimum of 35 ns.
 
#define CLOCK_HI_DELAY   do { delaycycles<MIN_DELAY>(); delaycycles<((SPI_SPEED > 10) ? (((SPI_SPEED-6) / 2) - MIN_DELAY) : (SPI_SPEED))>(); } while(0);
 Delay for the clock signal 'high' period.
 
#define CLOCK_LO_DELAY   do { delaycycles<((SPI_SPEED > 10) ? ((SPI_SPEED-6) / 2) : (SPI_SPEED))>(); } while(0);
 Delay for the clock signal 'low' period.
 

Macro Definition Documentation

◆ CLOCK_HI_DELAY

#define CLOCK_HI_DELAY   do { delaycycles<MIN_DELAY>(); delaycycles<((SPI_SPEED > 10) ? (((SPI_SPEED-6) / 2) - MIN_DELAY) : (SPI_SPEED))>(); } while(0);

Delay for the clock signal 'high' period.

Definition at line 143 of file fastspi_bitbang.h.

◆ CLOCK_LO_DELAY

#define CLOCK_LO_DELAY   do { delaycycles<((SPI_SPEED > 10) ? ((SPI_SPEED-6) / 2) : (SPI_SPEED))>(); } while(0);

Delay for the clock signal 'low' period.

Definition at line 145 of file fastspi_bitbang.h.

◆ MIN_DELAY

#define MIN_DELAY   ((NS(35)>3) ? (NS(35) - 3) : 1)

We want to make sure that the clock pulse is held high for a minimum of 35 ns.

Definition at line 140 of file fastspi_bitbang.h.