moved spi dev name to definitions file
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-03-30 17:50:13 +02:00
parent 44bd42ded6
commit a4f99b3e78
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 8 additions and 2 deletions

View File

@ -66,7 +66,7 @@ void ObjectFactory::produce(void* args) {
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
GpioCookie* gpioCookie = nullptr;
static_cast<void>(gpioCookie);
std::string spiDev = "/dev/spidev0.1";
SpiComIF* spiComIF = new SpiComIF(objects::SPI_COM_IF, gpioIF);
static_cast<void>(spiComIF);
auto pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
@ -80,7 +80,7 @@ void ObjectFactory::produce(void* args) {
#ifdef RASPBERRY_PI
rpi::gpio::initSpiCsDecoder(gpioIF);
#endif
createSunSensorComponents(gpioIF, spiComIF, pwrSwitcher, spiDev);
createSunSensorComponents(gpioIF, spiComIF, pwrSwitcher, spi::DEV);
#endif

View File

@ -6,6 +6,12 @@
#ifdef RASPBERRY_PI
namespace spi {
static constexpr char DEV[] = "/dev/spidev0.1";
}
/* Adapt these values accordingly */
namespace gpio {
static constexpr uint8_t MGM_0_BCM_PIN = 17;