oled_common.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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(void);
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif // __OLED_COMMON_H