compiling

This commit is contained in:
Robin Müller 2021-04-01 15:14:50 +02:00 committed by IRS Cleanroom Laptop
parent ff62b75029
commit 330aba7ea5
3 changed files with 38 additions and 16 deletions

View File

@ -5,6 +5,7 @@
#include <devices/gpioIds.h>
#include <tmtc/pusIds.h>
#include <devices/powerSwitcherList.h>
#include <devices/spi.h>
#include <bsp_q7s/devices/HeaterHandler.h>
#include <bsp_q7s/devices/SolarArrayDeploymentHandler.h>
@ -16,6 +17,10 @@
#include <mission/devices/PCDUHandler.h>
#include <mission/devices/P60DockHandler.h>
#include <mission/devices/Tmp1075Handler.h>
#include <mission/devices/MGMHandlerLIS3MDL.h>
#include <mission/devices/MGMHandlerRM3100.h>
#include <mission/devices/GyroL3GD20Handler.h>
#include <mission/devices/devicedefinitions/GomSpacePackets.h>
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
#include <mission/utility/TmFunnel.h>
@ -24,6 +29,7 @@
#include <linux/csp/CspComIF.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/gpio/LinuxLibgpioIF.h>
#include <fsfw_hal/common/gpio/GpioCookie.h>
@ -78,6 +84,7 @@ void ObjectFactory::produce(){
new CspComIF(objects::CSP_COM_IF);
new I2cComIF(objects::I2C_COM_IF);
auto gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
#if TE0720 == 0
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_LENGTH,
addresses::P60DOCK);
@ -112,20 +119,29 @@ void ObjectFactory::produce(){
(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);
GpiodRegular gpioGyro1(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"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpioGyro2);
GpiodRegular gpioGyro3(std::string("gpiochip5"), 3, std::string("CS_GYRO_3_L3G"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_L3G_CS, gpioGyro3);
GpiodRegular gpioMgm0(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"),
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"),
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"),
gpio::OUT, gpio::HIGH);
gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpioMgm3);
gpioIF->addGpios(gpioCookieAcsBoard);
std::string spiDev = "/dev/spidev2.0";
@ -158,7 +174,7 @@ void ObjectFactory::produce(){
tmp1075Handler_2->setStartUpImmediately();
GpioCookie* heaterGpiosCookie = new GpioCookie;
new LinuxLibgpioIF(objects::GPIO_IF);
#if TE0720 == 0
/* Pin H2-11 on stack connector */
GpiodRegular gpioConfigHeater0(std::string("gpiochip7"), 18,

@ -1 +1 @@
Subproject commit 7a3190e5b6980ad2addc5e8a76d21994b542f0e0
Subproject commit feee39a6c759f699a07dcde4a97d4b5f779ec50b

View File

@ -7,6 +7,12 @@
using gpioId_t = uint16_t;
namespace gpio {
enum Levels {
LOW = 0,
HIGH = 1
};
enum Direction {
IN = 0,
OUT = 1