Pigweed
C/C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
25using MessageToApContext = const void*;
26
32 uint64_t nanoapp_id;
33
35 uint32_t message_type;
36
37 uint32_t app_permissions;
38 uint32_t message_permissions;
39
41 uint16_t host_endpoint;
42
47
50 const uint8_t* data;
51
53 size_t length;
54
57 MessageToApContext chre_context;
58};
59
65bool SendMessageToAp(MessageToAp message);
66
67} // namespace pw::chre
Definition: host_link.h:30
const uint8_t * data
Definition: host_link.h:50
bool woke_host
Definition: host_link.h:46
uint16_t host_endpoint
The id of the client that this message should be delivered to on the host.
Definition: host_link.h:41
size_t length
The length of data in bytes.
Definition: host_link.h:53
uint64_t nanoapp_id
The id of the nanoapp sending the message.
Definition: host_link.h:32
MessageToApContext chre_context
Definition: host_link.h:57
uint32_t message_type
The type of the message.
Definition: host_link.h:35