Skip to content

Commit 2b470b1

Browse files
committed
Fix RGB LED use
1 parent 0cc438e commit 2b470b1

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

supervisor/shared/rgb_led_status.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,22 @@ busio_spi_obj_t status_apa102 = {
6666
#if defined(CP_RGB_STATUS_R) || defined(CP_RGB_STATUS_G) || defined(CP_RGB_STATUS_B)
6767
#define CP_RGB_STATUS_LED
6868

69-
#include "shared-bindings/pulseio/PWMOut.h"
69+
#include "shared-bindings/pwmio/PWMOut.h"
7070
#include "shared-bindings/microcontroller/Pin.h"
7171

72-
pulseio_pwmout_obj_t rgb_status_r = {
72+
pwmio_pwmout_obj_t rgb_status_r = {
7373
.base = {
74-
.type = &pulseio_pwmout_type,
74+
.type = &pwmio_pwmout_type,
7575
},
7676
};
77-
pulseio_pwmout_obj_t rgb_status_g = {
77+
pwmio_pwmout_obj_t rgb_status_g = {
7878
.base = {
79-
.type = &pulseio_pwmout_type,
79+
.type = &pwmio_pwmout_type,
8080
},
8181
};
82-
pulseio_pwmout_obj_t rgb_status_b = {
82+
pwmio_pwmout_obj_t rgb_status_b = {
8383
.base = {
84-
.type = &pulseio_pwmout_type,
84+
.type = &pwmio_pwmout_type,
8585
},
8686
};
8787

@@ -147,26 +147,26 @@ void rgb_led_status_init() {
147147

148148
#if defined(CP_RGB_STATUS_LED)
149149
if (common_hal_mcu_pin_is_free(CP_RGB_STATUS_R)) {
150-
pwmout_result_t red_result = common_hal_pulseio_pwmout_construct(&rgb_status_r, CP_RGB_STATUS_R, 0, 50000, false);
150+
pwmout_result_t red_result = common_hal_pwmio_pwmout_construct(&rgb_status_r, CP_RGB_STATUS_R, 0, 50000, false);
151151

152152
if (PWMOUT_OK == red_result) {
153-
common_hal_pulseio_pwmout_never_reset(&rgb_status_r);
153+
common_hal_pwmio_pwmout_never_reset(&rgb_status_r);
154154
}
155155
}
156156

157157
if (common_hal_mcu_pin_is_free(CP_RGB_STATUS_G)) {
158-
pwmout_result_t green_result = common_hal_pulseio_pwmout_construct(&rgb_status_g, CP_RGB_STATUS_G, 0, 50000, false);
158+
pwmout_result_t green_result = common_hal_pwmio_pwmout_construct(&rgb_status_g, CP_RGB_STATUS_G, 0, 50000, false);
159159

160160
if (PWMOUT_OK == green_result) {
161-
common_hal_pulseio_pwmout_never_reset(&rgb_status_g);
161+
common_hal_pwmio_pwmout_never_reset(&rgb_status_g);
162162
}
163163
}
164164

165165
if (common_hal_mcu_pin_is_free(CP_RGB_STATUS_B)) {
166-
pwmout_result_t blue_result = common_hal_pulseio_pwmout_construct(&rgb_status_b, CP_RGB_STATUS_B, 0, 50000, false);
166+
pwmout_result_t blue_result = common_hal_pwmio_pwmout_construct(&rgb_status_b, CP_RGB_STATUS_B, 0, 50000, false);
167167

168168
if (PWMOUT_OK == blue_result) {
169-
common_hal_pulseio_pwmout_never_reset(&rgb_status_b);
169+
common_hal_pwmio_pwmout_never_reset(&rgb_status_b);
170170
}
171171
}
172172
#endif
@@ -242,9 +242,9 @@ void new_status_color(uint32_t rgb) {
242242
status_rgb_color[2] = (uint16_t) (blue_u8 << 8) + blue_u8;
243243
#endif
244244

245-
common_hal_pulseio_pwmout_set_duty_cycle(&rgb_status_r, status_rgb_color[0]);
246-
common_hal_pulseio_pwmout_set_duty_cycle(&rgb_status_g, status_rgb_color[1]);
247-
common_hal_pulseio_pwmout_set_duty_cycle(&rgb_status_b, status_rgb_color[2]);
245+
common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_r, status_rgb_color[0]);
246+
common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_g, status_rgb_color[1]);
247+
common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_b, status_rgb_color[2]);
248248
#endif
249249
}
250250

@@ -288,9 +288,9 @@ void temp_status_color(uint32_t rgb) {
288288
temp_status_color_rgb[2] = (uint16_t) (blue_u8 << 8) + blue_u8;
289289
#endif
290290

291-
common_hal_pulseio_pwmout_set_duty_cycle(&rgb_status_r, temp_status_color_rgb[0]);
292-
common_hal_pulseio_pwmout_set_duty_cycle(&rgb_status_g, temp_status_color_rgb[1]);
293-
common_hal_pulseio_pwmout_set_duty_cycle(&rgb_status_b, temp_status_color_rgb[2]);
291+
common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_r, temp_status_color_rgb[0]);
292+
common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_g, temp_status_color_rgb[1]);
293+
common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_b, temp_status_color_rgb[2]);
294294
#endif
295295
}
296296

@@ -327,9 +327,9 @@ void clear_temp_status() {
327327
blue = status_rgb_color[2];
328328
#endif
329329

330-
common_hal_pulseio_pwmout_set_duty_cycle(&rgb_status_r, red);
331-
common_hal_pulseio_pwmout_set_duty_cycle(&rgb_status_g, green);
332-
common_hal_pulseio_pwmout_set_duty_cycle(&rgb_status_b, blue);
330+
common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_r, red);
331+
common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_g, green);
332+
common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_b, blue);
333333
#endif
334334
}
335335

0 commit comments

Comments
 (0)