15#include "pico/stdlib.h"
18#define K_TRACK 0x10000000
19#define K_STEP 0x08000000
20#define K_PLAY 0x02000000
21#define K_REC 0x04000000
22#define K_ALT 0x00040000
23#define K_PATT 0x00001000
24#define K_SONG 0x00000040
25#define K_MENU 0x00000020
26#define K_UP 0x00020000
27#define K_DOWN 0x00800000
28#define K_RIGHT 0x00000800
29#define K_LEFT 0x20000000
41#define K_10 0x00008000
42#define K_11 0x00000200
43#define K_12 0x00000008
44#define K_13 0x00000004
45#define K_14 0x00000100
46#define K_15 0x00004000
47#define K_16 0x00100000
82#define PGB1_LEDS_COUNT 24
110#define White (LedColor){255 / 8, 255 / 8, 255 / 8}
111#define Red (LedColor){255 / 8, 000 / 8, 000 / 8}
112#define Rose (LedColor){255 / 8, 000 / 8, 128 / 8}
113#define Magenta (LedColor){255 / 8, 000 / 8, 255 / 8}
114#define Violet (LedColor){128 / 8, 000 / 8, 255 / 8}
115#define Blue (LedColor){000 / 8, 000 / 8, 255 / 8}
116#define Azure (LedColor){000 / 8, 128 / 8, 255 / 8}
117#define Cyan (LedColor){000 / 8, 255 / 8, 255 / 8}
118#define Spring_Green (LedColor){000 / 8, 255 / 8, 128 / 8}
119#define Green (LedColor){000 / 8, 255 / 8, 000 / 8}
120#define Chartreuse (LedColor){128 / 8, 255 / 8, 000 / 8}
121#define Yellow (LedColor){255 / 8, 255 / 8, 000 / 8}
122#define Orange (LedColor){255 / 8, 128 / 8, 000 / 8}
132void leds_set_rgb(
int id, uint8_t r, uint8_t g, uint8_t b);
void midi_init(midi_in_cb_t cb)
Initializes the MIDI interface with a callback for incoming messages.
Definition pgb1.c:362
void screen_clear(void)
Clears the OLED screen to a blank state.
Definition pgb1.c:252
void screen_set_pixel(int x, int y, bool set)
Sets or clears a pixel on the screen.
Definition pgb1.c:269
bool falling(uint32_t key)
Checks if a key has transitioned from not-pressed to pressed state.
Definition pgb1.c:79
bool raising(uint32_t key)
Checks if a key has transitioned from pressed to not-pressed state.
Definition pgb1.c:84
bool leds_update(void)
Updates the LED states to the device.
Definition pgb1.c:106
void keyboard_init(void)
Initializes the keyboard interface.
Definition pgb1.c:33
void screen_print(int x, int y, const char *str)
Prints a string at a specified position on the screen.
Definition pgb1.c:336
void leds_init(void)
Initializes the LED subsystem.
Definition pgb1.c:92
void leds_set_color(int id, LedColor rgb)
Sets an individual LED internal state to a predefined color. The new state will be visible after a ca...
Definition pgb1.c:131
bool screen_update(void)
Updates the screen with the current graphics buffer.
Definition pgb1.c:256
void leds_clear(void)
Clears all LEDs to off state.
Definition pgb1.c:119
void screen_printc(int x, int y, char c)
Prints a single character at a specified position on the screen.
Definition pgb1.c:321
void screen_draw_line(int x0, int y0, int x1, int y1, bool set)
Draws a line between two points on the screen.
Definition pgb1.c:281
void screen_init(void)
Initializes the OLED screen.
Definition pgb1.c:207
void keyboard_scan(void)
Scans the keyboard state and updates internal key state tracking.
Definition pgb1.c:51
bool pressed(uint32_t key)
Checks if a key is currently pressed.
Definition pgb1.c:75
void leds_set_rgb(int id, uint8_t r, uint8_t g, uint8_t b)
Sets an individual LED internal state to a specific RGB color. The new state will be visible after a ...
Definition pgb1.c:123
void(* midi_in_cb_t)(uint32_t msg)
Type definition for MIDI input callback functions.
Definition pgb1.h:200
Represents an RGB color value.
Definition pgb1.h:104
uint8_t b
Blue component.
Definition pgb1.h:107
uint8_t g
Green component.
Definition pgb1.h:106
uint8_t r
Red component.
Definition pgb1.h:105