Table 9.2. Buttons Supported By swmgr
Buttons
Description
sw0
SW1
sw1
LCD_SW1
sw2
LCD_SW2
sw3
LCD_SW3
Specify the number of times to wait for an event in place of LOOP. Specify 0 for an unlimited number of times.
Specify the operation to execute when an event occurs in place of COMMAND.
9.3. swmgr Example
The following displays time information when SW1 is pressed.
[armadillo ~]# swmgr sw0 1 date
Figure 9.3. swmgr Example 1
The following turns LED3 on when LCD_SW1 is pressed and turns it off when LCD_SW2 is pressed.
[armadillo ~]# swmgr sw1 0 echo 1 > /sys/class/leds/red/brightness &
[armadillo ~]# swmgr sw2 0 echo 0 > /sys/class/leds/red/brightness &
Note: Execute the following command to stop the operations.
[armadillo ~]# killall swmgr
Figure 9.4. swmgr Example 2
Armadillo-440 LCD Model Development Set Startup Guide
Input Devices
58