Created
March 2, 2020 20:08
This function demonstrates the usage of GUI_DrawGraph function, to randomly plot data generated using random number generator function rand()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void test_draw_graph( void ) | |
{ | |
int x[LCD_GetXSize()]; | |
int i; | |
GUI_Clear(); | |
GUI_SetColor(GUI_RED); | |
for (i = 0; i < GUI_COUNTOF(x); i++) | |
{ | |
x[i] = rand() % LCD_GetYSize()/2; | |
} | |
GUI_DrawGraph(x, GUI_COUNTOF(x), 0, 0 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment