71 #define MAX6956_ADDRESS 0x40 // See table 3
72 #define MAX6956_DEFAULT_ADDRESS 0x40 // AD0 and AD1 at ground.
76 #define MAX6956_RA_NO_OP 0x00
102 #define MAX6956_RA_GLOBAL_CURRENT 0x02
137 #define MAX6956_RA_CONFIGURATION 0x04
152 #define MAX6956_RA_TRANSITION_DETECT 0x06
165 #define MAX6956_RA_DISPLAY_TEST 0x07
203 #define MAX6956_RA_CONFIG_P7P6P5P4 0x09
204 #define MAX6956_RA_CONFIG_P11P10P9P8 0x0A
205 #define MAX6956_RA_CONFIG_P15P14P13P12 0x0B
206 #define MAX6956_RA_CONFIG_P19P18P17P16 0x0C
207 #define MAX6956_RA_CONFIG_P23P22P21P20 0x0D
208 #define MAX6956_RA_CONFIG_P27P26P25P24 0x0E
209 #define MAX6956_RA_CONFIG_P31P30P29P28 0x0F
241 #define MAX6956_RA_CURRENT_0xP5P4 0x12
242 #define MAX6956_RA_CURRENT_0xP7P6 0x13
243 #define MAX6956_RA_CURRENT_0xP9P8 0x14
244 #define MAX6956_RA_CURRENT_0xP11P10 0x15
245 #define MAX6956_RA_CURRENT_0xP13P12 0x16
246 #define MAX6956_RA_CURRENT_0xP15P14 0x17
247 #define MAX6956_RA_CURRENT_0xP17P16 0x18
248 #define MAX6956_RA_CURRENT_0xP19P18 0x19
249 #define MAX6956_RA_CURRENT_0xP21P20 0x1A
250 #define MAX6956_RA_CURRENT_0xP23P22 0x1B
251 #define MAX6956_RA_CURRENT_0xP25P24 0x1C
252 #define MAX6956_RA_CURRENT_0xP27P26 0x1D
253 #define MAX6956_RA_CURRENT_0xP29P28 0x1E
254 #define MAX6956_RA_CURRENT_0xP31P30 0x1F
262 #define MAX6956_RA_PORT0 0x20
263 #define MAX6956_RA_PORT1 0x21
264 #define MAX6956_RA_PORT2 0x22
265 #define MAX6956_RA_PORT3 0x23
267 #define MAX6956_RA_PORT4 0x24
268 #define MAX6956_RA_PORT5 0x25
269 #define MAX6956_RA_PORT6 0x26
270 #define MAX6956_RA_PORT7 0x27
271 #define MAX6956_RA_PORT8 0x28
272 #define MAX6956_RA_PORT9 0x29
273 #define MAX6956_RA_PORT10 0x2A
274 #define MAX6956_RA_PORT11 0x2B
276 #define MAX6956_RA_PORT12 0x2C
277 #define MAX6956_RA_PORT13 0x2D
278 #define MAX6956_RA_PORT14 0x2E
279 #define MAX6956_RA_PORT15 0x2F
280 #define MAX6956_RA_PORT16 0x30
281 #define MAX6956_RA_PORT17 0x31
282 #define MAX6956_RA_PORT18 0x32
283 #define MAX6956_RA_PORT19 0x33
285 #define MAX6956_RA_PORT20 0x34
286 #define MAX6956_RA_PORT21 0x35
287 #define MAX6956_RA_PORT22 0x36
288 #define MAX6956_RA_PORT23 0x37
289 #define MAX6956_RA_PORT24 0x38
290 #define MAX6956_RA_PORT25 0x39
291 #define MAX6956_RA_PORT26 0x3A
292 #define MAX6956_RA_PORT27 0x3B
294 #define MAX6956_RA_PORT28 0x3C
295 #define MAX6956_RA_PORT29 0x3D
296 #define MAX6956_RA_PORT30 0x3E
297 #define MAX6956_RA_PORT31 0x3F
301 #define MAX6956_RA_PORTS4_7 0x40
302 #define MAX6956_RA_PORTS4_8 0x41
303 #define MAX6956_RA_PORTS4_9 0x42
304 #define MAX6956_RA_PORTS4_10 0x43
309 #define MAX6956_RA_PORTS4_11 0x44
310 #define MAX6956_RA_PORTS5_12 0x45
311 #define MAX6956_RA_PORTS6_13 0x46
312 #define MAX6956_RA_PORTS7_14 0x47
313 #define MAX6956_RA_PORTS8_15 0x48
314 #define MAX6956_RA_PORTS9_16 0x49
315 #define MAX6956_RA_PORTS10_17 0x4A
316 #define MAX6956_RA_PORTS11_18 0x4B
317 #define MAX6956_RA_PORTS12_19 0x4C
318 #define MAX6956_RA_PORTS13_20 0x4D
319 #define MAX6956_RA_PORTS14_21 0x4E
320 #define MAX6956_RA_PORTS15_22 0x4F
321 #define MAX6956_RA_PORTS16_23 0x50
322 #define MAX6956_RA_PORTS17_24 0x51
323 #define MAX6956_RA_PORTS18_25 0x52
324 #define MAX6956_RA_PORTS19_26 0x53
325 #define MAX6956_RA_PORTS20_27 0x54
326 #define MAX6956_RA_PORTS21_28 0x55
327 #define MAX6956_RA_PORTS22_29 0x56
328 #define MAX6956_RA_PORTS23_30 0x57
329 #define MAX6956_RA_PORTS24_31 0x58
333 #define MAX6956_RA_PORTS25_31 0x59
334 #define MAX6956_RA_PORTS26_31 0x5A
335 #define MAX6956_RA_PORTS27_31 0x5B
336 #define MAX6956_RA_PORTS28_31 0x5C
337 #define MAX6956_RA_PORTS29_31 0x5D
338 #define MAX6956_RA_PORTS30_31 0x5E
339 #define MAX6956_RA_PORTS31_31 0x5F
343 #define MAX6956_CONFIG_POWER_BIT 0
344 #define MAX6956_CONFIG_GLOBAL_CURRENT_BIT 6
345 #define MAX6956_CONFIG_TRANSITION_BIT 7
347 #define MAX6956_GLOBAL_CURRENT_BIT 0
348 #define MAX6956_GLOBAL_CURRENT_LENGTH 4
350 #define MAX6956_PORT12_CURRENT_BIT 3
351 #define MAX6956_PORT12_CURRENT_LENGTH 4
352 #define MAX6956_PORT13_CURRENT_BIT 7
353 #define MAX6956_PORT13_CURRENT_LENGTH 4
354 #define MAX6956_PORT14_CURRENT_BIT 3
355 #define MAX6956_PORT14_CURRENT_LENGTH 4
356 #define MAX6956_PORT15_CURRENT_BIT 7
357 #define MAX6956_PORT15_CURRENT_LENGTH 4
358 #define MAX6956_PORT16_CURRENT_BIT 3
359 #define MAX6956_PORT16_CURRENT_LENGTH 4
360 #define MAX6956_PORT17_CURRENT_BIT 7
361 #define MAX6956_PORT17_CURRENT_LENGTH 4
362 #define MAX6956_PORT18_CURRENT_BIT 3
363 #define MAX6956_PORT18_CURRENT_LENGTH 4
364 #define MAX6956_PORT19_CURRENT_BIT 7
365 #define MAX6956_PORT19_CURRENT_LENGTH 4
366 #define MAX6956_PORT23_CURRENT_BIT 3
367 #define MAX6956_PORT23_CURRENT_LENGTH 4
368 #define MAX6956_PORT21_CURRENT_BIT 7
369 #define MAX6956_PORT21_CURRENT_LENGTH 4
370 #define MAX6956_PORT22_CURRENT_BIT 3
371 #define MAX6956_PORT22_CURRENT_LENGTH 4
372 #define MAX6956_PORT23_CURRENT_BIT 7
373 #define MAX6956_PORT23_CURRENT_LENGTH 4
374 #define MAX6956_PORT24_CURRENT_BIT 3
375 #define MAX6956_PORT24_CURRENT_LENGTH 4
376 #define MAX6956_PORT25_CURRENT_BIT 7
377 #define MAX6956_PORT25_CURRENT_LENGTH 4
378 #define MAX6956_PORT26_CURRENT_BIT 3
379 #define MAX6956_PORT26_CURRENT_LENGTH 4
380 #define MAX6956_PORT27_CURRENT_BIT 7
381 #define MAX6956_PORT27_CURRENT_LENGTH 4
382 #define MAX6956_PORT28_CURRENT_BIT 3
383 #define MAX6956_PORT28_CURRENT_LENGTH 4
384 #define MAX6956_PORT29_CURRENT_BIT 7
385 #define MAX6956_PORT29_CURRENT_LENGTH 4
386 #define MAX6956_PORT33_CURRENT_BIT 3
387 #define MAX6956_PORT33_CURRENT_LENGTH 4
388 #define MAX6956_PORT31_CURRENT_BIT 7
389 #define MAX6956_PORT31_CURRENT_LENGTH 4
391 #define MAX6956_DISPLAY_TEST_BIT 0
393 #define MAX6956_TRANSITION_STATUS_BIT 7
394 #define MAX6956_TRANSITION_MASK_BIT 0
395 #define MAX6956_TRANSITION_MASK_LENGTH 7
396 #define MAX6956_TRANSITION_MASK_PORT30_BIT 6
397 #define MAX6956_TRANSITION_MASK_PORT29_BIT 5
398 #define MAX6956_TRANSITION_MASK_PORT28_BIT 4
399 #define MAX6956_TRANSITION_MASK_PORT27_BIT 3
400 #define MAX6956_TRANSITION_MASK_PORT26_BIT 2
401 #define MAX6956_TRANSITION_MASK_PORT25_BIT 1
402 #define MAX6956_TRANSITION_MASK_PORT24_BIT 0
406 #define MAX6956_OUTPUT_LED 0x00
407 #define MAX6956_OUTPUT_GPIO 0x01
408 #define MAX6956_INPUT_WO_PULL 0x02
409 #define MAX6956_INPUT_W_PULL 0x03
411 #define MAX6956_OFF 0x00
412 #define MAX6956_ON 0x01
414 #define MAX6956_CURRENT_0 0x00
415 #define MAX6956_CURRENT_1 0x01
416 #define MAX6956_CURRENT_2 0x02
417 #define MAX6956_CURRENT_3 0x03
418 #define MAX6956_CURRENT_4 0x04
419 #define MAX6956_CURRENT_5 0x05
420 #define MAX6956_CURRENT_6 0x06
421 #define MAX6956_CURRENT_7 0x07
422 #define MAX6956_CURRENT_8 0x08
423 #define MAX6956_CURRENT_9 0x09
424 #define MAX6956_CURRENT_10 0x0A
425 #define MAX6956_CURRENT_11 0x0B
426 #define MAX6956_CURRENT_12 0x0C
427 #define MAX6956_CURRENT_13 0x0D
428 #define MAX6956_CURRENT_14 0x0E
429 #define MAX6956_CURRENT_15 0x0F
494 void configPorts(uint8_t lower, uint8_t upper, uint8_t portConfig);
uint8_t devAddr
Holds the current device address.
uint8_t portCurrentRA
Holder for port current register.
uint8_t psArrayIndex
array index
bool getEnableTransitionDetection()
bool getEnableIndividualCurrent()
void setPower(bool power)
void configPort(uint8_t port, uint8_t portConfig)
void setAllPortsCurrent(uint8_t power)
0-15, 0 = min brightness (not off) 15 = max
void configPorts(uint8_t lower, uint8_t upper, uint8_t portConfig)
uint8_t getGlobalCurrent()
uint8_t psBitPosition
bit position
void setConfigReg(uint8_t config)
void configAllPorts(uint8_t portConfig)
void setEnableTransitionDetection(bool transition)
void setEnableIndividualCurrent(bool global)
void setPortCurrent(uint8_t port, uint8_t power)
0-15 brightness levels.
uint8_t portCurrentBit
Holder for the current bit offset.
void setPortLevel(uint8_t port, uint8_t power)
0 = off, 1-15 brightness levels.
uint8_t buffer[1]
Buffer for reading data from the device.
void setGlobalCurrent(uint8_t current)
void setTestMode(bool test)
uint8_t portConfig
Holder for port config bit pair.
void setInputMask(uint8_t mask)