7 static const char *
const TAG =
"bp1658cj";
9 static const uint8_t BP1658CJ_MODEL_ID = 0x80;
10 static const uint8_t BP1658CJ_ADDR_STANDBY = 0x0;
11 static const uint8_t BP1658CJ_ADDR_START_3CH = 0x10;
12 static const uint8_t BP1658CJ_ADDR_START_2CH = 0x20;
13 static const uint8_t BP1658CJ_ADDR_START_5CH = 0x30;
15 static const uint8_t BP1658CJ_DELAY = 2;
18 ESP_LOGCONFIG(TAG,
"Setting up BP1658CJ Output Component...");
26 ESP_LOGCONFIG(TAG,
"BP1658CJ:");
40 for (
int i = 1; i < 12; i++)
44 data[0] = BP1658CJ_MODEL_ID + BP1658CJ_ADDR_START_5CH;
47 data[0] = BP1658CJ_MODEL_ID + BP1658CJ_ADDR_STANDBY;
52 data[0] = BP1658CJ_MODEL_ID + BP1658CJ_ADDR_START_2CH;
54 for (
int i = 2, j = 0; i < 12; i += 2, j++) {
62 data[0] = BP1658CJ_MODEL_ID + BP1658CJ_ADDR_START_3CH;
64 for (
int i = 2, j = 0; i < 12; i += 2, j++) {
71 data[0] = BP1658CJ_MODEL_ID + BP1658CJ_ADDR_START_5CH;
73 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
void dump_config() override
virtual void pin_mode(gpio::Flags flags)=0
void write_buffer_(uint8_t *buffer, uint8_t size)
uint8_t max_power_color_channels_
void set_channel_value_(uint8_t channel, uint16_t value)
void loop() override
Send new values if they were updated.
void write_bit_(bool value)
Implementation of SPI Controller mode.
std::vector< uint16_t > pwm_amounts_
void IRAM_ATTR HOT delayMicroseconds(uint32_t us)
void write_byte_(uint8_t data)
uint8_t max_power_white_channels_