motor_test.c
来自「ARM_thumb 在embest 下的源码.可直接运行于embest 环境.」· C语言 代码 · 共 54 行
C
54 行
/*
***********************************************************************
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 + =
减小字号Ctrl + -
显示快捷键?