Ejemplo n.º 1
0
void lcd_clear_all( void )
{
    lcd_moveto_xy  ( 0, 0 );
    lcd_clear_area( 1, 132, NORMAL );
    lcd_moveto_xy  ( 1, 0 );
    lcd_clear_area( 1, 132, NORMAL );
    lcd_moveto_xy  ( 2, 0 );
    lcd_clear_area( 1, 132, NORMAL );
    lcd_moveto_xy  ( 3, 0 );
    lcd_clear_area( 1, 132, NORMAL );
}
Ejemplo n.º 2
0
/******************************************************************************
 * This function clears an area of the screen starting at the given coordinates
 * pages         - height of area in pages
 * columns       - width of area in pixels
 * style         - style modifier
 * col           - column of upper left corner
 * page          - page of upper left corner
 * Cursor is moved to start of area after clear
 */
void lcd_clear_area_xy(uint8_t pages, uint8_t columns, uint8_t style, uint8_t page, uint8_t col) {
  lcd_moveto_xy(page,col);
  lcd_clear_area(pages,columns,style);
  }
Ejemplo n.º 3
0
// Clears an entire text block. (rows of 8 pixels on the lcd) 
void lcd_clear_line(unsigned char line)
{
    lcd_clear_area(line, 0, LCD_WIDTH);
}
Ejemplo n.º 4
0
/* Clears an entire text block. (rows of 8 pixels on the lcd) */
void lcd_clear_line(unsigned char line)
{
    lcd_clear_area(line, 1, LCD_X_RES);
}
Ejemplo n.º 5
0
void lcd_clear_line(unsigned int line)  // Очистить строку (8 пиксилов по вертикали)
{  
   lcd_clear_area(line, 1, LCD_X_RES);
}
Ejemplo n.º 6
0
void cal_task( void * data)
{
	// initialize LCD
	lcd_clear_all();
	lcd_init();
	lcd_led_power(1);

	// draw splash screen
	lcd_text(32,10,3,"NFC",0);
	lcd_text(12,40,1,"ipTronix   Arrow   NXP",0);
	lcd_update(0,63);

	// initialize pll
	Si5351_Initialize();

	// prepare new screen during splash wait
	lcd_clear_all();
	lcd_vert_line(10,63,64);
	vTaskDelay(500);

	// application main loop
	for (;;)
	{
		int i;
		int max = 0;
		int maxval = 0;
		for (i=0;i<128;i++)
		{
			Si5351_OutputFrequency((9560000+i*8000000/128)*25/24);
			lcd_update(0,63);
			vTaskDelay(1);
			samples[i] = ADCRead(3);
			if (i!=64)
				lcd_clear_area(i,10,i,63);
			lcd_vert_line(63-samples[i]*51/1023,63,i);
			if (maxval<samples[i])
			{
				maxval = samples[i];
				max = i;
			}

			if (GPIOGetPinValue( PIN_ISP ) == 0)
			{
				lcd_clear_all();
				lcd_text(52,26,2,"ISP",0);
				lcd_update(0,63);
				NVIC_SystemReset();
			}
			if (GPIOGetPinValue( PIN_CAL_DET ) == 0)
			{
				NVIC_SystemReset();
			}
		}
		char str[20];
		float freq= 9.56+(float)max*8/128;
		sprintf(str,"fmax = %2d.%03d MHz",(int)freq,((int)(freq*1000))%1000);
		lcd_text(0, 0 , 0, str, 0);
		lcd_update(0,63);
		vTaskDelay(1500);
		lcd_clear_all();
		lcd_vert_line(10,63,64);
	}

}