aw20216s.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. /* Copyright 2021 Jasper Chan (Gigahawk)
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include <stdint.h>
  18. #include <stdbool.h>
  19. #include "progmem.h"
  20. #include "gpio.h"
  21. #include "util.h"
  22. // ======== DEPRECATED DEFINES - DO NOT USE ========
  23. #ifdef AW_SCALING_MAX
  24. # define AW20216S_SCALING_MAX AW_SCALING_MAX
  25. #endif
  26. #ifdef AW_GLOBAL_CURRENT_MAX
  27. # define AW20216S_GLOBAL_CURRENT_MAX AW_GLOBAL_CURRENT_MAX
  28. #endif
  29. #ifdef AW_SPI_MODE
  30. # define AW20216S_SPI_MODE AW_SPI_MODE
  31. #endif
  32. #ifdef AW_SPI_DIVISOR
  33. # define AW20216S_SPI_DIVISOR AW_SPI_DIVISOR
  34. #endif
  35. #ifdef DRIVER_1_CS
  36. # define AW20216S_CS_PIN_1 DRIVER_1_CS
  37. #endif
  38. #ifdef DRIVER_2_CS
  39. # define AW20216S_CS_PIN_2 DRIVER_2_CS
  40. #endif
  41. #ifdef DRIVER_1_EN
  42. # define AW20216S_EN_PIN DRIVER_1_EN
  43. #endif
  44. #ifdef AW20216S_EN_PIN_1
  45. # define AW20216S_EN_PIN AW20216S_EN_PIN_1
  46. #endif
  47. #define aw_led aw20216s_led_t
  48. #define g_aw_leds g_aw20216s_leds
  49. // ========
  50. #define AW20216S_ID (0b1010 << 4)
  51. #define AW20216S_WRITE 0
  52. #define AW20216S_READ 1
  53. #define AW20216S_PAGE_FUNCTION (0x00 << 1)
  54. #define AW20216S_PAGE_PWM (0x01 << 1)
  55. #define AW20216S_PAGE_SCALING (0x02 << 1)
  56. #define AW20216S_PAGE_PATTERN_CHOICE (0x03 << 1)
  57. #define AW20216S_PAGE_PWM_SCALING (0x04 << 1)
  58. #define AW20216S_FUNCTION_REG_CONFIGURATION 0x00
  59. #define AW20216S_CONFIGURATION_SWSEL_1_12 (0b1011 << 4)
  60. #define AW20216S_CONFIGURATION_CHIPEN (0b1 << 0)
  61. #define AW20216S_FUNCTION_REG_GLOBAL_CURRENT 0x01
  62. #define AW20216S_FUNCTION_REG_RESET 0x2F
  63. #define AW20216S_RESET_MAGIC 0xAE
  64. #define AW20216S_FUNCTION_REG_MIX_FUNCTION 0x46
  65. #define AW20216S_MIX_FUNCTION_LPEN (0b1 << 1)
  66. #if defined(RGB_MATRIX_AW20216S)
  67. # define AW20216S_LED_COUNT RGB_MATRIX_LED_COUNT
  68. #endif
  69. #if defined(AW20216S_CS_PIN_2)
  70. # define AW20216S_DRIVER_COUNT 2
  71. #elif defined(AW20216S_CS_PIN_1)
  72. # define AW20216S_DRIVER_COUNT 1
  73. #endif
  74. typedef struct aw20216s_led_t {
  75. uint8_t driver : 2;
  76. uint8_t r;
  77. uint8_t g;
  78. uint8_t b;
  79. } PACKED aw20216s_led_t;
  80. extern const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT];
  81. void aw20216s_init_drivers(void);
  82. void aw20216s_init(pin_t cs_pin);
  83. void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
  84. void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
  85. void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index);
  86. void aw20216s_flush(void);
  87. #define SW1_CS1 0x00
  88. #define SW1_CS2 0x01
  89. #define SW1_CS3 0x02
  90. #define SW1_CS4 0x03
  91. #define SW1_CS5 0x04
  92. #define SW1_CS6 0x05
  93. #define SW1_CS7 0x06
  94. #define SW1_CS8 0x07
  95. #define SW1_CS9 0x08
  96. #define SW1_CS10 0x09
  97. #define SW1_CS11 0x0A
  98. #define SW1_CS12 0x0B
  99. #define SW1_CS13 0x0C
  100. #define SW1_CS14 0x0D
  101. #define SW1_CS15 0x0E
  102. #define SW1_CS16 0x0F
  103. #define SW1_CS17 0x10
  104. #define SW1_CS18 0x11
  105. #define SW2_CS1 0x12
  106. #define SW2_CS2 0x13
  107. #define SW2_CS3 0x14
  108. #define SW2_CS4 0x15
  109. #define SW2_CS5 0x16
  110. #define SW2_CS6 0x17
  111. #define SW2_CS7 0x18
  112. #define SW2_CS8 0x19
  113. #define SW2_CS9 0x1A
  114. #define SW2_CS10 0x1B
  115. #define SW2_CS11 0x1C
  116. #define SW2_CS12 0x1D
  117. #define SW2_CS13 0x1E
  118. #define SW2_CS14 0x1F
  119. #define SW2_CS15 0x20
  120. #define SW2_CS16 0x21
  121. #define SW2_CS17 0x22
  122. #define SW2_CS18 0x23
  123. #define SW3_CS1 0x24
  124. #define SW3_CS2 0x25
  125. #define SW3_CS3 0x26
  126. #define SW3_CS4 0x27
  127. #define SW3_CS5 0x28
  128. #define SW3_CS6 0x29
  129. #define SW3_CS7 0x2A
  130. #define SW3_CS8 0x2B
  131. #define SW3_CS9 0x2C
  132. #define SW3_CS10 0x2D
  133. #define SW3_CS11 0x2E
  134. #define SW3_CS12 0x2F
  135. #define SW3_CS13 0x30
  136. #define SW3_CS14 0x31
  137. #define SW3_CS15 0x32
  138. #define SW3_CS16 0x33
  139. #define SW3_CS17 0x34
  140. #define SW3_CS18 0x35
  141. #define SW4_CS1 0x36
  142. #define SW4_CS2 0x37
  143. #define SW4_CS3 0x38
  144. #define SW4_CS4 0x39
  145. #define SW4_CS5 0x3A
  146. #define SW4_CS6 0x3B
  147. #define SW4_CS7 0x3C
  148. #define SW4_CS8 0x3D
  149. #define SW4_CS9 0x3E
  150. #define SW4_CS10 0x3F
  151. #define SW4_CS11 0x40
  152. #define SW4_CS12 0x41
  153. #define SW4_CS13 0x42
  154. #define SW4_CS14 0x43
  155. #define SW4_CS15 0x44
  156. #define SW4_CS16 0x45
  157. #define SW4_CS17 0x46
  158. #define SW4_CS18 0x47
  159. #define SW5_CS1 0x48
  160. #define SW5_CS2 0x49
  161. #define SW5_CS3 0x4A
  162. #define SW5_CS4 0x4B
  163. #define SW5_CS5 0x4C
  164. #define SW5_CS6 0x4D
  165. #define SW5_CS7 0x4E
  166. #define SW5_CS8 0x4F
  167. #define SW5_CS9 0x50
  168. #define SW5_CS10 0x51
  169. #define SW5_CS11 0x52
  170. #define SW5_CS12 0x53
  171. #define SW5_CS13 0x54
  172. #define SW5_CS14 0x55
  173. #define SW5_CS15 0x56
  174. #define SW5_CS16 0x57
  175. #define SW5_CS17 0x58
  176. #define SW5_CS18 0x59
  177. #define SW6_CS1 0x5A
  178. #define SW6_CS2 0x5B
  179. #define SW6_CS3 0x5C
  180. #define SW6_CS4 0x5D
  181. #define SW6_CS5 0x5E
  182. #define SW6_CS6 0x5F
  183. #define SW6_CS7 0x60
  184. #define SW6_CS8 0x61
  185. #define SW6_CS9 0x62
  186. #define SW6_CS10 0x63
  187. #define SW6_CS11 0x64
  188. #define SW6_CS12 0x65
  189. #define SW6_CS13 0x66
  190. #define SW6_CS14 0x67
  191. #define SW6_CS15 0x68
  192. #define SW6_CS16 0x69
  193. #define SW6_CS17 0x6A
  194. #define SW6_CS18 0x6B
  195. #define SW7_CS1 0x6C
  196. #define SW7_CS2 0x6D
  197. #define SW7_CS3 0x6E
  198. #define SW7_CS4 0x6F
  199. #define SW7_CS5 0x70
  200. #define SW7_CS6 0x71
  201. #define SW7_CS7 0x72
  202. #define SW7_CS8 0x73
  203. #define SW7_CS9 0x74
  204. #define SW7_CS10 0x75
  205. #define SW7_CS11 0x76
  206. #define SW7_CS12 0x77
  207. #define SW7_CS13 0x78
  208. #define SW7_CS14 0x79
  209. #define SW7_CS15 0x7A
  210. #define SW7_CS16 0x7B
  211. #define SW7_CS17 0x7C
  212. #define SW7_CS18 0x7D
  213. #define SW8_CS1 0x7E
  214. #define SW8_CS2 0x7F
  215. #define SW8_CS3 0x80
  216. #define SW8_CS4 0x81
  217. #define SW8_CS5 0x82
  218. #define SW8_CS6 0x83
  219. #define SW8_CS7 0x84
  220. #define SW8_CS8 0x85
  221. #define SW8_CS9 0x86
  222. #define SW8_CS10 0x87
  223. #define SW8_CS11 0x88
  224. #define SW8_CS12 0x89
  225. #define SW8_CS13 0x8A
  226. #define SW8_CS14 0x8B
  227. #define SW8_CS15 0x8C
  228. #define SW8_CS16 0x8D
  229. #define SW8_CS17 0x8E
  230. #define SW8_CS18 0x8F
  231. #define SW9_CS1 0x90
  232. #define SW9_CS2 0x91
  233. #define SW9_CS3 0x92
  234. #define SW9_CS4 0x93
  235. #define SW9_CS5 0x94
  236. #define SW9_CS6 0x95
  237. #define SW9_CS7 0x96
  238. #define SW9_CS8 0x97
  239. #define SW9_CS9 0x98
  240. #define SW9_CS10 0x99
  241. #define SW9_CS11 0x9A
  242. #define SW9_CS12 0x9B
  243. #define SW9_CS13 0x9C
  244. #define SW9_CS14 0x9D
  245. #define SW9_CS15 0x9E
  246. #define SW9_CS16 0x9F
  247. #define SW9_CS17 0xA0
  248. #define SW9_CS18 0xA1
  249. #define SW10_CS1 0xA2
  250. #define SW10_CS2 0xA3
  251. #define SW10_CS3 0xA4
  252. #define SW10_CS4 0xA5
  253. #define SW10_CS5 0xA6
  254. #define SW10_CS6 0xA7
  255. #define SW10_CS7 0xA8
  256. #define SW10_CS8 0xA9
  257. #define SW10_CS9 0xAA
  258. #define SW10_CS10 0xAB
  259. #define SW10_CS11 0xAC
  260. #define SW10_CS12 0xAD
  261. #define SW10_CS13 0xAE
  262. #define SW10_CS14 0xAF
  263. #define SW10_CS15 0xB0
  264. #define SW10_CS16 0xB1
  265. #define SW10_CS17 0xB2
  266. #define SW10_CS18 0xB3
  267. #define SW11_CS1 0xB4
  268. #define SW11_CS2 0xB5
  269. #define SW11_CS3 0xB6
  270. #define SW11_CS4 0xB7
  271. #define SW11_CS5 0xB8
  272. #define SW11_CS6 0xB9
  273. #define SW11_CS7 0xBA
  274. #define SW11_CS8 0xBB
  275. #define SW11_CS9 0xBC
  276. #define SW11_CS10 0xBD
  277. #define SW11_CS11 0xBE
  278. #define SW11_CS12 0xBF
  279. #define SW11_CS13 0xC0
  280. #define SW11_CS14 0xC1
  281. #define SW11_CS15 0xC2
  282. #define SW11_CS16 0xC3
  283. #define SW11_CS17 0xC4
  284. #define SW11_CS18 0xC5
  285. #define SW12_CS1 0xC6
  286. #define SW12_CS2 0xC7
  287. #define SW12_CS3 0xC8
  288. #define SW12_CS4 0xC9
  289. #define SW12_CS5 0xCA
  290. #define SW12_CS6 0xCB
  291. #define SW12_CS7 0xCC
  292. #define SW12_CS8 0xCD
  293. #define SW12_CS9 0xCE
  294. #define SW12_CS10 0xCF
  295. #define SW12_CS11 0xD0
  296. #define SW12_CS12 0xD1
  297. #define SW12_CS13 0xD2
  298. #define SW12_CS14 0xD3
  299. #define SW12_CS15 0xD4
  300. #define SW12_CS16 0xD5
  301. #define SW12_CS17 0xD6
  302. #define SW12_CS18 0xD7
  303. // DEPRECATED - DO NOT USE
  304. #define CS1_SW1 SW1_CS1
  305. #define CS2_SW1 SW1_CS2
  306. #define CS3_SW1 SW1_CS3
  307. #define CS4_SW1 SW1_CS4
  308. #define CS5_SW1 SW1_CS5
  309. #define CS6_SW1 SW1_CS6
  310. #define CS7_SW1 SW1_CS7
  311. #define CS8_SW1 SW1_CS8
  312. #define CS9_SW1 SW1_CS9
  313. #define CS10_SW1 SW1_CS10
  314. #define CS11_SW1 SW1_CS11
  315. #define CS12_SW1 SW1_CS12
  316. #define CS13_SW1 SW1_CS13
  317. #define CS14_SW1 SW1_CS14
  318. #define CS15_SW1 SW1_CS15
  319. #define CS16_SW1 SW1_CS16
  320. #define CS17_SW1 SW1_CS17
  321. #define CS18_SW1 SW1_CS18
  322. #define CS1_SW2 SW2_CS1
  323. #define CS2_SW2 SW2_CS2
  324. #define CS3_SW2 SW2_CS3
  325. #define CS4_SW2 SW2_CS4
  326. #define CS5_SW2 SW2_CS5
  327. #define CS6_SW2 SW2_CS6
  328. #define CS7_SW2 SW2_CS7
  329. #define CS8_SW2 SW2_CS8
  330. #define CS9_SW2 SW2_CS9
  331. #define CS10_SW2 SW2_CS10
  332. #define CS11_SW2 SW2_CS11
  333. #define CS12_SW2 SW2_CS12
  334. #define CS13_SW2 SW2_CS13
  335. #define CS14_SW2 SW2_CS14
  336. #define CS15_SW2 SW2_CS15
  337. #define CS16_SW2 SW2_CS16
  338. #define CS17_SW2 SW2_CS17
  339. #define CS18_SW2 SW2_CS18
  340. #define CS1_SW3 SW3_CS1
  341. #define CS2_SW3 SW3_CS2
  342. #define CS3_SW3 SW3_CS3
  343. #define CS4_SW3 SW3_CS4
  344. #define CS5_SW3 SW3_CS5
  345. #define CS6_SW3 SW3_CS6
  346. #define CS7_SW3 SW3_CS7
  347. #define CS8_SW3 SW3_CS8
  348. #define CS9_SW3 SW3_CS9
  349. #define CS10_SW3 SW3_CS10
  350. #define CS11_SW3 SW3_CS11
  351. #define CS12_SW3 SW3_CS12
  352. #define CS13_SW3 SW3_CS13
  353. #define CS14_SW3 SW3_CS14
  354. #define CS15_SW3 SW3_CS15
  355. #define CS16_SW3 SW3_CS16
  356. #define CS17_SW3 SW3_CS17
  357. #define CS18_SW3 SW3_CS18
  358. #define CS1_SW4 SW4_CS1
  359. #define CS2_SW4 SW4_CS2
  360. #define CS3_SW4 SW4_CS3
  361. #define CS4_SW4 SW4_CS4
  362. #define CS5_SW4 SW4_CS5
  363. #define CS6_SW4 SW4_CS6
  364. #define CS7_SW4 SW4_CS7
  365. #define CS8_SW4 SW4_CS8
  366. #define CS9_SW4 SW4_CS9
  367. #define CS10_SW4 SW4_CS10
  368. #define CS11_SW4 SW4_CS11
  369. #define CS12_SW4 SW4_CS12
  370. #define CS13_SW4 SW4_CS13
  371. #define CS14_SW4 SW4_CS14
  372. #define CS15_SW4 SW4_CS15
  373. #define CS16_SW4 SW4_CS16
  374. #define CS17_SW4 SW4_CS17
  375. #define CS18_SW4 SW4_CS18
  376. #define CS1_SW5 SW5_CS1
  377. #define CS2_SW5 SW5_CS2
  378. #define CS3_SW5 SW5_CS3
  379. #define CS4_SW5 SW5_CS4
  380. #define CS5_SW5 SW5_CS5
  381. #define CS6_SW5 SW5_CS6
  382. #define CS7_SW5 SW5_CS7
  383. #define CS8_SW5 SW5_CS8
  384. #define CS9_SW5 SW5_CS9
  385. #define CS10_SW5 SW5_CS10
  386. #define CS11_SW5 SW5_CS11
  387. #define CS12_SW5 SW5_CS12
  388. #define CS13_SW5 SW5_CS13
  389. #define CS14_SW5 SW5_CS14
  390. #define CS15_SW5 SW5_CS15
  391. #define CS16_SW5 SW5_CS16
  392. #define CS17_SW5 SW5_CS17
  393. #define CS18_SW5 SW5_CS18
  394. #define CS1_SW6 SW6_CS1
  395. #define CS2_SW6 SW6_CS2
  396. #define CS3_SW6 SW6_CS3
  397. #define CS4_SW6 SW6_CS4
  398. #define CS5_SW6 SW6_CS5
  399. #define CS6_SW6 SW6_CS6
  400. #define CS7_SW6 SW6_CS7
  401. #define CS8_SW6 SW6_CS8
  402. #define CS9_SW6 SW6_CS9
  403. #define CS10_SW6 SW6_CS10
  404. #define CS11_SW6 SW6_CS11
  405. #define CS12_SW6 SW6_CS12
  406. #define CS13_SW6 SW6_CS13
  407. #define CS14_SW6 SW6_CS14
  408. #define CS15_SW6 SW6_CS15
  409. #define CS16_SW6 SW6_CS16
  410. #define CS17_SW6 SW6_CS17
  411. #define CS18_SW6 SW6_CS18
  412. #define CS1_SW7 SW7_CS1
  413. #define CS2_SW7 SW7_CS2
  414. #define CS3_SW7 SW7_CS3
  415. #define CS4_SW7 SW7_CS4
  416. #define CS5_SW7 SW7_CS5
  417. #define CS6_SW7 SW7_CS6
  418. #define CS7_SW7 SW7_CS7
  419. #define CS8_SW7 SW7_CS8
  420. #define CS9_SW7 SW7_CS9
  421. #define CS10_SW7 SW7_CS10
  422. #define CS11_SW7 SW7_CS11
  423. #define CS12_SW7 SW7_CS12
  424. #define CS13_SW7 SW7_CS13
  425. #define CS14_SW7 SW7_CS14
  426. #define CS15_SW7 SW7_CS15
  427. #define CS16_SW7 SW7_CS16
  428. #define CS17_SW7 SW7_CS17
  429. #define CS18_SW7 SW7_CS18
  430. #define CS1_SW8 SW8_CS1
  431. #define CS2_SW8 SW8_CS2
  432. #define CS3_SW8 SW8_CS3
  433. #define CS4_SW8 SW8_CS4
  434. #define CS5_SW8 SW8_CS5
  435. #define CS6_SW8 SW8_CS6
  436. #define CS7_SW8 SW8_CS7
  437. #define CS8_SW8 SW8_CS8
  438. #define CS9_SW8 SW8_CS9
  439. #define CS10_SW8 SW8_CS10
  440. #define CS11_SW8 SW8_CS11
  441. #define CS12_SW8 SW8_CS12
  442. #define CS13_SW8 SW8_CS13
  443. #define CS14_SW8 SW8_CS14
  444. #define CS15_SW8 SW8_CS15
  445. #define CS16_SW8 SW8_CS16
  446. #define CS17_SW8 SW8_CS17
  447. #define CS18_SW8 SW8_CS18
  448. #define CS1_SW9 SW9_CS1
  449. #define CS2_SW9 SW9_CS2
  450. #define CS3_SW9 SW9_CS3
  451. #define CS4_SW9 SW9_CS4
  452. #define CS5_SW9 SW9_CS5
  453. #define CS6_SW9 SW9_CS6
  454. #define CS7_SW9 SW9_CS7
  455. #define CS8_SW9 SW9_CS8
  456. #define CS9_SW9 SW9_CS9
  457. #define CS10_SW9 SW9_CS10
  458. #define CS11_SW9 SW9_CS11
  459. #define CS12_SW9 SW9_CS12
  460. #define CS13_SW9 SW9_CS13
  461. #define CS14_SW9 SW9_CS14
  462. #define CS15_SW9 SW9_CS15
  463. #define CS16_SW9 SW9_CS16
  464. #define CS17_SW9 SW9_CS17
  465. #define CS18_SW9 SW9_CS18
  466. #define CS1_SW10 SW10_CS1
  467. #define CS2_SW10 SW10_CS2
  468. #define CS3_SW10 SW10_CS3
  469. #define CS4_SW10 SW10_CS4
  470. #define CS5_SW10 SW10_CS5
  471. #define CS6_SW10 SW10_CS6
  472. #define CS7_SW10 SW10_CS7
  473. #define CS8_SW10 SW10_CS8
  474. #define CS9_SW10 SW10_CS9
  475. #define CS10_SW10 SW10_CS10
  476. #define CS11_SW10 SW10_CS11
  477. #define CS12_SW10 SW10_CS12
  478. #define CS13_SW10 SW10_CS13
  479. #define CS14_SW10 SW10_CS14
  480. #define CS15_SW10 SW10_CS15
  481. #define CS16_SW10 SW10_CS16
  482. #define CS17_SW10 SW10_CS17
  483. #define CS18_SW10 SW10_CS18
  484. #define CS1_SW11 SW11_CS1
  485. #define CS2_SW11 SW11_CS2
  486. #define CS3_SW11 SW11_CS3
  487. #define CS4_SW11 SW11_CS4
  488. #define CS5_SW11 SW11_CS5
  489. #define CS6_SW11 SW11_CS6
  490. #define CS7_SW11 SW11_CS7
  491. #define CS8_SW11 SW11_CS8
  492. #define CS9_SW11 SW11_CS9
  493. #define CS10_SW11 SW11_CS10
  494. #define CS11_SW11 SW11_CS11
  495. #define CS12_SW11 SW11_CS12
  496. #define CS13_SW11 SW11_CS13
  497. #define CS14_SW11 SW11_CS14
  498. #define CS15_SW11 SW11_CS15
  499. #define CS16_SW11 SW11_CS16
  500. #define CS17_SW11 SW11_CS17
  501. #define CS18_SW11 SW11_CS18
  502. #define CS1_SW12 SW12_CS1
  503. #define CS2_SW12 SW12_CS2
  504. #define CS3_SW12 SW12_CS3
  505. #define CS4_SW12 SW12_CS4
  506. #define CS5_SW12 SW12_CS5
  507. #define CS6_SW12 SW12_CS6
  508. #define CS7_SW12 SW12_CS7
  509. #define CS8_SW12 SW12_CS8
  510. #define CS9_SW12 SW12_CS9
  511. #define CS10_SW12 SW12_CS10
  512. #define CS11_SW12 SW12_CS11
  513. #define CS12_SW12 SW12_CS12
  514. #define CS13_SW12 SW12_CS13
  515. #define CS14_SW12 SW12_CS14
  516. #define CS15_SW12 SW12_CS15
  517. #define CS16_SW12 SW12_CS16
  518. #define CS17_SW12 SW12_CS17
  519. #define CS18_SW12 SW12_CS18