Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_ds28e17.h
1 #ifndef _BC_DS28E17_H
2 #define _BC_DS28E17_H
3 
4 #include <bc_onewire.h>
5 #include <bc_gpio.h>
6 #include <bc_i2c.h>
7 
11 
13 
14 typedef struct
15 {
16  uint64_t _device_number;
17  bc_gpio_channel_t _channel;
18 
19 } bc_ds28e17_t;
20 
25 
26 void bc_ds28e17_init(bc_ds28e17_t *self, bc_gpio_channel_t channel, uint64_t device_number);
27 
30 
32 
35 
37 
40 
42 
46 
48 
54 
55 bool bc_ds28e17_write(bc_ds28e17_t *self, const bc_i2c_transfer_t *transfer);
56 
62 
63 bool bc_ds28e17_read(bc_ds28e17_t *self, const bc_i2c_transfer_t *transfer);
64 
70 
72 
78 
80 
82 
83 #endif // _BC_DS28E17_H
I2C transfer parameters.
Definition: bc_i2c.h:42
void bc_ds28e17_deinit(bc_ds28e17_t *self)
Deinitialize DS28E17.
Definition: bc_ds28e17.c:27
bool bc_ds28e17_set_speed(bc_ds28e17_t *self, bc_i2c_speed_t speed)
Set I2C speed.
Definition: bc_ds28e17.c:37
bool bc_ds28e17_read(bc_ds28e17_t *self, const bc_i2c_transfer_t *transfer)
Read from I2C.
Definition: bc_ds28e17.c:73
uint64_t bc_ds28e17_get_device_number(bc_ds28e17_t *self)
Get Device number.
Definition: bc_ds28e17.c:32
void bc_ds28e17_init(bc_ds28e17_t *self, bc_gpio_channel_t channel, uint64_t device_number)
Initialize DS28E17.
Definition: bc_ds28e17.c:14
bool bc_ds28e17_enable_sleep_mode(bc_ds28e17_t *self)
Enable Sleep Mode.
DS28E17 instance.
Definition: bc_ds28e17.h:14
I2C memory transfer parameters.
Definition: bc_i2c.h:57
bool bc_ds28e17_write(bc_ds28e17_t *self, const bc_i2c_transfer_t *transfer)
Write to I2C.
Definition: bc_ds28e17.c:62
bc_gpio_channel_t
GPIO channels.
Definition: bc_gpio.h:12
bc_i2c_speed_t
I2C communication speed.
Definition: bc_i2c.h:30
bool bc_ds28e17_memory_write(bc_ds28e17_t *self, const bc_i2c_memory_transfer_t *transfer)
Memory write to I2C.
Definition: bc_ds28e17.c:84
bool bc_ds28e17_memory_read(bc_ds28e17_t *self, const bc_i2c_memory_transfer_t *transfer)
Memory read from I2C.
Definition: bc_ds28e17.c:109