📄 globals.h
字号:
#ifndef _GLOBALS_H_
#define _GLOBALS_H_ 1
#define NULL 0
// Frequencies
#define F_CPU 1000000L
#define ASYNC_TIMER 128 // Hz
//KEY's
#define KEY_ENTPRELL 2 //x*ASYNC_TIMER
#define KEY_OFF 255 //
#define KEY_SETAUTO 192 //192=1,5 seconds
// Timings
#define MODE_MAX 8 //Quantity of modes
#define AUTO_PERIOD 64 //Quantity of periods until to next mode if Auto change is activated
#define BRIGHT_PERIOD 16 //Quantity of Async periods for light refresh
#define BRIGHT_ONTIME 1 // 1 = darkest light (one period of async int)
#define SPEED_FACTOR 1 //defines the number of bright periods when the next led step is shown
//other global variables
volatile uint8_t new_tick;
uint8_t led_mode;
uint8_t led_bright;
volatile uint8_t key_new, key, key_cnt, key_old;
//volatile uint8_t in_led;
#endif /* _GLOBALS_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -