Loading...
Searching...
No Matches
at24mac.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Benjamin Valentin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include <stdint.h>
20#include "net/eui48.h"
21#include "net/eui64.h"
22#include "periph/i2c.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
31typedef uint_fast8_t at24mac_t;
32
33#define AT24MAC_ID_LEN (16)
34
42
51
62
73
84int at24mac_get_id128(at24mac_t dev, void *dst);
85
95
96#ifdef __cplusplus
97}
98#endif
99
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:31
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:38
@ AT24MAC4XX
provides EUI-48
Definition at24mac.h:39
@ AT24MAC6XX
provides EUI-64
Definition at24mac.h:40
uint_fast8_t i2c_t
Default i2c_t type definition.
Definition i2c.h:155
Low-level I2C peripheral driver interface definition.
struct holding all params needed for device communication
Definition at24mac.h:46
uint8_t i2c_addr
I2C address.
Definition at24mac.h:48
i2c_t i2c_dev
I2C device.
Definition at24mac.h:47
at24mac_type_t type
Device type.
Definition at24mac.h:49
Data type to represent an EUI-48.
Definition eui48.h:34
Data type to represent an EUI-64.
Definition eui64.h:55