?? main.c
字號:
/* Copyright (c) 2008 Nordic Semiconductor. All Rights Reserved.
*
* The information contained herein is confidential property of Nordic
* Semiconductor. The use, copying, transfer or disclosure of such information
* is prohibited except by express written agreement with Nordic Semiconductor.
*
* $LastChangedRevision:$
*/
/** @file
* The nRF24LE1 example application main file
*
* @author Rune Brandsegg
* @author Ivar C. OEsthus (added AES encr.)
*/
#include <Nordic\reg24le1.h>
#include "hal_nrf.h"
#include "radio.h"
#include "application.h"
#include "system.h"
#include "lib_crypt.h"
static xdata uint8_t AES_Key[16] = {0xcc,0x77,0x44,0x18,0x87,0x56,0xb3,0x7d,0x99,0x10,0xc7,0xcc,0x13,0x14,0x15,0x16};
static xdata uint8_t AES_Counter[16] = {0xfa,0xff,0xff,0xff,0xff,0xcc,0xcc,0x00,0x20,0xff,0xff,0xff,0xff,0x22,0x02,0x01};
void main(void)
{
mcu_init();
lib_crypt_init(AES_Key,AES_Counter); // Initialize the encryption
EA = 1; // Global interrupt enable
boot_mess();
if(!B0) // Pressed B0 during "boot":
{ // Enter PRX mode (Receiver)
radio_init(RECEIVER);
receiver_mode();
}
else // Released B0 during "boot":
{ // Enter PTX mode (Transmitter)
radio_init(TRANSMITTER);
transmitter_mode();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -