?? mc13192_hw_config.c
字號:
/**
* Copyright (c) 2004, Freescale Semiconductor
* Freescale Confidential Proprietary
*
* File name : MC13192_hw_config.c
* Project name: SMAC (Simple Media Access Controller)
*
* Department : Freescale Radio Products Division
*
* Description : This is the SMAC C source driver header file for the MC13192
* transceiver hardware interconnections. Initialization is accomplished by the
* MC13192_hw_config.c source file.
*
* $Author: a19259 $
* $Date: 2005/07/29 02:27:50 $
* $Name: $
*/
#include "pub_def.h"
#include "drivers.h"
#include "MC13192_hw_config.h"
#include "mcu_hw_config.h"
/* Globals */
extern UINT8 gu8RTxMode;
extern UINT8 gu8IRQValue;
/*
* MC13192Init: Initialize the MC13192 register map.
*
* Parameters: None
*
* Return : None
*/
void MC13192Init(void)
{
/* Please refer to document MC13192RM for hidden register initialization */
SPIDrvWrite(0x11,0x80FF); /* Eliminate Unlock Conditions due to L01 */
SPIDrvWrite(0x1B,0x8000); /* Disable TC1. */
SPIDrvWrite(0x1D,0x8000); /* Disable TC2. */
SPIDrvWrite(0x1F,0x8000); /* Disable TC3. */
SPIDrvWrite(0x21,0x8000); /* Disable TC4. */
SPIDrvWrite(0x07,0x0E00); /* Enable CLKo in Doze */
SPIDrvWrite(0x0C,0x0300); /* IRQ pull-up disable. */
SPIDrvRead(0x25); /* Sets the reset indicator bit */
SPIDrvWrite(0x04,0xA08D); /* New cal value */
SPIDrvWrite(0x08,0xFFF7); /* Preferred injection */
SPIDrvWrite(0x05,0x8351); /* Acoma, TC1, Doze, ATTN masks, LO1, CRC */
SPIDrvWrite(0x06,0x4720); /* CCA, TX, RX, energy detect */
/* Read the status register to clear any undesired IRQs. */
SPIDrvRead(0x24); /* Clear the status register, if set */
gu8RTxMode = IDLE_MODE; /* Update global to reflect MC13192 status */
}
/*
* MC13192DisableInterrupts : Disable MC13192 interrupts
*
* Parameters : None
*
* Return : None
*/
void MC13192DisableInterrupts(void)
{
MC13192_IRQ_Disable(); /* Save context & disable the MC13192 interrupt source */
}
/*
* MC13192RestoreInterrupts : Restore MC13192 interrupts to previous condition
*
* Parameters : None
*
* Return : None
*/
void MC13192RestoreInterrupts(void)
{
MC13192_IRQ_Enable(); /* Restore the context of the IRQ register from global */
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -