forked from Mirrors/usk
publish
This commit is contained in:
parent
78d74bba86
commit
cae7779fa1
2 changed files with 4 additions and 4 deletions
6
misc.c
6
misc.c
|
|
@ -94,13 +94,13 @@ void halt_with_error(uint32_t err, uint32_t bits)
|
|||
zzz();
|
||||
}
|
||||
|
||||
void put_pixel(uint32_t pixel_rgb)
|
||||
void put_pixel(uint32_t pixel_grb)
|
||||
{
|
||||
static bool led_enabled = false;
|
||||
if (is_pico())
|
||||
{
|
||||
gpio_init(led_pin());
|
||||
if (pixel_rgb) {
|
||||
if (pixel_grb) {
|
||||
gpio_set_dir(led_pin(), true);
|
||||
gpio_put(led_pin(), 1);
|
||||
}
|
||||
|
|
@ -116,7 +116,7 @@ void put_pixel(uint32_t pixel_rgb)
|
|||
gpio_put(pwr_pin(), 1);
|
||||
sleep_us(200);
|
||||
}
|
||||
pio_sm_put_blocking(pio0, 3, pixel_rgb << 8u);
|
||||
pio_sm_put_blocking(pio0, 3, pixel_grb << 8u);
|
||||
sleep_us(50);
|
||||
pio_sm_set_enabled(pio0, 3, false);
|
||||
gpio_init(led_pin());
|
||||
|
|
|
|||
2
misc.h
2
misc.h
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#define PIX_g 0x008000
|
||||
|
||||
void put_pixel(uint32_t pixel_rgb);
|
||||
void put_pixel(uint32_t pixel_grb);
|
||||
|
||||
void halt_with_error(uint32_t err, uint32_t bits);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue