ESPHome 2025.5.0
|
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 933 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 1029 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 811 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_go | ( | const stm32_unique_ptr & | stm, |
const uint32_t | address ) |
Definition at line 899 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 500 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 659 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_readprot_memory | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 798 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_reset_device | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 922 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_runprot_memory | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 785 of file stm32flash.cpp.
uint32_t esphome::shelly_dimmer::stm32_sw_crc | ( | uint32_t | crc, |
uint8_t * | buf, | ||
unsigned int | len ) |
Definition at line 1000 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_wprot_memory | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 772 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 698 of file stm32flash.cpp.
stm32_err_t esphome::shelly_dimmer::stm32_wunprot_memory | ( | const stm32_unique_ptr & | stm | ) |
Definition at line 759 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.