ESPHome 2026.3.0-dev
Loading...
Searching...
No Matches
esphome::weikai_spi Namespace Reference

Data Structures

class  WeikaiComponentSPI
 The WeikaiComponentSPI class stores the information to the WeiKai component connected through an SPI bus. More...
 
class  WeikaiRegisterSPI
 WeikaiRegisterSPI objects acts as proxies to access remote register through an SPI Bus. More...
 

Enumerations

enum  RegType { REG = 0 , FIFO = 1 }
 
enum  CmdType { WRITE_CMD = 0 , READ_CMD = 1 }
 

Functions

uint32_t elapsed_ms (uint32_t &last_time)
 measure the time elapsed between two calls
 
const char * p2s (uart::UARTParityOptions parity)
 Converts the parity enum value to a C string.
 
void print_buffer (const uint8_t *data, size_t length)
 Display a buffer in hexadecimal format (32 hex values / line).
 
const char * reg_to_str (int reg, bool page1)
 

Enumeration Type Documentation

◆ CmdType

Enumerator
WRITE_CMD 
READ_CMD 

Definition at line 73 of file weikai_spi.cpp.

◆ RegType

Enumerator
REG 
FIFO 

Definition at line 72 of file weikai_spi.cpp.

Function Documentation

◆ elapsed_ms()

uint32_t esphome::weikai_spi::elapsed_ms ( uint32_t & last_time)

measure the time elapsed between two calls

Parameters
last_timetime of the previous call
Returns
the elapsed time in microseconds

Definition at line 16 of file weikai_spi.cpp.

◆ p2s()

const char * esphome::weikai_spi::p2s ( uart::UARTParityOptions parity)

Converts the parity enum value to a C string.

Parameters
parityenum
Returns
the string

Definition at line 25 of file weikai_spi.cpp.

◆ print_buffer()

void esphome::weikai_spi::print_buffer ( const uint8_t * data,
size_t length )

Display a buffer in hexadecimal format (32 hex values / line).

Definition at line 40 of file weikai_spi.cpp.

◆ reg_to_str()

const char * esphome::weikai_spi::reg_to_str ( int reg,
bool page1 )

Definition at line 62 of file weikai_spi.cpp.