Push Buttons¶
The MitySOM-QC6940 Devkit has five push buttons with both dedicated and configurable general purpose functions. Several buttons will generate input events. Several of the buttons are configured to generate key press events that can readily be integrated with C/C++ or Python programs, in addition to the evtest command line utility.
Force USB Boot¶
- The Force USB Boot button (S11), is configured as a GPIO with the label "ForceUSBBoot" after boot.
- If you run
gpiomon ForceUSBBootand press the button you will see output similar to the following:985.868895091 rising "ForceUSBBoot" 985.987862852 falling "ForceUSBBoot"
- If you run
- Holding down the Force USB Boot and Power buttons simultaneously will put the SOM into QDL mode.
Power¶
- The Power button (S2) can be used to turn the SOM on and off. To power on the SOM, hold it down for 400 ms. To power off the SOM, hold it down for about 10 seconds.
- It generates key press events with the keycode KEY_POWER
Volume Up¶
- The Volume Up button (S3) generates key press events with the keycode KEY_VOLUMEUP.
- It is registered with the gpio-keys driver
- Note: The Rev 1 and Rev 2 development kits have a hardware issue regarding this button and it will not work.
Volume Down¶
- The Volume Down button (S4) generates key press events with the keycode KEY_VOLUMEDOWN.
- Hold the button down during boot in order to enter Fastboot mode.
- Volume Down is also the "RESIN" input.
Home¶
- The Home button (S12) generates key press events with the keycode KEY_HOME.
- It is registered with the gpio-keys driver
- Note: This button is not working in BSP 1.0 Release. It will be resolved in BSP 1.1.
Key press events¶
For buttons that generate key press events, these events can be read from /dev/input/event devices as input_event structs defined here.
The following table shows which button corresponds to which event device.
The gpio-keys device (/dev/input/event1) will produce events from all buttons registered to the gpio-keys driver.
| Button | Device | Notes |
|---|---|---|
| Vol Down | /dev/input/event3 | |
| Vol Up | /dev/input/event1 | The Rev 1 and Rev 2 development kits have a hardware issue regarding this button and it will not work. |
| Power | /dev/input/event2 | |
| Home | /dev/input/event1 | This button is not working in BSP 1.0 Release. It will be resolved in BSP 1.1. |
Go to top