10 Sample Applications
Linux Software Developers Kit (SDK) User Guide
59
Figure 10-8. Serial-To-Ethernet GPIO Setup Screen
cpm (CP Manager)
The Configurable Pin Manager (cpm) provides shell level access to the device’s GPIO pins. It
also provides an example of how to use the libcp API to communicate with the CP GPIO driver.
To use CPs as GPIO, you have to configure the kernel. (see
CONFIG_LTRX_CPM_DEFAULT_GPIO of Appendix A
Important Configuration Switches
The cpm.conf configuration file is used to group CPs into bit patterns. Note that the MatchPort AR
has seven GPIO pins, whereas the XPort Pro has three of which 2 are shared with the serial
driver. The cpm.conf file is of the following format:
config cp<num[1-7]> {
type <output|input>
# direction
state <enable|disable> # pin assign
inverted <enable|disable>
# active low or high
}
group <name> {
type <output|input>
# direction
state <enable|disable> # group status
bit<num[0-31]> CP<num[1-7]>
# CP pin assign
}
Below is an example configuration file for creating a group called LED to control output for CP1 to
CP4
NOTE:
The XPort Pro supports only 3 GPIO pins.
[cpm.conf]
config cp1 {
type output
state enable
invert disable