Microchip® Advanced Software Framework

at24mac602.h File Reference
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include "contiki.h"

Data Structures

union  at24mac602_serialnumber_t
 
union  eui64_t
 

Macros

#define EUI64_ATMEL_OUI_1   0xFC
 
#define EUI64_ATMEL_OUI_2   0xC2
 
#define EUI64_ATMEL_OUI_3   0x3D
 

Functions

int at24mac602_init (void)
 Init the AT24MAC602 EEPROM. More...
 
int at24mac602_read_eui64 (eui64_t *eui)
 Read the EUI-64 from the AT24MAC602 EEPROM. More...
 
int at24mac602_read_serial128 (at24mac602_serialnumber_t *serial)
 Read the 128-bit serial number from the EEPROM. More...
 

#define EUI64_ATMEL_OUI_1   0xFC
#define EUI64_ATMEL_OUI_2   0xC2
#define EUI64_ATMEL_OUI_3   0x3D

int at24mac602_init ( void  )

Init the AT24MAC602 EEPROM.

Return values
0Success
-1Fail

References at24mac602_arch_init().

Referenced by node_id_restore().

int at24mac602_read_eui64 ( eui64_t eui)

Read the EUI-64 from the AT24MAC602 EEPROM.

Parameters
euiPointer to an EUI-64 struct to fill out with the EUI-64 read.
Return values
0Success
-1Fail

References at24mac602_arch_init(), at24mac602_arch_read_eui64(), printf, reset_i2c(), and eui64_t::u8.

Referenced by node_id_restore().

int at24mac602_read_serial128 ( at24mac602_serialnumber_t serial)

Read the 128-bit serial number from the EEPROM.

Parameters
serialpointer to serial number structure that will contain the serial number after reading
Return values
0Success
-1Fail

References at24mac602_arch_read_serial128(), and printf.