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 CanBusA CAN network interface, opened through Hardware.openCan(String).
class CanFrameOne classic CAN frame: an identifier and up to eight data bytes.
interface GpioListenerReceives edge events from a GpioPin that was opened as an input with edge detection.
class GpioPinA claimed GPIO line, opened through Hardware.openGpioOutput(String, int, boolean) or Hardware.openGpioInput(String, int, int, int).
class HardwareEntry 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 HardwareExceptionThrown 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 I2cDeviceA device on an I2C bus, opened through Hardware.openI2c(int, int).
class PwmChannelA hardware PWM channel, opened through Hardware.openPwm(int, int).
class SerialPortA serial port in raw mode, opened through Hardware.openSerial(String, int, int, int, int).
class SpiDeviceA device on an SPI bus, opened through Hardware.openSpi(int, int, int, int, int).
class WatchdogThe hardware watchdog, opened through Hardware.openWatchdog(int).