oled_common.h 1.2 KB

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