-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
53 lines (40 loc) · 1.37 KB
/
Copy pathmain.cpp
File metadata and controls
53 lines (40 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Robot Manager application
*
*/
#include "mbed.h"
#include "config.h"
#include "LogUtil.h"
#include "qp_port.h"
#include "bsp.h"
using namespace QP;
Serial logg(SERIAL_TX, SERIAL_RX);
LogUtil logger(logg);
extern QActive * const AO_ControlManagerSM;
static QP::QEvt const * controlManagerQueue[10];
// QP Subscribe List
static QP::QSubscrList subscribeList[MAX_PUB_SIG];
static QF_MPOOL_EL(QP::QEvt) smlPoolSto[10];
//---------------------------------------------------------------------------------------
// I2C Configuration
DigitalOut pin(PC_8, 1);
DigitalOut pin2(PC_6, 1);
int main()
{
// Starting up Robot Manager
LOG("<<=====Starting up Control Manager====>>\r\n");
LOG("<<=====System CLOCK: %i ====>>\r\n", SystemCoreClock);
// Create instance of Control Manager
// Create Control Manager QP State Machine
// Initialize Board Support Package
BSP::BSP_init();
// Initialize QP framework
QF::init();
QF::poolInit(smlPoolSto, sizeof(smlPoolSto), sizeof(smlPoolSto[0]));
QF::psInit(subscribeList, Q_DIM(subscribeList));
QS_OBJ_DICTIONARY(controlManagerQueue);
QS_OBJ_DICTIONARY(smlPoolSto);
AO_ControlManagerSM->start(1U, controlManagerQueue, Q_DIM(controlManagerQueue), static_cast<void *>(0), 0U);
//timer.attach_us(BSP::SysTick_Handler, 1000000);
QF::run();
}