Line data Source code
1 0 : /*
2 : * Copyright (c) 2025 Intel Corporation.
3 : *
4 : * SPDX-License-Identifier: Apache-2.0
5 : */
6 :
7 : #ifndef ZEPHYR_INCLUDE_DRIVERS_MFD_MC146818_H_
8 : #define ZEPHYR_INCLUDE_DRIVERS_MFD_MC146818_H_
9 :
10 : #ifdef __cplusplus
11 : extern "C" {
12 : #endif
13 :
14 : #include <zephyr/device.h>
15 :
16 : /**
17 : * @brief Read the value at the given offset in standard memory bank.
18 : *
19 : * @param dev mc146818 mfd device
20 : * @param offset memory offset to be read.
21 : * @retval value at the offset
22 : */
23 1 : uint8_t mfd_mc146818_std_read(const struct device *dev, uint8_t offset);
24 :
25 : /**
26 : * @brief Write the value at the given offset in standard memory bank.
27 : *
28 : * @param dev mc146818 mfd device
29 : * @param offset memory offset to be written.
30 : * @param value to be written at the offset
31 : */
32 1 : void mfd_mc146818_std_write(const struct device *dev, uint8_t offset, uint8_t value);
33 :
34 : /**
35 : * @brief Read the value at the given offset in extended memory bank.
36 : *
37 : * @param dev mc146818 mfd device
38 : * @param offset memory offset to be read.
39 : * @retval value at the offset
40 : */
41 1 : uint8_t mfd_mc146818_ext_read(const struct device *dev, uint8_t offset);
42 :
43 : /**
44 : * @brief Write the value at the given offset in extended memory bank.
45 : *
46 : * @param dev mc146818 mfd device
47 : * @param offset memory offset to be written.
48 : * @param value to be written at the offset
49 : */
50 1 : void mfd_mc146818_ext_write(const struct device *dev, uint8_t offset, uint8_t value);
51 :
52 : #ifdef __cplusplus
53 : }
54 : #endif
55 :
56 : #endif /* ZEPHYR_INCLUDE_DRIVERS_MFD_MC146818_H_ */
|