Tizen Peripheral I/O Native API
Tizen IoT provides the Peripheral I/O APIs for IoT devices to control peripherals, such as sensors and actuators, using industry-standard protocols and interfaces:
- GPIO (General-Purpose Input/Output)
- PWM (Pulse-Width Modulation)
- SPI (Serial Peripheral Interface)
- I2C (Inter-Integrated Circuit)
- UART (Universal Asynchronous Receiver-Transmitter)
Since each peripheral supports different interfaces and protocols, you must check from the peripheral’s specifications whether a specific protocol is supported. Peripheral I/O APIs are categorized based on the protocol.
Figure: Peripherals connected to an IoT device
The following table lists the supported protocols for the Tizen IoT hardware targets.
Table: Protocols supported by the Tizen IoT hardware targets
|Protocol||Raspberry Pi 3 and Raspberry Pi 4|
The following figures illustrate the pinout information for the Tizen IoT hardware targets.
Figure: Raspberry Pi 3 and Raspberry Pi 4 pinout
To use the Peripheral I/O API, the application has to request permission by adding the following platform privilege to the
<privileges> <privilege>http://tizen.org/privilege/peripheralio</privilege> </privileges>
To obtain authorization to use platform-level privileges, the application must be signed with a platform-level distributor certificate. Create a certificate profile for signing the application:
To open the Certificate Manager, in the Tizen Studio menu, go to Tools > Certificate Manager.
To add a new certificate profile for signing your application, click + in the Certificate Manager and enter a profile name.
Select Create a new author certificate and click Next.
Enter the key file name, author name, password, and password again. If you want to provide more information for the certificate, enter the details after unfolding the More details section.
Select Use the default Tizen distributor certificate and the Platform privilege level, and click Finish.
The new platform-level certificate is created and shown in the Certificate Manager.
To use the functions and data types of the Peripheral I/O API, include the
<peripheral_io.h>header file in your application: