diff options
Diffstat (limited to 'keyboards/infinity60/led_controller.h')
| -rw-r--r-- | keyboards/infinity60/led_controller.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/keyboards/infinity60/led_controller.h b/keyboards/infinity60/led_controller.h index 455f06050..7bdef7ae6 100644 --- a/keyboards/infinity60/led_controller.h +++ b/keyboards/infinity60/led_controller.h | |||
| @@ -31,6 +31,7 @@ msg_t is31_read_register(uint8_t page, uint8_t reg, uint8_t *result); | |||
| 31 | * ============================*/ | 31 | * ============================*/ |
| 32 | 32 | ||
| 33 | void led_controller_init(void); | 33 | void led_controller_init(void); |
| 34 | void print_debug (uint8_t page); | ||
| 34 | 35 | ||
| 35 | #define CAPS_LOCK_LED_ADDRESS 46 //pin matrix location | 36 | #define CAPS_LOCK_LED_ADDRESS 46 //pin matrix location |
| 36 | #define NUM_LOCK_LED_ADDRESS 85 | 37 | #define NUM_LOCK_LED_ADDRESS 85 |
| @@ -58,7 +59,7 @@ void led_controller_init(void); | |||
| 58 | 59 | ||
| 59 | #define IS31_REG_DISPLAYOPT 0x05 | 60 | #define IS31_REG_DISPLAYOPT 0x05 |
| 60 | #define IS31_REG_DISPLAYOPT_INTENSITY_SAME 0x20 // same intensity for all frames | 61 | #define IS31_REG_DISPLAYOPT_INTENSITY_SAME 0x20 // same intensity for all frames |
| 61 | #define IS31_REG_DISPLAYOPT_BLINK_ENABLE 0x8 | 62 | #define IS31_REG_DISPLAYOPT_BLINK_ENABLE 0x08 |
| 62 | // D2:D0 bits blink period time (*0.27s) | 63 | // D2:D0 bits blink period time (*0.27s) |
| 63 | 64 | ||
| 64 | #define IS31_REG_AUDIOSYNC 0x06 | 65 | #define IS31_REG_AUDIOSYNC 0x06 |
| @@ -86,32 +87,33 @@ void led_controller_init(void); | |||
| 86 | #define IS31_TIMEOUT 10000 // needs to be long enough to write a whole page | 87 | #define IS31_TIMEOUT 10000 // needs to be long enough to write a whole page |
| 87 | 88 | ||
| 88 | /* ======================================== | 89 | /* ======================================== |
| 89 | * LED Thread related functions/definitions | 90 | * LED Thread related items |
| 90 | * ========================================*/ | 91 | * ========================================*/ |
| 91 | 92 | ||
| 92 | extern mailbox_t led_mailbox; | 93 | extern mailbox_t led_mailbox; |
| 93 | 94 | ||
| 94 | void set_led_bit (uint8_t page, uint8_t *led_control_reg, uint8_t led_addr, uint8_t action); | 95 | void set_led_bit (uint8_t page, uint8_t *led_control_reg, uint8_t led_addr, uint8_t action); |
| 95 | void set_lock_leds (uint8_t led_addr, uint8_t led_action); | 96 | void set_lock_leds (uint8_t led_addr, uint8_t led_action, uint8_t page); |
| 96 | void write_led_byte (uint8_t page, uint8_t row, uint8_t led_byte); | 97 | void write_led_byte (uint8_t page, uint8_t row, uint8_t led_byte); |
| 97 | void write_led_page (uint8_t page, uint8_t *led_array, uint8_t led_count); | 98 | void write_led_page (uint8_t page, uint8_t *led_array, uint8_t led_count); |
| 98 | 99 | ||
| 99 | // constants for signaling the LED controller thread | 100 | // constants for signaling the LED controller thread |
| 100 | enum led_msg_t { | 101 | enum led_msg_t { |
| 101 | KEY_LIGHT, | 102 | KEY_LIGHT, |
| 102 | BLINK_OFF_LED, | 103 | SET_FULL_ROW, |
| 103 | BLINK_ON_LED, | ||
| 104 | BLINK_TOGGLE_LED, | ||
| 105 | OFF_LED, | 104 | OFF_LED, |
| 106 | ON_LED, | 105 | ON_LED, |
| 107 | TOGGLE_LED, | 106 | TOGGLE_LED, |
| 107 | BLINK_OFF_LED, | ||
| 108 | BLINK_ON_LED, | ||
| 109 | BLINK_TOGGLE_LED, | ||
| 108 | TOGGLE_ALL, | 110 | TOGGLE_ALL, |
| 109 | TOGGLE_BACKLIGHT, | 111 | TOGGLE_BACKLIGHT, |
| 110 | DISPLAY_PAGE, | 112 | DISPLAY_PAGE, |
| 111 | RESET_PAGE, | 113 | RESET_PAGE, |
| 112 | TOGGLE_NUM_LOCK, | 114 | TOGGLE_NUM_LOCK, |
| 113 | TOGGLE_CAPS_LOCK, | 115 | TOGGLE_CAPS_LOCK, |
| 114 | MODE_BREATH, | 116 | TOGGLE_BREATH, |
| 115 | STEP_BRIGHTNESS | 117 | STEP_BRIGHTNESS |
| 116 | }; | 118 | }; |
| 117 | 119 | ||
