2020-07-18 17:58:58 -04:00
|
|
|
#include "qpcpp.hpp"
|
|
|
|
. . .
|
|
|
|
|
|
|
|
//............................................................................
|
2015-12-31 14:56:37 -05:00
|
|
|
int main() {
|
2022-04-19 19:23:30 -04:00
|
|
|
. . .
|
2015-12-31 14:56:37 -05:00
|
|
|
|
|
|
|
QP::QF::init(); // initialize the framework and the underlying RT kernel
|
2020-07-18 17:58:58 -04:00
|
|
|
BSP::init(); // initialize the BSP
|
|
|
|
. . .
|
2022-04-19 19:23:30 -04:00
|
|
|
// start the extended threads...
|
|
|
|
static QP::QEvt const *test1QueueSto[5];
|
|
|
|
static uint64_t test1StackSto[64];
|
2020-07-18 17:58:58 -04:00
|
|
|
DPP::XT_Test1->start( // <== start an extended thread
|
|
|
|
1U, // QP prio of the thread
|
|
|
|
test1QueueSto, // event queue storage
|
|
|
|
Q_DIM(test1QueueSto), // queue length [events]
|
|
|
|
test1StackSto, // stack storage
|
|
|
|
sizeof(test1StackSto)); // stack size [bytes]
|
2015-12-31 14:56:37 -05:00
|
|
|
. . .
|
2022-04-19 19:23:30 -04:00
|
|
|
// start active objects (basic threads)...
|
|
|
|
static QP::QEvt const *tableQueueSto[N_PHILO];
|
2020-07-18 17:58:58 -04:00
|
|
|
DPP::AO_Table->start( // <== start a basic thread (AO)
|
|
|
|
N_PHILO + 7U, // QP priority of the AO
|
|
|
|
tableQueueSto, // event queue storage
|
|
|
|
Q_DIM(tableQueueSto), // queue length [events]
|
2022-04-19 19:23:30 -04:00
|
|
|
nullptr, 0U); // NO stack storage
|
2015-12-31 14:56:37 -05:00
|
|
|
|
|
|
|
return QP::QF::run(); // run the QF application
|
|
|
|
}
|