Ejemplo n.º 1
0
void task1(void* pdata) {
	char strTemp[2];
	while (1) {
			PS2();

			VGA_box(0, 0, 319, 239, 0);

			strTemp[0] = getKey();
			printf("getKey: %c\n", strTemp[0]);

			VGA_text(5, 5, strTemp);
			VGA_box(0, 0, 319, 239, 0);
	}
}
Ejemplo n.º 2
0
Archivo: c.c Proyecto: rv1/GuitarPedal
/****************************************************************************************
 * Subroutine to check r10 and display accordingly
 * x = x coordinate, y = y coordinate, val = r10's value
****************************************************************************************/
void VGA_Polling(int x,int y, int val){
	/* output text message to the LCD */
	LCD_cursor (0,0);										// set LCD cursor location to top row
	LCD_text ("Selected Effect :-\0");
	VGA_box(0, 60, 319, 179, 0);
	if (val == 1){
		hollow_rect(20,90,100,20,0x7777);
		hollow_rect(20,120,100,20,0x2222);
		hollow_rect(20,150,100,20,0x2222);
		hollow_rect(20,180,100,20,0x2222);
		hollow_rect(20,210,100,20,0x2222);
		
		LCD_cursor (0,1);										// set LCD cursor location to bottom row
		LCD_text ("Distortion      \0");
		LCD_cursor_off ();
		VGA_text (10, 20, "Active effect is Distortion \0");
	} else if (val == 2){
		hollow_rect(20,90,100,20,0x2222);
		hollow_rect(20,120,100,20,0x7777);
		hollow_rect(20,150,100,20,0x2222);
		hollow_rect(20,180,100,20,0x2222);
		hollow_rect(20,210,100,20,0x2222);
		VGA_text (10, 20, "Active effect is Echo       \0");
		LCD_cursor (0,1);										// set LCD cursor location to bottom row
		LCD_text ("Echo            \0");
		LCD_cursor_off ();
	} else if (val == 3){
		hollow_rect(20,90,100,20,0x2222);
		hollow_rect(20,120,100,20,0x2222);
		hollow_rect(20,150,100,20,0x7777);
		hollow_rect(20,180,100,20,0x2222);
		hollow_rect(20,210,100,20,0x2222);
		VGA_text (10, 20, "Active effect is Kill Switch\0");
		LCD_cursor (0,1);										// set LCD cursor location to bottom row
		LCD_text ("Kill Switch     \0");
		LCD_cursor_off ();
	}else if (val == 4){
		hollow_rect(20,90,100,20,0x2222);
		hollow_rect(20,120,100,20,0x2222);
		hollow_rect(20,150,100,20,0x2222);
		hollow_rect(20,180,100,20,0x7777);
		hollow_rect(20,210,100,20,0x2222);
		VGA_text (10, 20, "Active effect is Bit Crusher\0");
		LCD_cursor (0,1);										// set LCD cursor location to bottom row
		LCD_text ("Bit Crusher     \0");
		LCD_cursor_off ();
	} else if (val == 5){
		hollow_rect(20,90,100,20,0x2222);
		hollow_rect(20,120,100,20,0x2222);
		hollow_rect(20,150,100,20,0x2222);
		hollow_rect(20,180,100,20,0x2222);
		hollow_rect(20,210,100,20,0x7777);
		VGA_text (10, 20, "Plain output activated      \0");
		LCD_cursor (0,1);										// set LCD cursor location to bottom row
		LCD_text ("Plain Audio     \0");
		LCD_cursor_off ();
	}
}
Ejemplo n.º 3
0
int main(void) {

	VGA_box(0, 0, 319, 239, 0);

	OSTaskCreateExt(task1,
	NULL, (void *) &task1_stk[TASK_STACKSIZE - 1],
	TASK1_PRIORITY,
	TASK1_PRIORITY, task1_stk,
	TASK_STACKSIZE,
	NULL, 0);

	OSStart();
	return 0;
}