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

projects/nrfgo_sdk/gazell_examples/gzll_device/main.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: 133 $
00012  */
00013 
00031 //lint -e534
00032 
00033 #include "gzll_mcu.h"
00034 #include "gzll.h"
00035 
00036 void main(void)
00037 {
00038   uint8_t payload[GZLL_MAX_PAYLOAD_LENGTH];
00039 
00040   mcu_init();
00041   gzll_init();
00042 
00043   EA = 1;
00044 
00045   for(;;)
00046   {      
00047     // If gazell link layer idle
00048     if(gzll_get_state() == GZLL_IDLE)
00049     {
00050       // Put P0 contents in payload[0]
00051       payload[0] = ~P0;
00052       // Transmits payload[] to pipe 0 address
00053       gzll_tx_data(payload, GZLL_MAX_FW_PAYLOAD_LENGTH, 0);   
00054     }
00055   }  
00056 }
00057 

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