led.h

来自「HCS08仿真器资料:资料详细」· C头文件 代码 · 共 15 行

H
15
字号
#define LED_INIT      PTD_PTD0=1; DDRD_DDRD0=1;   /* LED off, LED pin is output */
#define LED_SW_ON     PTD_PTD0=0;
#define LED_SW_OFF    PTD_PTD0=1;
#define LED_SW_TOGGLE PTD_PTD0^=1;

#define LED_BLINK_PERIOD  150   /* duration of LED period */
#define LED_OFF_TIME      75    /* how long should the LED be off during the blink period */

typedef enum {
  LED_ON,
  LED_OFF,
  LED_BLINK
} led_state_e;

extern led_state_e led_state;

⌨️ 快捷键说明

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