initial._c

来自「著名的RF射频芯片nRF2401应用程序」· _C 代码 · 共 34 行

_C
34
字号
//ICC-AVR application builder : 2006-8-29 21:21:04
// Target : M8
// Crystal: 8.0000Mhz

#include <iom8v.h>
#include <macros.h>

void port_init(void)
{
 DDRB  = 0x46;     //0100 0110
 PORTB = 0x80;     //1000 0000
 
 DDRC  = 0x0A;     //0000 1010
 PORTC = 0x00;     //m103 output only
 
 DDRD  = 0xF0;     //1111 0000
 PORTD = 0xEC;     //1110 1100
 
}

void init_devices(void)
{
 CLI(); //disable all interrupts
 port_init();
 //nrf2401A_Init();
 MCUCR = 0x02;
 GICR  = 0x40;
 TIMSK = 0x00; //timer interrupt sources
 
 SEI(); //re-enable interrupts
 
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?