Microchip® Advanced Software Framework

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

Functions

int at24mac602_arch_init (void)
 Init the AT24MAC602 EEPROM arch dependencies, ie MCU pins etc. More...
 
int at24mac602_arch_read_eui64 (eui64_t *eui)
 Read the EEPROM EUI-64. More...
 
int at24mac602_arch_read_serial128 (at24mac602_serialnumber_t *serial)
 Read the EEPROM EUI-64. More...
 
void reset_i2c (void)
 

int at24mac602_arch_init ( void  )

Init the AT24MAC602 EEPROM arch dependencies, ie MCU pins etc.

Return values
0Success
-1Fail

References AT24MAC602_SCL_PIN, AT24MAC602_SDA_PIN, port_config::direction, port_get_config_defaults(), PORT_PIN_DIR_OUTPUT, port_pin_set_config(), and port_pin_set_output_level().

Referenced by at24mac602_init(), and at24mac602_read_eui64().

int at24mac602_arch_read_eui64 ( eui64_t eui)

Read the EEPROM EUI-64.

Parameters
euiPointer EUI-64 structure
Return values
0Success
-1Fail

References EEPROM_EUI64_ADDRESS, i, LEN_EUI, printf, read(), readbuf, and eui64_t::u8.

Referenced by at24mac602_read_eui64().

int at24mac602_arch_read_serial128 ( at24mac602_serialnumber_t serial)

Read the EEPROM EUI-64.

Parameters
euiPointer EUI-64 structure
Return values
0Success
-1Fail

References EEPROM_SERIAL128_ADDRESS, i, LEN_SERIALNUMBER, printf, read(), readbuf, and at24mac602_serialnumber_t::u8.

Referenced by at24mac602_read_serial128().

void reset_i2c ( void  )