Enumerations | Functions | Variables

gazell/common/gzp_host.c File Reference

Implementation of Gazell Pairing Library (gzp), Host functions. More...

#include "gzp.h"
#include "gzll.h"
#include "string.h"
#include "stdint.h"
#include "stdbool.h"
#include "hal_aes.h"
#include "hal_flash.h"
#include "memdefs.h"

Go to the source code of this file.

Enumerations

enum  gzp_id_req_stat_t { GZP_ID_REQ_IDLE, GZP_ID_REQ_PENDING, GZP_ID_REQ_PENDING_AND_GRANTED, GZP_ID_REQ_PENDING_AND_REJECTED }

Functions

void gzp_host_chip_id_read (uint8_t *dst, uint8_t n)
void gzp_init ()
void gzp_pairing_enable (_Bool enable)
void gzp_host_execute ()
_Bool gzp_address_exchanged ()
_Bool gzp_crypt_user_data_received ()
_Bool gzp_crypt_user_data_read (uint8_t *dst, uint8_t *length)
_Bool gzp_id_req_received ()
void gzp_id_req_reject ()
void gzp_id_req_grant ()
void gzp_id_req_cancel ()
_Bool gzp_get_host_id (uint8_t *dst)

Variables

__no_init uint8_t gzp_dyn_key [(16-3)]

Detailed Description

Implementation of Gazell Pairing Library (gzp), Host functions.

Definition in file gzp_host.c.


Enumeration Type Documentation

Definition of internal states.

Enumerator:
GZP_ID_REQ_IDLE 
GZP_ID_REQ_PENDING 
GZP_ID_REQ_PENDING_AND_GRANTED 
GZP_ID_REQ_PENDING_AND_REJECTED 

Definition at line 37 of file gzp_host.c.


Function Documentation

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.

_Bool gzp_get_host_id ( uint8_t *  dst )

Function reading current "Host ID". On Host, returns false if host ID not yet generated.

Definition at line 388 of file gzp_host.c.

{
  if(hal_flash_byte_read(GZP_PARAMS_STORAGE_ADR) == 0)
  {
    hal_flash_bytes_read(GZP_PARAMS_STORAGE_ADR + 1, dst, GZP_HOST_ID_LENGTH);
    return true;
  }
  else
  {
    return false;
  }
}

Variable Documentation

__no_init uint8_t gzp_dyn_key[(16-3)]

Definition at line 26 of file gzp_host_le1.c.