예제 #1
0
파일: unit_tests.c 프로젝트: k3wals/glcd
void glcd_test_rectangles(void)
{
	glcd_tiny_set_font(Font5x7,5,7,32,127);
	glcd_clear_buffer();
	glcd_tiny_draw_string(0,0,"RECTANGLE DEMO");
	glcd_write();
	delay_ms(200);

	while(1) {

		glcd_clear();
		glcd_draw_rect(0,0,100,50,BLACK);
		glcd_tiny_draw_string(0,GLCD_NUMBER_OF_BANKS-1,"glcd_draw_rect");
		glcd_write();
		delay_ms(500);
		DEMO_RETURN();

		glcd_clear();
		glcd_tiny_draw_string(0,GLCD_NUMBER_OF_BANKS-1,"glcd_draw_rect_thick");
		glcd_write();

		glcd_draw_rect_thick(5,5,80,30,3,6,BLACK);
		glcd_write();
		delay_ms(500);
		DEMO_RETURN();

		glcd_draw_rect_thick(0,0,20,20,2,2,BLACK);
		glcd_write();
		delay_ms(500);
		DEMO_RETURN();

		glcd_draw_rect_thick(100,10,20,20,5,5,BLACK);
		glcd_write();
		delay_ms(500);
		DEMO_RETURN();

		glcd_clear();
		glcd_tiny_draw_string(0,GLCD_NUMBER_OF_BANKS-1,"glcd_draw_rect_shadow");
		glcd_draw_rect_shadow(0,0,45,30,BLACK);
		glcd_write();
		delay_ms(500);
		DEMO_RETURN();

		glcd_draw_rect_shadow(95,5,30,30,BLACK);
		glcd_write();
		delay_ms(500);
		DEMO_RETURN();

	}

}
예제 #2
0
파일: unit_tests.c 프로젝트: k3wals/glcd
void glcd_test_hello_world(void)
{
	glcd_tiny_set_font(Font5x7,5,7,32,127);
	glcd_clear_buffer();
	glcd_tiny_draw_string(0,0,"Hello World!");
	glcd_write();
	while(1) {
		DEMO_RETURN();
	}
}
예제 #3
0
void glcd_tiny_draw_string_ammend(char *str) {
	glcd_scroll_line();
	glcd_tiny_draw_string(0, (GLCD_LCD_HEIGHT/8-1), str);
	//glcd_write();
}
예제 #4
0
void glcd_tempdata_writer(char Tempdata){ //function that writes to the LCD
	glcd_tiny_set_font(Font5x7,5,7,32,127);
	glcd_clear_buffer();
	glcd_tiny_draw_string(10,10,"Testing");
	glcd_write();
}