📄 motor.c
字号:
//============================
//绕线机程序
//============================
#ifndef __motor_c__
#define __motor_c__
#include "included.h"
//=================================
//===来回马达进来子程序
void for_m(uint t)
{
cp_h();
delay_10us(t);
cp_l();
delay_10us(t);
}
//===============================
//===来回马达出去子程序
void back_m(uint t)
{
cp_h();
delay_10us(t);
cp_l();
delay_10us(t);
}
//==============================
void delay_10us(t)
{
uint i;
for(i=0;i<7;i++)
{
_nop_();
}
for(i=0;i<t;i++)
{
_nop_();
}
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -