⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 virkey.ini

📁 驱动15X20D液晶屏
💻 INI
字号:
PORT1 = 0xFF;
  
/* define a debug function for the pedestrian push button */
signal void push_key1 (void)  {
  PORT1 =  0xFE;          /* set P1.0 = 0       */
  twatch (`Clock*0.02);    /* wait 20 msec   */
  PORT1 = 0xFF;          /* reset P1.0     */
}
signal void push_key2 (void)  {
  PORT1 |=  0x02;
  twatch (`Clock*0.02);
  PORT1 &= ~0x02;
}
signal void push_key3 (void)  {
  PORT1 |=  0x04;
  twatch (`Clock*0.02);
  PORT1 &= ~0x04;
}
signal void push_key4 (void)  {
  PORT1 |=  0x08;
  twatch (`Clock*0.02);
  PORT1 &= ~0x08;
}

signal void PumpOK (void) 
{
	S1IN = 0x2F; twatch (CLOCK / 900); 
	S1IN = 0x30; twatch (CLOCK / 900);
	S1IN = 0x60; twatch (CLOCK / 900);
	S1IN = 0x03; twatch (CLOCK / 900);
	S1IN = 0x0D; twatch (CLOCK / 900);
	S1IN = 0x0A; twatch (CLOCK / 900);
	S1IN = 0xFF; twatch (CLOCK / 900);
}

signal void PumpBusy (void) 
{
	S1IN = 0x2F; twatch (CLOCK / 900); 
	S1IN = 0x30; twatch (CLOCK / 900);
	S1IN = 0x40; twatch (CLOCK / 900);
	S1IN = 0x03; twatch (CLOCK / 900);
	S1IN = 0x0D; twatch (CLOCK / 900);
	S1IN = 0x0A; twatch (CLOCK / 900);
	S1IN = 0xFF; twatch (CLOCK / 900);
}


signal void SendUART0 (void) 
{
	S0IN = 0x2F; twatch (CLOCK / 900); 
	S0IN = 0x30; twatch (CLOCK / 900);
	S0IN = 0x40; twatch (CLOCK / 900);
	S0IN = 0x03; twatch (CLOCK / 900);
	S0IN = 0x0D; twatch (CLOCK / 900);
	S0IN = 0x0A; twatch (CLOCK / 900);
}


/* define a toolbar button to call push_key */
define button "K1-Fucn", "push_key1 ()"
define button "K2-Up", "push_key2 ()"
define button "K3-Down", "push_key3 ()"
define button "K4-Esc", "push_key4 ()"
define button "SendUART0", "SendUART0()"
//define BUTTON "PumpOK", "PumpOK ()"
//define BUTTON "PumpBusy", "PumpBusy ()"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -