HW_Lib/sim/oled/sim_oled.h

68 lines
1.8 KiB
C
Raw Normal View History

2024-06-22 11:13:18 +00:00
#ifndef HW_LIB_SIM_OLED_H
#define HW_LIB_SIM_OLED_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stdint.h"
2024-06-22 11:32:13 +00:00
#define BLACK 0
#define BLUE 0xAA0000
#define GREEN 0x00AA00
#define CYAN 0xAAAA00
#define RED 0x0000AA
#define MAGENTA 0xAA00AA
#define BROWN 0x0055AA
#define LIGHTGRAY 0xAAAAAA
#define DARKGRAY 0x555555
#define LIGHTBLUE 0xFF5555
#define LIGHTGREEN 0x55FF55
#define LIGHTCYAN 0xFFFF55
#define LIGHTRED 0x5555FF
#define LIGHTMAGENTA 0xFF55FF
#define YELLOW 0x55FFFF
#define WHITE 0xFFFFFF
2024-06-22 11:13:18 +00:00
/**
* @brief OLED
2024-06-22 11:26:54 +00:00
* @param width: []
* @param height: []
2024-06-22 11:13:18 +00:00
* @param pixcolor: []
* @param backcolor: []
* @param scale: []
2024-06-22 11:32:13 +00:00
* @param border: []
2024-06-22 11:13:18 +00:00
* @return void
2024-06-22 11:26:54 +00:00
* @example SIM_OLED_INIT(128, 64, 0xFFFF00, 0x000000, 10, 1);
2024-06-22 11:13:18 +00:00
**/
2024-06-22 11:32:13 +00:00
void SIM_OLED_INIT(int width, int height, uint32_t pixcolor, uint32_t backcolor, int scale, uint8_t border);
2024-06-22 11:13:18 +00:00
/**
* @brief OLED
* @return void
* @example SIM_OLED_START();
**/
void SIM_OLED_START();
/**
* @brief OLED
* @return void
* @example SIM_OLED_STOP();
**/
void SIM_OLED_STOP();
/**
* @brief OLED
* @param buf: []
* @param width: []
* @param height: []
* @return void
* @example SIM_OLED_DrawFromBuffer(buffer, 128, 64);
**/
void SIM_OLED_DrawFromBuffer(uint8_t *buf, uint8_t width, uint8_t height);
#ifdef __cplusplus
}
#endif
#endif //HW_LIB_SIM_OLED_H