You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.6 KiB
C++
76 lines
1.6 KiB
C++
/*
|
|
* SinglePhase.h
|
|
*
|
|
* Author: Aleksey Gerasimenko
|
|
* gerasimenko.aleksey.n@gmail.com
|
|
*/
|
|
|
|
// #include "PERIPHERY/COMMBoard.h"
|
|
#include "RUDRIVEFRAMEWORK/PhaseBase.h"
|
|
//#include "RUDRIVEFRAMEWORK/HeaderRUDRIVEFRAMEWORK.h"
|
|
|
|
|
|
#ifndef RUDRIVEFRAMEWORK_SINGLEPHASE_H_
|
|
#define RUDRIVEFRAMEWORK_SINGLEPHASE_H_
|
|
|
|
|
|
void write_fram (uint16_t addr, uint16_t *buffer_pointer, uint16_t buffer_size);
|
|
|
|
|
|
namespace RUDRIVEFRAMEWORK
|
|
{
|
|
|
|
|
|
struct SinglePhaseSetup
|
|
{
|
|
DSP28335::CPUSetup cpu;
|
|
// PERIPHERY::IPeripherySetup periphery;
|
|
MODBUSRTU::ModbusRTUTransceiverSetup modbus;
|
|
SinglePhaseSetup():
|
|
cpu(),
|
|
// periphery(),
|
|
modbus()
|
|
{}
|
|
};//SinglePhaseSetup
|
|
|
|
|
|
struct SinglePhaseConfiguration
|
|
{
|
|
DSP28335::SCIConfiguration scib;
|
|
DSP28335::SCIConfiguration scic;
|
|
DSP28335::EPWMConfiguration epwm;
|
|
SinglePhaseConfiguration():
|
|
scib(),
|
|
scic(),
|
|
epwm()
|
|
{}
|
|
};//SinglePhaseConfiguration
|
|
|
|
|
|
struct SinglePhasePWMConfiguration: public PERIPHERY::PWMSInterfaceConfiguration
|
|
{
|
|
SinglePhasePWMConfiguration():
|
|
PWMSInterfaceConfiguration()
|
|
{}
|
|
};//
|
|
|
|
|
|
class SinglePhase: public RUDRIVEFRAMEWORK::PhaseBase
|
|
{
|
|
public:
|
|
// PERIPHERY::IPeriphery periphery;
|
|
MODBUSRTU::ModbusRTUCRC crc;
|
|
MODBUSRTU::ModbusRTUTransceiver modbus_port;
|
|
// PERIPHERY::COMMBoard comm_board;
|
|
public:
|
|
SinglePhase(uint16_t *memzone);
|
|
public:
|
|
void setup(SinglePhaseSetup& setup);
|
|
public:
|
|
void get_hard_code_setup(SinglePhaseSetup& hsetup);
|
|
};// SinglePhase
|
|
|
|
} /* namespace RUDRIVEFRAMEWORK */
|
|
|
|
#endif /* RUDRIVEFRAMEWORK_SINGLEPHASE_H_ */
|