📄 system.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
* System level functions.
*
* @author Rune Brandsegg
*
*/
#include <stdint.h>
#include "hal_nrf.h"
#include "radio.h"
#include "system.h"
void mcu_init(void)
{
P0 = 0; // Port setup
P0DIR = 0xF0; // P0.0 - P0.3 output LEDS
// P0.4 - P0.7 inputs BUTTONS
RFCKEN = 1; // enable L01 clock
RF = 1; // enable RF interrupt
}
void boot_mess(void)
{
uint8_t ctr;
for(ctr=0;ctr<3;ctr++)
{
LED0_BLINK();
delay_10ms();
LED1_BLINK();
delay_10ms();
LED2_BLINK();
delay_10ms();
}
}
void delay_10ms(void)
{
uint16_t ctr;
for(ctr=0; ctr<15000; ctr++);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -