29 lines
645 B
C
29 lines
645 B
C
#ifndef GRAPHICS_H
|
|
#define GRAPHICS_H
|
|
|
|
#include "display.h"
|
|
#include "stdint.h"
|
|
#include "stdbool.h"
|
|
#include "fonts/font.h"
|
|
|
|
void DisplayTest(pixel_t color);
|
|
void DrawBox(uint32_t topleft_x_loc, uint32_t topleft_y_loc, uint32_t width, uint32_t height, pixel_t color);
|
|
|
|
/*
|
|
* All fields have default values when not provided
|
|
*/
|
|
typedef struct
|
|
{
|
|
uint16_t x;
|
|
uint16_t y;
|
|
uint16_t width;
|
|
uint16_t height;
|
|
pixel_t on_color;
|
|
pixel_t off_color;
|
|
pixel_t inner_padding_pixels;
|
|
bool value;
|
|
} toggle_switch_t;
|
|
|
|
void draw_toggle_switch(volatile pixel_t *const framebuffer, const toggle_switch_t *const toggle_switch);
|
|
|
|
#endif |