-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path12_i2c.h
26 lines (14 loc) · 980 Bytes
/
12_i2c.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
int write_to_i2c(const char* i2c_dev_node_path,int i2c_dev_address,int i2c_dev_reg_addr, unsigned char i2c_val_to_write, _Bool force);
int write_to_i2c_word(const char* i2c_dev_node_path,int i2c_dev_address,int i2c_dev_reg_addr, unsigned short i2c_val_to_write, _Bool force);
int read_from_i2c(const char* i2c_dev_node_path,int i2c_dev_address,int i2c_dev_reg_addr, char* value, _Bool force);
int read_from_i2c_command(const char* i2c_dev_node_path,int i2c_dev_address, char* value, _Bool force);
int write_to_i2c_command(const char* i2c_dev_node_path,int i2c_dev_address,int i2c_dev_command, _Bool force);
int write_to_i2c_buffer(const char* i2c_dev_node_path,int i2c_dev_address,int i2c_dev_reg_addr,const unsigned char *buffer, int len, _Bool force);
int read_to_i2c_buffer(const char* i2c_dev_node_path,int i2c_dev_address,int i2c_dev_reg_addr,unsigned char *buffer, _Bool force);
#ifdef __cplusplus
}
#endif