Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
fake.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
11
12#ifndef ZEPHYR_INCLUDE_DRIVERS_REGULATOR_FAKE_H_
13#define ZEPHYR_INCLUDE_DRIVERS_REGULATOR_FAKE_H_
14
16#include <zephyr/fff.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
39
41DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_enable, const struct device *);
43DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_disable, const struct device *);
45DECLARE_FAKE_VALUE_FUNC(unsigned int, regulator_fake_count_voltages,
46 const struct device *);
48DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_list_voltage, const struct device *,
49 unsigned int, int32_t *);
51DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_set_voltage, const struct device *,
54DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_get_voltage, const struct device *,
55 int32_t *);
57DECLARE_FAKE_VALUE_FUNC(unsigned int, regulator_fake_count_current_limits, const struct device *);
59DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_list_current_limit, const struct device *, unsigned int,
60 int32_t *);
62DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_set_current_limit,
63 const struct device *, int32_t, int32_t);
65DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_get_current_limit,
66 const struct device *, int32_t *);
68DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_set_mode, const struct device *,
71DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_get_mode, const struct device *,
74DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_set_active_discharge, const struct device *,
75 bool);
77DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_get_active_discharge, const struct device *,
78 bool *);
80DECLARE_FAKE_VALUE_FUNC(int, regulator_fake_get_error_flags,
81 const struct device *, regulator_error_flags_t *);
82
84DECLARE_FAKE_VALUE_FUNC(int, regulator_parent_fake_dvs_state_set,
85 const struct device *, regulator_dvs_state_t);
87DECLARE_FAKE_VALUE_FUNC(int, regulator_parent_fake_ship_mode,
88 const struct device *);
89
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif /* ZEPHYR_INCLUDE_DRIVERS_REGULATOR_FAKE_H_ */
#define DECLARE_FAKE_VALUE_FUNC(...)
Definition fff.h:8684
uint8_t regulator_mode_t
Opaque type to store regulator modes.
Definition regulator.h:52
uint8_t regulator_error_flags_t
Opaque bit map for regulator error flags (see REGULATOR_ERRORS).
Definition regulator.h:55
uint8_t regulator_dvs_state_t
Opaque type to store regulator DVS states.
Definition regulator.h:49
Main header file for regulator driver API.
__INT32_TYPE__ int32_t
Definition stdint.h:74
Runtime device structure (in ROM) per driver instance.
Definition device.h:543