5 namespace sm10bit_base {
7 static const char *
const TAG =
"sm10bit_base";
9 static const uint8_t SM10BIT_ADDR_STANDBY = 0x0;
10 static const uint8_t SM10BIT_ADDR_START_3CH = 0x8;
11 static const uint8_t SM10BIT_ADDR_START_2CH = 0x10;
12 static const uint8_t SM10BIT_ADDR_START_5CH = 0x18;
14 static const uint8_t SM10BIT_DELAY = 2;
42 for (
int i = 1; i < 12; i++)
45 data[0] = this->
model_id_ + SM10BIT_ADDR_START_5CH;
48 data[0] = this->
model_id_ + SM10BIT_ADDR_STANDBY;
53 data[0] = this->
model_id_ + SM10BIT_ADDR_START_2CH;
55 for (
int i = 2, j = 0; i < 12; i += 2, j++) {
63 data[0] = this->
model_id_ + SM10BIT_ADDR_START_3CH;
65 for (
int i = 2, j = 0; i < 12; i += 2, j++) {
72 data[0] = this->
model_id_ + SM10BIT_ADDR_START_5CH;
74 for (
int i = 2, j = 0; i < 12; i += 2, j++) {
101 for (uint8_t mask = 0x80; mask; mask >>= 1) {
120 for (uint32_t i = 0; i < size; i++) {
virtual void digital_write(bool value)=0
uint8_t max_power_color_channels_
void write_byte_(uint8_t data)
virtual void pin_mode(gpio::Flags flags)=0
std::vector< uint16_t > pwm_amounts_
void write_bit_(bool value)
void write_buffer_(uint8_t *buffer, uint8_t size)
Implementation of SPI Controller mode.
uint8_t max_power_white_channels_
void IRAM_ATTR HOT delayMicroseconds(uint32_t us)
void set_channel_value_(uint8_t channel, uint16_t value)