motor_test.c

来自「使用embest IDE开发工具开发的基于LPC2294 的触摸屏开发」· C语言 代码 · 共 67 行

C
67
字号

/*
**********************************************************************************************
*
*     		  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
**********************************************************************************************
*/
/*
**********************************************************************************************
*                                       include files
**********************************************************************************************
*/
#include    "..\..\com\lpc_lib_motor\lpc_lib_motor.h"
/*
**********************************************************************************************
*                               global variable define
**********************************************************************************************
*/

/*
**********************************************************************************************
* name:		Main
* func:		motor_test main function
* para:		none
* ret:		none
* comment:		
**********************************************************************************************
*/	
void Main(void)
{
     INT32U i;
   
//initialize sysytem
	lpc_init_pll_manual();
		
	spi_data_send(0, 0xfb);
	spi_data_send(0, 0x56);
	spi_data_send(0, 0xfb);
	spi_data_send(0, 0x56);

//--------motor test-----------------------
	motor();


 }
void motor(void)
{
	motor_init();
	spi_extend_set(0,module_c_MOTOR_EN);
	
	while(1)
	motor_test(dir_motor,contrarotate);

} 

 



⌨️ 快捷键说明

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