⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mcu_hw_config.c

📁 zigbee通讯程序,设计方案为MC13191+C51,通过串口对无线模块进行控制
💻 C
字号:
/**************************************************************
*Includes
**************************************************************/
//#include "device_header.h" /* include peripheral declarations */
#include <REG51F.H>
#include "drivers.h"
#include "pub_def.h"
#include "MC13192_regs.h"
#include "MC13192_hw_config.h"
#include "mcu_hw_config.h"


/**************************************************************
*	Globals
**************************************************************/
extern unsigned char rtx_mode;

/**************************************************************
*	Function: 	Initialize the MCU-to-MC13192 GPIO direction and data.
*	Parameters: None
*	Return:		None
**************************************************************/
void init_gpio()
{
 MC13192_CE = 1;					
 MC13192_ATTN = 1;
 MC13192_RTXEN = 0;
 MC13192_CE = 1;					
 MC13192_ATTN = 1;
 MC13192_RTXEN = 0;
}


/**************************************************************
*	Function: 	Restart the MC13192.
*	Parameters: None
*	Return:		None
**************************************************************/
void MC13192_restart()
{
 rtx_mode = SYSTEM_RESET_MODE;
 drv_read_spi_1(0x24);	/* Clear MC13192 interrupts */
}


/**************************************************************
*	Function: 	Initialize the MCU COP, GPIO, SPI and IRQ.
*				Set the desired MC13192 clock frequency here.
*	Parameters: None
*	Return:		None
**************************************************************/
void mcu_init(void)
{
	rtx_mode = RESET_DELAY;	

    rtx_mode = SYSTEM_RESET_MODE;

 	init_gpio();
 
 	rtx_mode = MC13192_RESET_MODE;
 
 	rtx_mode = MC13192_CONFIG_MODE;
}

⌨️ 快捷键说明

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