diff options
| author | MelGeek <65591833+melgeek001365@users.noreply.github.com> | 2020-09-03 18:37:04 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-03 20:37:04 +1000 |
| commit | 2f26e14dc627592734769424b09007e02ddb3c09 (patch) | |
| tree | adbdb4bca827efb708af85365fe91726584d269a /drivers | |
| parent | bad589ec59ef47e926dbc5b40e2802e3275d4105 (diff) | |
| download | qmk_firmware-2f26e14dc627592734769424b09007e02ddb3c09.tar.gz qmk_firmware-2f26e14dc627592734769424b09007e02ddb3c09.zip | |
Update ISSI3741 (#9912)
* [Driver] bugfix reset the scaling register flag to FALSE
* Update drivers/issi/is31fl3741.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Add CS & SW defines for ISSI3741
* Make IS31FL3741 control register update clearer
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Jumail Mundekkat <mundekkat@hotmail.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/issi/is31fl3741.c | 76 | ||||
| -rw-r--r-- | drivers/issi/is31fl3741.h | 379 |
2 files changed, 394 insertions, 61 deletions
diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c index fc5c58835..99d72b9b0 100644 --- a/drivers/issi/is31fl3741.c +++ b/drivers/issi/is31fl3741.c | |||
| @@ -78,22 +78,6 @@ bool g_scaling_registers_update_required[DRIVER_COUNT] = {false}; | |||
| 78 | 78 | ||
| 79 | uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS]; | 79 | uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS]; |
| 80 | 80 | ||
| 81 | uint32_t IS31FL3741_get_cw_sw_position(uint8_t cs, uint8_t sw) { | ||
| 82 | uint32_t pos = 0; | ||
| 83 | |||
| 84 | if (cs < 31) { | ||
| 85 | if (sw < 7) { | ||
| 86 | pos = (sw - 1) * 30 + (cs - 1); | ||
| 87 | |||
| 88 | } else { | ||
| 89 | pos = 0xB4 + (sw - 7) * 30 + (cs - 1); | ||
| 90 | } | ||
| 91 | } else { | ||
| 92 | pos = 0xB4 + 0x5A + (sw - 1) * 9 + (cs - 31); | ||
| 93 | } | ||
| 94 | |||
| 95 | return pos; | ||
| 96 | } | ||
| 97 | 81 | ||
| 98 | void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) { | 82 | void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) { |
| 99 | g_twi_transfer_buffer[0] = reg; | 83 | g_twi_transfer_buffer[0] = reg; |
| @@ -186,15 +170,10 @@ void IS31FL3741_init(uint8_t addr) { | |||
| 186 | void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { | 170 | void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { |
| 187 | if (index >= 0 && index < DRIVER_LED_TOTAL) { | 171 | if (index >= 0 && index < DRIVER_LED_TOTAL) { |
| 188 | is31_led led = g_is31_leds[index]; | 172 | is31_led led = g_is31_leds[index]; |
| 189 | uint32_t rp = 0, gp = 0, bp = 0; | ||
| 190 | 173 | ||
| 191 | rp = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw); | 174 | g_pwm_buffer[led.driver][led.r] = red; |
| 192 | gp = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw); | 175 | g_pwm_buffer[led.driver][led.g] = green; |
| 193 | bp = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw); | 176 | g_pwm_buffer[led.driver][led.b] = blue; |
| 194 | |||
| 195 | g_pwm_buffer[led.driver][rp] = red; | ||
| 196 | g_pwm_buffer[led.driver][gp] = green; | ||
| 197 | g_pwm_buffer[led.driver][bp] = blue; | ||
| 198 | g_pwm_buffer_update_required = true; | 177 | g_pwm_buffer_update_required = true; |
| 199 | } | 178 | } |
| 200 | } | 179 | } |
| @@ -208,26 +187,22 @@ void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { | |||
| 208 | void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { | 187 | void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { |
| 209 | is31_led led = g_is31_leds[index]; | 188 | is31_led led = g_is31_leds[index]; |
| 210 | 189 | ||
| 211 | uint32_t scaling_register_r = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw); | ||
| 212 | uint32_t scaling_register_g = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw); | ||
| 213 | uint32_t scaling_register_b = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw); | ||
| 214 | |||
| 215 | if (red) { | 190 | if (red) { |
| 216 | g_scaling_registers[led.driver][scaling_register_r] = 0xFF; | 191 | g_scaling_registers[led.driver][led.r] = 0xFF; |
| 217 | } else { | 192 | } else { |
| 218 | g_scaling_registers[led.driver][scaling_register_r] = 0x00; | 193 | g_scaling_registers[led.driver][led.r] = 0x00; |
| 219 | } | 194 | } |
| 220 | 195 | ||
| 221 | if (green) { | 196 | if (green) { |
| 222 | g_scaling_registers[led.driver][scaling_register_g] = 0xFF; | 197 | g_scaling_registers[led.driver][led.g] = 0xFF; |
| 223 | } else { | 198 | } else { |
| 224 | g_scaling_registers[led.driver][scaling_register_g] = 0x00; | 199 | g_scaling_registers[led.driver][led.g] = 0x00; |
| 225 | } | 200 | } |
| 226 | 201 | ||
| 227 | if (blue) { | 202 | if (blue) { |
| 228 | g_scaling_registers[led.driver][scaling_register_b] = 0xFF; | 203 | g_scaling_registers[led.driver][led.b] = 0xFF; |
| 229 | } else { | 204 | } else { |
| 230 | g_scaling_registers[led.driver][scaling_register_b] = 0x00; | 205 | g_scaling_registers[led.driver][led.b] = 0x00; |
| 231 | } | 206 | } |
| 232 | 207 | ||
| 233 | g_scaling_registers_update_required[led.driver] = true; | 208 | g_scaling_registers_update_required[led.driver] = true; |
| @@ -242,15 +217,9 @@ void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { | |||
| 242 | } | 217 | } |
| 243 | 218 | ||
| 244 | void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { | 219 | void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { |
| 245 | uint32_t rp = 0, gp = 0, bp = 0; | 220 | g_pwm_buffer[pled->driver][pled->r] = red; |
| 246 | 221 | g_pwm_buffer[pled->driver][pled->g] = green; | |
| 247 | rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw); | 222 | g_pwm_buffer[pled->driver][pled->b] = blue; |
| 248 | gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw); | ||
| 249 | bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw); | ||
| 250 | |||
| 251 | g_pwm_buffer[pled->driver][rp] = red; | ||
| 252 | g_pwm_buffer[pled->driver][gp] = green; | ||
| 253 | g_pwm_buffer[pled->driver][bp] = blue; | ||
| 254 | 223 | ||
| 255 | g_pwm_buffer_update_required = true; | 224 | g_pwm_buffer_update_required = true; |
| 256 | } | 225 | } |
| @@ -261,7 +230,8 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { | |||
| 261 | IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); | 230 | IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); |
| 262 | IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_0); | 231 | IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_0); |
| 263 | 232 | ||
| 264 | for (int i = 0; i < 180; ++i) { | 233 | // CS1_SW1 to CS30_SW6 are on PG2 |
| 234 | for (int i = CS1_SW1; i <= CS30_SW6; ++i) { | ||
| 265 | IS31FL3741_write_register(addr, i, g_scaling_registers[0][i]); | 235 | IS31FL3741_write_register(addr, i, g_scaling_registers[0][i]); |
| 266 | } | 236 | } |
| 267 | 237 | ||
| @@ -269,8 +239,9 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { | |||
| 269 | IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); | 239 | IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); |
| 270 | IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_1); | 240 | IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_1); |
| 271 | 241 | ||
| 272 | for (int i = 0; i < 171; ++i) { | 242 | // CS1_SW7 to CS39_SW9 are on PG3 |
| 273 | IS31FL3741_write_register(addr, i, g_scaling_registers[0][180 + i]); | 243 | for (int i = CS1_SW7; i <= CS39_SW9; ++i) { |
| 244 | IS31FL3741_write_register(addr, i - CS1_SW7, g_scaling_registers[0][i]); | ||
| 274 | } | 245 | } |
| 275 | 246 | ||
| 276 | g_scaling_registers_update_required[index] = false; | 247 | g_scaling_registers_update_required[index] = false; |
| @@ -278,13 +249,8 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { | |||
| 278 | } | 249 | } |
| 279 | 250 | ||
| 280 | void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { | 251 | void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { |
| 281 | uint32_t rp = 0, gp = 0, bp = 0; | 252 | g_scaling_registers[pled->driver][pled->r] = red; |
| 282 | 253 | g_scaling_registers[pled->driver][pled->g] = green; | |
| 283 | rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw); | 254 | g_scaling_registers[pled->driver][pled->b] = blue; |
| 284 | gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw); | ||
| 285 | bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw); | ||
| 286 | |||
| 287 | g_scaling_registers[pled->driver][rp] = red; | ||
| 288 | g_scaling_registers[pled->driver][gp] = green; | ||
| 289 | g_scaling_registers[pled->driver][bp] = blue; | ||
| 290 | } | 255 | } |
| 256 | |||
diff --git a/drivers/issi/is31fl3741.h b/drivers/issi/is31fl3741.h index 3fa853467..69cf206d4 100644 --- a/drivers/issi/is31fl3741.h +++ b/drivers/issi/is31fl3741.h | |||
| @@ -24,12 +24,9 @@ | |||
| 24 | 24 | ||
| 25 | typedef struct is31_led { | 25 | typedef struct is31_led { |
| 26 | uint8_t driver : 2; | 26 | uint8_t driver : 2; |
| 27 | uint8_t rcs; | 27 | uint16_t r; |
| 28 | uint8_t rsw; | 28 | uint16_t g; |
| 29 | uint8_t gcs; | 29 | uint16_t b; |
| 30 | uint8_t gsw; | ||
| 31 | uint8_t bcs; | ||
| 32 | uint8_t bsw; | ||
| 33 | } __attribute__((packed)) is31_led; | 30 | } __attribute__((packed)) is31_led; |
| 34 | 31 | ||
| 35 | extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; | 32 | extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; |
| @@ -53,3 +50,373 @@ void IS31FL3741_update_led_control_registers(uint8_t addr1, uint8_t addr2); | |||
| 53 | void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); | 50 | void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); |
| 54 | 51 | ||
| 55 | void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); | 52 | void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); |
| 53 | |||
| 54 | #define CS1_SW1 0x00 | ||
| 55 | #define CS2_SW1 0x01 | ||
| 56 | #define CS3_SW1 0x02 | ||
| 57 | #define CS4_SW1 0x03 | ||
| 58 | #define CS5_SW1 0x04 | ||
| 59 | #define CS6_SW1 0x05 | ||
| 60 | #define CS7_SW1 0x06 | ||
| 61 | #define CS8_SW1 0x07 | ||
| 62 | #define CS9_SW1 0x08 | ||
| 63 | #define CS10_SW1 0x09 | ||
| 64 | #define CS11_SW1 0x0A | ||
| 65 | #define CS12_SW1 0x0B | ||
| 66 | #define CS13_SW1 0x0C | ||
| 67 | #define CS14_SW1 0x0D | ||
| 68 | #define CS15_SW1 0x0E | ||
| 69 | #define CS16_SW1 0x0F | ||
| 70 | #define CS17_SW1 0x10 | ||
| 71 | #define CS18_SW1 0x11 | ||
| 72 | #define CS19_SW1 0x12 | ||
| 73 | #define CS20_SW1 0x13 | ||
| 74 | #define CS21_SW1 0x14 | ||
| 75 | #define CS22_SW1 0x15 | ||
| 76 | #define CS23_SW1 0x16 | ||
| 77 | #define CS24_SW1 0x17 | ||
| 78 | #define CS25_SW1 0x18 | ||
| 79 | #define CS26_SW1 0x19 | ||
| 80 | #define CS27_SW1 0x1A | ||
| 81 | #define CS28_SW1 0x1B | ||
| 82 | #define CS29_SW1 0x1C | ||
| 83 | #define CS30_SW1 0x1D | ||
| 84 | |||
| 85 | #define CS1_SW2 0x1E | ||
| 86 | #define CS2_SW2 0x1F | ||
| 87 | #define CS3_SW2 0x20 | ||
| 88 | #define CS4_SW2 0x21 | ||
| 89 | #define CS5_SW2 0x22 | ||
| 90 | #define CS6_SW2 0x23 | ||
| 91 | #define CS7_SW2 0x24 | ||
| 92 | #define CS8_SW2 0x25 | ||
| 93 | #define CS9_SW2 0x26 | ||
| 94 | #define CS10_SW2 0x27 | ||
| 95 | #define CS11_SW2 0x28 | ||
| 96 | #define CS12_SW2 0x29 | ||
| 97 | #define CS13_SW2 0x2A | ||
| 98 | #define CS14_SW2 0x2B | ||
| 99 | #define CS15_SW2 0x2C | ||
| 100 | #define CS16_SW2 0x2D | ||
| 101 | #define CS17_SW2 0x2E | ||
| 102 | #define CS18_SW2 0x2F | ||
| 103 | #define CS19_SW2 0x30 | ||
| 104 | #define CS20_SW2 0x31 | ||
| 105 | #define CS21_SW2 0x32 | ||
| 106 | #define CS22_SW2 0x33 | ||
| 107 | #define CS23_SW2 0x34 | ||
| 108 | #define CS24_SW2 0x35 | ||
| 109 | #define CS25_SW2 0x36 | ||
| 110 | #define CS26_SW2 0x37 | ||
| 111 | #define CS27_SW2 0x38 | ||
| 112 | #define CS28_SW2 0x39 | ||
| 113 | #define CS29_SW2 0x3A | ||
| 114 | #define CS30_SW2 0x3B | ||
| 115 | |||
| 116 | #define CS1_SW3 0x3C | ||
| 117 | #define CS2_SW3 0x3D | ||
| 118 | #define CS3_SW3 0x3E | ||
| 119 | #define CS4_SW3 0x3F | ||
| 120 | #define CS5_SW3 0x40 | ||
| 121 | #define CS6_SW3 0x41 | ||
| 122 | #define CS7_SW3 0x42 | ||
| 123 | #define CS8_SW3 0x43 | ||
| 124 | #define CS9_SW3 0x44 | ||
| 125 | #define CS10_SW3 0x45 | ||
| 126 | #define CS11_SW3 0x46 | ||
| 127 | #define CS12_SW3 0x47 | ||
| 128 | #define CS13_SW3 0x48 | ||
| 129 | #define CS14_SW3 0x49 | ||
| 130 | #define CS15_SW3 0x4A | ||
| 131 | #define CS16_SW3 0x4B | ||
| 132 | #define CS17_SW3 0x4C | ||
| 133 | #define CS18_SW3 0x4D | ||
| 134 | #define CS19_SW3 0x4E | ||
| 135 | #define CS20_SW3 0x4F | ||
| 136 | #define CS21_SW3 0x50 | ||
| 137 | #define CS22_SW3 0x51 | ||
| 138 | #define CS23_SW3 0x52 | ||
| 139 | #define CS24_SW3 0x53 | ||
| 140 | #define CS25_SW3 0x54 | ||
| 141 | #define CS26_SW3 0x55 | ||
| 142 | #define CS27_SW3 0x56 | ||
| 143 | #define CS28_SW3 0x57 | ||
| 144 | #define CS29_SW3 0x58 | ||
| 145 | #define CS30_SW3 0x59 | ||
| 146 | |||
| 147 | #define CS1_SW4 0x5A | ||
| 148 | #define CS2_SW4 0x5B | ||
| 149 | #define CS3_SW4 0x5C | ||
| 150 | #define CS4_SW4 0x5D | ||
| 151 | #define CS5_SW4 0x5E | ||
| 152 | #define CS6_SW4 0x5F | ||
| 153 | #define CS7_SW4 0x60 | ||
| 154 | #define CS8_SW4 0x61 | ||
| 155 | #define CS9_SW4 0x62 | ||
| 156 | #define CS10_SW4 0x63 | ||
| 157 | #define CS11_SW4 0x64 | ||
| 158 | #define CS12_SW4 0x65 | ||
| 159 | #define CS13_SW4 0x66 | ||
| 160 | #define CS14_SW4 0x67 | ||
| 161 | #define CS15_SW4 0x68 | ||
| 162 | #define CS16_SW4 0x69 | ||
| 163 | #define CS17_SW4 0x6A | ||
| 164 | #define CS18_SW4 0x6B | ||
| 165 | #define CS19_SW4 0x6C | ||
| 166 | #define CS20_SW4 0x6D | ||
| 167 | #define CS21_SW4 0x6E | ||
| 168 | #define CS22_SW4 0x6F | ||
| 169 | #define CS23_SW4 0x70 | ||
| 170 | #define CS24_SW4 0x71 | ||
| 171 | #define CS25_SW4 0x72 | ||
| 172 | #define CS26_SW4 0x73 | ||
| 173 | #define CS27_SW4 0x74 | ||
| 174 | #define CS28_SW4 0x75 | ||
| 175 | #define CS29_SW4 0x76 | ||
| 176 | #define CS30_SW4 0x77 | ||
| 177 | |||
| 178 | #define CS1_SW5 0x78 | ||
| 179 | #define CS2_SW5 0x79 | ||
| 180 | #define CS3_SW5 0x7A | ||
| 181 | #define CS4_SW5 0x7B | ||
| 182 | #define CS5_SW5 0x7C | ||
| 183 | #define CS6_SW5 0x7D | ||
| 184 | #define CS7_SW5 0x7E | ||
| 185 | #define CS8_SW5 0x7F | ||
| 186 | #define CS9_SW5 0x80 | ||
| 187 | #define CS10_SW5 0x81 | ||
| 188 | #define CS11_SW5 0x82 | ||
| 189 | #define CS12_SW5 0x83 | ||
| 190 | #define CS13_SW5 0x84 | ||
| 191 | #define CS14_SW5 0x85 | ||
| 192 | #define CS15_SW5 0x86 | ||
| 193 | #define CS16_SW5 0x87 | ||
| 194 | #define CS17_SW5 0x88 | ||
| 195 | #define CS18_SW5 0x89 | ||
| 196 | #define CS19_SW5 0x8A | ||
| 197 | #define CS20_SW5 0x8B | ||
| 198 | #define CS21_SW5 0x8C | ||
| 199 | #define CS22_SW5 0x8D | ||
| 200 | #define CS23_SW5 0x8E | ||
| 201 | #define CS24_SW5 0x8F | ||
| 202 | #define CS25_SW5 0x90 | ||
| 203 | #define CS26_SW5 0x91 | ||
| 204 | #define CS27_SW5 0x92 | ||
| 205 | #define CS28_SW5 0x93 | ||
| 206 | #define CS29_SW5 0x94 | ||
| 207 | #define CS30_SW5 0x95 | ||
| 208 | |||
| 209 | #define CS1_SW6 0x96 | ||
| 210 | #define CS2_SW6 0x97 | ||
| 211 | #define CS3_SW6 0x98 | ||
| 212 | #define CS4_SW6 0x99 | ||
| 213 | #define CS5_SW6 0x9A | ||
| 214 | #define CS6_SW6 0x9B | ||
| 215 | #define CS7_SW6 0x9C | ||
| 216 | #define CS8_SW6 0x9D | ||
| 217 | #define CS9_SW6 0x9E | ||
| 218 | #define CS10_SW6 0x9F | ||
| 219 | #define CS11_SW6 0xA0 | ||
| 220 | #define CS12_SW6 0xA1 | ||
| 221 | #define CS13_SW6 0xA2 | ||
| 222 | #define CS14_SW6 0xA3 | ||
| 223 | #define CS15_SW6 0xA4 | ||
| 224 | #define CS16_SW6 0xA5 | ||
| 225 | #define CS17_SW6 0xA6 | ||
| 226 | #define CS18_SW6 0xA7 | ||
| 227 | #define CS19_SW6 0xA8 | ||
| 228 | #define CS20_SW6 0xA9 | ||
| 229 | #define CS21_SW6 0xAA | ||
| 230 | #define CS22_SW6 0xAB | ||
| 231 | #define CS23_SW6 0xAC | ||
| 232 | #define CS24_SW6 0xAD | ||
| 233 | #define CS25_SW6 0xAE | ||
| 234 | #define CS26_SW6 0xAF | ||
| 235 | #define CS27_SW6 0xB0 | ||
| 236 | #define CS28_SW6 0xB1 | ||
| 237 | #define CS29_SW6 0xB2 | ||
| 238 | #define CS30_SW6 0xB3 | ||
| 239 | |||
| 240 | #define CS1_SW7 0xB4 | ||
| 241 | #define CS2_SW7 0xB5 | ||
| 242 | #define CS3_SW7 0xB6 | ||
| 243 | #define CS4_SW7 0xB7 | ||
| 244 | #define CS5_SW7 0xB8 | ||
| 245 | #define CS6_SW7 0xB9 | ||
| 246 | #define CS7_SW7 0xBA | ||
| 247 | #define CS8_SW7 0xBB | ||
| 248 | #define CS9_SW7 0xBC | ||
| 249 | #define CS10_SW7 0xBD | ||
| 250 | #define CS11_SW7 0xBE | ||
| 251 | #define CS12_SW7 0xBF | ||
| 252 | #define CS13_SW7 0xC0 | ||
| 253 | #define CS14_SW7 0xC1 | ||
| 254 | #define CS15_SW7 0xC2 | ||
| 255 | #define CS16_SW7 0xC3 | ||
| 256 | #define CS17_SW7 0xC4 | ||
| 257 | #define CS18_SW7 0xC5 | ||
| 258 | #define CS19_SW7 0xC6 | ||
| 259 | #define CS20_SW7 0xC7 | ||
| 260 | #define CS21_SW7 0xC8 | ||
| 261 | #define CS22_SW7 0xC9 | ||
| 262 | #define CS23_SW7 0xCA | ||
| 263 | #define CS24_SW7 0xCB | ||
| 264 | #define CS25_SW7 0xCC | ||
| 265 | #define CS26_SW7 0xCD | ||
| 266 | #define CS27_SW7 0xCE | ||
| 267 | #define CS28_SW7 0xCF | ||
| 268 | #define CS29_SW7 0xD0 | ||
| 269 | #define CS30_SW7 0xD1 | ||
| 270 | |||
| 271 | #define CS1_SW8 0xD2 | ||
| 272 | #define CS2_SW8 0xD3 | ||
| 273 | #define CS3_SW8 0xD4 | ||
| 274 | #define CS4_SW8 0xD5 | ||
| 275 | #define CS5_SW8 0xD6 | ||
| 276 | #define CS6_SW8 0xD7 | ||
| 277 | #define CS7_SW8 0xD8 | ||
| 278 | #define CS8_SW8 0xD9 | ||
| 279 | #define CS9_SW8 0xDA | ||
| 280 | #define CS10_SW8 0xDB | ||
| 281 | #define CS11_SW8 0xDC | ||
| 282 | #define CS12_SW8 0xDD | ||
| 283 | #define CS13_SW8 0xDE | ||
| 284 | #define CS14_SW8 0xDF | ||
| 285 | #define CS15_SW8 0xE0 | ||
| 286 | #define CS16_SW8 0xE1 | ||
| 287 | #define CS17_SW8 0xE2 | ||
| 288 | #define CS18_SW8 0xE3 | ||
| 289 | #define CS19_SW8 0xE4 | ||
| 290 | #define CS20_SW8 0xE5 | ||
| 291 | #define CS21_SW8 0xE6 | ||
| 292 | #define CS22_SW8 0xE7 | ||
| 293 | #define CS23_SW8 0xE8 | ||
| 294 | #define CS24_SW8 0xE9 | ||
| 295 | #define CS25_SW8 0xEA | ||
| 296 | #define CS26_SW8 0xEB | ||
| 297 | #define CS27_SW8 0xEC | ||
| 298 | #define CS28_SW8 0xED | ||
| 299 | #define CS29_SW8 0xEE | ||
| 300 | #define CS30_SW8 0xEF | ||
| 301 | |||
| 302 | #define CS1_SW9 0xF0 | ||
| 303 | #define CS2_SW9 0xF1 | ||
| 304 | #define CS3_SW9 0xF2 | ||
| 305 | #define CS4_SW9 0xF3 | ||
| 306 | #define CS5_SW9 0xF4 | ||
| 307 | #define CS6_SW9 0xF5 | ||
| 308 | #define CS7_SW9 0xF6 | ||
| 309 | #define CS8_SW9 0xF7 | ||
| 310 | #define CS9_SW9 0xF8 | ||
| 311 | #define CS10_SW9 0xF9 | ||
| 312 | #define CS11_SW9 0xFA | ||
| 313 | #define CS12_SW9 0xFB | ||
| 314 | #define CS13_SW9 0xFC | ||
| 315 | #define CS14_SW9 0xFD | ||
| 316 | #define CS15_SW9 0xFE | ||
| 317 | #define CS16_SW9 0xFF | ||
| 318 | #define CS17_SW9 0x100 | ||
| 319 | #define CS18_SW9 0x101 | ||
| 320 | #define CS19_SW9 0x102 | ||
| 321 | #define CS20_SW9 0x103 | ||
| 322 | #define CS21_SW9 0x104 | ||
| 323 | #define CS22_SW9 0x105 | ||
| 324 | #define CS23_SW9 0x106 | ||
| 325 | #define CS24_SW9 0x107 | ||
| 326 | #define CS25_SW9 0x108 | ||
| 327 | #define CS26_SW9 0x109 | ||
| 328 | #define CS27_SW9 0x10A | ||
| 329 | #define CS28_SW9 0x10B | ||
| 330 | #define CS29_SW9 0x10C | ||
| 331 | #define CS30_SW9 0x10D | ||
| 332 | |||
| 333 | #define CS31_SW1 0x10E | ||
| 334 | #define CS32_SW1 0x10F | ||
| 335 | #define CS33_SW1 0x110 | ||
| 336 | #define CS34_SW1 0x111 | ||
| 337 | #define CS35_SW1 0x112 | ||
| 338 | #define CS36_SW1 0x113 | ||
| 339 | #define CS37_SW1 0x114 | ||
| 340 | #define CS38_SW1 0x115 | ||
| 341 | #define CS39_SW1 0x116 | ||
| 342 | |||
| 343 | #define CS31_SW2 0x117 | ||
| 344 | #define CS32_SW2 0x118 | ||
| 345 | #define CS33_SW2 0x119 | ||
| 346 | #define CS34_SW2 0x11A | ||
| 347 | #define CS35_SW2 0x11B | ||
| 348 | #define CS36_SW2 0x11C | ||
| 349 | #define CS37_SW2 0x11D | ||
| 350 | #define CS38_SW2 0x11E | ||
| 351 | #define CS39_SW2 0x11F | ||
| 352 | |||
| 353 | #define CS31_SW3 0x120 | ||
| 354 | #define CS32_SW3 0x121 | ||
| 355 | #define CS33_SW3 0x122 | ||
| 356 | #define CS34_SW3 0x123 | ||
| 357 | #define CS35_SW3 0x124 | ||
| 358 | #define CS36_SW3 0x125 | ||
| 359 | #define CS37_SW3 0x126 | ||
| 360 | #define CS38_SW3 0x127 | ||
| 361 | #define CS39_SW3 0x128 | ||
| 362 | |||
| 363 | #define CS31_SW4 0x129 | ||
| 364 | #define CS32_SW4 0x12A | ||
| 365 | #define CS33_SW4 0x12B | ||
| 366 | #define CS34_SW4 0x12C | ||
| 367 | #define CS35_SW4 0x12D | ||
| 368 | #define CS36_SW4 0x12E | ||
| 369 | #define CS37_SW4 0x12F | ||
| 370 | #define CS38_SW4 0x130 | ||
| 371 | #define CS39_SW4 0x131 | ||
| 372 | |||
| 373 | #define CS31_SW5 0x132 | ||
| 374 | #define CS32_SW5 0x133 | ||
| 375 | #define CS33_SW5 0x134 | ||
| 376 | #define CS34_SW5 0x135 | ||
| 377 | #define CS35_SW5 0x136 | ||
| 378 | #define CS36_SW5 0x137 | ||
| 379 | #define CS37_SW5 0x138 | ||
| 380 | #define CS38_SW5 0x139 | ||
| 381 | #define CS39_SW5 0x13A | ||
| 382 | |||
| 383 | #define CS31_SW6 0x13B | ||
| 384 | #define CS32_SW6 0x13C | ||
| 385 | #define CS33_SW6 0x13D | ||
| 386 | #define CS34_SW6 0x13E | ||
| 387 | #define CS35_SW6 0x13F | ||
| 388 | #define CS36_SW6 0x140 | ||
| 389 | #define CS37_SW6 0x141 | ||
| 390 | #define CS38_SW6 0x142 | ||
| 391 | #define CS39_SW6 0x143 | ||
| 392 | |||
| 393 | #define CS31_SW7 0x144 | ||
| 394 | #define CS32_SW7 0x145 | ||
| 395 | #define CS33_SW7 0x146 | ||
| 396 | #define CS34_SW7 0x147 | ||
| 397 | #define CS35_SW7 0x148 | ||
| 398 | #define CS36_SW7 0x149 | ||
| 399 | #define CS37_SW7 0x14A | ||
| 400 | #define CS38_SW7 0x14B | ||
| 401 | #define CS39_SW7 0x14C | ||
| 402 | |||
| 403 | #define CS31_SW8 0x14D | ||
| 404 | #define CS32_SW8 0x14E | ||
| 405 | #define CS33_SW8 0x14F | ||
| 406 | #define CS34_SW8 0x150 | ||
| 407 | #define CS35_SW8 0x151 | ||
| 408 | #define CS36_SW8 0x152 | ||
| 409 | #define CS37_SW8 0x153 | ||
| 410 | #define CS38_SW8 0x154 | ||
| 411 | #define CS39_SW8 0x155 | ||
| 412 | |||
| 413 | #define CS31_SW9 0x156 | ||
| 414 | #define CS32_SW9 0x157 | ||
| 415 | #define CS33_SW9 0x158 | ||
| 416 | #define CS34_SW9 0x159 | ||
| 417 | #define CS35_SW9 0x15A | ||
| 418 | #define CS36_SW9 0x15B | ||
| 419 | #define CS37_SW9 0x15C | ||
| 420 | #define CS38_SW9 0x15D | ||
| 421 | #define CS39_SW9 0x15E | ||
| 422 | |||
