📄 motor_test.c
字号:
/*
**********************************************************************************************
*
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -