moved spi dev name to definitions file
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
44bd42ded6
commit
a4f99b3e78
@ -66,7 +66,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
|
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
|
||||||
GpioCookie* gpioCookie = nullptr;
|
GpioCookie* gpioCookie = nullptr;
|
||||||
static_cast<void>(gpioCookie);
|
static_cast<void>(gpioCookie);
|
||||||
std::string spiDev = "/dev/spidev0.1";
|
|
||||||
SpiComIF* spiComIF = new SpiComIF(objects::SPI_COM_IF, gpioIF);
|
SpiComIF* spiComIF = new SpiComIF(objects::SPI_COM_IF, gpioIF);
|
||||||
static_cast<void>(spiComIF);
|
static_cast<void>(spiComIF);
|
||||||
auto pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
auto pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
||||||
@ -80,7 +80,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#ifdef RASPBERRY_PI
|
#ifdef RASPBERRY_PI
|
||||||
rpi::gpio::initSpiCsDecoder(gpioIF);
|
rpi::gpio::initSpiCsDecoder(gpioIF);
|
||||||
#endif
|
#endif
|
||||||
createSunSensorComponents(gpioIF, spiComIF, pwrSwitcher, spiDev);
|
createSunSensorComponents(gpioIF, spiComIF, pwrSwitcher, spi::DEV);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
|
|
||||||
#ifdef RASPBERRY_PI
|
#ifdef RASPBERRY_PI
|
||||||
|
|
||||||
|
namespace spi {
|
||||||
|
|
||||||
|
static constexpr char DEV[] = "/dev/spidev0.1";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* Adapt these values accordingly */
|
/* Adapt these values accordingly */
|
||||||
namespace gpio {
|
namespace gpio {
|
||||||
static constexpr uint8_t MGM_0_BCM_PIN = 17;
|
static constexpr uint8_t MGM_0_BCM_PIN = 17;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user