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

📄 periph.h

📁 用freescale公司的DSP56F8013芯片实现的PMSM的SVPWM 驱动
💻 H
字号:
/** ###################################################################
**
**     (c) Freescale Semiconductor
**     2004 All Rights Reserved
**
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2004
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

/* File: periph.h */

#ifndef __PERIPH_H
#define __PERIPH_H

#include "port.h"


#ifdef __cplusplus
extern "C" {
#endif


/*******************************************************
* Routines for Peripheral Memory Access
********************************************************
*  Parameter usage:
*   Addr - architecture structure field
*   Mask - bit to manipulate
*   Data - 16 bit word to assign or access
********************************************************/

/*
inline void periphBitSet(register UWord16 Mask, register volatile UWord16 * Addr)
{
  register unsigned int Value;

  asm(move.w  x:(Addr+$1ffc00),Value);
  asm(or.w    Mask,Value);
  asm(move.w  Value,x:(Addr+$1ffc00));
}
*/

/*
inline void periphBitClear(register UWord16 Mask, register volatile UWord16 * Addr)
{
  register unsigned int Value;

  asm(move.w  x:(Addr+$1ffc00),Value);
  asm(not.w   Mask);
  asm(and.w   Mask,Value);
  asm(move.w  Value,x:(Addr+$1ffc00));
}
*/

/*
inline void periphBitChange(register UWord16 Mask, register volatile UWord16 * Addr)
{
  register unsigned int Value;

  asm(move.w  x:(Addr+$1ffc00),Value);
  asm(eor.w   Mask,Value);
  asm(move.w  Value,x:(Addr+$1ffc00));
}
*/

/*
inline bool periphBitTest(register UWord16 Mask, register volatile UWord16 * Addr)
{
  register unsigned int Value;

  asm(move.w  x:(Addr+$1ffc00),Value);

  if ((Value & Mask) == 0)
  {
    return false;
  }

  return true;
}
*/

/*
inline void periphMemWrite(register UWord16 Data, register volatile UWord16 * Addr)
{
  asm(move.w  Data,X:(Addr+$1ffc00));
}
*/

/*
inline UWord16 periphMemRead(register volatile UWord16 * Addr)
{
  register unsigned int Value;

  asm(move.w  X:(Addr+$1ffc00),Value);

  return Value;
}
*/

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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