maca.c

来自「基于MMA7260QR2的跌落检查程序」· C语言 代码 · 共 68 行

C
68
字号
/************************************************************************************
* maca funcions implementation 
*
* (c) Copyright 2008, Freescale, Inc.  All rights reserved.
*
* No part of this document must be reproduced in any form - including copied,
* transcribed, printed or by any electronic means - without specific written
* permission from Freescale.
*
* Last Inspected:
* Last Tested:
************************************************************************************/

#include "../Interface/ghdr/maca.h"


/************************************************************************************
*************************************************************************************
* Private macros
*************************************************************************************
************************************************************************************/

/************************************************************************************
*************************************************************************************
* Private prototypes
*************************************************************************************
************************************************************************************/
void ResetMaca(void);

/************************************************************************************
*************************************************************************************
* Private type definitions
*************************************************************************************
************************************************************************************/

/************************************************************************************
*************************************************************************************
* Private memory declarations
*************************************************************************************
************************************************************************************/

/************************************************************************************
*************************************************************************************
* Public functions
*************************************************************************************
************************************************************************************/

/************************************************************************************
* main ResetMaca
*
* Resets MACA module.
*
************************************************************************************/
void ResetMaca(void)
{
  uint32_t tmp;
  MACA_WRITE(maca_control, control_seq_nop); 
  do
  {
    tmp = MACA_READ(maca_status);
  }
  while ((tmp & maca_status_cc_mask) == cc_not_completed);
 
  /* Clear all interrupts. */
  MACA_WRITE(maca_clrirq,   0xFFFF);
}

⌨️ 快捷键说明

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