@@ -141,7 +141,8 @@ uint32_t hwled_setup_exc(void) {
141
141
pio_config .offset ,
142
142
bio2bufiopin [M_LED_SDO ],
143
143
(float )mode_config .baudrate ,
144
- false);
144
+ false);
145
+ system_config .num_bits = 24 ;
145
146
break ;
146
147
case M_LED_APA102 :
147
148
system_bio_update_purpose_and_label (true, M_LED_SDO , BP_PIN_MODE , pin_labels [0 ]);
@@ -162,14 +163,15 @@ uint32_t hwled_setup_exc(void) {
162
163
mode_config .baudrate ,
163
164
bio2bufiopin [M_LED_SCL ],
164
165
bio2bufiopin [M_LED_SDO ]);
165
-
166
+ system_config . num_bits = 32 ;
166
167
break ;
167
168
case M_LED_WS2812_ONBOARD : // internal LEDs, stop any in-progress stuff
168
169
rgb_irq_enable (false);
169
170
rgb_set_all (0 , 0 , 0 );
170
171
pio_config .pio = PIO_RGB_LED_PIO ;
171
172
pio_config .sm = PIO_RGB_LED_SM ;
172
173
mode_config .baudrate = 800000 ;
174
+ system_config .num_bits = 24 ;
173
175
#if BP_VER == 5
174
176
logic_analyzer_set_base_pin (RGB_CDO );
175
177
#endif
@@ -180,7 +182,7 @@ uint32_t hwled_setup_exc(void) {
180
182
}
181
183
device_cleanup = mode_config .device ;
182
184
system_config .subprotocol_name = led_device_type [mode_config .device ];
183
- system_config . num_bits = 24 ;
185
+
184
186
return 1 ;
185
187
}
186
188
@@ -249,10 +251,10 @@ void hwled_write(struct _bytecode* result, struct _bytecode* next) {
249
251
// only set to full brightness if the top bits from caller are zero
250
252
// otherwise, allow the caller to set the global brightness bits for
251
253
// more advanced brightness setting.
252
- if ((result -> out_data & 0xE0000000 ) == 0 ) {
254
+ /* if ((result->out_data & 0xE0000000) == 0) {
253
255
result->out_data|=(0xff<<24);
254
256
//pio_sm_put_blocking(pio_config.pio, pio_config.sm, ((0xff<<24)|result->out_data));
255
- }//else{
257
+ }//else{*/
256
258
pio_sm_put_blocking (pio_config .pio , pio_config .sm , result -> out_data );
257
259
//}
258
260
break ;
0 commit comments