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

Detailed Description

Data types and constants used by SPI interfaces.

Definition in file fastspi_types.h.

#include "FastLED.h"
#include "fl/force_inline.h"
#include "fl/namespace.h"
#include "fl/unused.h"

Go to the source code of this file.

Classes

class  DATA_NOP
 Dummy class for output controllers that need no data transformations. More...
 

Macros

#define FLAG_START_BIT   0x80
 Flag for the start of an SPI transaction.
 
#define MASK_SKIP_BITS   0x3F
 Bitmask for the lower 6 bits of a byte.
 
#define MAX_DATA_RATE   0
 Max SPI data rate.
 
Byte Re-Order Macros

Some helper macros for getting at mis-ordered byte values.

Todo
Unused. Remove?
#define SPI_B0   (RGB_BYTE0(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
 Get SPI byte 0 offset.
 
#define SPI_B1   (RGB_BYTE1(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
 Get SPI byte 1 offset.
 
#define SPI_B2   (RGB_BYTE2(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))
 Get SPI byte 2 offset.
 
#define SPI_ADVANCE   (3 + (MASK_SKIP_BITS & SKIP))
 Advance SPI data pointer.
 
Clock speed dividers
#define SPEED_DIV_2   2
 Divisor for clock speed by 2.
 
#define SPEED_DIV_4   4
 Divisor for clock speed by 4.
 
#define SPEED_DIV_8   8
 Divisor for clock speed by 8.
 
#define SPEED_DIV_16   16
 Divisor for clock speed by 16.
 
#define SPEED_DIV_32   32
 Divisor for clock speed by 32.
 
#define SPEED_DIV_64   64
 Divisor for clock speed by 64.
 
#define SPEED_DIV_128   128
 Divisor for clock speed by 128.
 

Macro Definition Documentation

◆ FLAG_START_BIT

#define FLAG_START_BIT   0x80

Flag for the start of an SPI transaction.

Definition at line 57 of file fastspi_types.h.

◆ MASK_SKIP_BITS

#define MASK_SKIP_BITS   0x3F

Bitmask for the lower 6 bits of a byte.

Todo
Unused. Remove?

Definition at line 61 of file fastspi_types.h.

◆ MAX_DATA_RATE

#define MAX_DATA_RATE   0

Max SPI data rate.

Todo
Unused. Remove?

Definition at line 84 of file fastspi_types.h.

◆ SPEED_DIV_128

#define SPEED_DIV_128   128

Divisor for clock speed by 128.

Definition at line 79 of file fastspi_types.h.

◆ SPEED_DIV_16

#define SPEED_DIV_16   16

Divisor for clock speed by 16.

Definition at line 73 of file fastspi_types.h.

◆ SPEED_DIV_2

#define SPEED_DIV_2   2

Divisor for clock speed by 2.

Definition at line 67 of file fastspi_types.h.

◆ SPEED_DIV_32

#define SPEED_DIV_32   32

Divisor for clock speed by 32.

Definition at line 75 of file fastspi_types.h.

◆ SPEED_DIV_4

#define SPEED_DIV_4   4

Divisor for clock speed by 4.

Definition at line 69 of file fastspi_types.h.

◆ SPEED_DIV_64

#define SPEED_DIV_64   64

Divisor for clock speed by 64.

Definition at line 77 of file fastspi_types.h.

◆ SPEED_DIV_8

#define SPEED_DIV_8   8

Divisor for clock speed by 8.

Definition at line 71 of file fastspi_types.h.

◆ SPI_ADVANCE

#define SPI_ADVANCE   (3 + (MASK_SKIP_BITS & SKIP))

Advance SPI data pointer.

Definition at line 27 of file fastspi_types.h.

◆ SPI_B0

#define SPI_B0   (RGB_BYTE0(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))

Get SPI byte 0 offset.

Definition at line 21 of file fastspi_types.h.

◆ SPI_B1

#define SPI_B1   (RGB_BYTE1(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))

Get SPI byte 1 offset.

Definition at line 23 of file fastspi_types.h.

◆ SPI_B2

#define SPI_B2   (RGB_BYTE2(RGB_ORDER) + (MASK_SKIP_BITS & SKIP))

Get SPI byte 2 offset.

Definition at line 25 of file fastspi_types.h.