| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- #ifndef __OLED_COMMON_H
- #define __OLED_COMMON_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include <stdbool.h>
-
- //
- void init_oled(void);
- //
- void init_gpio_oled(void);
- //
- void oled_reset(void);
- //
- void oled_delay_ms(uint32_t ms);
- //
- void oled_command(uint8_t com);
- //
- void oled_data(uint8_t dat);
- //
- void oled_display(void);
- //
- void oled_bitmap(uint8_t *bitmap);
- //
- void oled_invert_colors(uint8_t invert);
- //
- void oled_rotate_display(uint8_t rotate);
- //
- void oled_display_on(uint8_t on);
- //
- void oled_set_contrast(uint8_t contrast);
- //
- void oled_start_scroll_right(uint8_t start_page, uint8_t end_page, uint8_t speed);
- //
- void oled_start_scroll_left(uint8_t start_page, uint8_t end_page, uint8_t speed);
- //
- void oled_stop_scroll(void);
- //
- void oled_init(void);
- //
- void oled_draw_pixel(int16_t x, int16_t y, uint8_t color);
- //
- void oled_clear(uint8_t color);
- // ------------------------------------------------------------------------------- //
- //
- void oled_draw_string_frame(uint8_t str_num);
- //
- void oled_frame(uint8_t str_y, bool double_str);
- //
- void oled_int_right_alignment(int value, uint8_t char_num, char *out);
- //
- void oled_int_right_alignment_post(int value, uint8_t char_num, char *postfix, char *out);
- //
- void oled_float_right_aligment(float value, uint8_t char_num, char *out);
- //
- void oled_draw_rec(int x_start, int y_start, int x_end, int y_end, uint8_t color);
- //
- void test_oled_old(void);
- //
- void test_oled(void);
- extern uint8_t oled_buf[];
- #ifdef __cplusplus
- }
- #endif
- #endif // __OLED_COMMON_H
|