Client and backend. Every class listed here is shared: the same code is compiled into your app and into your server. The package's page in the client API lists all of it, including any classes that exist only in the app.
package com.codename1.hardware
Buses and pins of embedded devices: GPIO lines (GpioPin,
GpioListener), I2C (I2cDevice), SPI (SpiDevice), serial ports
(SerialPort), PWM (PwmChannel), CAN (CanBus, CanFrame), the
hardware watchdog (Watchdog) and backlight brightness.
Hardware.getInstance() is the entry point. Ports without hardware access
report every feature as unsupported, so an application written against this
package also runs on phones, desktops and the simulator.
Types
class CanBus | A CAN network interface, opened through Hardware.openCan(String). |
class CanFrame | One classic CAN frame: an identifier and up to eight data bytes. |
interface GpioListener | Receives edge events from a GpioPin that was opened as an input with edge detection. |
class GpioPin | A claimed GPIO line, opened through Hardware.openGpioOutput(String, int, boolean) or Hardware.openGpioInput(String, int, int, int). |
class Hardware | Entry point to the buses and pins of the device the application runs on: GPIO lines, I2C, SPI, serial ports, PWM, CAN, the hardware watchdog and the display backlight. |
class HardwareException | Thrown when a hardware bus or pin cannot be opened or an I/O operation on it fails: the device node is absent, the process lacks permission for it, the line is already claimed, or the peripheral did not acknowledge. |
class I2cDevice | A device on an I2C bus, opened through Hardware.openI2c(int, int). |
class PwmChannel | A hardware PWM channel, opened through Hardware.openPwm(int, int). |
class SerialPort | A serial port in raw mode, opened through Hardware.openSerial(String, int, int, int, int). |
class SpiDevice | A device on an SPI bus, opened through Hardware.openSpi(int, int, int, int, int). |
class Watchdog | The hardware watchdog, opened through Hardware.openWatchdog(int). |