* @ingroup CAPI_SYSTEM_FRAMEWORK
* @defgroup CAPI_SYSTEM_PERIPHERAL_IO_MODULE Peripheral IO
* @brief The @ref CAPI_SYSTEM_PERIPHERAL_IO_MODULE API provides functions to make use of peripherals connected to the IoT device.
+ * @details The @ref CAPI_SYSTEM_PERIPHERAL_IO_MODULE API provides access to the low level device providers, including GPIO, I2C, PWM, ADC, UART and SPI.
*
* @section CAPI_SYSTEM_PERIPHERAL_IO_MODULE_HEADER Required Header
* \#include <peripheral_io.h>
* @ingroup CAPI_SYSTEM_PERIPHERAL_IO_MODULE
* @defgroup CAPI_SYSTEM_PERIPHERAL_IO_GPIO_MODULE GPIO
* @brief The @ref CAPI_SYSTEM_PERIPHERAL_IO_GPIO_MODULE API provides functions to control GPIO peripherals connected to the IoT device.
+ * @details The @ref CAPI_SYSTEM_PERIPHERAL_IO_GPIO_MODULE API provides functions to control GPIO peripherals connected to the IoT device.
*
* @section CAPI_SYSTEM_PERIPHERAL_IO_GPIO_MODULE_HEADER Required Header
* \#include <peripheral_io.h>
*
* This @ref CAPI_SYSTEM_PERIPHERAL_IO_GPIO_MODULE API provides functions to control GPIO peripherals connected to the IoT device.
*
- * @section CAPI_SYSTEM_PERIPHERAL_IO_GPIO_MODULE_FEATURE Realted Features
+ * @section CAPI_SYSTEM_PERIPHERAL_IO_GPIO_MODULE_FEATURE Related Features
*
* This API is related with the following feature:\n
* - http://tizen.org/feature/peripheral_io.gpio\n
* @ingroup CAPI_SYSTEM_PERIPHERAL_IO_MODULE
* @defgroup CAPI_SYSTEM_PERIPHERAL_IO_I2C_MODULE I2C
* @brief The @ref CAPI_SYSTEM_PERIPHERAL_IO_I2C_MODULE API provides functions to control I2C peripherals connected to the IoT device.
+ * @details The @ref CAPI_SYSTEM_PERIPHERAL_IO_I2C_MODULE API provides functions to control I2C peripherals connected to the IoT device.
*
* @section CAPI_SYSTEM_PERIPHERAL_IO_I2C_MODULE_HEADER Required Header
* \#include <peripheral_io.h>
*
* This @ref CAPI_SYSTEM_PERIPHERAL_IO_I2C_MODULE API provides functions to control I2C peripherals connected to the IoT device.
*
- * @section CAPI_SYSTEM_PERIPHERAL_IO_I2C_MODULE_FEATURE Realted Features
+ * @section CAPI_SYSTEM_PERIPHERAL_IO_I2C_MODULE_FEATURE Related Features
*
* This API is related with the following feature:\n
* - http://tizen.org/feature/peripheral_io.i2c\n
* @ingroup CAPI_SYSTEM_PERIPHERAL_IO_MODULE
* @defgroup CAPI_SYSTEM_PERIPHERAL_IO_SPI_MODULE SPI
* @brief The @ref CAPI_SYSTEM_PERIPHERAL_IO_SPI_MODULE API provides functions to control SPI peripherals connected to the IoT device.
+ * @details The @ref CAPI_SYSTEM_PERIPHERAL_IO_SPI_MODULE API provides functions to control SPI peripherals connected to the IoT device.
*
* @section CAPI_SYSTEM_PERIPHERAL_IO_SPI_MODULE_HEADER Required Header
* \#include <peripheral_io.h>
* @ingroup CAPI_SYSTEM_PERIPHERAL_IO_MODULE
* @defgroup CAPI_SYSTEM_PERIPHERAL_IO_UART_MODULE UART
* @brief The @ref CAPI_SYSTEM_PERIPHERAL_IO_UART_MODULE API provides functions to control UART peripherals connected to the IoT device.
+ * @details The @ref CAPI_SYSTEM_PERIPHERAL_IO_UART_MODULE API provides functions to control UART peripherals connected to the IoT device.
*
* @section CAPI_SYSTEM_PERIPHERAL_IO_UART_MODULE_HEADER Required Header
* \#include <peripheral_io.h>
* @ingroup CAPI_SYSTEM_PERIPHERAL_IO_MODULE
* @defgroup CAPI_SYSTEM_PERIPHERAL_IO_PWM_MODULE PWM
* @brief The @ref CAPI_SYSTEM_PERIPHERAL_IO_PWM_MODULE API provides functions to control PWM peripherals connected to the IoT device.
+ * @details The @ref CAPI_SYSTEM_PERIPHERAL_IO_PWM_MODULE API provides functions to control PWM peripherals connected to the IoT device.
*
* @section CAPI_SYSTEM_PERIPHERAL_IO_PWM_MODULE_HEADER Required Header
* \#include <peripheral_io.h>
* @ingroup CAPI_SYSTEM_PERIPHERAL_IO_MODULE
* @defgroup CAPI_SYSTEM_PERIPHERAL_IO_ADC_MODULE ADC
* @brief The @ref CAPI_SYSTEM_PERIPHERAL_IO_ADC_MODULE API provides functions to control ADC peripherals connected to the IoT device.
+ * @details The @ref CAPI_SYSTEM_PERIPHERAL_IO_ADC_MODULE API provides functions to control ADC peripherals connected to the IoT device.
*
* @section CAPI_SYSTEM_PERIPHERAL_IO_ADC_MODULE_HEADER Required Header
* \#include <peripheral_io.h>
/**
* @file peripheral_io.h
* @brief This file contains the public peripheral-io interface.
+ * @details Useful for controlling peripheral devices like sensors, servomotors and whatnot.
*/
/**
* @brief Enumeration for error codes returned by the peripheral-io API.
+ * @details Most peripheral-io API functions can return one of these codes to specify an error.
* @since_tizen 4.0
*/
typedef enum {
/**
* @brief Enumeration representing GPIO device direction options.
+ * @details Some interfaces require you to specify whether data goes in or out.
* @since_tizen 4.0
*/
typedef enum {
/**
* @brief Enumeration for edge types for the GPIO interrupt.
+ * @details Some interfaces require you to specify what kind of signal edge produces an interrupt.
* @since_tizen 4.0
*/
typedef enum {
/**
* @brief An opaque handle to an object representing a GPIO pin.
+ * @details A handle to a single GPIO pin, for use with most GPIO interfaces
* @since_tizen 4.0
*/
typedef struct _peripheral_gpio_s *peripheral_gpio_h;
/**
* @platform
* @brief Opens a GPIO pin and returns a handle representing it
+ * @details Starts the lifetime of the handle and allocates its needed resources.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Closes a GPIO pin and frees the resources associated with the handle
+ * @details This function should be called at the end of the object's lifetime to avoid a memleak.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the input/output direction of given GPIO pin.
+ * @details Sets whether data goes in or out on given GPIO pin.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the input edge mode of given GPIO pin device.
+ * @details Changes which kind of edge mode the GPIO pin is in.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the GPIO interrupted callback to be invoked when the GPIO interrupt is triggered.
+ * @details Sets the GPIO interrupted callback to be invoked when the GPIO interrupt is triggered.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Unsets the GPIO interrupted callback invoked when the GPIO interrupt is triggered.
+ * @details Unsets the GPIO interrupted callback invoked when the GPIO interrupt is triggered.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Gets the current value being exposed on the GPIO pin.
+ * @details Reads data from the GPIO pin to the specified address.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the value to be exposed on the given GPIO pin.
+ * @details Writes data into the GPIO pin from the specified address.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @brief An opaque handle representing the I2C slave device.
+ * @details A handle to a single I2C slave device, for use with most I2C slave interfaces
* @since_tizen 4.0
*/
typedef struct _peripheral_i2c_s *peripheral_i2c_h;
/**
* @platform
* @brief Opens an I2C slave device and returns a handle representing it
+ * @details Starts the lifetime of the handle and allocates its needed resources.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
* @brief Enumeration for open flags (bitmask) for an i2c device.
* @since_tizen 6.5
*
- * @remarks Enum values are supposed to be used as bitmask, where only one
+ * @details Enum values are supposed to be used as bitmask, where only one
* value can be specified for following flag groups:
* - locking mode - either #PERIPHERAL_OPEN_FLAGS_PRIVATE or #PERIPHERAL_OPEN_FLAGS_SHARED can be used
*
/**
* @platform
* @brief Opens an I2C slave device and returns a representing handle
+ * @details Starts the lifetime of the handle and allocates its needed resources.
* @since_tizen 6.5
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Closes an I2C slave device and frees resources associated with the handle.
+ * @details This function should be called at the end of the object's lifetime to avoid a memleak.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Reads the bytes data from the I2C slave device into a buffer
+ * @details Reads the bytes data from the I2C slave device into a buffer
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Writes the bytes data from a buffer to the I2C slave device.
+ * @details Writes the bytes data from a buffer to the I2C slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Reads single byte data from the register of the I2C slave device.
+ * @details Reads single byte data from the register of the I2C slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Writes single byte data to the register of the I2C slave device.
+ * @details Writes single byte data to the register of the I2C slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Reads word data from the register of the I2C slave device.
+ * @details Reads word data from the register of the I2C slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Writes word data to the register of the I2C slave device.
+ * @details Writes word data to the register of the I2C slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @brief An opaque handle representing a PWM peripherals pin.
+ * @details A handle to a single PWM peripherals pin, for use with most PWM interfaces
* @since_tizen 4.0
*/
typedef struct _peripheral_pwm_s *peripheral_pwm_h;
/**
* @brief Enumeration for representing PWN active signal Polarity.
+ * @details Controls whether an active PWM signal has high or low/inversed polarity.
* @since_tizen 4.0
*/
typedef enum {
/**
* @platform
* @brief Opens the PWM pin and returns a handle representing it
+ * @details Starts the lifetime of the handle and allocates its needed resources.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Closes a PWM pin and frees resources associated with the handle.
+ * @details This function should be called at the end of the object's lifetime to avoid a memleak.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the period length in nanoseconds for the given PWM pin.
+ * @details Sets the period length in nanoseconds for the given PWM pin.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the length of a duty cycle of the given PWM pin.
+ * @details Sets the length of a duty cycle of the given PWM pin.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the active signal polarity of the given PWM pin.
+ * @details Sets the active signal polarity of the given PWM pin.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Toggles whether given PWM peripherals pin is enabled.
+ * @details Toggles whether given PWM peripherals pin is enabled.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @brief An opaque handle representing an ADC peripherals pin.
+ * @details A handle to a single ADC pin, for use with most ADC interfaces
* @since_tizen 5.0
*/
typedef struct _peripheral_adc_s *peripheral_adc_h;
/**
* @platform
* @brief Opens the ADC pin and returns a handle representing it
+ * @details Starts the lifetime of the handle and allocates its needed resources.
* @since_tizen 5.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Closes the ADC pin and frees the resources associated with it.
+ * @details This function should be called at the end of the object's lifetime to avoid a memleak.
* @since_tizen 5.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Gets the current value of the ADC peripherals pin.
+ * @details Gets the current value of the ADC peripherals pin.
* @since_tizen 5.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @brief An opaque handle representing a UART peripherals device.
+ * @details A handle to a single UART slave device, for use with most UART peripherals interfaces
* @since_tizen 4.0
*/
typedef struct _peripheral_uart_s *peripheral_uart_h;
/**
* @brief Enumeration for signal baud rate for UART slave devices.
+ * @details Controls the baud rate, i.e. signals per second on a UART device
* @since_tizen 4.0
*/
typedef enum {
/**
* @brief Enumeration for data byte size for UART slave devices.
+ * @details Controls how many bits per byte are there for data, on UART slave devices.
* @since_tizen 4.0
*/
typedef enum {
/**
* @brief Enumeration for parity bit for UART slave devices.
+ * @details Controls whether parity is even, odd, or none for UART devices
* @since_tizen 4.0
*/
typedef enum {
/**
* @brief Enumeration for the number of stop bits for UART slave devices.
+ * @details Controls whether there is one or two stop bits for UART devices
* @since_tizen 4.0
*/
typedef enum {
/**
* @brief Enumeration for hardware flow control for UART slave devices.
+ * @details Controls details of the hardware flow control on UART devices
* @since_tizen 4.0
*/
typedef enum {
/**
* @brief Enumeration for software flow control for UART slave devices.
+ * @details Controls details of the software flow control on UART devices
* @since_tizen 4.0
*/
typedef enum {
/**
* @platform
* @brief Opens the UART slave device and returns a handle representing it
+ * @details Starts the lifetime of the handle and allocates its needed resources.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Opens the UART slave device using specified open flags, and returns a handle representing it
+ * @details Starts the lifetime of the handle and allocates its needed resources.
* @since_tizen 6.5
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Closes the UART slave device and frees resources associated with the handle.
+ * @details This function should be called at the end of the object's lifetime to avoid a memleak.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the baud rate for the given UART slave device.
+ * @details Sets the baud rate for the given UART slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets data byte size for the given UART slave device.
+ * @details Sets data byte size for the given UART slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the parity bit for the given UART slave device.
+ * @details Sets the parity bit for the given UART slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the number of stop bits for the UART slave device.
+ * @details Sets the number of stop bits for the UART slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets hardware and software flow control of the UART slave device.
+ * @details Sets hardware and software flow control of the UART slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Reads data from the UART slave device into a local buffer.
+ * @details Reads data from the UART slave device into a local buffer.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Discards data queued for writing to UART slave device, but not yet transmitted.
+ * @details Discards data queued for writing to UART slave device, but not yet transmitted.
* @since_tizen 8.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Waits for all data queued for UART to be transmitted.
+ * @details Waits for all data queued for UART to be transmitted.
* @since_tizen 8.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Writes data from a buffer to the UART slave device.
+ * @details Writes data from a buffer to the UART slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @brief An opaque handle representing a SPI peripherals slave device.
+ * @details A handle to a single SPI slave device, for use with most SPI interfaces
* @since_tizen 4.0
*/
typedef struct _peripheral_spi_s *peripheral_spi_h;
/**
* @brief Enumeration of transfer modes for SPI slave devices.
+ * @details Use this to control CPOL and CPHa modes on the device.
* @since_tizen 4.0
*/
typedef enum {
/**
* @brief Enumeration of bit orders for SPI slave device interfaces.
+ * @details Sets whether the most or the least significant bit goes first
* @since_tizen 4.0
*/
typedef enum {
/**
* @platform
* @brief Opens a SPI slave device and returns a handle representing it.
+ * @details Starts the lifetime of the handle and allocates its needed resources.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Closes the SPI slave device and frees resources associated with the handle.
+ * @details This function should be called at the end of the object's lifetime to avoid a memleak.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the transfer mode for the given SPI slave device.
+ * @details Sets the transfer mode for the given SPI slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the transfer bit order for given SPI slave device.
+ * @details Sets the transfer bit order for given SPI slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the number of bits per word for given SPI slave device.
+ * @details Sets the number of bits per word for given SPI slave device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Sets the board-dependent frequency of the SPI bus.
+ * @details Sets the frequency, in hertz, if the board supports it
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Reads the bytes data from the SPI slave device to a local buffer.
+ * @details Receives data into the specified buffer from the device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Writes the bytes data buffer to the SPI slave device.
+ * @details Puts data from the specified buffer unto the device.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio
/**
* @platform
* @brief Exchanges (read and write) the bytes data to the SPI slave device.
+ * @details Performs data switcheroo. Essentially a combined write and read call.
* @since_tizen 4.0
* @privlevel platform
* @privilege http://tizen.org/privilege/peripheralio