Buttons on Tachyon
Typically, a Qualcomm Snapdragon processor supports multiple buttons for system control. However, as part of Particle's design, we've consolidated all button functionalities into one button, using a combination of software and hardware techniques.
The button is primarily controlled by a system controller, which is a microcontroller that interprets the button presses. When the system is running, the button is visible to the Linux processor and can be used to control different features like suspend-resume, low-power mode, and even trigger custom actions through Linux.
This button functions through the ButtonIO feature set in Linux, which allows for various interactions like tap recognition and action execution.
Button Functionality
The Tachyon board has a single button (label 18) located next to the primary LED. This button controls various device states and provides the following functionalities:
Button Action | Result |
---|---|
Quick Press (from power down mode aka red led) | The device powers on, and the LED flashes green as Linux boots. |
Hold for 3 seconds (from operating mode) | The device immediately shuts down, disconnecting power and returning to power off mode. |
Hold for 3 seconds (from power off mode) | The device enters programming mode after 3 seconds and the LED flashes yellow. |
Quick Press (from operating mode) | The device sends a message to suspend the device. Weston or Gnome3 respond to this and turn the LCD off. |
Quick Press (again from low-power mode) | The device wakes up and resumes operation. Again, supported by Weston / Gnome3 |
User-Space Custom Actions
The button can be customized in Linux to detect multiple taps (e.g., double, triple, or quadruple taps). Once configured, each tap pattern can trigger custom scripts.
For example, you could configure the button to:
- Triple Tap → Toggle the Wi-Fi hotspot on or off.
- Double Tap → Trigger a custom action like switching between power modes.
This functionality is highly flexible and can be tailored to suit the needs of different applications.