KymoCore/Documentation
v8.0.0 Stable⌄
Versions8.0.0 Current
GitHub ↗
KYMOCORE / API REFERENCE

kymo_core_watch.h Source File

API contracts in their original English. Navigation and guides are bilingual.
Go to the documentation of this file.
1/* SPDX-License-Identifier: MIT */
9#ifndef KYMO_CORE_WATCH_H
10#define KYMO_CORE_WATCH_H
11#include "kymo_types.h"
12#if KYMO_EFFECTIVE_WATCH || defined(DOXYGEN)
13
14#ifdef __cplusplus
15extern "C"
16{
17#endif
18
25#define KYMO_WATCH_BUILD_ID_MAX 20u
26
33#define KYMO_WATCH_MAX_RANGES 4u
34
42#define KYMO_WATCH_FRAME_MAX_SIZE (11u + KYMO_WATCH_BUILD_ID_MAX + (8u * KYMO_WATCH_MAX_RANGES))
43
52 typedef struct
53 {
55 uint32_t startAddress;
56
58 uint32_t sizeBytes;
60
75 typedef uint8_t (*KymoWatchReadFn)(void *pContext, uint32_t address, uint8_t sizeBytes,
76 uint8_t *pOutputAv);
77
83 typedef struct
84 {
87
90
93
95 size_t rangeCount;
96
98 const uint8_t *pBuildIdAv;
99
102
105
107 uint8_t lastChannel;
109#if KYMO_EFFECTIVE_CORE || defined(DOXYGEN)
110
121
122#endif
123#ifdef __cplusplus
124}
125#endif
126#endif
127#endif
uint8_t(*) KymoWatchReadFn(void *pContext, uint32_t address, uint8_t sizeBytes, uint8_t *pOutputAv)
Optional memory reader.
KymoStatus KymoCoreWatch_init(const KymoCoreWatchConfig *pConfig)
Initialize watch and activate its processing in Core Main.
Status codes and callback types shared by every KymoCore module.
uint8_t KymoStatus
Result of a KymoCore operation.
Definition kymo_types.h:40
Application configuration for watch.
uint8_t lastChannel
Last reserved DATA channel, inclusive.
size_t rangeCount
Number of allowed ranges, 1..KYMO_WATCH_MAX_RANGES.
void * pReadContext
Read callback context.
const KymoWatchRange * pRangesAv
Persistent allowed address ranges.
KymoWatchReadFn readValueCbk
Optional safe reader; NULL uses direct device-address reads.
size_t buildIdSizeBytes
Build identifier size, at most KYMO_WATCH_BUILD_ID_MAX.
uint8_t firstChannel
First reserved DATA channel, inclusive.
const uint8_t * pBuildIdAv
Persistent build identifier bytes.
One memory range the host may read.
uint32_t sizeBytes
Number of readable bytes from start.
uint32_t startAddress
First readable address.