MotorControlModuleSDFM_TMS3.../Projects/EFC_Application/UMLibrary/peripheral/IPwm.hh

45 lines
919 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* IPwm.h
*
* Created on: 26 окт. 2016 г.
* Author: titov
*/
#ifndef SOURCE_PERIPHERAL_IPWM_H_
#define SOURCE_PERIPHERAL_IPWM_H_
#include <stdint.h>
namespace peripheral {
struct IPwmInfo {
typedef uint32_t PwmTime;
//! Функция возвращает максимально допустимую уставку ШИМ.
virtual PwmTime getMaxThreshold() const = 0;
virtual ~IPwmInfo() = default;
};
struct IPwm : public IPwmInfo {
typedef IPwmInfo::PwmTime PwmTime;
//!Функция устанавливает новую уставку сравнения ШИМ.
/*!
* \param[in] value - значение уставки сравнения в отсчетах таймера ШИМ.
*/
virtual void setThreshold( PwmTime value ) = 0;
//!Функция запрещает импульсы управления этого канала ШИМ.
virtual void disableOutput() = 0;
//!Функция разрешает импульсы управления этого канала ШИМ.
virtual void enableOutput() = 0;
virtual ~IPwm() = default;
};
}
#endif /* SOURCE_PERIPHERAL_IPWM_H_ */