C/C++ API Reference
Loading...
Searching...
No Matches
host_link.h
1// Copyright 2023 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14
15#pragma once
16
17#include <cstddef>
18#include <cstdint>
19
20// These host link functions should be implemented by the system integrator.
21namespace pw::chre {
22
24
27using MessageToApContext = const void*;
28
34 uint64_t nanoapp_id;
35
37 uint32_t message_type;
38
39 uint32_t app_permissions;
40 uint32_t message_permissions;
41
43 uint16_t host_endpoint;
44
49
52 const uint8_t* data;
53
55 size_t length;
56
60};
61
68
69} // namespace pw::chre
const void * MessageToApContext
Definition: host_link.h:27
const uint8_t * data
Definition: host_link.h:52
bool woke_host
Definition: host_link.h:48
uint16_t host_endpoint
The id of the client that this message should be delivered to on the host.
Definition: host_link.h:43
size_t length
The length of data in bytes.
Definition: host_link.h:55
uint64_t nanoapp_id
The id of the nanoapp sending the message.
Definition: host_link.h:34
MessageToApContext chre_context
Definition: host_link.h:59
uint32_t message_type
The type of the message.
Definition: host_link.h:37
bool SendMessageToAp(MessageToAp message)
Definition: host_link.h:32