Firmware SDK
twr_ds28e17.h
1 #ifndef _TWR_DS28E17_H
2 #define _TWR_DS28E17_H
3 
4 #include <twr_onewire.h>
5 #include <twr_i2c.h>
6 
10 
12 
13 typedef struct
14 {
15  uint64_t _device_number;
16  twr_onewire_t *_onewire;
17 
19 
24 
25 void twr_ds28e17_init(twr_ds28e17_t *self, twr_onewire_t *onewire, uint64_t device_number);
26 
29 
31 
34 
36 
39 
41 
45 
47 
53 
54 bool twr_ds28e17_write(twr_ds28e17_t *self, const twr_i2c_transfer_t *transfer);
55 
61 
62 bool twr_ds28e17_read(twr_ds28e17_t *self, const twr_i2c_transfer_t *transfer);
63 
69 
71 
77 
79 
81 
82 #endif // _TWR_DS28E17_H
bool twr_ds28e17_write(twr_ds28e17_t *self, const twr_i2c_transfer_t *transfer)
Write to I2C.
Definition: twr_ds28e17.c:60
bool twr_ds28e17_memory_read(twr_ds28e17_t *self, const twr_i2c_memory_transfer_t *transfer)
Memory read from I2C.
Definition: twr_ds28e17.c:107
void twr_ds28e17_deinit(twr_ds28e17_t *self)
Deinitialize DS28E17.
Definition: twr_ds28e17.c:25
bool twr_ds28e17_memory_write(twr_ds28e17_t *self, const twr_i2c_memory_transfer_t *transfer)
Memory write to I2C.
Definition: twr_ds28e17.c:82
bool twr_ds28e17_set_speed(twr_ds28e17_t *self, twr_i2c_speed_t speed)
Set I2C speed.
Definition: twr_ds28e17.c:35
void twr_ds28e17_init(twr_ds28e17_t *self, twr_onewire_t *onewire, uint64_t device_number)
Initialize DS28E17.
Definition: twr_ds28e17.c:14
bool twr_ds28e17_read(twr_ds28e17_t *self, const twr_i2c_transfer_t *transfer)
Read from I2C.
Definition: twr_ds28e17.c:71
uint64_t twr_ds28e17_get_device_number(twr_ds28e17_t *self)
Get Device number.
Definition: twr_ds28e17.c:30
bool twr_ds28e17_enable_sleep_mode(twr_ds28e17_t *self)
Enable Sleep Mode.
twr_i2c_speed_t
I2C communication speed.
Definition: twr_i2c.h:31
struct twr_onewire_t twr_onewire_t
1-Wire instance
Definition: twr_onewire.h:14
DS28E17 instance.
Definition: twr_ds28e17.h:14
I2C memory transfer parameters.
Definition: twr_i2c.h:58
I2C transfer parameters.
Definition: twr_i2c.h:43