?? config.h
字號:
#ifndef __config_H__
#define __config_H__ 1
/*********************************************/
#define M8 1
#define M16 2
#define M32 3
#define M64 4
#define M128 5
/*********************************************/
#define CPU_TYPE M32
//定義MCU時鐘頻率
//#define F_CPU 14745600
#define F_CPU 7372800
//**************************************************
//包含系統頭文件,請根據實際需要進行裁減
//**************************************************
//#pragma REGPARMS
#if CPU_TYPE == M128
#include <iom128v.h>
#endif
#if CPU_TYPE == M64
#include <iom64v.h>
#endif
#if CPU_TYPE == M32
#include <iom32v.h>
#endif
#if CPU_TYPE == M16
#include <iom16v.h>
#endif
#if CPU_TYPE == M8
#include <iom8v.h>
#endif
//#include <intrins.h>
//#include <absacc.h>
//#include <string.h>
//#include <FLOAT.H>
//#include <math.h>
//#include <stdlib.h>
#include <macros.h>
//#include <eeprom.h>
//#define const code
//**************************************************
//系統數據類型定義
//**************************************************
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif
#define MIN(a,b) ((a<b)?(a):(b))
#define MAX(a,b) ((a>b)?(a):(b))
#define ABS(x) ((x>0)?(x):(-x))
typedef unsigned char uint8; /* 定義可移植的無符號8位整數關鍵字 */
typedef signed char int8; /* 定義可移植的有符號8位整數關鍵字 */
typedef unsigned int uint16; /* 定義可移植的無符號16位整數關鍵字 */
typedef signed int int16; /* 定義可移植的有符號16位整數關鍵字 */
typedef unsigned long uint32; /* 定義可移植的無符號32位整數關鍵字 */
typedef signed long int32; /* 定義可移植的有符號32位整數關鍵字 */
//**************************************************
//包含工程頭文件,請根據需要進行裁減
//**************************************************
#include "delay.h"
#include "device_init.h"
#include "motor.h"
//#include "lcddrive.h"
//#include "main.h"
//#include "queue.h"
//#include "TWI.h"
//#include "sio.h"
//**************************************************
//一下為工程變量、端口定義
//**************************************************
/********************************/
/* "以下為工程配置" */
/********************************/
#endif
/**********************end****************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -