C/C++ API Reference
Loading...
Searching...
No Matches
chre.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#include "pw_chre/host_link.h"
21
22namespace pw::chre {
23
25
30 uint64_t nano_app_id;
32 uint32_t message_type;
34 uint16_t host_endpoint;
36 const uint8_t* data;
38 size_t length;
39};
40
43void Init();
44
47void Deinit();
48
52
56
61
68
71void SetEstimatedHostTimeOffset(int64_t offset);
72
73} // namespace pw::chre
const void * MessageToApContext
Definition: host_link.h:27
uint64_t nano_app_id
The id of the nanoapp this message is sent to.
Definition: chre.h:30
uint16_t host_endpoint
The id of the host on the AP that sent this request.
Definition: chre.h:34
void Init()
void StopEventLoop()
size_t length
The size in bytes of the message data.
Definition: chre.h:38
void SetEstimatedHostTimeOffset(int64_t offset)
void FreeMessageToAp(MessageToApContext context)
void Deinit()
void RunEventLoop()
const uint8_t * data
The actual message data.
Definition: chre.h:36
void SendMessageToNanoapp(NanoappMessage message)
uint32_t message_type
The type of message this is.
Definition: chre.h:32
Definition: chre.h:28