📄 ledmodule.h
字号:
/* $Id: ledmodule.h,v 1.9 2005/04/28 21:37:39 simimeie Exp $ * Functions for communicating with the LED module. * The module is connected through an i2c bus, it consists of two SAA 1064 * drivers. */ #ifndef _LEDMODULE_H_ #define _LEDMODULE_H_#ifdef LEDMODULEextern uint8_t led_digits[16];#define led_dot 0x01#define led_dash 0x80#define led_letter_n 0x8a#define led_letter_o 0x8e#define led_letter_S 0xe6#define led_letter_i 0x08#define led_letter_g 0xf7extern uint8_t led_brightness;extern uint8_t led_statusleds;#define led_status_dcfbit 0x01 /* Received a DCF77 bit */#define led_status_dcfgood 0x02 /* The received signal was decoded OK */#define led_status_netrx 0x04 /* A packet was received from the net */#define led_status_nettx 0x08 /* A packet was sent to the net */#define led_status_netping 0x10 /* We got a PING request */#define led_status_netntp 0x20 /* We got a NTP request */#define led_status_netrcon 0x40 /* We got a RCON request */#define led_status_dispovr 0x80 /* The display is overriden *//* For temporarily overriding the time display. * Can be set via serial interface or network */extern uint8_t led_dispoverride[7];extern uint8_t led_dispovcnt;/* This sets one digit on the LED module. * digit is the number of the digit (0 - 7) * val is a bitfield that contains the values to set. See the leddigits * array for useful values for this. */void set_led_digit(uint8_t digit, uint8_t val);/* Configures the brightness of the LED module, or rather: the current the * driver allows through them. * The values 0 through 7 can be used, corresponding to 0 through 21 mA */void set_led_brightness(void);/* Initialize the LED module... This basically enables the pullups on the I2C * Bus pins */void led_init(void);#else /* ndef LEDMODULE */#define set_led_digit(d, v) if (0) { }#define set_led_brightness() if (0) { }#define led_init() if (0) { }#endif /* ndef LEDMODULE */#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -