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.
CCS-COMM_BOARD/RUDRIVEFRAMEWORK/SinglePhase.cpp

53 lines
1.4 KiB
C++

/*
* SinglePhase.cpp
*
* Author: Aleksey Gerasimenko
* gerasimenko.aleksey.n@gmail.com
*/
#include "RUDRIVEFRAMEWORK/SinglePhase.h"
// #include "PERIPHERY/CAN.h"
// #include "PERIPHERY/COMMBoard.h"
namespace RUDRIVEFRAMEWORK
{
//CONSTRUCTOR
SinglePhase::SinglePhase(uint16_t *memzone):
PhaseBase(memzone),
// periphery(),
crc(),
modbus_port(cpu.scib, cpu.interval_measure, crc)
// comm_board(canSpace::CANB)
{}//CONSTRUCTOR
void SinglePhase::setup(SinglePhaseSetup& setup)
{
cpu.setup(setup.cpu);
// periphery.setup(m_memzone);
modbus_port.setup(setup.modbus);
// comm_board.config();
//
}//
//
//
void SinglePhase::get_hard_code_setup(SinglePhaseSetup& hsetup)
{
cpu.get_hard_code_setup(hsetup.cpu);
// hsetup.cpu.epwm.parameters.fpwm = SINGLE_PHASE_PWM_FREQUENCY;
// hsetup.cpu.epwm.parameters.adc_soc_quantity = SINGLE_PHASE_ADC_ISR_QUANTITY;
// hsetup.cpu.epwm.parameters.adc_soc_offset = SINGLE_PHASE_ADC_ISR_OFFSET_RELATIVE;
//
// periphery.get_hard_code_setup(hsetup.periphery);
//
hsetup.modbus.gpio_re_de_setup = &DSP28335::GPIO::gpio_scib_re_de_setup;
hsetup.modbus.gpio_driver_enable = &DSP28335::GPIO::gpio_scib_re_de_set;
hsetup.modbus.gpio_receiver_enable = &DSP28335::GPIO::gpio_scib_re_de_clear;
//
}//
//
} /* namespace RUDRIVEFRAMEWORK */