HT16K33 Class: Difference between revisions

Jump to navigation Jump to search
Line 149: Line 149:


=== GetComPortRegister(port, com) ===
=== GetComPortRegister(port, com) ===
Return register address.
Considering 2 output port with eight output each. named '''A''' and '''B'''. Port '''A''' will manage output '''1...8''' regarding of the Common selected. Port '''B''' will drive output '''9-16''' in the same way.<br />
* port : '''A''' or '''B'''. Allow to choose witch range of output will be affected.
* com : Register Number [1...8]
Except for development or debugging and knowing what you are doing, there is no reason to invoke this method directly. It is a system method internal to the operation of the driver.
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
Line 157: Line 162:
>>> MODULE_HT16K33 = FGINT1.getModule('HT16K33')
>>> MODULE_HT16K33 = FGINT1.getModule('HT16K33')
>>> LEDPACK2 = MODULE_HT16K33('LEDPACK2', '0x71', 0)
>>> LEDPACK2 = MODULE_HT16K33('LEDPACK2', '0x71', 0)
>>> print(hex(LEDPACK2.GetComPortRegister('A', 1)))
0x0
>>> print(hex(LEDPACK2.GetComPortRegister('A', 2)))
0x2
>>> print(hex(LEDPACK2.GetComPortRegister('B', 4)))
0x7
>>> print(hex(LEDPACK2.GetComPortRegister('B', 1)))
0x1
>>>
>>>
</syntaxhighlight>
</syntaxhighlight>
534

edits

Navigation menu