Implementation of nRF24LU1+ specific Device functions for the Gazell pairing library. More...
#include "nrf24le1.h"
#include <gzp.h>
#include "hal_rng.h"
#include "hal_flash.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 xdata uint8_t | gzp_session_token [5] |
__no_init xdata uint8_t | gzp_dyn_key [(16-3)] |
Implementation of nRF24LU1+ specific Device functions for the Gazell pairing library.
Definition in file gzp_host_le1.c.
void gzp_host_chip_id_read | ( | uint8_t * | dst, |
uint8_t | n | ||
) |
Function for reading unique chip ID.
Definition at line 28 of file gzp_host_le1.c.
{ uint8_t i; if(hal_flash_byte_read(GZP_PARAMS_STORAGE_ADR + GZP_HOST_ID_LENGTH + 1) == 0xff) { hal_flash_byte_write((GZP_PARAMS_STORAGE_ADR + GZP_HOST_ID_LENGTH + 1), 0x00); hal_rng_power_up(true); for(i = 0; i < n; i++) { while(!hal_rng_data_ready()) ; hal_flash_byte_write((GZP_PARAMS_STORAGE_ADR + GZP_HOST_ID_LENGTH + 2 + i), hal_rng_read()); } hal_rng_power_up(false); } for(i = 0; i < n; i++) { *(dst++) = hal_flash_byte_read((GZP_PARAMS_STORAGE_ADR + GZP_HOST_ID_LENGTH + 2 + i)); } }
__no_init xdata uint8_t gzp_session_token[5] |
Definition at line 25 of file gzp_host_le1.c.
__no_init xdata uint8_t gzp_dyn_key[(16-3)] |
Definition at line 26 of file gzp_host_le1.c.