MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/application/schematic/SignalFromBitmapU16.hh
2024-06-07 11:12:56 +03:00

58 lines
1.5 KiB
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.

/*
* 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_ */