ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_mdl_service.h File Reference

Public integration contract for the ESP32-C6 media RPC component. More...

#include <stddef.h>
#include <stdint.h>
#include "esp_err.h"
Include dependency graph for ra8_mdl_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint32_t ra8_mdl_service_component_abi (void)
 Return the linked first-party media component ABI version.
esp_err_t esp_hosted_custom_rpc_sync_handler (uint32_t message_id, const uint8_t *request, size_t request_len, uint8_t *response, size_t response_cap, size_t *response_len)
 Handle one synchronous ESP-hosted CustomRpc media operation.

Detailed Description

Public integration contract for the ESP32-C6 media RPC component.

Tag
[Ring 4 / PAL] {World: NS}

The pinned ESP-hosted patch calls the synchronous hook by its upstream ABI name. The first-party build script also verifies the component marker as a strong text symbol after link. Publishing both declarations here makes those externally linked entry points explicit; neither is a module-private helper and neither may be renamed to the priv_ vocabulary.

Definition in file ra8_mdl_service.h.

Function Documentation

◆ esp_hosted_custom_rpc_sync_handler()

esp_err_t esp_hosted_custom_rpc_sync_handler ( uint32_t message_id,
const uint8_t * request,
size_t request_len,
uint8_t * response,
size_t response_cap,
size_t * response_len )

Handle one synchronous ESP-hosted CustomRpc media operation.

Dispatches a bounded generated-protobuf request through the first-party media service on ESP-hosted's serialized control path.

Parameters
[in]message_idStable media RPC operation identifier.
[in]requestPacked generated inner protobuf.
[in]request_lenValid bytes in request.
[out]responseCaller-owned inner protobuf response buffer.
[in]response_capCapacity of response.
[out]response_lenPacked response byte count.
Returns
ESP-IDF status for the patched ESP-hosted dispatcher.
Return values
ESP_OKA valid inner response was produced.
ESP_FAILComponent initialisation or dispatch failed.
Precondition
ESP-hosted invokes the hook on its serialized control path.
Request and response spans are valid and do not overlap.
Postcondition
Success sets response_len no greater than response_cap.
Failure does not claim a successful CustomRpc response.
Note
Not thread-safe outside the serialized ESP-hosted control task.
Since
0.1.0

Handle one synchronous ESP-hosted CustomRpc media operation.

The hook runs on ESP-hosted's serialized control path. It returns a fully packed inner protobuf in caller-owned storage; the patched upstream handler immediately wraps those bytes in its generated CustomRpc response.

Parameters
[in]message_idStable media RPC operation identifier.
[in]requestPacked generated inner protobuf.
[in]request_lenValid request bytes.
[out]responseCaller-owned inner response buffer.
[in]response_capCapacity of response.
[out]response_lenPacked response bytes.
Returns
ESP-hosted hook status.
Return values
ESP_OKA valid inner response was produced.
ESP_FAILComponent or one-time backend initialisation failed.
ESP_ERR_NOT_SUPPORTEDThe operation is not owned by the media service.
ESP_ERR_INVALID_ARGA request argument or pointer was invalid.
ESP_ERR_INVALID_STATEThe media service is busy or inactive.
ESP_ERR_INVALID_SIZEA bounded request or response extent was rejected.
ESP_ERR_INVALID_RESPONSEThe inner protobuf or response was invalid.
Precondition
ESP-hosted invokes the hook on its serialized control path.
Request/response spans are valid and do not overlap.
Postcondition
Success sets response_len within response_cap.
Failure does not claim a successful CustomRpc response.
Note
Not thread-safe outside the serialized ESP-hosted control task.
Warning
The concrete ESP-IDF HTTP/TLS adapter remains a heap exception.
Since
0.1.0

Definition at line 759 of file mdl_service.c.

References ESP_ERR_INVALID_ARG, ESP_ERR_NOT_SUPPORTED, ESP_FAIL, internal_mdl_http_begin(), internal_mdl_http_cancel(), internal_mdl_http_init(), internal_mdl_http_read(), internal_mdl_to_esp_status(), k_ra8_mdl_rpc_cancel, k_ra8_mdl_rpc_next, k_ra8_mdl_rpc_start, k_ra8_ok, ra8_mdl_service_dispatch(), ra8_mdl_service_init(), s_component_abi, s_http, s_initialised, and s_service.

◆ ra8_mdl_service_component_abi()

uint32_t ra8_mdl_service_component_abi ( void )

Return the linked first-party media component ABI version.

The post-link build assertion requires this exact strong symbol.

Returns
Stable positive ABI version checked by the component itself.
Return values
1First version of the concrete media service component.
Precondition
The first-party component object is strongly linked into the image.
The upstream weak fallback has not replaced this component.
Postcondition
No global or peripheral state is modified.
Repeated calls return the same version for one image.
Note
Thread-safe and allocation-free.
Since
0.1.0

Definition at line 75 of file mdl_service.c.