.scanlinesmapping Property

Function:

Defines the list of up to eight I/O lines that will serve as scan lines of the matrix keypad.

Type:

String

Value Range:

Up to eight comma-separated I/O line numbers can be listed (default = "").

See Also:

Connecting Matrix Keypads, Connecting Binary Keypads, Preparing the Keypad for Operation, kp.returnlinesmapping


Details

This property should contain a comma-separated list of I/O line numbers, for example: "28, 30, 31." The line numbers correspond to those of the pl_io_num enum, which is platform-specific. The declarations for pl_io_num can be found in the "Platform-Dependent Constants" section of your device's platform documentation (for example, the EM1000's is here).

The kp.scanlinesmapping string should only contain a list of decimal numbers. That is, use "28" and not "28 — PL_IO_NUM_28." Only numerical characters are processed anyway — writing "28 — PL_IO_NUM_28,30 — PL_IO_NUM_30" will set this property to "28,30." You can, of course, use the following way as well:

kp.scanlinesmapping = str(28- PL_IO_NUM_28)+","+str(30-PL_IO_NUM_30)

The order in which you list the scan lines does matter — this is the order in which the lines will be numbered. The order of scan lines listed in this property directly influences the formation of key codes.

On platforms with output buffer control, all intended scan lines should be configured as outputs (see io.num and io.enabled).

This property can only be changed when the keypad is disabled (kp.enabled = 0 — NO). Setting the property to "" means that the keypad will have no scan lines, which is also a valid keypad configuration.

The scan lines of the keypad should be separate from the return lines (see kp.returnlinesmapping). The keypad will not work properly if you designate any I/O line as both a scan line and a return line.

The scan lines are only required if you are working with a matrix keypad.


.scanlinesmapping Property

Details