started rm3100 testing
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
#include <fsfw/osal/linux/TcUnixUdpPollingTask.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <linux/spi/SpiComIF.h>
|
||||
#include <mission/devices/MGMHandlerRM3100.h>
|
||||
|
||||
void Factory::setStaticFrameworkObjectIds() {
|
||||
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
|
||||
@ -100,9 +101,14 @@ void ObjectFactory::produce(){
|
||||
std::string spiDev = "/dev/spidev0.0";
|
||||
SpiCookie* spiCookie = new SpiCookie(addresses::MGM_0_LIS3,
|
||||
gpioIds::MGM_0_LIS3_CS, spiDev, 24, spi::SpiMode::MODE_3, 3'900'000);
|
||||
auto mgmHandler = new MGMHandlerLIS3MDL(objects::MGM_0_LIS3_HANDLER,
|
||||
auto mgmLis3Handler = new MGMHandlerLIS3MDL(objects::MGM_0_LIS3_HANDLER,
|
||||
objects::SPI_COM_IF, spiCookie);
|
||||
mgmHandler->setStartUpImmediately();
|
||||
mgmLis3Handler->setStartUpImmediately();
|
||||
spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev, 32,
|
||||
spi::SpiMode::MODE_3, 976'000);
|
||||
auto mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_1_RM3100_HANDLER,
|
||||
objects::SPI_COM_IF, spiCookie);
|
||||
mgmRm3100Handler->setStartUpImmediately();
|
||||
|
||||
#endif /* RPI_TEST_ACS_BOARD == 1 */
|
||||
}
|
||||
|
@ -7,8 +7,8 @@
|
||||
#define RPI_LOOPBACK_TEST_GPIO 0
|
||||
|
||||
/* Only one of those 2 should be enabled! */
|
||||
#define RPI_ADD_SPI_TEST 0
|
||||
#define RPI_TEST_ACS_BOARD 1
|
||||
#define RPI_ADD_SPI_TEST 1
|
||||
#define RPI_TEST_ACS_BOARD 0
|
||||
|
||||
/* Adapt these values accordingly */
|
||||
namespace gpio {
|
||||
|
Reference in New Issue
Block a user