1 /*
2  * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * Espressif private functions. Not for peripherals. Don't use it in your app.
9  */
10 
11 #include <stdint.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /**
18  * @brief Read internal register
19  *
20  * @param block     Block of the register
21  * @param host_id   Host of the register
22  * @param reg_add   Address of the register
23  * @return uint8_t  Register value
24  */
25 uint8_t esp_rom_regi2c_read(uint8_t block, uint8_t host_id, uint8_t reg_add);
26 
27 /**
28  * @brief Read internal register, in bits
29  *
30  * @param block     Block of the register
31  * @param host_id   Host of the register
32  * @param reg_add   Address of the register
33  * @param msb       MSB of the register
34  * @param lsb       LSB of the register
35  * @return uint8_t  Register value
36  */
37 uint8_t esp_rom_regi2c_read_mask(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t msb, uint8_t lsb);
38 
39 /**
40  * @brief Write internal register
41  *
42  * @param block     Block of the register
43  * @param host_id   Host of the register
44  * @param reg_add   Address of the register
45  * @param data      Value to write
46  */
47 void esp_rom_regi2c_write(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t data);
48 
49 /**
50  * @brief Write internal register, in bits
51  *
52  * @param block     Block of the register
53  * @param host_id   Host of the register
54  * @param reg_add   Address of the register
55  * @param msb       MSB of the register
56  * @param lsb       LSB of the register
57  * @param data      Value to write
58  */
59 void esp_rom_regi2c_write_mask(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t msb, uint8_t lsb, uint8_t data);
60 
61 #ifdef __cplusplus
62 }
63 #endif
64