AT24MAC unique ID chip

Device driver interface for the AT24MAC I2C chip. More...

Detailed Description

Device driver interface for the AT24MAC I2C chip.

Files

file  at24mac_params.h
 Default configuration for the AT24MAC chip.
 
file  at24mac.h
 

Data Structures

struct  at24mac_params_t
 struct holding all params needed for device communication More...
 

Macros

#define AT24MAC_ID_LEN   (16)
 Length of ID128.
 

Typedefs

typedef uint_fast8_t at24mac_t
 Device handle type for AT24Mac devices.
 

Enumerations

enum  at24mac_type_t { AT24MAC4XX, AT24MAC6XX }
 Type of the AT24Mac device. More...
 

Functions

int at24mac_get_eui48 (at24mac_t dev, eui48_t *addr)
 Get the unique EUI48 address from a AT24MAC4xx chip. More...
 
int at24mac_get_eui64 (at24mac_t dev, eui64_t *addr)
 Get the unique EUI64 address from a AT24MAC6xx chip. More...
 
int at24mac_get_id128 (at24mac_t dev, void *dst)
 Get the unique ID from a AT24MACxxx chip. More...
 
at24mac_type_t at24mac_get_type (at24mac_t dev)
 Get the type of a AT24MACxxx chip. More...
 

Enumeration Type Documentation

◆ at24mac_type_t

Type of the AT24Mac device.

Enumerator
AT24MAC4XX 

provides EUI-48

AT24MAC6XX 

provides EUI-64

Definition at line 42 of file at24mac.h.

Function Documentation

◆ at24mac_get_eui48()

int at24mac_get_eui48 ( at24mac_t  dev,
eui48_t addr 
)

Get the unique EUI48 address from a AT24MAC4xx chip.

Parameters
[in]devIndex of the AT24Mac chip in the at24mac_params array.
[out]addrmemory location to copy the address into.
Returns
0 on success, error otherwise.

◆ at24mac_get_eui64()

int at24mac_get_eui64 ( at24mac_t  dev,
eui64_t addr 
)

Get the unique EUI64 address from a AT24MAC6xx chip.

Parameters
[in]devIndex of the AT24Mac chip in the at24mac_params array.
[out]addrmemory location to copy the address into.
Returns
0 on success, error otherwise.

◆ at24mac_get_id128()

int at24mac_get_id128 ( at24mac_t  dev,
void *  dst 
)

Get the unique ID from a AT24MACxxx chip.

Parameters
[in]devIndex of the AT24MAC chip in the at24mac_params array.
[out]dstmemory location to copy the ID into. Must be able to hold at least AT24MAC_ID_LEN bytes.
Returns
0 on success, error otherwise.

◆ at24mac_get_type()

at24mac_type_t at24mac_get_type ( at24mac_t  dev)

Get the type of a AT24MACxxx chip.

Parameters
[in]devIndex of the AT24MAC chip in the at24mac_params array.
Returns
The type of the device (AT24MAC4XX or AT24MAC6XX)