?? motor_test.c
字號:
/*
***********************************************************************
Embest Info&Tech Co., Ltd. All rights reserved.
www.embedinfo.com
***********************************************************************
*/
#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"
#include "..\..\com\lpc_lib_pwm\lpc_lib_pwm.h"
#include "..\..\com\lpc_lib_motor\lpc_lib_motor.h"
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(step_motor,contrarotate);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -