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

📄 common.c

📁 MSP4250单芯片电子称,采样数据无线发送给主机,编译环境IAR for MSP430
💻 C
字号:
/*
*********************************************************************************************************
*
* File    : COMMON.C
* Data	  : April 12, 2007
*********************************************************************************************************
*/

#include "hal.h"

/*
*********************************************************************************************************
*                                         PAUSE_10US
*
* Description      :
* Arguments        :
* Returned Values  : none
* Note(s)/Warnings :
*********************************************************************************************************
*/
void Pause_10uS(unsigned int delay)
{
	
#ifdef SYSCLOCK_512K
	do{
      	__no_operation();
      	__no_operation();
	}while(--delay);
#else
#ifdef SYSCLOCK_1M
	do{
		__no_operation();
      	__no_operation();
	  	__no_operation();
     	__no_operation();
		__no_operation();
      	__no_operation();
	  	__no_operation();
	}while(--delay);
#else
#ifdef SYSCLOCK_2M
	char i;
	do{
		for(i=2;i;i--)
			__no_operation();
	}while(--delay);
#else
#ifdef SYSCLOCK_4M
	char i;
	do{
		for(i=4;i;i--)
			__no_operation();
	}while(--delay);
#else
   #error "SYSCLOCK_xx has not been defined"
#endif
#endif
#endif
#endif
}

/*
*********************************************************************************************************
*                                         PAUSE_1MS
*
* Description      :
* Arguments        :
* Returned Values  : none
* Note(s)/Warnings :
*********************************************************************************************************
*/
void Pause_1mS(unsigned int delay)
{
  	do{
    	Pause_10uS(100);
  	}while(--delay);
}

⌨️ 快捷键说明

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