ESPHome 2025.8.0b1
|
Data Structures | |
class | ShellyDimmer |
struct | VarlenCmd |
Typedefs | |
using | stm32_err_t |
using | flags_t |
using | stm32_cmd_t |
using | stm32_dev_t |
using | stm32_t |
using | stm32_unique_ptr = std::unique_ptr<stm32_t, void (*)(stm32_t *)> |
Functions | |
uint16_t | shelly_dimmer_checksum (const uint8_t *buf, int len) |
Computes a crappy checksum as defined by the Shelly Dimmer protocol. | |
stm32_unique_ptr | stm32_init (uart::UARTDevice *stream, const uint8_t flags, const char init) |
stm32_err_t | stm32_read_memory (const stm32_unique_ptr &stm, const uint32_t address, uint8_t *data, const unsigned int len) |
stm32_err_t | stm32_write_memory (const stm32_unique_ptr &stm, uint32_t address, const uint8_t *data, const unsigned int len) |
stm32_err_t | stm32_wunprot_memory (const stm32_unique_ptr &stm) |
stm32_err_t | stm32_wprot_memory (const stm32_unique_ptr &stm) |
stm32_err_t | stm32_runprot_memory (const stm32_unique_ptr &stm) |
stm32_err_t | stm32_readprot_memory (const stm32_unique_ptr &stm) |
stm32_err_t | stm32_erase_memory (const stm32_unique_ptr &stm, uint32_t spage, uint32_t pages) |
stm32_err_t | stm32_go (const stm32_unique_ptr &stm, const uint32_t address) |
stm32_err_t | stm32_reset_device (const stm32_unique_ptr &stm) |
stm32_err_t | stm32_crc_memory (const stm32_unique_ptr &stm, const uint32_t address, const uint32_t length, uint32_t *const crc) |
uint32_t | stm32_sw_crc (uint32_t crc, uint8_t *buf, unsigned int len) |
stm32_err_t | stm32_crc_wrapper (const stm32_unique_ptr &stm, uint32_t address, uint32_t length, uint32_t *crc) |
Variables | |
constexpr uint32_t | SZ_128 = 0x00000080 |
constexpr uint32_t | SZ_256 = 0x00000100 |
constexpr uint32_t | SZ_1K = 0x00000400 |
constexpr uint32_t | SZ_2K = 0x00000800 |
constexpr uint32_t | SZ_16K = 0x00004000 |
constexpr uint32_t | SZ_32K = 0x00008000 |
constexpr uint32_t | SZ_64K = 0x00010000 |
constexpr uint32_t | SZ_128K = 0x00020000 |
constexpr uint32_t | SZ_256K = 0x00040000 |
constexpr uint32_t | p_128 [] = {SZ_128, 0} |
constexpr uint32_t | p_256 [] = {SZ_256, 0} |
constexpr uint32_t | p_1k [] = {SZ_1K, 0} |
constexpr uint32_t | p_2k [] = {SZ_2K, 0} |
constexpr uint32_t | f2f4 [] = {SZ_16K, SZ_16K, SZ_16K, SZ_16K, SZ_64K, SZ_128K, 0} |
constexpr uint32_t | f4db [] |
constexpr uint32_t | f7 [] = {SZ_32K, SZ_32K, SZ_32K, SZ_32K, SZ_128K, SZ_256K, 0} |
constexpr stm32_dev_t | DEVICES [] |
constexpr auto | STREAM_OPT_BYTE = (1 << 0) |
constexpr auto | STREAM_OPT_GVR_ETX = (1 << 1) |
constexpr auto | STREAM_OPT_CMD_INIT = (1 << 2) |
constexpr auto | STREAM_OPT_RETRY = (1 << 3) |
constexpr auto | STREAM_OPT_I2C = (1 << 4) |
constexpr auto | STREAM_OPT_STRETCH_W = (1 << 5) |
constexpr auto | STREAM_SERIAL = (STREAM_OPT_BYTE | STREAM_OPT_GVR_ETX | STREAM_OPT_CMD_INIT | STREAM_OPT_RETRY) |
constexpr auto | STREAM_I2C = (STREAM_OPT_I2C | STREAM_OPT_STRETCH_W) |
constexpr auto | STM32_MAX_RX_FRAME = 256 |
constexpr auto | STM32_MAX_TX_FRAME = (1 + 256 + 1) |
constexpr auto | STM32_MAX_PAGES = 0x0000ffff |
constexpr auto | STM32_MASS_ERASE = 0x00100000 |
Definition at line 56 of file stm32flash.h.
Definition at line 61 of file stm32flash.h.
Definition at line 76 of file stm32flash.h.
Definition at line 49 of file stm32flash.h.
Definition at line 88 of file stm32flash.h.
using esphome::shelly_dimmer::stm32_unique_ptr = std::unique_ptr<stm32_t, void (*)(stm32_t *)> |
Definition at line 112 of file stm32flash.h.
uint16_t esphome::shelly_dimmer::shelly_dimmer_checksum | ( | const uint8_t * | buf, |
int | len ) |
Computes a crappy checksum as defined by the Shelly Dimmer protocol.
Definition at line 63 of file shelly_dimmer.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_crc_memory | ( | const stm32_unique_ptr & | stm, |
const uint32_t | address, | ||
const uint32_t | length, | ||
uint32_t *const | crc ) |
Definition at line 932 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_crc_wrapper | ( | const stm32_unique_ptr & | stm, |
uint32_t | address, | ||
uint32_t | length, | ||
uint32_t * | crc ) |
Definition at line 1028 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_erase_memory | ( | const stm32_unique_ptr & | stm, |
uint32_t | spage, | ||
uint32_t | pages ) |
Definition at line 810 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_go | ( | const stm32_unique_ptr & | stm, |
const uint32_t | address ) |
Definition at line 898 of file stm32flash.cpp.
stm32_unique_ptr esphome::shelly_dimmer::stm32_init | ( | uart::UARTDevice * | stream, |
const uint8_t | flags, | ||
const char | init ) |
Definition at line 499 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_read_memory | ( | const stm32_unique_ptr & | stm, |
const uint32_t | address, | ||
uint8_t * | data, | ||
const unsigned int | len ) |
Definition at line 658 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_readprot_memory | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 797 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_reset_device | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 921 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_runprot_memory | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 784 of file stm32flash.cpp.
uint32_t esphome::shelly_dimmer::stm32_sw_crc | ( | uint32_t | crc, |
uint8_t * | buf, | ||
unsigned int | len ) |
Definition at line 999 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_wprot_memory | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 771 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_write_memory | ( | const stm32_unique_ptr & | stm, |
uint32_t | address, | ||
const uint8_t * | data, | ||
const unsigned int | len ) |
Definition at line 697 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_wunprot_memory | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 758 of file stm32flash.cpp.
|
constexpr |
Definition at line 62 of file dev_table.h.
|
constexpr |
Definition at line 50 of file dev_table.h.
|
constexpr |
Definition at line 52 of file dev_table.h.
|
constexpr |
Definition at line 55 of file dev_table.h.
|
constexpr |
Definition at line 45 of file dev_table.h.
|
constexpr |
Definition at line 47 of file dev_table.h.
|
constexpr |
Definition at line 46 of file dev_table.h.
|
constexpr |
Definition at line 48 of file dev_table.h.
|
constexpr |
Definition at line 47 of file stm32flash.h.
|
constexpr |
Definition at line 46 of file stm32flash.h.
|
constexpr |
Definition at line 43 of file stm32flash.h.
|
constexpr |
Definition at line 44 of file stm32flash.h.
|
constexpr |
Definition at line 41 of file stm32flash.h.
|
constexpr |
Definition at line 33 of file stm32flash.h.
|
constexpr |
Definition at line 35 of file stm32flash.h.
|
constexpr |
Definition at line 34 of file stm32flash.h.
|
constexpr |
Definition at line 37 of file stm32flash.h.
|
constexpr |
Definition at line 36 of file stm32flash.h.
|
constexpr |
Definition at line 38 of file stm32flash.h.
|
constexpr |
Definition at line 40 of file stm32flash.h.
|
constexpr |
Definition at line 29 of file dev_table.h.
|
constexpr |
Definition at line 36 of file dev_table.h.
|
constexpr |
Definition at line 33 of file dev_table.h.
|
constexpr |
Definition at line 31 of file dev_table.h.
|
constexpr |
Definition at line 30 of file dev_table.h.
|
constexpr |
Definition at line 37 of file dev_table.h.
|
constexpr |
Definition at line 32 of file dev_table.h.
|
constexpr |
Definition at line 34 of file dev_table.h.
|
constexpr |
Definition at line 35 of file dev_table.h.