Dining Philosophers Problem (DPP) example for the QP active object framework. Demonstrates: event-driven programming, hierarchical state machines in C++, modeling and graphical state machine design, code generation, preemptive multitasking, software tracing, power saving mode, direct event posting, publish-subscribe. More information available in the [[/users/QL/notebook|Quantum Leaps Notebook pages]]. See also [[http://www.state-machine.com|state-machine.com]].
Diff: bsp.cpp
- Revision:
- 3:81ceb3127876
- Parent:
- 2:2e62e514f323
- Child:
- 4:6189d844a1a2
diff -r 2e62e514f323 -r 81ceb3127876 bsp.cpp --- a/bsp.cpp Wed Feb 16 17:12:38 2011 +0000 +++ b/bsp.cpp Mon Sep 26 02:21:01 2011 +0000 @@ -1,7 +1,7 @@ ////////////////////////////////////////////////////////////////////////////// // Product: BSP for "Dining Philosophers Problem" example, QK kernel -// Last Updated for Version: 4.1.06 -// Date of the Last Update: Feb 16, 2011 +// Last Updated for Version: 4.2.04 +// Date of the Last Update: Sep 25, 2011 // // Q u a n t u m L e a P s // --------------------------- @@ -50,6 +50,7 @@ QSTimeCtr l_tickTime; QSTimeCtr l_tickPeriod; + static uint8_t l_SysTick_Handler; #define QSPY_BAUD_RATE 115200 @@ -69,7 +70,7 @@ l_tickTime += l_tickPeriod; // account for the clock rollover #endif - QF::tick(); // process all armed time events + QF::TICK(&l_SysTick_Handler); // process all armed time events QK_ISR_EXIT(); // inform the QK kernel of exiting the ISR } @@ -87,6 +88,7 @@ if (QS_INIT((void *)0) == 0) { // initialize the QS software tracing Q_ERROR(); } + QS_OBJ_DICTIONARY(&l_SysTick_Handler); } //............................................................................ void BSP_displyPhilStat(uint8_t n, char const *stat) {