Firmware SDK
twr_ds2484

Driver for DS2484 Single-Channel 1-Wire Master. More...

Macros

#define TWR_DS2484_STATUS_1WB   (1<<0)
 Callback events.
 
#define TWR_DS2484_STATUS_PPD   (1<<1)
 
#define TWR_DS2484_STATUS_SD   (1<<2)
 
#define TWR_DS2484_STATUS_LL   (1<<3)
 
#define TWR_DS2484_STATUS_RST   (1<<4)
 
#define TWR_DS2484_STATUS_SBR   (1<<5)
 
#define TWR_DS2484_STATUS_TSB   (1<<6)
 
#define TWR_DS2484_STATUS_DIR   (1<<7)
 

Typedefs

typedef struct twr_ds2484_t twr_ds2484_t
 TMP112 instance.
 

Functions

bool twr_ds2484_init (twr_ds2484_t *self, twr_i2c_channel_t i2c_channel)
 Initialize DS2484. More...
 
void twr_ds2484_set_slpz_handler (twr_ds2484_t *self, bool(*handler)(void *, bool), void *handler_ctx)
 
void twr_ds2484_enable (twr_ds2484_t *self)
 Enable DS2484. More...
 
void twr_ds2484_disable (twr_ds2484_t *self)
 Disable DS2484. More...
 
bool twr_ds2484_reset (twr_ds2484_t *self)
 Reset the 1-Wire bus and return the presence of any device. More...
 
bool twr_ds2484_busy_wait (twr_ds2484_t *self)
 Wait until not busy. More...
 
bool twr_ds2484_write_byte (twr_ds2484_t *self, const uint8_t byte)
 
bool twr_ds2484_read_byte (twr_ds2484_t *self, uint8_t *byte)
 
bool twr_ds2484_read_bit (twr_ds2484_t *self, uint8_t *bit)
 
bool twr_ds2484_triplet (twr_ds2484_t *self, const uint8_t direction)
 
bool twr_ds2484_is_ready (twr_ds2484_t *self)
 
uint8_t twr_ds2484_status_get (twr_ds2484_t *self)
 
bool twr_ds2484_is_present (twr_ds2484_t *self)
 

Detailed Description

Driver for DS2484 Single-Channel 1-Wire Master.

Function Documentation

◆ twr_ds2484_busy_wait()

bool twr_ds2484_busy_wait ( twr_ds2484_t self)

Wait until not busy.

Parameters
[in]selfInstance

Definition at line 125 of file twr_ds2484.c.

Referenced by twr_ds2484_disable(), and twr_ds2484_reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ twr_ds2484_disable()

void twr_ds2484_disable ( twr_ds2484_t self)

Disable DS2484.

Parameters
[in]selfInstance

Definition at line 90 of file twr_ds2484.c.

Here is the call graph for this function:

◆ twr_ds2484_enable()

void twr_ds2484_enable ( twr_ds2484_t self)

Enable DS2484.

Parameters
[in]selfInstance

Definition at line 59 of file twr_ds2484.c.

Here is the call graph for this function:

◆ twr_ds2484_init()

bool twr_ds2484_init ( twr_ds2484_t self,
twr_i2c_channel_t  i2c_channel 
)

Initialize DS2484.

Parameters
[in]selfInstance
[in]i2c_channelI2C channel

Definition at line 40 of file twr_ds2484.c.

Here is the call graph for this function:

◆ twr_ds2484_reset()

bool twr_ds2484_reset ( twr_ds2484_t self)

Reset the 1-Wire bus and return the presence of any device.

Parameters
[in]selfInstance

Definition at line 102 of file twr_ds2484.c.

Here is the call graph for this function: