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

48 lines
1.3 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.

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