/* * SpiBusSetup.h * * Created on: 24 июн. 2019 г. * Author: user */ #ifndef SOURCE_APPLICATION__BOARD_SPIBUSSETUP_H_ #define SOURCE_APPLICATION__BOARD_SPIBUSSETUP_H_ #include "../ISetupStep.hh" #include "../../peripheral/ISerialPort.hh" #include "../../peripheral/ISerialPortConfigurator.hh" namespace application { namespace virtualization { //!Многоабонентная кооперативная шина SPI. struct SpiBus : public ISetupStep { peripheral::ISerialPort * serial_port = nullptr; peripheral::ISerialPortConfigurator * serial_port_configurator = nullptr; bool input( Environment & env ); void build( Environment & env ); struct Links { Environment::Id spi_port; //!<Интерфейс порта SPI. Environment::Id spi_config; //!<Интерфейс настройки порта SPI. Environment::Id spi_bus; //!<Шина SPI. }; struct Setting { uint32_t abonent_quantity; //!<Максимальное количество абонентов spi шины. }; const Links & links; const Setting & config; SpiBus( const Links & links, const Setting & setting ); }; } /* namespace board */ } /* namespace application */ #endif /* SOURCE_APPLICATION_BOARD_SPIBUSSETUP_H_ */