You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added GPIO API
* Updated bundle
* Refereshed sensors and timers parameter table with a "type"
* Updated the expected output after flashing the Ocre runtime
* Added the ocre_runtime api, as well as re-organized the API structure in the references section.
* Minor formatting tweaks
Copy file name to clipboardExpand all lines: docs/reference/apis/container-api/gpio.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: GPIO
3
3
layout: default
4
-
parent: Container APIs
4
+
parent: Container
5
5
has_toc: false
6
6
---
7
7
@@ -439,4 +439,4 @@ int main() {
439
439
|[`ocre_gpio_pin_toggle`](#toggle-gpio-pin)| Toggles a GPIO pin state |`pin`: GPIO pin number |`0` on success, negative on error |`ENODEV`, `EINVAL`|
440
440
|[`ocre_gpio_register_callback`](#register-gpio-callback)| Registers callback for GPIO changes |`pin`: GPIO pin number<br/>`callback`: Callback function |`0` on success, negative on error |`ENODEV`, `EINVAL`|
441
441
|[`ocre_gpio_unregister_callback`](#unregister-gpio-callback)| Removes GPIO callback |`pin`: GPIO pin number |`0` on success, negative on error |`ENODEV`, `EINVAL`|
442
-
|[`get_pin_id`](#get-pin-id)| Calculates pin ID from port and pin |`port`: GPIO port number<br/>`pin`: Pin number within port | Pin ID or `-1` on invalid Pin | N/A |
442
+
|[`get_pin_id`](#get-pin-id)| Calculates pin ID from port and pin |`port`: GPIO port number<br/>`pin`: Pin number within port | Pin ID or `-1` on invalid Pin | N/A |
Container APIs provide direct interfaces for containers to efficiently interact with underlying system resources and capabilities. Designed with simplicity, security, and consistency in mind, these APIs follow well-defined patterns to facilitate ease of use and seamless integration.
10
+
11
+
---
12
+
13
+
## Available APIs
14
+
15
+
Below are the core APIs available for Ocre containers. Each API includes detailed documentation with usage examples, error handling patterns, and best practices.
16
+
17
+
### System Interaction
18
+
19
+
| API | Description |
20
+
|-----|-------------|
21
+
|**[GPIO](gpio)**| Control digital pins for input/output operations with hardware peripherals and external components |
22
+
|**[Sensors](sensors)**| Interface with hardware sensors for environmental and motion data |
23
+
|**[Timers](timers)**| Create and manage timed events with millisecond precision |
The sensor handle contains a unique ID, device name, and a reference to the underlying device structure. It is used to reference a specific sensor in all operations.
61
+
The sensor handle contains a unique `ID`, device name, and a reference to the underlying device structure. It is used to reference a specific sensor in all operations.
62
62
63
63
### Sensor Instance
64
64
@@ -169,8 +169,8 @@ ocre_sensors_status_t ocre_sensors_discover_sensors(ocre_sensor_t *sensors, int
169
169
170
170
| Name | Type | Description |
171
171
| ------ | ------ | ----------- |
172
-
|`sensors`|*ocre_sensor_t**| Pointer to the sensor list to store the discovered info about available sensors |
173
-
|`sensors_count`|*int**| Pointer to variable to store the number of discovered sensors |
172
+
|`sensors`|*ocre_sensor_t** | Pointer to the sensor list to store the discovered info about available sensors |
173
+
|`sensors_count`|*int** | Pointer to variable to store the number of discovered sensors |
This page provides an overview of the Application Programming Interfaces (APIs) available in the Ocre platform. These APIs allow developers to interact with various features of the Ocre runtime and create containerized applications.
11
+
12
+
---
13
+
14
+
## Overview
15
+
16
+
Ocre provides *two* primary categories of APIs:
17
+
18
+
1.**[Container APIs:](../apis/container-api)** APIs that are accessible from within containers and allow applications to interact with hardware, timers, and other system resources. These are designed for application developers building solutions that will run within Ocre containers.
19
+
20
+
2.**[Runtime API:](../apis/runtime-api)** The API for managing the Ocre runtime environment itself, including container lifecycle operations. The Runtime API is intended for system implementors and integrators looking to incorporate the Ocre runtime into their own solutions.
21
+
22
+
23
+
---
24
+
25
+
## Next Steps
26
+
27
+
Check out some of the the [Sample Applications](../../samples) for practical examples using these APIs
0 commit comments