NHAL Interface v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
nhal_i2c_master.h
Go to the documentation of this file.
1
16#ifndef NHAL_I2C_MASTER_H
17#define NHAL_I2C_MASTER_H
18
19#include <stdint.h>
20#include <stddef.h>
21
22#include "nhal_common.h"
23#include "nhal_i2c_types.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33
35 struct nhal_i2c_context *ctx,
36 nhal_i2c_address dev_address,
37 const uint8_t *data, size_t len
38);
39
41 struct nhal_i2c_context *ctx,
42 nhal_i2c_address dev_address,
43 uint8_t *data, size_t len
44);
45
47 struct nhal_i2c_context *ctx,
48 nhal_i2c_address dev_address,
49 const uint8_t *reg_address, size_t reg_len,
50 uint8_t *data, size_t data_len
51);
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif
nhal_result_t
Unified HAL result type for all peripheral operations.
Definition nhal_common.h:22
nhal_result_t nhal_i2c_master_set_config(struct nhal_i2c_context *ctx, struct nhal_i2c_config *config)
nhal_result_t nhal_i2c_master_read(struct nhal_i2c_context *ctx, nhal_i2c_address dev_address, uint8_t *data, size_t len)
nhal_result_t nhal_i2c_master_get_config(struct nhal_i2c_context *ctx, struct nhal_i2c_config *config)
nhal_result_t nhal_i2c_master_write(struct nhal_i2c_context *ctx, nhal_i2c_address dev_address, const uint8_t *data, size_t len)
nhal_result_t nhal_i2c_master_write_read_reg(struct nhal_i2c_context *ctx, nhal_i2c_address dev_address, const uint8_t *reg_address, size_t reg_len, uint8_t *data, size_t data_len)
nhal_result_t nhal_i2c_master_init(struct nhal_i2c_context *ctx)
nhal_result_t nhal_i2c_master_deinit(struct nhal_i2c_context *ctx)
Defines common types and structures for the I2C Hardware Abstraction Layer (HAL).
uint16_t nhal_i2c_address
Base I2C context - always present, minimal footprint.