/* * 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::Input PortInput; typedef typename driver::PinIO::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_ */