small code cleanup
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -31,6 +31,7 @@ msg_t is31_read_register(uint8_t page, uint8_t reg, uint8_t *result);
|
||||
* ============================*/
|
||||
|
||||
void led_controller_init(void);
|
||||
void print_debug (uint8_t page);
|
||||
|
||||
#define CAPS_LOCK_LED_ADDRESS 46 //pin matrix location
|
||||
#define NUM_LOCK_LED_ADDRESS 85
|
||||
@ -58,7 +59,7 @@ void led_controller_init(void);
|
||||
|
||||
#define IS31_REG_DISPLAYOPT 0x05
|
||||
#define IS31_REG_DISPLAYOPT_INTENSITY_SAME 0x20 // same intensity for all frames
|
||||
#define IS31_REG_DISPLAYOPT_BLINK_ENABLE 0x8
|
||||
#define IS31_REG_DISPLAYOPT_BLINK_ENABLE 0x08
|
||||
// D2:D0 bits blink period time (*0.27s)
|
||||
|
||||
#define IS31_REG_AUDIOSYNC 0x06
|
||||
@ -86,32 +87,33 @@ void led_controller_init(void);
|
||||
#define IS31_TIMEOUT 10000 // needs to be long enough to write a whole page
|
||||
|
||||
/* ========================================
|
||||
* LED Thread related functions/definitions
|
||||
* LED Thread related items
|
||||
* ========================================*/
|
||||
|
||||
extern mailbox_t led_mailbox;
|
||||
|
||||
void set_led_bit (uint8_t page, uint8_t *led_control_reg, uint8_t led_addr, uint8_t action);
|
||||
void set_lock_leds (uint8_t led_addr, uint8_t led_action);
|
||||
void set_lock_leds (uint8_t led_addr, uint8_t led_action, uint8_t page);
|
||||
void write_led_byte (uint8_t page, uint8_t row, uint8_t led_byte);
|
||||
void write_led_page (uint8_t page, uint8_t *led_array, uint8_t led_count);
|
||||
|
||||
// constants for signaling the LED controller thread
|
||||
enum led_msg_t {
|
||||
KEY_LIGHT,
|
||||
BLINK_OFF_LED,
|
||||
BLINK_ON_LED,
|
||||
BLINK_TOGGLE_LED,
|
||||
SET_FULL_ROW,
|
||||
OFF_LED,
|
||||
ON_LED,
|
||||
TOGGLE_LED,
|
||||
BLINK_OFF_LED,
|
||||
BLINK_ON_LED,
|
||||
BLINK_TOGGLE_LED,
|
||||
TOGGLE_ALL,
|
||||
TOGGLE_BACKLIGHT,
|
||||
DISPLAY_PAGE,
|
||||
RESET_PAGE,
|
||||
TOGGLE_NUM_LOCK,
|
||||
TOGGLE_CAPS_LOCK,
|
||||
MODE_BREATH,
|
||||
TOGGLE_BREATH,
|
||||
STEP_BRIGHTNESS
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user