Functions | Variables

gazell/nrf24lu1/gzp_host_lu1.c File Reference

#include <stdint.h>
#include "nrf24lu1p.h"
#include <gzp.h>
#include "memdefs.h"

Go to the source code of this file.

Functions

void gzp_host_chip_id_read (uint8_t *dst, uint8_t n)

Variables

__no_init uint8_t gzp_session_token [5]
__no_init uint8_t gzp_dyn_key [(16-3)]

Detailed Description

Definition in file gzp_host_lu1.c.


Function Documentation

void gzp_host_chip_id_read ( uint8_t *  dst,
uint8_t  n 
)

Function for reading unique chip ID.

Definition at line 26 of file gzp_host_lu1.c.

{
  uint8_t i;
#ifdef __C51__
  volatile uint8_t xdata *gzp = (uint8_t xdata *)0x0b;                          // 0x0b is start of chip ID in info-page
#else
  __no_init volatile uint8_t *gzp;        // 0x0b is start of chip ID in info-page
  *gzp = 0x0b;
#endif
    uint8_t temp_infen;
  temp_infen = INFEN;

  INFEN = 1;
  // Read n bytes of chip ID from info page
  for(i = 0; i < n; i++)
  {
    *(dst + i) = *(gzp + i);
  }
  INFEN = temp_infen;
}

Variable Documentation

__no_init uint8_t gzp_session_token[5]

Definition at line 23 of file gzp_host_lu1.c.

__no_init uint8_t gzp_dyn_key[(16-3)]

Definition at line 24 of file gzp_host_lu1.c.