main.c 477 B

1234567891011121314151617181920212223242526272829303132
  1. #include "u8g2.h"
  2. #include <stdio.h>
  3. u8g2_t u8g2;
  4. int main(void)
  5. {
  6. u8g2_SetupBuffer_Utf8(&u8g2, U8G2_R0);
  7. u8g2_InitDisplay(&u8g2);
  8. u8g2_SetPowerSave(&u8g2, 0);
  9. u8g2_SetFont(&u8g2, u8g2_font_6x13_tf);
  10. u8g2_SetFontDirection(&u8g2, 0);
  11. u8g2_FirstPage(&u8g2);
  12. do
  13. {
  14. u8g2_DrawTriangle(&u8g2, 2, 2, 17, 9, 7, 21);
  15. u8g2_DrawStr(&u8g2, 22, 10, "DrawTriangle");
  16. } while( u8g2_NextPage(&u8g2) );
  17. utf8_show();
  18. return 0;
  19. }