Skip to content

Commit

Permalink
publish
Browse files Browse the repository at this point in the history
  • Loading branch information
DefenderOfHyrule committed Jul 7, 2024
1 parent 5617e8c commit 3a7c9e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
3 changes: 2 additions & 1 deletion misc.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "misc.h"
#include "pico/stdlib.h"
#include "hardware/pio.h"
#include "pins.h"
#include <string.h>
#include "hardware/vreg.h"
#include "ws2812.pio.h"
#include "board_detect.h"
#include "misc.h"
#include "board_detect.h"

extern int ws_pio_offset;
Expand Down Expand Up @@ -152,3 +152,4 @@ void reset_cpu() {
gpio_disable_pulls(PIN_RST);
gpio_disable_input_output(PIN_RST);
}

18 changes: 8 additions & 10 deletions misc.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
#ifndef MISC_H_
#define MISC_H_

#define PIX_gre 0x00FF00
#define PIX_red 0xFF0000
#define PIX_whi 0x111111

#define PIX_g 0x008000

void put_pixel(uint32_t pixel_grb);

uint8_t red = (pixel_grb >> 8) & 0xFF;
uint8_t green = (pixel_grb >> 16) & 0xFF;
uint8_t blue = pixel_grb & 0xFF;

#include <stdint.h>

void put_pixel(uint32_t pixel_grb);
void halt_with_error(uint32_t err, uint32_t bits);

void gpio_disable_input_output(int pin);

void gpio_enable_input_output(int pin);

void finish_pins_except_leds();

void reset_cpu();

#endif /* MISC_H_ */

0 comments on commit 3a7c9e6

Please sign in to comment.