motorcontroller.h

来自「日本人设计的电子热水瓶的全部嵌入式源码,很好的实例」· C头文件 代码 · 共 43 行

H
43
字号
////////////////////////////////////////////////////////
//	僼傽僀儖偺愢柧丗儌乕僞乕惂屼僋儔僗僿僢僟
////////////////////////////////////////////////////////
#ifndef __MOTOR_CONTROLLER_H
#define __MOTOR_CONTROLLER_H

#include "Typedef.h"
#include "Cup.h"


////////////////////////////////////////////////////////
//	僪儊僀儞    丗搾偺拲偓乮僴乕僪偑傜傒乯
//	僋儔僗偺愢柧丗儌乕僞乕惂屼僋儔僗
////////////////////////////////////////////////////////
class MotorController
{
///////////////////////////////////////////////////////
//	僨乕僞儊儞僶乕
///////////////////////////////////////////////////////
protected:

///////////////////////////////////////////////////////
//	儊僜僢僪
///////////////////////////////////////////////////////
public:
	// 儌乕僞摦嶌
	VOID activateMotor( USHORT speed )
	{
		Cup * pCup = ::getCupObject();
		pCup->giveSpeed( speed );
	};
	// 儌乕僞乕掆巭
	VOID stopMotor()
	{
		Cup * pCup = ::getCupObject();
		pCup->giveSpeed( 0 );
	};

protected:

};
#endif //__MOTOR_CONTROLLER_H

⌨️ 快捷键说明

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