Update v1.1.0 - MGT - RTD - PUSC #28
@ -106,6 +106,46 @@ void ObjectFactory::produce(){
|
|||||||
//pdu1handler->setModeNormal();
|
//pdu1handler->setModeNormal();
|
||||||
//pdu2handler->setModeNormal();
|
//pdu2handler->setModeNormal();
|
||||||
//acuhandler->setModeNormal();
|
//acuhandler->setModeNormal();
|
||||||
|
(void) p60dockhandler;
|
||||||
|
(void) pdu1handler;
|
||||||
|
(void) pdu2handler;
|
||||||
|
(void) acuhandler;
|
||||||
|
|
||||||
|
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
||||||
|
gpio::createRpiGpioConfig(gpioCookieAcsBoard, gpioIds::MGM_0_LIS3_CS, gpio::MGM_0_BCM_PIN,
|
||||||
|
"MGM_0_LIS3", gpio::Direction::OUT, 1);
|
||||||
|
gpio::createRpiGpioConfig(gpioCookieAcsBoard, gpioIds::MGM_1_RM3100_CS, gpio::MGM_1_BCM_PIN,
|
||||||
|
"MGM_1_RM3100", gpio::Direction::OUT, 1);
|
||||||
|
gpio::createRpiGpioConfig(gpioCookieAcsBoard, gpioIds::MGM_2_LIS3_CS, gpio::MGM_2_BCM_PIN,
|
||||||
|
"MGM_2_LIS3", gpio::Direction::OUT, 1);
|
||||||
|
gpio::createRpiGpioConfig(gpioCookieAcsBoard, gpioIds::MGM_3_RM3100_CS, gpio::MGM_3_BCM_PIN,
|
||||||
|
"MGM_3_RM3100", gpio::Direction::OUT, 1);
|
||||||
|
gpio::createRpiGpioConfig(gpioCookieAcsBoard, gpioIds::GYRO_0_ADIS_CS, gpio::GYRO_0_BCM_PIN,
|
||||||
|
"GYRO_0_ADIS", gpio::Direction::OUT, 1);
|
||||||
|
gpio::createRpiGpioConfig(gpioCookieAcsBoard, gpioIds::GYRO_1_L3G_CS, gpio::GYRO_1_BCM_PIN,
|
||||||
|
"GYRO_1_L3G", gpio::Direction::OUT, 1);
|
||||||
|
gpio::createRpiGpioConfig(gpioCookieAcsBoard, gpioIds::GYRO_2_L3G_CS, gpio::GYRO_2_BCM_PIN,
|
||||||
|
"GYRO_2_L3G", gpio::Direction::OUT, 1);
|
||||||
|
gpioIF->addGpios(gpioCookieAcsBoard);
|
||||||
|
|
||||||
|
std::string spiDev = "/dev/spidev0.0";
|
||||||
|
SpiCookie* spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
|
||||||
|
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
||||||
|
auto mgmLis3Handler = new MGMHandlerLIS3MDL(objects::MGM_0_LIS3_HANDLER,
|
||||||
|
objects::SPI_COM_IF, spiCookie);
|
||||||
|
mgmLis3Handler->setStartUpImmediately();
|
||||||
|
|
||||||
|
spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
|
||||||
|
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||||
|
auto mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_1_RM3100_HANDLER,
|
||||||
|
objects::SPI_COM_IF, spiCookie);
|
||||||
|
mgmRm3100Handler->setStartUpImmediately();
|
||||||
|
|
||||||
|
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev,
|
||||||
|
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
||||||
|
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
|
||||||
|
spiCookie);
|
||||||
|
gyroL3gHandler->setStartUpImmediately();
|
||||||
#endif
|
#endif
|
||||||
/* Temperature sensors */
|
/* Temperature sensors */
|
||||||
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
# add_subdirectory(gpio)
|
# add_subdirectory(gpio)
|
||||||
add_subdirectory(i2c)
|
|
||||||
add_subdirectory(csp)
|
add_subdirectory(csp)
|
||||||
add_subdirectory(spi)
|
|
||||||
add_subdirectory(utility)
|
add_subdirectory(utility)
|
||||||
add_subdirectory(boardtest)
|
add_subdirectory(boardtest)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user