示例#1
0
void lcd_reset(){
	for(int i = 0 ; i < 3; i++){
		
		D7(1);D6(1);D5(1);D4(1);
		
		_delay_ms(20);
		
		D7(0);D6(0);D5(1);D4(1);
		
		lcd_new_data();
	}
	D7(0);D6(0);D5(1);D4(0);
	
	lcd_new_data();
}
示例#2
0
void lcd_read(unsigned char cmd){
	// read first 4 bit
	D7(0); D6(0);D5(0); D4(0);
	D7(rd_bit(cmd,7));
	D6(rd_bit(cmd,6));
	D5(rd_bit(cmd,5));
	D4(rd_bit(cmd,4));

	lcd_new_data();

	// read second 4 bit
	D7(0); D6(0);D5(0); D4(0);
	D7(rd_bit(cmd,3));
	D6(rd_bit(cmd,2));
	D5(rd_bit(cmd,1));
	D4(rd_bit(cmd,0));

	lcd_new_data();
}
示例#3
0
文件: empty2.C 项目: VargMon/dd-wrt
int main ()
{
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
  if (Check<B1, C1> ())
    return 1;
  if (Check<B2, C2> ())
    return 2;
  if (Check<B3, C3> ())
    return 3;
  if (Check<B4, C4> ())
    return 4;
  if (Check<B5, C5> ())
    return 5;
  if (Check<B6, C6> ())
    return 6;
  if (Check<B7, C7> ())
    return 7;
  if (Check<B8, C8> ())
    return 8;
  
  if (Check<C1> (D1 ()))
    return 11;
  if (Check<C2> (D2 ()))
    return 12;
  if (Check<C3> (D3 ()))
    return 13;
  if (Check<C4> (D4 ()))
    return 14;
  if (Check<C5> (D5 ()))
    return 15;
  if (Check<C6> (D6 ()))
    return 16;
  if (Check<C7> (D7 ()))
    return 17;
  if (Check<C8> (D8 ()))
    return 18;
  
  if (sizeof (C2) == nearly_empty_size)
    return 22;
  if (sizeof (C3) == nearly_empty_size)
    return 23;
  if (sizeof (C4) == nearly_empty_size)
    return 24;
  if (sizeof (C5) == nearly_empty_size)
    return 25;
  if (sizeof (C6) == nearly_empty_size)
    return 26;
  if (sizeof (C7) == nearly_empty_size)
    return 27;
  if (sizeof (C8) == nearly_empty_size)
    return 28;
#endif
  return 0;
  
}