Pigweed
 
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
28 uint64_t nano_app_id;
30 uint32_t message_type;
32 uint16_t host_endpoint;
34 const uint8_t* data;
36 size_t length;
37};
38
41void Init();
42
45void Deinit();
46
49void RunEventLoop();
50
53void StopEventLoop();
54
58void SendMessageToNanoapp(NanoappMessage message);
59
65void FreeMessageToAp(MessageToApContext context);
66
69void SetEstimatedHostTimeOffset(int64_t offset);
70
71} // namespace pw::chre
Definition: chre.h:26
uint64_t nano_app_id
The id of the nanoapp this message is sent to.
Definition: chre.h:28
uint16_t host_endpoint
The id of the host on the AP that sent this request.
Definition: chre.h:32
size_t length
The size in bytes of the message data.
Definition: chre.h:36
const uint8_t * data
The actual message data.
Definition: chre.h:34
uint32_t message_type
The type of message this is.
Definition: chre.h:30