Microchip® Advanced Software Framework

node-id-samd21.c File Reference
#include <stdio.h>
#include <string.h>
#include "node-id.h"
#include "contiki-conf.h"
#include "at24mac602.h"

Macros

#define _DEBUG_   0
 
#define NODEID_BASEADDR   (0x0003FF80)
 
#define PRINTF(...)
 

Functions

static int fallback (void)
 
void node_id_burn (unsigned short id)
 
void node_id_restore (void)
 

Variables

static const uint8_t magic_bytes [] = {0xde, 0xad, 0xbe, 0xef}
 
unsigned short node_id = 0
 
unsigned char node_mac [8]
 

#define _DEBUG_   0
#define NODEID_BASEADDR   (0x0003FF80)

Referenced by fallback().

#define PRINTF (   ...)

Referenced by fallback(), and node_id_burn().

static int fallback ( void  )
static

References i, magic_bytes, node_mac, NODEID_BASEADDR, and PRINTF.

Referenced by node_id_restore().

void node_id_burn ( unsigned short  id)

References PRINTF.

Referenced by main().

void node_id_restore ( void  )

const uint8_t magic_bytes[] = {0xde, 0xad, 0xbe, 0xef}
static

Referenced by fallback().

unsigned short node_id = 0
unsigned char node_mac[8]