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

📄 lpc_lib_motor.h

📁 使用embest IDE开发工具开发的基于LPC2294 的触摸屏开发
💻 H
字号:
/*
**********************************************************************************************
*
*     		  Embest Info&Tech Co., Ltd.  All rights reserved.
*                   		  www.embedinfo.com
*			
*file:     		xxx.c/xxx.h 
*author:   		embest 
*establish: 	2006.xx.xx
*modify:		xx
*notes:			xx
**********************************************************************************************
*/

/*
**********************************************************************************************
*                                      compiler condition 
**********************************************************************************************
*/
#ifndef lpc_lib_motor
	#define lpc_lib_motor
/*
**********************************************************************************************
*                                       include files
**********************************************************************************************
*/
#include    "..\..\com\type_redefine.h"
#include    "..\..\com\lpc22xx_register.h"
#include    "..\..\com\22eb06_lib_modulecontrol\22eb06_lib_modulecontrol.h"
#include    "..\..\com\lpc_lib_spi\lpc_lib_spi.h"
#include    "..\..\com\lpc_lib_pll\lpc_lib_pll.h"
#include    "..\..\com\lpc22eb06_target_define.h"
/*
**********************************************************************************************
*                                   type define 
**********************************************************************************************
*/
typedef enum {motor1,motor2,motor3,motor4,motor5} motor_sel;
typedef enum {pwm1_pin,pwm3_pin,pwm4_pin,pwm5_pin,pwm6_pin} pwm_pin;

typedef enum {dir_motor,step_motor} motor_type;
typedef enum {deasil,contrarotate} direct_sel; //deasil:顺时针 contratotate:逆时针
/*
**********************************************************************************************
*                               extern function/variable declare
**********************************************************************************************
*/

/*
**********************************************************************************************
*                                   function declare  
**********************************************************************************************
*/
void motor_init(void);
void motor_close(void);
void motor_sel_en(INT8U onoff,motor_sel motor);
void pwm_pin_en(INT8U onoff,pwm_pin pwm);
void a_set(INT8U onoff,INT8U polarity);
void b_set(INT8U onoff,INT8U polarity);
void motor_test(motor_type motor,direct_sel dir);


#endif















⌨️ 快捷键说明

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