Loading...
Searching...
No Matches
at24mac.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Benjamin Valentin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
20#ifndef AT24MAC_H
21#define AT24MAC_H
22
23#include <stdint.h>
24#include "net/eui48.h"
25#include "net/eui64.h"
26#include "periph/i2c.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35typedef uint_fast8_t at24mac_t;
36
37#define AT24MAC_ID_LEN (16)
46
55
66
77
88int at24mac_get_id128(at24mac_t dev, void *dst);
89
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif /* AT24MAC_H */
Definition and IPv6 IID conversion for IEEE EUI-48 identifiers.
EUI-64 data type definition.
int at24mac_get_eui64(at24mac_t dev, eui64_t *addr)
Get the unique EUI64 address from a AT24MAC6xx chip.
at24mac_type_t at24mac_get_type(at24mac_t dev)
Get the type of a AT24MACxxx chip.
int at24mac_get_id128(at24mac_t dev, void *dst)
Get the unique ID from a AT24MACxxx chip.
uint_fast8_t at24mac_t
Device handle type for AT24Mac devices.
Definition at24mac.h:35
int at24mac_get_eui48(at24mac_t dev, eui48_t *addr)
Get the unique EUI48 address from a AT24MAC4xx chip.
at24mac_type_t
Type of the AT24Mac device.
Definition at24mac.h:42
@ AT24MAC4XX
provides EUI-48
Definition at24mac.h:43
@ AT24MAC6XX
provides EUI-64
Definition at24mac.h:44
uint_fast8_t i2c_t
Default i2c_t type definition.
Definition i2c.h:151
Low-level I2C peripheral driver interface definition.
struct holding all params needed for device communication
Definition at24mac.h:50
uint8_t i2c_addr
I2C address
Definition at24mac.h:52
i2c_t i2c_dev
I2C device
Definition at24mac.h:51
at24mac_type_t type
Device type
Definition at24mac.h:53
Data type to represent an EUI-48.
Definition eui48.h:35
Data type to represent an EUI-64.
Definition eui64.h:55