pdec handler
This commit is contained in:
@ -76,6 +76,7 @@
|
||||
#endif
|
||||
|
||||
#include <linux/obc/Ptme.h>
|
||||
#include <linux/obc/PdecHandler.h>
|
||||
#include <linux/obc/PapbVcInterface.h>
|
||||
#include <linux/obc/PtmeConfig.h>
|
||||
|
||||
@ -171,7 +172,7 @@ void ObjectFactory::produce(void* args) {
|
||||
new StarTrackerHandler(objects::START_TRACKER, objects::UART_COM_IF, starTrackerCookie);
|
||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||
|
||||
#endif /* TE7020 != 0 */
|
||||
#endif /* TE7020 == 0 */
|
||||
|
||||
#if OBSW_USE_CCSDS_IP_CORE == 1
|
||||
createCcsdsComponents(gpioComIF);
|
||||
@ -936,7 +937,8 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) {
|
||||
ptme->addVcInterface(ccsds::VC2, vc2);
|
||||
ptme->addVcInterface(ccsds::VC3, vc3);
|
||||
|
||||
CCSDSHandler* ccsdsHandler = new CCSDSHandler(objects::CCSDS_HANDLER, objects::PTME);
|
||||
CCSDSHandler* ccsdsHandler = new CCSDSHandler(objects::CCSDS_HANDLER, objects::PTME,
|
||||
objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||
|
||||
VirtualChannel* vc = nullptr;
|
||||
vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE);
|
||||
@ -948,6 +950,19 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) {
|
||||
vc = new VirtualChannel(ccsds::VC3, common::VC3_QUEUE_SIZE);
|
||||
ccsdsHandler->addVirtualChannel(ccsds::VC3, vc);
|
||||
|
||||
GpioCookie* gpioCookiePdec = new GpioCookie;
|
||||
consumer.str("");
|
||||
consumer << "0x" << std::hex << objects::PDEC_HANDLER;
|
||||
// GPIO also low after linux boot (specified by device-tree)
|
||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PDEC_RESET, consumer.str(), gpio::OUT,
|
||||
gpio::LOW);
|
||||
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
|
||||
|
||||
gpioComIF->addGpios(gpioCookiePdec);
|
||||
|
||||
new PdecHandler(objects::PDEC_HANDLER, objects::CCSDS_HANDLER, gpioComIF, gpioIds::PDEC_RESET);
|
||||
|
||||
#if BOARD_TE0720 == 0
|
||||
GpioCookie* gpioRS485Chip = new GpioCookie;
|
||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
|
||||
gpio::Direction::OUT, gpio::HIGH);
|
||||
@ -957,6 +972,7 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) {
|
||||
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_DATA, gpio);
|
||||
|
||||
gpioComIF->addGpios(gpioRS485Chip);
|
||||
#endif /* BOARD_TE0720 == 0 */
|
||||
}
|
||||
|
||||
void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
||||
|
Reference in New Issue
Block a user