58 lines
1.4 KiB
C++
58 lines
1.4 KiB
C++
|
|
/*
|
|||
|
|
* BitmapU16ToSignal.hh
|
|||
|
|
*
|
|||
|
|
* Created on: 13 <EFBFBD><EFBFBD><EFBFBD>. 2020 <EFBFBD>.
|
|||
|
|
* 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;//!<<3C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
|||
|
|
Environment::Id port_output_u16;//!<<3C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
Environment::SignalId signal_id;//!<
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// typedef ::schematic::BitmapU16ToSignal::Setting Setting;
|
|||
|
|
struct Setting {
|
|||
|
|
uint16_t index_first_bit;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
uint16_t number_bits;// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
bool inverse_code;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
const Links & links;
|
|||
|
|
const Setting & config;
|
|||
|
|
|
|||
|
|
SignalFromBitmapU16( const Links & links, const Setting & config );
|
|||
|
|
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
}// namespace schematic
|
|||
|
|
}// namespace application
|
|||
|
|
|
|||
|
|
#endif /* UMLIBRARY_APPLICATION_SCHEMATIC_SIGNALFROMBITMAPU16_HH_ */
|