TMF8829 Universal Driver 0.1.0
Loading...
Searching...
No Matches
tmf8829_types.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (c) 2026 tmf8829_universal_driver contributors
5 * Derived from ams-OSRAM TMF8829 reference drivers (MIT); adapted for portable multi-instance use.
6 */
7
15
16#ifndef TMF8829_TYPES_H
17#define TMF8829_TYPES_H
18
19#include <stddef.h>
20#include <stdint.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30struct tmf8829_driver;
31struct tmf8829_ops;
32
35
36/* ------------------------------------------------------------------ */
37/* Bus selection */
38/* ------------------------------------------------------------------ */
39
47
48/* ------------------------------------------------------------------ */
49/* Error / status codes */
50/* ------------------------------------------------------------------ */
51
71
72/* ------------------------------------------------------------------ */
73/* Logging */
74/* ------------------------------------------------------------------ */
75
93
94/* ------------------------------------------------------------------ */
95/* Compile-time configuration */
96/* ------------------------------------------------------------------ */
97
104#ifndef TMF8829_CLK_CORRECTION_PAIRS
105#define TMF8829_CLK_CORRECTION_PAIRS 4u
106#endif
107
115#ifndef TMF8829_MIN_BUFFER_SIZE
116#define TMF8829_MIN_BUFFER_SIZE 256u
117#endif
118
119#ifdef __cplusplus
120} /* extern "C" */
121#endif
122
123#endif /* TMF8829_TYPES_H */
One driver instance per physical TMF8829.
Definition tmf8829.h:139
Set of platform callbacks required by tmf8829_init.
Definition tmf8829_ops.h:90
tmf8829_bus
Physical bus used to reach this device instance.
Definition tmf8829_types.h:43
@ TMF8829_BUS_I2C
Definition tmf8829_types.h:44
@ TMF8829_BUS_SPI
Definition tmf8829_types.h:45
enum tmf8829_bus tmf8829_bus_t
Physical bus used to reach this device instance.
tmf8829_err
Return codes from public driver functions.
Definition tmf8829_types.h:61
@ TMF8829_E_NOT_IMPLEMENTED
Definition tmf8829_types.h:69
@ TMF8829_E_TIMEOUT
Definition tmf8829_types.h:65
@ TMF8829_E_PARAM
Definition tmf8829_types.h:63
@ TMF8829_E_NO_RESULT
Definition tmf8829_types.h:66
@ TMF8829_OK
Definition tmf8829_types.h:62
@ TMF8829_E_BUS
Definition tmf8829_types.h:64
@ TMF8829_E_BOOTLOADER
Definition tmf8829_types.h:67
@ TMF8829_E_STATE
Definition tmf8829_types.h:68
enum tmf8829_err tmf8829_err_t
Return codes from public driver functions.
struct tmf8829_driver tmf8829_driver_t
Definition tmf8829_types.h:33
tmf8829_log_level
Bit-mask log levels (ams-OSRAM compatible).
Definition tmf8829_types.h:82
@ TMF8829_LOG_INFO
Definition tmf8829_types.h:88
@ TMF8829_LOG_RESULTS_HEADER
Definition tmf8829_types.h:85
@ TMF8829_LOG_NONE
Definition tmf8829_types.h:83
@ TMF8829_LOG_VERBOSE
Definition tmf8829_types.h:89
@ TMF8829_LOG_ERROR
Definition tmf8829_types.h:84
@ TMF8829_LOG_RESULTS
Definition tmf8829_types.h:86
@ TMF8829_LOG_DEBUG
Definition tmf8829_types.h:91
@ TMF8829_LOG_BUS
Definition tmf8829_types.h:90
@ TMF8829_LOG_CLK_CORRECTION
Definition tmf8829_types.h:87
struct tmf8829_ops tmf8829_ops_t
Definition tmf8829_types.h:34