• Main Page
  • Modules
  • Index
  • File List
  • Globals

gazell/nrf24lu1/gzp_host_lu1.c

Go to the documentation of this file.
00001 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
00002  *
00003  * The information contained herein is confidential property of Nordic
00004  * Semiconductor ASA.Terms and conditions of usage are described in detail
00005  * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
00006  *
00007  * Licensees are granted free, non-transferable use of the information. NO
00008  * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
00009  * the file.
00010  *
00011  * $LastChangedRevision: 230 $
00012  */
00013 
00018 #include <stdint.h>
00019 #include "nrf24lu1p.h"
00020 #include <gzp.h>
00021 #include "memdefs.h"
00022 
00023 __no_init uint8_t gzp_session_token[GZP_SESSION_TOKEN_LENGTH];
00024 __no_init uint8_t gzp_dyn_key[GZP_DYN_KEY_LENGTH];
00025 
00026 void gzp_host_chip_id_read(uint8_t *dst, uint8_t n)
00027 {
00028   uint8_t i;
00029 #ifdef __C51__
00030   volatile uint8_t xdata *gzp = (uint8_t xdata *)0x0b;                          // 0x0b is start of chip ID in info-page
00031 #else
00032   __no_init volatile uint8_t *gzp;        // 0x0b is start of chip ID in info-page
00033   *gzp = 0x0b;
00034 #endif
00035     uint8_t temp_infen;
00036   temp_infen = INFEN;
00037 
00038   INFEN = 1;
00039   // Read n bytes of chip ID from info page
00040   for(i = 0; i < n; i++)
00041   {
00042     *(dst + i) = *(gzp + i);
00043   }
00044   INFEN = temp_infen;
00045 }

Generated on Fri Apr 20 2012 14:11:44 for nRFGo SDK by  doxygen 1.7.2