This commit is contained in:
Robin Müller 2021-04-01 16:21:24 +02:00 committed by IRS Cleanroom Laptop
parent fe4c8ad136
commit c3f97dde30
6 changed files with 51 additions and 47 deletions

View File

@ -33,9 +33,13 @@
#include <linux/csp/CspCookie.h>
#include <linux/csp/CspComIF.h>
#include <linux/uart/UartComIF.h>
#include <linux/uart/UartCookie.h>
#include <fsfw_hal/linux/i2c/I2cCookie.h>
#include <fsfw_hal/linux/i2c/I2cComIF.h>
#include <fsfw_hal/linux/spi/SpiCookie.h>
#include <fsfw_hal/linux/spi/SpiComIF.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include <fsfw_hal/common/gpio/GpioCookie.h>
@ -94,8 +98,6 @@ void ObjectFactory::produce(){
new UartComIF(objects::UART_COM_IF);
new SpiComIF(objects::SPI_COM_IF, gpioComIF);
auto gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
/* Temperature sensors */
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
objects::TMP1075_HANDLER_1, objects::I2C_COM_IF,
@ -143,30 +145,31 @@ void ObjectFactory::produce(){
(void) acuhandler;
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
GpiodRegular gpioGyro1(std::string("gpiochip5"), 21, std::string("CS_GYRO_1_ADIS"),
GpiodRegular* gpio = nullptr;
gpio = new GpiodRegular(std::string("gpiochip5"), 21, std::string("CS_GYRO_1_ADIS"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpioGyro1);
GpiodRegular gpioGyro2(std::string("gpiochip5"), 7, std::string("CS_GYRO_2_L3G"),
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio);
gpio = new GpiodRegular(std::string("gpiochip5"), 7, std::string("CS_GYRO_2_L3G"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpioGyro2);
GpiodRegular gpioGyro3(std::string("gpiochip5"), 3, std::string("CS_GYRO_3_L3G"),
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio);
gpio = new GpiodRegular(std::string("gpiochip5"), 3, std::string("CS_GYRO_3_L3G"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_L3G_CS, gpioGyro3);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_L3G_CS, gpio);
GpiodRegular gpioMgm0(std::string("gpiochip5"), 5, std::string("CS_MGM_0_LIS3_A"),
gpio = new GpiodRegular(std::string("gpiochip5"), 5, std::string("CS_MGM_0_LIS3_A"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpioMgm0);
GpiodRegular gpioMgm1(std::string("gpiochip5"), 17, std::string("CS_MGM_1_RM3100_A"),
gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpio);
gpio = new GpiodRegular(std::string("gpiochip5"), 17, std::string("CS_MGM_1_RM3100_A"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpioMgm1);
GpiodRegular gpioMgm2(std::string("gpiochip6"), 0, std::string("CS_MGM_2_LIS3_B"),
gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpio);
gpio = new GpiodRegular(std::string("gpiochip6"), 0, std::string("CS_MGM_2_LIS3_B"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpioMgm2);
GpiodRegular gpioMgm3(std::string("gpiochip5"), 23, std::string("CS_MGM_3_RM3100_B"),
gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpio);
gpio = new GpiodRegular(std::string("gpiochip5"), 23, std::string("CS_MGM_3_RM3100_B"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpioMgm3);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio);
gpioIF->addGpios(gpioCookieAcsBoard);
gpioComIF->addGpios(gpioCookieAcsBoard);
std::string spiDev = "/dev/spidev2.0";
SpiCookie* spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
@ -366,7 +369,7 @@ void ObjectFactory::produce(){
Max31865PT1000Handler* rtdIc16 = new Max31865PT1000Handler(objects::RTD_IC16, objects::SPI_COM_IF, spiRtdIc16, 0);
Max31865PT1000Handler* rtdIc17 = new Max31865PT1000Handler(objects::RTD_IC17, objects::SPI_COM_IF, spiRtdIc17, 0);
Max31865PT1000Handler* rtdIc18 = new Max31865PT1000Handler(objects::RTD_IC18, objects::SPI_COM_IF, spiRtdIc18, 0);
rtdIc10->setStartUpImmediately();
// rtdIc10->setStartUpImmediately();
// rtdIc4->setStartUpImmediately();
#endif

View File

@ -1,7 +1,8 @@
#include <bsp_q7s/gpio/gpioCallbacks.h>
#include <fsfwconfig/devices/gpioIds.h>
#include <linux/gpio/LinuxLibgpioIF.h>
#include <linux/gpio/GpioCookie.h>
#include "gpioCallbacks.h"
#include <devices/gpioIds.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include <fsfw_hal/common/gpio/GpioCookie.h>
#include <fsfw/serviceinterface/ServiceInterface.h>

View File

@ -1,8 +1,8 @@
#ifndef LINUX_GPIO_GPIOCALLBACKS_H_
#define LINUX_GPIO_GPIOCALLBACKS_H_
#include <linux/gpio/gpioDefinitions.h>
#include <linux/gpio/GpioIF.h>
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
#include <fsfw_hal/common/gpio/GpioIF.h>
namespace gpioCallbacks {

@ -1 +1 @@
Subproject commit 7ffae254b1c2658c2b87566a7bb6856236c6e7e8
Subproject commit c62cdbebcb521975043f1782692667faaf5a8aca

View File

@ -182,27 +182,27 @@ ReturnValue_t pst::gomspacePstInit(FixedTimeslotTaskIF *thisSequence){
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
// DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.2,
// DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.4,
// DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6,
// DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.8,
// DeviceHandlerIF::GET_READ);
//
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
// DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.2,
// DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.4,
// DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6,
// DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8,
// DeviceHandlerIF::GET_READ);
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Initialization of GomSpace PST failed" << std::endl;

View File

@ -1,4 +1,4 @@
add_subdirectory(csp)
add_subdirectory(uart)
add_subdirectory(utility)
add_subdirectory(boardtest)