MotorControlModuleSDFM_TMS3.../Projects/EFC_Application/UMLibrary/application/schematic/SignalFromBitmapU16.hh

58 lines
1.4 KiB
C++

/*
* BitmapU16ToSignal.hh
*
* Created on: 13 àâã. 2020 ã.
* Author: s.maksimenko
*/
#ifndef UMLIBRARY_APPLICATION_SCHEMATIC_SIGNALFROMBITMAPU16_HH_
#define UMLIBRARY_APPLICATION_SCHEMATIC_SIGNALFROMBITMAPU16_HH_
#include "../ISetupStep.hh"
#include "../../schematic/BitmapU16ToSignal.hpp"
#include "../../driver/PinIO.hh"
namespace application {
namespace schematic {
struct SignalFromBitmapU16 : public ISetupStep
{
typedef uint16_t PortType;
typedef typename driver::PinIO<PortType>::Input PortInput;
typedef typename driver::PinIO<PortType>::Output PortOutput;
volatile PortInput * port_input = nullptr;
volatile PortOutput * port_output = nullptr;
bool input( Environment & env );
bool prepare();
void build( Environment & env );
struct Links {
Environment::Id port_input_u16;//!<Âèðòóàëüíûé ïîðò: âõîä
Environment::Id port_output_u16;//!<Âèðòóàëüíûé ïîðò: âûõîä
Environment::SignalId signal_id;//!<
};
// typedef ::schematic::BitmapU16ToSignal::Setting Setting;
struct Setting {
uint16_t index_first_bit;// Èíäåêñ ïåðâîãî çíà÷àùåãî áèòà
uint16_t number_bits;// ×èñëî çíà÷àùèõ áèòîâ
bool inverse_code;// Ïðèçíàê èíâåðñíîãî êîäà
};
const Links & links;
const Setting & config;
SignalFromBitmapU16( const Links & links, const Setting & config );
};
}// namespace schematic
}// namespace application
#endif /* UMLIBRARY_APPLICATION_SCHEMATIC_SIGNALFROMBITMAPU16_HH_ */