ESPHome
2024.8.3
|
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 | |
std::string | i2s (uint8_t val) |
convert an int to binary representation as C++ std::string More... | |
uint32_t | elapsed_ms (uint32_t &last_time) |
measure the time elapsed between two calls More... | |
const char * | p2s (uart::UARTParityOptions parity) |
Converts the parity enum value to a C string. More... | |
void | print_buffer (const uint8_t *data, size_t length) |
Display a buffer in hexadecimal format (32 hex values / line). More... | |
const char * | reg_to_str (int reg, bool page1) |
Enumerator | |
---|---|
WRITE_CMD | |
READ_CMD |
Definition at line 80 of file weikai_spi.cpp.
Enumerator | |
---|---|
REG | |
FIFO |
Definition at line 79 of file weikai_spi.cpp.
uint32_t esphome::weikai_spi::elapsed_ms | ( | uint32_t & | last_time | ) |
measure the time elapsed between two calls
last_time | time of the previous call |
Definition at line 23 of file weikai_spi.cpp.
|
inline |
convert an int to binary representation as C++ std::string
val | integer to convert |
Definition at line 16 of file weikai_spi.cpp.
const char* esphome::weikai_spi::p2s | ( | uart::UARTParityOptions | parity | ) |
Converts the parity enum value to a C string.
parity | enum |
Definition at line 32 of file weikai_spi.cpp.
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 47 of file weikai_spi.cpp.
const char* esphome::weikai_spi::reg_to_str | ( | int | reg, |
bool | page1 | ||
) |
Definition at line 69 of file weikai_spi.cpp.