{
  "actions": {
    "case(os)": {
      "linux": [
        {
          "command": [
            "sh",
            "-c",
            "./postfetch"
          ],
          "type": "post-fetch"
        }
      ]
    }
  },
  "authors": [
    "Philip Munts"
  ],
  "available": {
    "case(os)": {
      "...": false,
      "linux": true
    }
  },
  "description": "Linux Simple I/O Library",
  "licenses": "BSD-1-Clause",
  "long-description": "Introduction\n============\n\nThis crate provides an Ada binding to the [Linux Simple I/O\nLibrary](https://github.com/pmunts/libsimpleio), *aka* **libsimpleio**.\n\n*Note: This crate includes all of the functionality of the **`mcp2221`**\nand **`remoteio`** crates. Unlike those two crates, which can be built\nfor and used on Linux, MacOS, or Windows targets, this crate can only be\nbuilt for and used on Linux targets.*\n\nLinux Simple I/O Library\n========================\n\n**libsimpleio** is an attempt to encapsulate (as much as possible) the\nugliness of Linux I/O device access. It provides services for the\nfollowing types of I/O devices:\n\n-   [Industrial I/O\n    Subsystem](https://wiki.analog.com/software/linux/docs/iio/iio) A/D\n    (Analog to Digital) Converter Devices\n-   [Industrial I/O\n    Subsystem](https://wiki.analog.com/software/linux/docs/iio/iio) D/A\n    (Digital to Analog) Converter Devices\n-   GPIO (General Purpose Input/Output) Pins\n-   Raw HID (Human Interface Device) Devices\n-   I2C (Inter-Integrated Circuit) Bus Devices\n-   PWM (Pulse Width Modulated) Output Devices\n-   [Remote I/O\n    Protocol](http://git.munts.com/libsimpleio/doc/RemoteIOProtocol.pdf)\n    Devices\n-   Serial Ports\n-   SPI (Serial Peripheral Interface) Bus Devices\n-   [Stream Framing\n    Protocol](http://git.munts.com/libsimpleio/doc/StreamFramingProtocol.pdf)\n    Devices\n-   TCP and UDP over IPv4 Network Devices\n-   Watchdog Timer Devices\n\n**libsimpleio** exports a small number of C wrapper or shim functions.\nThese shim functions present a more coherent API (Application\nProgramming Interface) than Linux kernel **`ioctl()`** services and the\nmyriad other different Linux device I/O API's. The **libsimpleio** shim\nfunctions are designed to be easily called from Ada, C++, C#, Java,\nFree Pascal and other programming languages.\n\nThe **`man`** pages specifying the **libsimpleio** API (Application\nProgramming Interface) are available for viewing at\n<http://git.munts.com/libsimpleio/doc/libsimpleio.html>.\n\nAda Binding for the Linux Simple I/O Library\n============================================\n\nThe Ada binding consists of several software component layers.\n\nThe bottom software component layer consists of the **C shim functions**\ndiscussed in the previous section.\n\nThe next software component layer consists of **binding packages** that\ndeclare the C shim functions as Ada procedures. Each of the binding\npackages corresponds to a single C source file (*e.g.* package\n**`libadc`** corresponds to **`libadc.c`**). Each of the C shim\nfunctions are declared as external Ada procedures using\n**`pragma Import`**. The Ada procedure names do not necessarily match\nthe C function names (*e.g.* the C function **`ADC_Open()`** is declared\nas Ada procedure **`libadc.Open`**). Many of the binding packages also\ndeclare constants as well (*e.g.* **`DIRECTION_INPUT`** in\n**`libgpio.ads`**).\n\nWith very few exceptions, you will never need to directly call any of\nthe procedures nor reference any of the constants declared in the\n**`libxxx`** binding packages.\n\nThe next software component layer consists of **object packages** that\ndeclare OOP (Object Oriented Programming) object types and methods for\neach of the I/O subsystems. This layer uses Ada interface types,\naccess-to-interface types, and private tagged records extensively.\n\nFor example, the package **`GPIO`** defines an interface type\n**`PinInterface`**, an access to **`PinInterface`** type named\n**`Pin`**, and primitive operation subprograms **`Get`** and **`Put`**.\n\nThe child package **`GPIO.libsimpleio`** declares a private tagged\nrecord type **`PinSubclass`** that *implements* **`GPIO.PinInterface`**,\nsubprograms **`Get`** and **`Put`** that are required to implement\n**`GPIO.PinInterface`**, and a constructor function **`Create`** that\nreturns an **`GPIO.Pin`** access value.\n\nEvery package that implements **`GPIO.PinInterface`** will also declare\na constructor function **`Create`** that returns **`GPIO.Pin`**.\n\nThis architecture allows code similar to the following fragment:\n\n    MyPins : array (1 .. 3) of GPIO.pin;\n\n    GPIO(1) := GPIO.libsimpleio.Create(...);\n    GPIO(2) := GPIO.UserLED.Create(...);\n    GPIO(3) := GPIO.PWM.Create(...);\n\nThe three GPIO pins can be stored in the same array and manipulated in\nexactly the same manner even though the hardware implementation for each\npin is radically different.\n\nThe topmost software component layer consists of **device packages**\nthat implement support for particular I/O devices and are built upon the\nlower layers. Most of the device packages correspond to integrated\ncircuits, such as the [PCA9534 I2C GPIO\nExpander](https://www.nxp.com/products/interfaces/ic-spi-serial-interface-devices/ic-general-purpose-i-o/8-bit-ic-bus-and-smbus-low-power-i-o-port-with-interrupt:PCA9534).\nA few implement support for boards or modules, such the [Grove\nTemperature\nSensor](https://www.seeedstudio.com/Grove-Temperature-Sensor.html)\nmodule.\n",
  "maintainers": [
    "Philip Munts <phil@munts.net>"
  ],
  "maintainers-logins": [
    "pmunts"
  ],
  "name": "libsimpleio",
  "origin": {
    "hashes": [
      "sha256:1fa62ea09be1a4f0ce42a00e356bf831187bd9b188a927b4ab3a5d656f5c99c2",
      "sha512:0dd5ac73e404c6499757315e117454b95ad388b70620f34cae0df3d35f5e335f83461346bc039a0e3912443c17c707f25621390e8b777d7798b62dd83185ebe7"
    ],
    "url": "https://raw.githubusercontent.com/pmunts/alire-crates/e042dc6ee4223693310e1af3afa99ad80e4fa313/libsimpleio/libsimpleio-2.22364.1.tbz2"
  },
  "project-files": [
    "libsimpleio.gpr"
  ],
  "tags": [
    "embedded",
    "linux",
    "libsimpleio",
    "remoteio",
    "beaglebone",
    "pocketbeagle",
    "raspberrypi",
    "raspberry",
    "pi",
    "adc",
    "dac",
    "gpio",
    "hid",
    "i2c",
    "motor",
    "pwm",
    "sensor",
    "serial",
    "servo",
    "spi",
    "stepper",
    "watchdog"
  ],
  "version": "2.22364.1",
  "website": "https://github.com/pmunts/libsimpleio"
}
