oled_common.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef __OLED_COMMON_H
  2. #define __OLED_COMMON_H
  3. //
  4. void init_oled(void);
  5. //
  6. void init_gpio_oled(void);
  7. //
  8. void oled_reset(void);
  9. //
  10. void oled_delay_ms(uint32_t ms);
  11. //
  12. void oled_command(uint8_t com);
  13. //
  14. void oled_data(uint8_t dat);
  15. //
  16. void oled_display(void);
  17. //
  18. void oled_bitmap(uint8_t *bitmap);
  19. //
  20. void oled_invert_colors(uint8_t invert);
  21. //
  22. void oled_rotate_display(uint8_t rotate);
  23. //
  24. void oled_display_on(uint8_t on);
  25. //
  26. void oled_set_contrast(uint8_t contrast);
  27. //
  28. void oled_start_scroll_right(uint8_t start_page, uint8_t end_page, uint8_t speed);
  29. //
  30. void oled_start_scroll_left(uint8_t start_page, uint8_t end_page, uint8_t speed);
  31. //
  32. void oled_stop_scroll(void);
  33. //
  34. void oled_draw_pixel(int16_t x, int16_t y, uint8_t color);
  35. //
  36. void oled_clear(uint8_t color);
  37. // ------------------------------------------------------------------------------- //
  38. //
  39. void oled_draw_string_frame(uint8_t str_num);
  40. //
  41. void oled_draw_rec(int x_start, int y_start, int x_end, int y_end, uint8_t color);
  42. //
  43. void test_oled(void);
  44. #endif // __OLED_COMMON_H