diff --git a/3rd_party/CMSIS/Include/cmsis_ccs.h b/3rd_party/CMSIS/Include/cmsis_ccs.h index 2f597604..7243f2e0 100644 --- a/3rd_party/CMSIS/Include/cmsis_ccs.h +++ b/3rd_party/CMSIS/Include/cmsis_ccs.h @@ -1,9 +1,6 @@ //***************************************************************************** -// Updated by Quantum Leaps for CMIS 5.0.1 -// 2016-12-12 -//***************************************************************************** // -// Copyright (C) 2012 - 2014 Texas Instruments Incorporated - http://www.ti.com/ +// Copyright (C) 2012 - 2017 Texas Instruments Incorporated - http://www.ti.com/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -40,63 +37,18 @@ #ifndef CMSIS_CCS_H_ #define CMSIS_CCS_H_ -// Data Synchronization Barrier -__attribute__( ( always_inline ) ) static inline void __DSB(void) -{ - __asm(" dsb"); -} - -// Instruction Synchronization Barrier -__attribute__( ( always_inline ) ) static inline void __ISB(void) -{ - __asm(" isb"); -} - -#if (0) -// Get Main Stack Pointer -static inline uint32_t __get_MSP(void) -{ - register uint32_t result; - //__asm (" mrs result, msp"); - return(result); -} - -// Set Main Stack Pointer -static inline void __set_MSP(uint32_t topOfMainStack) -{ - asm(" .global topOfMainStack"); - __asm (" msr msp, topOfMainStack"); -} - - -// Get Priority Mask -static inline uint32_t __get_PRIMASK(void) -{ - uint32_t result; - __asm (" mrs result, primask"); - return(result); -} - - -// Set Priority Mask -static inline void __set_PRIMASK(uint32_t priMask) -{ - __asm (" msr primask, priMask"); -} -#endif - +//***************************************************************************** +// CMSIS-compatible instruction calls +//***************************************************************************** // // v5e, v6, Cortex-M3, Cortex-M4, Cortex-R4, and Cortex-A8 compiler intrinsics // -#define __CLZ _norm -#define __SXTB _sxtb -#define __SXTH _sxth -#define __UXTB _uxtb -#define __UXTH _uxth -#define __NOP __nop -#define __WFI __wfi - +#define __CLZ _norm +#define __SXTB _sxtb +#define __SXTH _sxth +#define __UXTB _uxtb +#define __UXTH _uxth // CCS supports intrinsics to take advantage of the shift operand left/right // before saturation extension of SSAT, but CMSIS does not take advantage // of those, so tell the compiler to use a sat & shift left with a shift @@ -108,18 +60,67 @@ static inline void __set_PRIMASK(uint32_t priMask) // Only define M4 based intrinsics if we're not using an M4 // #if defined (__TI_TMS470_V7M4__) + +// +// Add definitions for enable and disable interrupts +// +#if defined (__TI_COMPILER_VERSION__) + +#if (__TI_COMPILER_VERSION__ >= 5002000) + +#define __enable_irq _enable_IRQ +#define __disable_irq _disable_IRQ + +// No Operation +#define __NOP __nop +// Data Synchronization Barrier +#define __DSB _dsb + +#define __ISB _isb + +#elif (__TI_COMPILER_VERSION__ >= 4009000) + +#define __enable_fault_irq _enable_interrupts +#define __disable_fault_irq _disable_interrupts + +// No Operation +__attribute__( ( always_inline ) ) static inline void __nop(void) +{ + __asm(" nop"); +} +__attribute__( ( always_inline ) ) static inline void __NOP(void) +{ + __asm(" nop"); +} +// Data Synchronization Barrier +__attribute__( ( always_inline ) ) static inline void __DSB(void) +{ + __asm(" dsb"); +} + +__attribute__( ( always_inline ) ) static inline void __ISB(void) +{ + __asm(" isb"); +} + +#endif /*__TI_COMPILER_VERSION__ version*/ + +#endif /*__TI_COMPILER_VERSION__*/ + // // V5E, V6, Cortex-M4, Cortex-R4, and Cortex-A8 compiler intrinsics // -#define __QADD _sadd -#define __QDADD _sdadd -#define __QDSUB _sdsub -#define __SMLABB _smlabb -#define __SMLABT _smlabt -#define __SMLALBB _smlalbb -#define __SMLALBT _smlalbt -#define __SMLALTB _smlaltb -#define __SMLALTT _smlaltt +#define __ROR __ror +#define __SXTB16(src) _sxtb16((src),0) +#define __QADD _sadd +#define __QDADD _sdadd +#define __QDSUB _sdsub +#define __SMLABB _smlabb +#define __SMLABT _smlabt +#define __SMLALBB _smlalbb +#define __SMLALBT _smlalbt +#define __SMLALTB _smlaltb +#define __SMLALTT _smlaltt #define __SMLATB _smlatb #define __SMLATT _smlatt #define __SMLAWB _smlawb @@ -131,77 +132,77 @@ static inline void __set_PRIMASK(uint32_t priMask) #define __SMULTT _smultt #define __SMULWB _smulwb #define __SMULWT _smulwt -#define __QSUB _ssub -#define __SUBC _subc +#define __QSUB _ssub +#define __SUBC _subc // // v6, Cortex-M4, Cortex-R4, and Cortex-A8 compiler intrinsics // -#define __SHASX _shaddsubx -#define __SHSAX _shsubaddx -#define __PKHBT _pkhbt -#define __PKHTB _pkhtb +#define __SHASX _shaddsubx +#define __SHSAX _shsubaddx +#define __PKHBT _pkhbt +#define __PKHTB _pkhtb #define __QADD16 _qadd16 -#define __QADD8 _qadd8 +#define __QADD8 _qadd8 #define __QSUB16 _qsub16 -#define __QSUB8 _qsub8 -#define __QASX _saddsubx -#define __QSAX _qsubaddx +#define __QSUB8 _qsub8 +#define __QASX _saddsubx +#define __QSAX _qsubaddx #define __SADD16 _sadd16 -#define __SADD8 _sadd8 -#define __SASX _saddsubx -#define __SEL _sel -#define __SHADD16 _shadd16 +#define __SADD8 _sadd8 +#define __SASX _saddsubx +#define __SEL _sel +#define __SHADD16 _shadd16 #define __SHADD8 _shadd8 -#define __SHSUB16 _shsub16 +#define __SHSUB16 _shsub16 #define __SHSUB8 _shsub8 -#define __SMLAD _smlad +#define __SMLAD _smlad #define __SMLADX _smladx -#define __SMLALD _smlald -#define __SMLALDX _smlaldx -#define __SMLSD _smlsd +#define __SMLALD(src1, src2, accumulator) _smlald(accumulator, src1, src2) +#define __SMLALDX _smlaldx +#define __SMLSD _smlsd #define __SMLSDX _smlsdx #define __SMLSLD _smlsld -#define __SMLSLDX _smlsldx -#define __SMMLA _smmla +#define __SMLSLDX _smlsldx +#define __SMMLA _smmla #define __SMMLAR _smmlar -#define __SMMLS _smmls +#define __SMMLS _smmls #define __SMMLSR _smmlsr -#define __SMMUL _smmul +#define __SMMUL _smmul #define __SMMULR _smmulr -#define __SMUAD _smuad +#define __SMUAD _smuad #define __SMUADX _smuadx -#define __SMUSD _smusd -#define __SMUSDX _smusd +#define __SMUSD _smusd +#define __SMUSDX _smusdx #define __SSAT16 _ssat16 #define __SSUB16 _ssub16 -#define __SSUB8 _ssub8 -#define __SSAX _ssubaddx -#define __SXTAB _sxtab -#define __SXTAB16 _sxtab16 -#define __SXTAH _sxtah -#define __UMAAL _umaal +#define __SSUB8 _ssub8 +#define __SSAX _ssubaddx +#define __SXTAB _sxtab +#define __SXTAB16 _sxtab16 +#define __SXTAH _sxtah +#define __UMAAL _umaal #define __UADD16 _uadd16 -#define __UADD8 _uadd8 -#define __UHADD16 _uhadd16 +#define __UADD8 _uadd8 +#define __UHADD16 _uhadd16 #define __UHADD8 _uhadd8 -#define __UASX _uaddsubx -#define __UHSUB16 _uhsub16 +#define __UASX _uaddsubx +#define __UHSUB16 _uhsub16 #define __UHSUB8 _uhsub8 -#define __UQADD16 _uqadd16 +#define __UQADD16 _uqadd16 #define __UQADD8 _uqadd8 -#define __UQASX _uqaddsubx -#define __UQSUB16 _uqsub16 +#define __UQASX _uqaddsubx +#define __UQSUB16 _uqsub16 #define __UQSUB8 _uqsub8 -#define __UQSAX _uqsubaddx -#define __USAD8 _usad8 +#define __UQSAX _uqsubaddx +#define __USAD8 _usad8 #define __USAT16 _usat16 #define __USUB16 _usub16 -#define __USUB8 _usub8 -#define __USAX _usubaddx -#define __UXTAB _uxtab -#define __UXTAB16 _uxtab16 -#define __UXTAH _uxtah +#define __USUB8 _usub8 +#define __USAX _usubaddx +#define __UXTAB _uxtab +#define __UXTAB16 _uxtab16 +#define __UXTAH _uxtah #define __UXTB16 _uxtb16 #endif /*__TI_TMS470_V7M4__*/ diff --git a/README.md b/README.md index 8add81a4..107cf47d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ ![QP framework](https://state-machine.com/img/qp_banner.jpg) +> **NOTE:** If your company has a policy forbidding open source in your product, all QP frameworks can be [licensed commercially](https://state-machine.com/licensing), in which case you don't use any open source license and you do not violate your policy. + # What's New? -View QP/C Revision History at: -https://state-machine.com/qpc/history.html +View QP/C Revision History at: https://state-machine.com/qpc/history.html --------------------------------------------------------------------------- # About QP/C @@ -71,14 +72,19 @@ https://state-machine.com/doc/AN_Getting_Started_with_QPC.pdf The guide also contains a tutorial, in which you build a simple "Blinky" application. -> NOTE: QP/C can be unzipped anywhere in your file system, but the -recommended location is `C:\qp\qpcpp` on Windows and `~/qp/qpcpp` +> **NOTE:** QP/C can be unzipped anywhere in your file system, but the +recommended location is `C:\qp\qpc` on Windows and `~/qp/qpc` on Linux/MacOS. +--------------------------------------------------------------------------- +# QP/C Licensing +QP/C is licensed under the increasingly popular [dual licensing model](https://state-machine.com/licensing), in which both the open source software distribution mechanism and traditional closed source software distribution models are combined. + +> **NOTE:** If your company has a policy forbidding open source in your product, all QP frameworks can be [licensed commercially](https://state-machine.com/licensing), in which case you don't use any open source license and you do not violate your policy. + --------------------------------------------------------------------------- # QP/C Documentation -The **QP/C Manual** is located online at: -- https://state-machine.com/qpc +The **QP/C Manual** is located online at: https://state-machine.com/qpc --------------------------------------------------------------------------- # How to get help? diff --git a/doxygen/history.dox b/doxygen/history.dox index 4bd056d9..917b3aad 100644 --- a/doxygen/history.dox +++ b/doxygen/history.dox @@ -12,8 +12,8 @@ changed to `QXTHREAD_START(XT_Test1 ...)`, where XT_Test1 is a pointer to `::QXThread *`. This release fixes the following bugs: -- bug#178 "GNU-ARM compiler reports "Error: unaligned opcodes..." in startup code for QP/C/C++/nano examples". The bug fix entails modifying the startup code for the GNU-ARM compiler in the `3rd_party` directory. Specifically, the proper alignment directives have been added to the inline assembly in the exception handlers. -- bug#179 "Assertion ID 210 fires when signaling on a QXK semaphore" +- bug#178 "GNU-ARM compiler reports "Error: unaligned opcodes..." in startup code for QP/C/C++/nano examples". The bug fix entails modifying the startup code for the GNU-ARM compiler in the `3rd_party` directory. Specifically, the proper alignment directives have been added to the inline assembly in the exception handlers. +- bug#179 "Assertion ID 210 fires when signaling on a QXK semaphore" This release fixes the naming problem of the startup code for the STM32F7-Discovery board (in the `3rd_party/stm32f7-discovery/gnu/ and arm/` diff --git a/doxygen/metrics.dox b/doxygen/metrics.dox index 82c1d490..bd7d1078 100644 --- a/doxygen/metrics.dox +++ b/doxygen/metrics.dox @@ -1,2246 +1,2246 @@ -/** @page metrics Code Metrics - -@code - Standard Code Metrics for QP/C 5.9.5 - - Resource Standard Metrics (TM) for C, C++, C# and Java - Version 7.75 - mSquaredTechnologies.com - - License Type: Windows Single User License - Licensed To : Quantum Leaps, LLC - License No. : WS2975 License Date: Dec 15, 2013 - Build Date : Sep 2 2009 Run Date: Jul 20, 2017 - (C)1996-2009 M Squared Technologies LLC - ________________________________________________________________________ - - ~~ Function Metrics ~~ - ~~ Complexity Detail Analysis ~~ - - File: ..\include\qassert.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 49 eLOC 48 lLOC 3 Comment 240 Lines 309 - ________________________________________________________________________ - End of File: ..\include\qassert.h - - - File: ..\include\qep.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 156 eLOC 152 lLOC 56 Comment 404 Lines 613 - ________________________________________________________________________ - End of File: ..\include\qep.h - - - File: ..\include\qequeue.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 33 eLOC 33 lLOC 15 Comment 180 Lines 233 - ________________________________________________________________________ - End of File: ..\include\qequeue.h - - - File: ..\include\qf.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 191 eLOC 191 lLOC 75 Comment 530 Lines 825 - ________________________________________________________________________ - End of File: ..\include\qf.h - - - File: ..\include\qk.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 64 eLOC 64 lLOC 24 Comment 105 Lines 177 - ________________________________________________________________________ - End of File: ..\include\qk.h - - - File: ..\include\qmpool.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 42 eLOC 42 lLOC 18 Comment 109 Lines 169 - ________________________________________________________________________ - End of File: ..\include\qmpool.h - - - File: ..\include\qp_port.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 4 eLOC 4 lLOC 0 Comment 40 Lines 45 - ________________________________________________________________________ - End of File: ..\include\qp_port.h - - - File: ..\include\qpc.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 66 eLOC 65 lLOC 8 Comment 125 Lines 223 - ________________________________________________________________________ - End of File: ..\include\qpc.h - - - File: ..\include\qpset.h - ________________________________________________________________________ - - Inline Function: QF_LOG2 - Parameters: (uint32_t x) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 3 - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 25 eLOC 18 lLOC 11 Comment 7 Lines 26 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 98 eLOC 91 lLOC 23 Comment 96 Lines 216 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 1 - Total Function LOC.....: 25 Total Function Pts LOC : 0.0 - Total Function eLOC....: 18 Total Function Pts eLOC: 0.0 - Total Function lLOC....: 11 Total Function Pts lLOC: 0.0 - Total Function Params .: 1 Total Function Return .: 1 - Total Cyclo Complexity : 4 Total Function Complex.: 6 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 25 Average Function LOC ..: 25.00 - Max Function eLOC .....: 18 Average Function eLOC .: 18.00 - Max Function lLOC .....: 11 Average Function lLOC .: 11.00 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 1 Avg Function Parameters: 1.00 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 2 Avg Interface Complex. : 2.00 - Max Cyclomatic Complex.: 4 Avg Cyclomatic Complex.: 4.00 - Max Total Complexity ..: 6 Avg Total Complexity ..: 6.00 - ________________________________________________________________________ - End of File: ..\include\qpset.h - - - File: ..\include\qs.h - ________________________________________________________________________ - - - NOTICE: The end of the source file has been reached where the - open brace count { 28 != 26 } close brace count - This is an indication of non-compilable code within the source - file. RSM processes all source code including code wrapped - with preprocessor directives. Accurate metrics requires that - all code present in this file must be compilable. - ~~ Total File Summary ~~ - - LOC 489 eLOC 481 lLOC 119 Comment 704 Lines 1199 - ________________________________________________________________________ - End of File: ..\include\qs.h - - - File: ..\include\qs_dummy.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 72 eLOC 72 lLOC 0 Comment 43 Lines 124 - ________________________________________________________________________ - End of File: ..\include\qs_dummy.h - - - File: ..\include\qv.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 25 eLOC 25 lLOC 2 Comment 80 Lines 111 - ________________________________________________________________________ - End of File: ..\include\qv.h - - - File: ..\include\qxk.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 71 eLOC 71 lLOC 28 Comment 122 Lines 204 - ________________________________________________________________________ - End of File: ..\include\qxk.h - - - File: ..\include\qxthread.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 32 eLOC 32 lLOC 15 Comment 132 Lines 177 - ________________________________________________________________________ - End of File: ..\include\qxthread.h - - - File: ..\src\qf_pkg.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 63 eLOC 63 lLOC 8 Comment 120 Lines 206 - ________________________________________________________________________ - End of File: ..\src\qf_pkg.h - - - File: ..\src\qs_pkg.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 25 eLOC 23 lLOC 6 Comment 59 Lines 93 - ________________________________________________________________________ - End of File: ..\src\qs_pkg.h - - - File: ..\src\qxk_pkg.h - ________________________________________________________________________ - - ~~ Total File Summary ~~ - - LOC 20 eLOC 19 lLOC 8 Comment 49 Lines 78 - ________________________________________________________________________ - End of File: ..\src\qxk_pkg.h - - - File: ..\src\qf\qep_hsm.c - ________________________________________________________________________ - - Function: QHsm_ctor - Parameters: (QHsm * const me, QStateHandler initial) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 9 eLOC 7 lLOC 4 Comment 21 Lines 9 - - Function: QHsm_init_ - Parameters: (QHsm * const me, QEvt const * const e) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 3 - Conditional if / else if: 1 - Logical and ( && ) : 2 - Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 - LOC 50 eLOC 47 lLOC 31 Comment 35 Lines 70 - - Function: QHsm_top - Parameters: (void const * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 18 Lines 5 - - Function: QHsm_dispatch_ - Parameters: (QHsm * const me, QEvt const * const e) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 4 - Loops for / foreach : 2 - Conditional if / else if: 5 - Logical and ( && ) : 1 - Complexity Param 2 Return 1 Cyclo Vg 13 Total 16 - LOC 106 eLOC 95 lLOC 62 Comment 67 Lines 147 - - Function: QHsm_tran_ - Parameters: (QHsm * const me, QStateHandler path[QHSM_MAX_NEST_DEPTH_]) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 4 - Conditional if / else if: 10 - Complexity Param 2 Return 1 Cyclo Vg 15 Total 18 - LOC 97 eLOC 76 lLOC 48 Comment 63 Lines 134 - - Function: QHsm_isIn - Parameters: (QHsm * const me, QStateHandler const state) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 1 - Conditional if / else if: 1 - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 16 eLOC 13 lLOC 9 Comment 21 Lines 21 - - Function: QHsm_childState_ - Parameters: (QHsm * const me, QStateHandler const parent) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 1 - Conditional if / else if: 1 - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 19 eLOC 15 lLOC 12 Comment 30 Lines 25 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 345 eLOC 298 lLOC 177 Comment 317 Lines 628 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 7 - Total Function LOC.....: 302 Total Function Pts LOC : 2.7 - Total Function eLOC....: 257 Total Function Pts eLOC: 2.3 - Total Function lLOC....: 169 Total Function Pts lLOC: 1.4 - Total Function Params .: 14 Total Function Return .: 7 - Total Cyclo Complexity : 43 Total Function Complex.: 64 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 106 Average Function LOC ..: 43.14 - Max Function eLOC .....: 95 Average Function eLOC .: 36.71 - Max Function lLOC .....: 62 Average Function lLOC .: 24.14 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 2 Avg Function Parameters: 2.00 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 3 Avg Interface Complex. : 3.00 - Max Cyclomatic Complex.: 15 Avg Cyclomatic Complex.: 6.14 - Max Total Complexity ..: 18 Avg Total Complexity ..: 9.14 - ________________________________________________________________________ - End of File: ..\src\qf\qep_hsm.c - - - File: ..\src\qf\qep_msm.c - ________________________________________________________________________ - - Function: QMsm_ctor - Parameters: (QMsm * const me, QStateHandler initial) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 9 eLOC 7 lLOC 4 Comment 28 Lines 10 - - Function: QMsm_init_ - Parameters: (QMsm * const me, QEvt const * const e) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 1 - Logical and ( && ) : 2 - Complexity Param 2 Return 1 Cyclo Vg 4 Total 7 - LOC 23 eLOC 22 lLOC 13 Comment 25 Lines 37 - - Function: QMsm_dispatch_ - Parameters: (QMsm * const me, QEvt const * const e) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 2 - Conditional if / else if: 13 - Complexity Param 2 Return 1 Cyclo Vg 16 Total 19 - LOC 116 eLOC 99 lLOC 61 Comment 77 Lines 157 - - Function: QMsm_execTatbl_ - Parameters: (QMsm * const me, QMTranActTable const *tatbl) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Conditional if / else if: 6 - Complexity Param 2 Return 1 Cyclo Vg 8 Total 11 - LOC 53 eLOC 43 lLOC 21 Comment 33 Lines 64 - - Function: QMsm_exitToTranSource_ - Parameters: (QMsm * const me, QMState const *s, QMState const *ts) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 1 - Conditional if / else if: 2 - Complexity Param 3 Return 1 Cyclo Vg 4 Total 8 - LOC 17 eLOC 12 lLOC 6 Comment 20 Lines 23 - - Function: QMsm_enterHistory_ - Parameters: (QMsm * const me, QMState const *const hist) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 2 - Conditional if / else if: 3 - Complexity Param 2 Return 1 Cyclo Vg 6 Total 9 - LOC 40 eLOC 33 lLOC 21 Comment 24 Lines 48 - - Function: QMsm_isInState - Parameters: (QMsm const * const me, QMState const * const state) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Conditional if / else if: 1 - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 11 eLOC 8 lLOC 6 Comment 16 Lines 12 - - Function: QMsm_childStateObj_ - Parameters: (QMsm const * const me, QMState const * const parent) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Conditional if / else if: 1 - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 19 eLOC 13 lLOC 9 Comment 20 Lines 23 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 315 eLOC 262 lLOC 146 Comment 300 Lines 582 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 8 - Total Function LOC.....: 288 Total Function Pts LOC : 2.5 - Total Function eLOC....: 237 Total Function Pts eLOC: 2.0 - Total Function lLOC....: 141 Total Function Pts lLOC: 1.1 - Total Function Params .: 17 Total Function Return .: 8 - Total Cyclo Complexity : 45 Total Function Complex.: 70 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 116 Average Function LOC ..: 36.00 - Max Function eLOC .....: 99 Average Function eLOC .: 29.63 - Max Function lLOC .....: 61 Average Function lLOC .: 17.63 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 3 Avg Function Parameters: 2.13 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 4 Avg Interface Complex. : 3.13 - Max Cyclomatic Complex.: 16 Avg Cyclomatic Complex.: 5.63 - Max Total Complexity ..: 19 Avg Total Complexity ..: 8.75 - ________________________________________________________________________ - End of File: ..\src\qf\qep_msm.c - - - File: ..\src\qf\qf_act.c - ________________________________________________________________________ - - Function: QF_add_ - Parameters: (QActive * const a) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical and ( && ) : 2 - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 15 eLOC 14 lLOC 8 Comment 23 Lines 25 - - Function: QF_remove_ - Parameters: (QActive * const a) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical and ( && ) : 2 - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 16 eLOC 15 lLOC 9 Comment 23 Lines 25 - - Function: QF_bzero - Parameters: (void * const start, uint_fast16_t len) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 1 - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 8 eLOC 6 lLOC 4 Comment 14 Lines 8 - - Inline Function: QF_LOG2 - Parameters: (uint32_t x) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 3 - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 25 eLOC 18 lLOC 11 Comment 1 Lines 26 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 148 eLOC 136 lLOC 35 Comment 123 Lines 276 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 4 - Total Function LOC.....: 64 Total Function Pts LOC : 1.2 - Total Function eLOC....: 53 Total Function Pts eLOC: 1.1 - Total Function lLOC....: 32 Total Function Pts lLOC: 0.3 - Total Function Params .: 5 Total Function Return .: 4 - Total Cyclo Complexity : 12 Total Function Complex.: 21 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 25 Average Function LOC ..: 16.00 - Max Function eLOC .....: 18 Average Function eLOC .: 13.25 - Max Function lLOC .....: 11 Average Function lLOC .: 8.00 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 2 Avg Function Parameters: 1.25 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 3 Avg Interface Complex. : 2.25 - Max Cyclomatic Complex.: 4 Avg Cyclomatic Complex.: 3.00 - Max Total Complexity ..: 6 Avg Total Complexity ..: 5.25 - ________________________________________________________________________ - End of File: ..\src\qf\qf_act.c - - - File: ..\src\qf\qf_actq.c - ________________________________________________________________________ - - Function: QActive_post_ - Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con - st margin) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 5 - Logical or ( || ) : 1 - Logical and ( && ) : 1 - Complexity Param 3 Return 1 Cyclo Vg 8 Total 12 - LOC 60 eLOC 50 lLOC 35 Comment 77 Lines 81 - - Function: QActive_postLIFO_ - Parameters: (QActive * const me, QEvt const * const e) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 4 - Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 - LOC 37 eLOC 31 lLOC 22 Comment 36 Lines 50 - - Function: QActive_get_ - Parameters: (QActive * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 2 - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 37 eLOC 33 lLOC 23 Comment 32 Lines 47 - - Function: QF_getQueueMin - Parameters: (uint_fast8_t const prio) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical and ( && ) : 1 - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 10 eLOC 9 lLOC 6 Comment 18 Lines 13 - - Function: QTicker_ctor - Parameters: (QTicker * const me, uint8_t tickRate) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 12 eLOC 10 lLOC 4 Comment 6 Lines 14 - - Function: QTicker_init_ - Parameters: (QHsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 - - Function: QTicker_dispatch_ - Parameters: (QHsm * const me, QEvt const * const e) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 12 eLOC 10 lLOC 8 Comment 4 Lines 15 - - Function: QTicker_post_ - Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con - st margin) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 - LOC 24 eLOC 21 lLOC 17 Comment 15 Lines 32 - - Function: QTicker_postLIFO_ - Parameters: (QActive * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 238 eLOC 208 lLOC 126 Comment 252 Lines 453 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 9 - Total Function LOC.....: 202 Total Function Pts LOC : 1.9 - Total Function eLOC....: 172 Total Function Pts eLOC: 1.6 - Total Function lLOC....: 121 Total Function Pts lLOC: 1.0 - Total Function Params .: 18 Total Function Return .: 9 - Total Cyclo Complexity : 25 Total Function Complex.: 52 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 60 Average Function LOC ..: 22.44 - Max Function eLOC .....: 50 Average Function eLOC .: 19.11 - Max Function lLOC .....: 35 Average Function lLOC .: 13.44 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 3 Avg Function Parameters: 2.00 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 4 Avg Interface Complex. : 3.00 - Max Cyclomatic Complex.: 8 Avg Cyclomatic Complex.: 2.78 - Max Total Complexity ..: 12 Avg Total Complexity ..: 5.78 - ________________________________________________________________________ - End of File: ..\src\qf\qf_actq.c - - - File: ..\src\qf\qf_defer.c - ________________________________________________________________________ - - Function: QActive_defer - Parameters: (QActive const * const me, QEQueue * const eq, QEvt const * - const e) - Complexity Param 3 Return 1 Cyclo Vg 1 Total 5 - LOC 4 eLOC 2 lLOC 2 Comment 24 Lines 5 - - Function: QActive_recall - Parameters: (QActive * const me, QEQueue * const eq) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 2 - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 19 eLOC 15 lLOC 10 Comment 33 Lines 36 - - Function: QActive_flushDeferred - Parameters: (QActive const * const me, QEQueue * const eq) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 10 eLOC 7 lLOC 7 Comment 17 Lines 12 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 47 eLOC 38 lLOC 19 Comment 121 Lines 167 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 3 - Total Function LOC.....: 33 Total Function Pts LOC : 0.4 - Total Function eLOC....: 24 Total Function Pts eLOC: 0.3 - Total Function lLOC....: 19 Total Function Pts lLOC: 0.1 - Total Function Params .: 7 Total Function Return .: 3 - Total Cyclo Complexity : 6 Total Function Complex.: 16 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 19 Average Function LOC ..: 11.00 - Max Function eLOC .....: 15 Average Function eLOC .: 8.00 - Max Function lLOC .....: 10 Average Function lLOC .: 6.33 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 3 Avg Function Parameters: 2.33 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 4 Avg Interface Complex. : 3.33 - Max Cyclomatic Complex.: 3 Avg Cyclomatic Complex.: 2.00 - Max Total Complexity ..: 6 Avg Total Complexity ..: 5.33 - ________________________________________________________________________ - End of File: ..\src\qf\qf_defer.c - - - File: ..\src\qf\qf_dyn.c - ________________________________________________________________________ - - Function: QEvt_ctor - Parameters: (QEvt * const me, enum_t const sig) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 9 Lines 6 - - Function: QF_poolInit - Parameters: (void * const poolSto, uint_fast32_t const poolSize, uint_fa - st16_t const evtSize) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical or ( || ) : 1 - Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 - LOC 9 eLOC 7 lLOC 4 Comment 38 Lines 13 - - Function: QF_newX_ - Parameters: (uint_fast16_t const evtSize, uint_fast16_t const margin, en - um_t const sig) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Conditional if / else if: 2 - Inlined if-else ( ? : ) : 1 - Complexity Param 3 Return 1 Cyclo Vg 5 Total 9 - LOC 29 eLOC 23 lLOC 14 Comment 37 Lines 39 - - Function: QF_gc - Parameters: (QEvt const * const e) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 2 - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 26 eLOC 22 lLOC 13 Comment 35 Lines 39 - - Function: QF_newRef_ - Parameters: (QEvt const * const e, QEvt const * const evtRef) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 10 eLOC 8 lLOC 5 Comment 16 Lines 15 - - Function: QF_poolGetMaxBlockSize - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 3 eLOC 2 lLOC 1 Comment 5 Lines 3 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 100 eLOC 84 lLOC 42 Comment 193 Lines 293 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 6 - Total Function LOC.....: 82 Total Function Pts LOC : 0.8 - Total Function eLOC....: 66 Total Function Pts eLOC: 0.7 - Total Function lLOC....: 40 Total Function Pts lLOC: 0.3 - Total Function Params .: 11 Total Function Return .: 6 - Total Cyclo Complexity : 14 Total Function Complex.: 31 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 29 Average Function LOC ..: 13.67 - Max Function eLOC .....: 23 Average Function eLOC .: 11.00 - Max Function lLOC .....: 14 Average Function lLOC .: 6.67 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 3 Avg Function Parameters: 1.83 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 4 Avg Interface Complex. : 2.83 - Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 2.33 - Max Total Complexity ..: 9 Avg Total Complexity ..: 5.17 - ________________________________________________________________________ - End of File: ..\src\qf\qf_dyn.c - - - File: ..\src\qf\qf_mem.c - ________________________________________________________________________ - - Function: QMPool_init - Parameters: (QMPool * const me, void * const poolSto, uint_fast32_t pool - Size, uint_fast16_t blockSize) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 2 - Logical and ( && ) : 2 - Complexity Param 4 Return 1 Cyclo Vg 5 Total 10 - LOC 36 eLOC 32 lLOC 24 Comment 58 Lines 52 - - Function: QMPool_put - Parameters: (QMPool * const me, void *b) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical and ( && ) : 1 - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 15 eLOC 14 lLOC 9 Comment 29 Lines 22 - - Function: QMPool_get - Parameters: (QMPool * const me, uint_fast16_t const margin) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 3 - Complexity Param 2 Return 1 Cyclo Vg 4 Total 7 - LOC 42 eLOC 36 lLOC 23 Comment 54 Lines 66 - - Function: QF_getPoolMin - Parameters: (uint_fast8_t const poolId) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical and ( && ) : 1 - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 10 eLOC 9 lLOC 6 Comment 13 Lines 14 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 115 eLOC 103 lLOC 62 Comment 201 Lines 302 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 4 - Total Function LOC.....: 103 Total Function Pts LOC : 0.9 - Total Function eLOC....: 91 Total Function Pts eLOC: 0.8 - Total Function lLOC....: 62 Total Function Pts lLOC: 0.5 - Total Function Params .: 9 Total Function Return .: 4 - Total Cyclo Complexity : 13 Total Function Complex.: 26 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 42 Average Function LOC ..: 25.75 - Max Function eLOC .....: 36 Average Function eLOC .: 22.75 - Max Function lLOC .....: 24 Average Function lLOC .: 15.50 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 4 Avg Function Parameters: 2.25 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 5 Avg Interface Complex. : 3.25 - Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 3.25 - Max Total Complexity ..: 10 Avg Total Complexity ..: 6.50 - ________________________________________________________________________ - End of File: ..\src\qf\qf_mem.c - - - File: ..\src\qf\qf_ps.c - ________________________________________________________________________ - - Function: QF_psInit - Parameters: (QSubscrList * const subscrSto, enum_t const maxSignal) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 7 eLOC 6 lLOC 3 Comment 32 Lines 12 - - Function: QF_publish_ - Parameters: (QEvt const * const e) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 1 - Conditional if / else if: 3 - Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 - LOC 36 eLOC 30 lLOC 21 Comment 50 Lines 63 - - Function: QActive_subscribe - Parameters: (QActive const * const me, enum_t const sig) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical and ( && ) : 4 - Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 - LOC 16 eLOC 15 lLOC 8 Comment 22 Lines 22 - - Function: QActive_unsubscribe - Parameters: (QActive const * const me, enum_t const sig) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical and ( && ) : 4 - Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 - LOC 16 eLOC 15 lLOC 8 Comment 29 Lines 25 - - Function: QActive_unsubscribeAll - Parameters: (QActive const * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Conditional if / else if: 1 - Logical and ( && ) : 2 - Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 - LOC 21 eLOC 18 lLOC 10 Comment 24 Lines 24 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 113 eLOC 101 lLOC 52 Comment 205 Lines 320 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 5 - Total Function LOC.....: 96 Total Function Pts LOC : 0.9 - Total Function eLOC....: 84 Total Function Pts eLOC: 0.8 - Total Function lLOC....: 50 Total Function Pts lLOC: 0.4 - Total Function Params .: 8 Total Function Return .: 5 - Total Cyclo Complexity : 21 Total Function Complex.: 34 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 36 Average Function LOC ..: 19.20 - Max Function eLOC .....: 30 Average Function eLOC .: 16.80 - Max Function lLOC .....: 21 Average Function lLOC .: 10.00 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 2 Avg Function Parameters: 1.60 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 3 Avg Interface Complex. : 2.60 - Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 4.20 - Max Total Complexity ..: 8 Avg Total Complexity ..: 6.80 - ________________________________________________________________________ - End of File: ..\src\qf\qf_ps.c - - - File: ..\src\qf\qf_qact.c - ________________________________________________________________________ - - Function: QActive_ctor - Parameters: (QActive * const me, QStateHandler initial) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 12 eLOC 10 lLOC 4 Comment 19 Lines 17 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 14 eLOC 12 lLOC 4 Comment 69 Lines 81 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 1 - Total Function LOC.....: 12 Total Function Pts LOC : 0.1 - Total Function eLOC....: 10 Total Function Pts eLOC: 0.1 - Total Function lLOC....: 4 Total Function Pts lLOC: 0.0 - Total Function Params .: 2 Total Function Return .: 1 - Total Cyclo Complexity : 1 Total Function Complex.: 4 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 12 Average Function LOC ..: 12.00 - Max Function eLOC .....: 10 Average Function eLOC .: 10.00 - Max Function lLOC .....: 4 Average Function lLOC .: 4.00 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 2 Avg Function Parameters: 2.00 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 3 Avg Interface Complex. : 3.00 - Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00 - Max Total Complexity ..: 4 Avg Total Complexity ..: 4.00 - ________________________________________________________________________ - End of File: ..\src\qf\qf_qact.c - - - File: ..\src\qf\qf_qeq.c - ________________________________________________________________________ - - Function: QEQueue_init - Parameters: (QEQueue * const me, QEvt const *qSto[], uint_fast16_t const - qLen) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 - LOC 16 eLOC 13 lLOC 9 Comment 22 Lines 18 - - Function: QEQueue_post - Parameters: (QEQueue * const me, QEvt const * const e, uint_fast16_t con - st margin) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 5 - Complexity Param 3 Return 1 Cyclo Vg 6 Total 10 - LOC 53 eLOC 44 lLOC 30 Comment 55 Lines 74 - - Function: QEQueue_postLIFO - Parameters: (QEQueue * const me, QEvt const * const e) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 4 - Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 - LOC 34 eLOC 29 lLOC 21 Comment 41 Lines 44 - - Function: QEQueue_get - Parameters: (QEQueue * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 3 - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 37 eLOC 32 lLOC 21 Comment 35 Lines 47 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 154 eLOC 132 lLOC 81 Comment 204 Lines 322 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 4 - Total Function LOC.....: 140 Total Function Pts LOC : 1.2 - Total Function eLOC....: 118 Total Function Pts eLOC: 1.0 - Total Function lLOC....: 81 Total Function Pts lLOC: 0.6 - Total Function Params .: 9 Total Function Return .: 4 - Total Cyclo Complexity : 17 Total Function Complex.: 30 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 53 Average Function LOC ..: 35.00 - Max Function eLOC .....: 44 Average Function eLOC .: 29.50 - Max Function lLOC .....: 30 Average Function lLOC .: 20.25 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 3 Avg Function Parameters: 2.25 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 4 Avg Interface Complex. : 3.25 - Max Cyclomatic Complex.: 6 Avg Cyclomatic Complex.: 4.25 - Max Total Complexity ..: 10 Avg Total Complexity ..: 7.50 - ________________________________________________________________________ - End of File: ..\src\qf\qf_qeq.c - - - File: ..\src\qf\qf_qmact.c - ________________________________________________________________________ - - Function: QMActive_ctor - Parameters: (QMActive * const me, QStateHandler initial) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 12 eLOC 10 lLOC 4 Comment 28 Lines 28 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 15 eLOC 13 lLOC 4 Comment 79 Lines 94 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 1 - Total Function LOC.....: 12 Total Function Pts LOC : 0.1 - Total Function eLOC....: 10 Total Function Pts eLOC: 0.1 - Total Function lLOC....: 4 Total Function Pts lLOC: 0.0 - Total Function Params .: 2 Total Function Return .: 1 - Total Cyclo Complexity : 1 Total Function Complex.: 4 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 12 Average Function LOC ..: 12.00 - Max Function eLOC .....: 10 Average Function eLOC .: 10.00 - Max Function lLOC .....: 4 Average Function lLOC .: 4.00 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 2 Avg Function Parameters: 2.00 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 3 Avg Interface Complex. : 3.00 - Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00 - Max Total Complexity ..: 4 Avg Total Complexity ..: 4.00 - ________________________________________________________________________ - End of File: ..\src\qf\qf_qmact.c - - - File: ..\src\qf\qf_time.c - ________________________________________________________________________ - - Function: QF_tickX_ - Parameters: (uint_fast8_t const tickRate) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Conditional if / else if: 5 - Complexity Param 1 Return 1 Cyclo Vg 7 Total 9 - LOC 66 eLOC 54 lLOC 36 Comment 53 Lines 94 - - Function: QF_noTimeEvtsActiveX - Parameters: (uint_fast8_t const tickRate) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 2 - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 14 eLOC 10 lLOC 6 Comment 13 Lines 17 - - Function: QTimeEvt_ctorX - Parameters: (QTimeEvt * const me, QActive * const act, enum_t const sig, - uint_fast8_t tickRate) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical and ( && ) : 1 - Complexity Param 4 Return 1 Cyclo Vg 2 Total 7 - LOC 11 eLOC 9 lLOC 8 Comment 32 Lines 31 - - Function: QTimeEvt_armX - Parameters: (QTimeEvt * const me, QTimeEvtCtr const nTicks, QTimeEvtCtr - const interval) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Logical and ( && ) : 4 - Complexity Param 3 Return 1 Cyclo Vg 6 Total 10 - LOC 28 eLOC 25 lLOC 16 Comment 49 Lines 50 - - Function: QTimeEvt_disarm - Parameters: (QTimeEvt * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 29 eLOC 26 lLOC 17 Comment 30 Lines 37 - - Function: QTimeEvt_rearm - Parameters: (QTimeEvt * const me, QTimeEvtCtr const nTicks) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 2 - Inlined if-else ( ? : ) : 1 - Logical and ( && ) : 3 - Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 - LOC 34 eLOC 30 lLOC 18 Comment 47 Lines 60 - - Function: QTimeEvt_ctr - Parameters: (QTimeEvt const * const me) - Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 - LOC 16 eLOC 15 lLOC 11 Comment 20 Lines 19 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 218 eLOC 189 lLOC 113 Comment 304 Lines 514 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 7 - Total Function LOC.....: 198 Total Function Pts LOC : 1.7 - Total Function eLOC....: 169 Total Function Pts eLOC: 1.5 - Total Function lLOC....: 112 Total Function Pts lLOC: 0.9 - Total Function Params .: 13 Total Function Return .: 7 - Total Cyclo Complexity : 28 Total Function Complex.: 48 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 66 Average Function LOC ..: 28.29 - Max Function eLOC .....: 54 Average Function eLOC .: 24.14 - Max Function lLOC .....: 36 Average Function lLOC .: 16.00 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 4 Avg Function Parameters: 1.86 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 5 Avg Interface Complex. : 2.86 - Max Cyclomatic Complex.: 7 Avg Cyclomatic Complex.: 4.00 - Max Total Complexity ..: 10 Avg Total Complexity ..: 6.86 - ________________________________________________________________________ - End of File: ..\src\qf\qf_time.c - - - File: ..\src\qv\qv.c - ________________________________________________________________________ - - Function: QF_init - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 11 eLOC 10 lLOC 7 Comment 12 Lines 13 - - Function: QF_stop - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 - - Function: QF_run - Parameters: (void) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Conditional if / else if: 3 - Complexity Param 0 Return 1 Cyclo Vg 5 Total 6 - LOC 48 eLOC 42 lLOC 24 Comment 45 Lines 75 - - Function: QActive_start_ - Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], - uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv - t const *ie) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Logical and ( && ) : 2 - Complexity Param 7 Return 1 Cyclo Vg 3 Total 11 - LOC 11 eLOC 9 lLOC 7 Comment 31 Lines 17 - - Function: QActive_stop - Parameters: (QActive * const me) - Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 - LOC 7 eLOC 6 lLOC 4 Comment 13 Lines 9 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 98 eLOC 87 lLOC 44 Comment 167 Lines 258 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 5 - Total Function LOC.....: 80 Total Function Pts LOC : 0.8 - Total Function eLOC....: 69 Total Function Pts eLOC: 0.7 - Total Function lLOC....: 43 Total Function Pts lLOC: 0.3 - Total Function Params .: 8 Total Function Return .: 5 - Total Cyclo Complexity : 11 Total Function Complex.: 24 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 48 Average Function LOC ..: 16.00 - Max Function eLOC .....: 42 Average Function eLOC .: 13.80 - Max Function lLOC .....: 24 Average Function lLOC .: 8.60 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 7 Avg Function Parameters: 1.60 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 8 Avg Interface Complex. : 2.60 - Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 2.20 - Max Total Complexity ..: 11 Avg Total Complexity ..: 4.80 - ________________________________________________________________________ - End of File: ..\src\qv\qv.c - - - File: ..\src\qk\qk.c - ________________________________________________________________________ - - Function: QF_init - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 13 eLOC 12 lLOC 9 Comment 14 Lines 16 - - Function: QF_stop - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 - - Function: initial_events - Parameters: (void) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 - LOC 6 eLOC 4 lLOC 2 Comment 6 Lines 8 - - Function: QF_run - Parameters: (void) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 - LOC 12 eLOC 10 lLOC 7 Comment 12 Lines 14 - - Function: QActive_start_ - Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], - uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv - t const *ie) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Logical and ( && ) : 3 - Complexity Param 7 Return 1 Cyclo Vg 5 Total 13 - LOC 18 eLOC 15 lLOC 10 Comment 34 Lines 28 - - Function: QActive_stop - Parameters: (QActive * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 11 eLOC 9 lLOC 6 Comment 13 Lines 15 - - Function: QK_sched_ - Parameters: (void) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 2 - Complexity Param 0 Return 1 Cyclo Vg 3 Total 4 - LOC 15 eLOC 11 lLOC 7 Comment 21 Lines 19 - - Function: QK_activate_ - Parameters: (void) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 1 - Conditional if / else if: 5 - Complexity Param 0 Return 1 Cyclo Vg 7 Total 8 - LOC 60 eLOC 52 lLOC 29 Comment 48 Lines 86 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 157 eLOC 134 lLOC 73 Comment 213 Lines 353 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 8 - Total Function LOC.....: 138 Total Function Pts LOC : 1.2 - Total Function eLOC....: 115 Total Function Pts eLOC: 1.0 - Total Function lLOC....: 71 Total Function Pts lLOC: 0.6 - Total Function Params .: 8 Total Function Return .: 8 - Total Cyclo Complexity : 23 Total Function Complex.: 39 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 60 Average Function LOC ..: 17.25 - Max Function eLOC .....: 52 Average Function eLOC .: 14.38 - Max Function lLOC .....: 29 Average Function lLOC .: 8.88 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 7 Avg Function Parameters: 1.00 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 8 Avg Interface Complex. : 2.00 - Max Cyclomatic Complex.: 7 Avg Cyclomatic Complex.: 2.88 - Max Total Complexity ..: 13 Avg Total Complexity ..: 4.88 - ________________________________________________________________________ - End of File: ..\src\qk\qk.c - - - File: ..\src\qk\qk_mutex.c - ________________________________________________________________________ - - Function: QMutex_init - Parameters: (QMutex * const me, uint_fast8_t prio) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 4 eLOC 3 lLOC 2 Comment 17 Lines 4 - - Function: QMutex_lock - Parameters: (QMutex * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Logical and ( && ) : 1 - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 16 eLOC 14 lLOC 7 Comment 28 Lines 23 - - Function: QMutex_unlock - Parameters: (QMutex * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 2 - Inlined if-else ( ? : ) : 1 - Logical and ( && ) : 1 - Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 - LOC 23 eLOC 20 lLOC 10 Comment 28 Lines 30 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 59 eLOC 52 lLOC 20 Comment 122 Lines 175 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 3 - Total Function LOC.....: 43 Total Function Pts LOC : 0.5 - Total Function eLOC....: 37 Total Function Pts eLOC: 0.4 - Total Function lLOC....: 19 Total Function Pts lLOC: 0.2 - Total Function Params .: 4 Total Function Return .: 3 - Total Cyclo Complexity : 9 Total Function Complex.: 16 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 23 Average Function LOC ..: 14.33 - Max Function eLOC .....: 20 Average Function eLOC .: 12.33 - Max Function lLOC .....: 10 Average Function lLOC .: 6.33 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 2 Avg Function Parameters: 1.33 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 3 Avg Interface Complex. : 2.33 - Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 3.00 - Max Total Complexity ..: 7 Avg Total Complexity ..: 5.33 - ________________________________________________________________________ - End of File: ..\src\qk\qk_mutex.c - - - File: ..\src\qxk\qxk.c - ________________________________________________________________________ - - Function: QF_init - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 16 eLOC 15 lLOC 12 Comment 16 Lines 22 - - Function: QF_stop - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 - - Function: initial_events - Parameters: (void) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 - LOC 6 eLOC 4 lLOC 2 Comment 6 Lines 8 - - Function: QF_run - Parameters: (void) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops for / foreach : 1 - Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 - LOC 12 eLOC 10 lLOC 7 Comment 13 Lines 15 - - Function: QActive_start_ - Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], - uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv - t const *ie) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Logical and ( && ) : 4 - Complexity Param 7 Return 1 Cyclo Vg 6 Total 14 - LOC 19 eLOC 16 lLOC 10 Comment 35 Lines 28 - - Function: QActive_stop - Parameters: (QActive * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 11 eLOC 9 lLOC 6 Comment 13 Lines 15 - - Function: QXK_sched_ - Parameters: (void) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 5 - Complexity Param 0 Return 1 Cyclo Vg 6 Total 7 - LOC 50 eLOC 40 lLOC 22 Comment 33 Lines 67 - - Function: QXK_activate_ - Parameters: (void) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Loops while / do : 1 - Conditional if / else if: 6 - Complexity Param 0 Return 1 Cyclo Vg 8 Total 9 - LOC 75 eLOC 65 lLOC 36 Comment 54 Lines 104 - - Function: QXK_current - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 9 eLOC 8 lLOC 6 Comment 2 Lines 13 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 221 eLOC 189 lLOC 105 Comment 238 Lines 444 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 9 - Total Function LOC.....: 201 Total Function Pts LOC : 1.7 - Total Function eLOC....: 169 Total Function Pts eLOC: 1.5 - Total Function lLOC....: 102 Total Function Pts lLOC: 0.8 - Total Function Params .: 8 Total Function Return .: 9 - Total Cyclo Complexity : 29 Total Function Complex.: 46 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 75 Average Function LOC ..: 22.33 - Max Function eLOC .....: 65 Average Function eLOC .: 18.78 - Max Function lLOC .....: 36 Average Function lLOC .: 11.33 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 7 Avg Function Parameters: 0.89 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 8 Avg Interface Complex. : 1.89 - Max Cyclomatic Complex.: 8 Avg Cyclomatic Complex.: 3.22 - Max Total Complexity ..: 14 Avg Total Complexity ..: 5.11 - ________________________________________________________________________ - End of File: ..\src\qxk\qxk.c - - - File: ..\src\qxk\qxk_mutex.c - ________________________________________________________________________ - - Function: QXMutex_init - Parameters: (QXMutex * const me, uint_fast8_t prio) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 4 eLOC 3 lLOC 2 Comment 17 Lines 4 - - Function: QXMutex_lock - Parameters: (QXMutex * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Inlined if-else ( ? : ) : 1 - Logical and ( && ) : 1 - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 21 eLOC 19 lLOC 9 Comment 36 Lines 29 - - Function: QXMutex_unlock - Parameters: (QXMutex * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 3 - Logical and ( && ) : 1 - Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 - LOC 29 eLOC 24 lLOC 13 Comment 39 Lines 37 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 70 eLOC 61 lLOC 25 Comment 141 Lines 202 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 3 - Total Function LOC.....: 54 Total Function Pts LOC : 0.5 - Total Function eLOC....: 46 Total Function Pts eLOC: 0.5 - Total Function lLOC....: 24 Total Function Pts lLOC: 0.2 - Total Function Params .: 4 Total Function Return .: 3 - Total Cyclo Complexity : 10 Total Function Complex.: 17 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 29 Average Function LOC ..: 18.00 - Max Function eLOC .....: 24 Average Function eLOC .: 15.33 - Max Function lLOC .....: 13 Average Function lLOC .: 8.00 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 2 Avg Function Parameters: 1.33 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 3 Avg Interface Complex. : 2.33 - Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 3.33 - Max Total Complexity ..: 7 Avg Total Complexity ..: 5.67 - ________________________________________________________________________ - End of File: ..\src\qxk\qxk_mutex.c - - - File: ..\src\qxk\qxk_sema.c - ________________________________________________________________________ - - Function: QXSemaphore_init - Parameters: (QXSemaphore * const me, uint_fast16_t count) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 4 eLOC 3 lLOC 2 Comment 16 Lines 4 - - Function: QXSemaphore_wait - Parameters: (QXSemaphore * const me, uint_fast16_t const nTicks, uint_fa - st8_t const tickRate) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Logical and ( && ) : 2 - Complexity Param 3 Return 1 Cyclo Vg 4 Total 8 - LOC 27 eLOC 23 lLOC 18 Comment 34 Lines 35 - - Function: QXSemaphore_signal - Parameters: (QXSemaphore * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 2 - Logical and ( && ) : 1 - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 23 eLOC 19 lLOC 12 Comment 21 Lines 30 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 69 eLOC 60 lLOC 32 Comment 120 Lines 187 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 3 - Total Function LOC.....: 54 Total Function Pts LOC : 0.5 - Total Function eLOC....: 45 Total Function Pts eLOC: 0.5 - Total Function lLOC....: 32 Total Function Pts lLOC: 0.3 - Total Function Params .: 6 Total Function Return .: 3 - Total Cyclo Complexity : 9 Total Function Complex.: 18 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 27 Average Function LOC ..: 18.00 - Max Function eLOC .....: 23 Average Function eLOC .: 15.00 - Max Function lLOC .....: 18 Average Function lLOC .: 10.67 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 3 Avg Function Parameters: 2.00 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 4 Avg Interface Complex. : 3.00 - Max Cyclomatic Complex.: 4 Avg Cyclomatic Complex.: 3.00 - Max Total Complexity ..: 8 Avg Total Complexity ..: 6.00 - ________________________________________________________________________ - End of File: ..\src\qxk\qxk_sema.c - - - File: ..\src\qxk\qxk_xthr.c - ________________________________________________________________________ - - Function: QXThread_ctor - Parameters: (QXThread * const me, QXThreadHandler handler, uint_fast8_t - tickRate) - Complexity Param 3 Return 1 Cyclo Vg 1 Total 5 - LOC 13 eLOC 10 lLOC 5 Comment 24 Lines 16 - - Function: QXThread_init_ - Parameters: (QMsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 2 Lines 5 - - Function: QXThread_dispatch_ - Parameters: (QMsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 - - Function: QXThread_start_ - Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], - uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv - t const *ie) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Logical and ( && ) : 4 - Complexity Param 7 Return 1 Cyclo Vg 6 Total 14 - LOC 20 eLOC 17 lLOC 11 Comment 35 Lines 36 - - Function: QXThread_post_ - Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con - st margin) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 9 - Complexity Param 3 Return 1 Cyclo Vg 10 Total 14 - LOC 78 eLOC 64 lLOC 45 Comment 76 Lines 111 - - Function: QXThread_postLIFO_ - Parameters: (QActive * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 10 Lines 5 - - Function: QXThread_queueGet - Parameters: (uint_fast16_t const nTicks, uint_fast8_t const tickRate) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 4 - Logical and ( && ) : 2 - Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 - LOC 60 eLOC 52 lLOC 35 Comment 50 Lines 80 - - Function: QXThread_block_ - Parameters: (QXThread const * const me) - Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 - LOC 5 eLOC 4 lLOC 3 Comment 9 Lines 6 - - Function: QXThread_unblock_ - Parameters: (QXThread const * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Logical and ( && ) : 1 - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 8 eLOC 5 lLOC 2 Comment 10 Lines 8 - - Function: QXThread_teArm_ - Parameters: (QXThread * const me, QSignal sig, uint_fast16_t const nTick - s, uint_fast8_t const tickRate) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 2 - Complexity Param 4 Return 1 Cyclo Vg 3 Total 8 - LOC 13 eLOC 9 lLOC 7 Comment 23 Lines 30 - - Function: QXThread_teDisarm_ - Parameters: (QXThread * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 11 eLOC 8 lLOC 5 Comment 11 Lines 13 - - Function: QXThread_delay - Parameters: (uint_fast16_t const nTicks, uint_fast8_t const tickRate) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 18 eLOC 17 lLOC 14 Comment 10 Lines 29 - - Function: QXThread_delayCancel - Parameters: (QXThread * const me) - Cyclomatic Complexity Vg Detail - Function Base : 1 - Conditional if / else if: 1 - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 14 eLOC 11 lLOC 7 Comment 2 Lines 16 - - Function: QXK_threadRet_ - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 10 eLOC 9 lLOC 7 Comment 12 Lines 12 - - ------------------------------------------------------------------------ - - ~~ Total File Summary ~~ - - LOC 311 eLOC 264 lLOC 156 Comment 325 Lines 631 - ------------------------------------------------------------------------ - - ~~ File Functional Summary ~~ - - File Function Count....: 14 - Total Function LOC.....: 265 Total Function Pts LOC : 2.4 - Total Function eLOC....: 218 Total Function Pts eLOC: 2.1 - Total Function lLOC....: 150 Total Function Pts lLOC: 1.2 - Total Function Params .: 31 Total Function Return .: 14 - Total Cyclo Complexity : 40 Total Function Complex.: 85 - ------ ----- ----- ------ ------ ----- - Max Function LOC ......: 78 Average Function LOC ..: 18.93 - Max Function eLOC .....: 64 Average Function eLOC .: 15.57 - Max Function lLOC .....: 45 Average Function lLOC .: 10.71 - ------ ----- ----- ------ ------ ----- - Max Function Parameters: 7 Avg Function Parameters: 2.21 - Max Function Returns ..: 1 Avg Function Returns ..: 1.00 - Max Interface Complex. : 8 Avg Interface Complex. : 3.21 - Max Cyclomatic Complex.: 10 Avg Cyclomatic Complex.: 2.86 - Max Total Complexity ..: 14 Avg Total Complexity ..: 6.07 - ________________________________________________________________________ - End of File: ..\src\qxk\qxk_xthr.c - - - ------------------------------------------------------------------------ - - ~~ Project Analysis For 36 Files ~~ - - ------------------------------------------------------------------------ - - ~~ Total Project Summary ~~ - - LOC 4307 eLOC 3899 lLOC 1724 Comment 6832 Lines 11284 - Average per File, metric/36 files - LOC 119 eLOC 108 lLOC 47 Comment 189 Lines 313 - - ------------------------------------------------------------------------ - - ~~ Project Functional Metrics ~~ - - Function: QF_LOG2 - Parameters: (uint32_t x) - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 25 eLOC 18 lLOC 11 Comment 7 Lines 26 - - Function: QHsm_ctor - Parameters: (QHsm * const me, QStateHandler initial) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 9 eLOC 7 lLOC 4 Comment 21 Lines 9 - - Function: QHsm_init_ - Parameters: (QHsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 - LOC 50 eLOC 47 lLOC 31 Comment 35 Lines 70 - - Function: QHsm_top - Parameters: (void const * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 18 Lines 5 - - Function: QHsm_dispatch_ - Parameters: (QHsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 13 Total 16 - LOC 106 eLOC 95 lLOC 62 Comment 67 Lines 147 - - Function: QHsm_tran_ - Parameters: (QHsm * const me, QStateHandler path[QHSM_MAX_NEST_DEPTH_]) - Complexity Param 2 Return 1 Cyclo Vg 15 Total 18 - LOC 97 eLOC 76 lLOC 48 Comment 63 Lines 134 - - Function: QHsm_isIn - Parameters: (QHsm * const me, QStateHandler const state) - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 16 eLOC 13 lLOC 9 Comment 21 Lines 21 - - Function: QHsm_childState_ - Parameters: (QHsm * const me, QStateHandler const parent) - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 19 eLOC 15 lLOC 12 Comment 30 Lines 25 - - Function: QMsm_ctor - Parameters: (QMsm * const me, QStateHandler initial) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 9 eLOC 7 lLOC 4 Comment 28 Lines 10 - - Function: QMsm_init_ - Parameters: (QMsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 4 Total 7 - LOC 23 eLOC 22 lLOC 13 Comment 25 Lines 37 - - Function: QMsm_dispatch_ - Parameters: (QMsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 16 Total 19 - LOC 116 eLOC 99 lLOC 61 Comment 77 Lines 157 - - Function: QMsm_execTatbl_ - Parameters: (QMsm * const me, QMTranActTable const *tatbl) - Complexity Param 2 Return 1 Cyclo Vg 8 Total 11 - LOC 53 eLOC 43 lLOC 21 Comment 33 Lines 64 - - Function: QMsm_exitToTranSource_ - Parameters: (QMsm * const me, QMState const *s, QMState const *ts) - Complexity Param 3 Return 1 Cyclo Vg 4 Total 8 - LOC 17 eLOC 12 lLOC 6 Comment 20 Lines 23 - - Function: QMsm_enterHistory_ - Parameters: (QMsm * const me, QMState const *const hist) - Complexity Param 2 Return 1 Cyclo Vg 6 Total 9 - LOC 40 eLOC 33 lLOC 21 Comment 24 Lines 48 - - Function: QMsm_isInState - Parameters: (QMsm const * const me, QMState const * const state) - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 11 eLOC 8 lLOC 6 Comment 16 Lines 12 - - Function: QMsm_childStateObj_ - Parameters: (QMsm const * const me, QMState const * const parent) - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 19 eLOC 13 lLOC 9 Comment 20 Lines 23 - - Function: QF_add_ - Parameters: (QActive * const a) - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 15 eLOC 14 lLOC 8 Comment 23 Lines 25 - - Function: QF_remove_ - Parameters: (QActive * const a) - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 16 eLOC 15 lLOC 9 Comment 23 Lines 25 - - Function: QF_bzero - Parameters: (void * const start, uint_fast16_t len) - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 8 eLOC 6 lLOC 4 Comment 14 Lines 8 - - Function: QF_LOG2 - Parameters: (uint32_t x) - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 25 eLOC 18 lLOC 11 Comment 1 Lines 26 - - Function: QActive_post_ - Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con - st margin) - Complexity Param 3 Return 1 Cyclo Vg 8 Total 12 - LOC 60 eLOC 50 lLOC 35 Comment 77 Lines 81 - - Function: QActive_postLIFO_ - Parameters: (QActive * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 - LOC 37 eLOC 31 lLOC 22 Comment 36 Lines 50 - - Function: QActive_get_ - Parameters: (QActive * const me) - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 37 eLOC 33 lLOC 23 Comment 32 Lines 47 - - Function: QF_getQueueMin - Parameters: (uint_fast8_t const prio) - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 10 eLOC 9 lLOC 6 Comment 18 Lines 13 - - Function: QTicker_ctor - Parameters: (QTicker * const me, uint8_t tickRate) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 12 eLOC 10 lLOC 4 Comment 6 Lines 14 - - Function: QTicker_init_ - Parameters: (QHsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 - - Function: QTicker_dispatch_ - Parameters: (QHsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 12 eLOC 10 lLOC 8 Comment 4 Lines 15 - - Function: QTicker_post_ - Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con - st margin) - Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 - LOC 24 eLOC 21 lLOC 17 Comment 15 Lines 32 - - Function: QTicker_postLIFO_ - Parameters: (QActive * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 - - Function: QActive_defer - Parameters: (QActive const * const me, QEQueue * const eq, QEvt const * - const e) - Complexity Param 3 Return 1 Cyclo Vg 1 Total 5 - LOC 4 eLOC 2 lLOC 2 Comment 24 Lines 5 - - Function: QActive_recall - Parameters: (QActive * const me, QEQueue * const eq) - Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 - LOC 19 eLOC 15 lLOC 10 Comment 33 Lines 36 - - Function: QActive_flushDeferred - Parameters: (QActive const * const me, QEQueue * const eq) - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 10 eLOC 7 lLOC 7 Comment 17 Lines 12 - - Function: QEvt_ctor - Parameters: (QEvt * const me, enum_t const sig) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 9 Lines 6 - - Function: QF_poolInit - Parameters: (void * const poolSto, uint_fast32_t const poolSize, uint_fa - st16_t const evtSize) - Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 - LOC 9 eLOC 7 lLOC 4 Comment 38 Lines 13 - - Function: QF_newX_ - Parameters: (uint_fast16_t const evtSize, uint_fast16_t const margin, en - um_t const sig) - Complexity Param 3 Return 1 Cyclo Vg 5 Total 9 - LOC 29 eLOC 23 lLOC 14 Comment 37 Lines 39 - - Function: QF_gc - Parameters: (QEvt const * const e) - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 26 eLOC 22 lLOC 13 Comment 35 Lines 39 - - Function: QF_newRef_ - Parameters: (QEvt const * const e, QEvt const * const evtRef) - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 10 eLOC 8 lLOC 5 Comment 16 Lines 15 - - Function: QF_poolGetMaxBlockSize - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 3 eLOC 2 lLOC 1 Comment 5 Lines 3 - - Function: QMPool_init - Parameters: (QMPool * const me, void * const poolSto, uint_fast32_t pool - Size, uint_fast16_t blockSize) - Complexity Param 4 Return 1 Cyclo Vg 5 Total 10 - LOC 36 eLOC 32 lLOC 24 Comment 58 Lines 52 - - Function: QMPool_put - Parameters: (QMPool * const me, void *b) - Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 - LOC 15 eLOC 14 lLOC 9 Comment 29 Lines 22 - - Function: QMPool_get - Parameters: (QMPool * const me, uint_fast16_t const margin) - Complexity Param 2 Return 1 Cyclo Vg 4 Total 7 - LOC 42 eLOC 36 lLOC 23 Comment 54 Lines 66 - - Function: QF_getPoolMin - Parameters: (uint_fast8_t const poolId) - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 10 eLOC 9 lLOC 6 Comment 13 Lines 14 - - Function: QF_psInit - Parameters: (QSubscrList * const subscrSto, enum_t const maxSignal) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 7 eLOC 6 lLOC 3 Comment 32 Lines 12 - - Function: QF_publish_ - Parameters: (QEvt const * const e) - Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 - LOC 36 eLOC 30 lLOC 21 Comment 50 Lines 63 - - Function: QActive_subscribe - Parameters: (QActive const * const me, enum_t const sig) - Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 - LOC 16 eLOC 15 lLOC 8 Comment 22 Lines 22 - - Function: QActive_unsubscribe - Parameters: (QActive const * const me, enum_t const sig) - Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 - LOC 16 eLOC 15 lLOC 8 Comment 29 Lines 25 - - Function: QActive_unsubscribeAll - Parameters: (QActive const * const me) - Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 - LOC 21 eLOC 18 lLOC 10 Comment 24 Lines 24 - - Function: QActive_ctor - Parameters: (QActive * const me, QStateHandler initial) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 12 eLOC 10 lLOC 4 Comment 19 Lines 17 - - Function: QEQueue_init - Parameters: (QEQueue * const me, QEvt const *qSto[], uint_fast16_t const - qLen) - Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 - LOC 16 eLOC 13 lLOC 9 Comment 22 Lines 18 - - Function: QEQueue_post - Parameters: (QEQueue * const me, QEvt const * const e, uint_fast16_t con - st margin) - Complexity Param 3 Return 1 Cyclo Vg 6 Total 10 - LOC 53 eLOC 44 lLOC 30 Comment 55 Lines 74 - - Function: QEQueue_postLIFO - Parameters: (QEQueue * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 - LOC 34 eLOC 29 lLOC 21 Comment 41 Lines 44 - - Function: QEQueue_get - Parameters: (QEQueue * const me) - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 37 eLOC 32 lLOC 21 Comment 35 Lines 47 - - Function: QMActive_ctor - Parameters: (QMActive * const me, QStateHandler initial) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 12 eLOC 10 lLOC 4 Comment 28 Lines 28 - - Function: QF_tickX_ - Parameters: (uint_fast8_t const tickRate) - Complexity Param 1 Return 1 Cyclo Vg 7 Total 9 - LOC 66 eLOC 54 lLOC 36 Comment 53 Lines 94 - - Function: QF_noTimeEvtsActiveX - Parameters: (uint_fast8_t const tickRate) - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 14 eLOC 10 lLOC 6 Comment 13 Lines 17 - - Function: QTimeEvt_ctorX - Parameters: (QTimeEvt * const me, QActive * const act, enum_t const sig, - uint_fast8_t tickRate) - Complexity Param 4 Return 1 Cyclo Vg 2 Total 7 - LOC 11 eLOC 9 lLOC 8 Comment 32 Lines 31 - - Function: QTimeEvt_armX - Parameters: (QTimeEvt * const me, QTimeEvtCtr const nTicks, QTimeEvtCtr - const interval) - Complexity Param 3 Return 1 Cyclo Vg 6 Total 10 - LOC 28 eLOC 25 lLOC 16 Comment 49 Lines 50 - - Function: QTimeEvt_disarm - Parameters: (QTimeEvt * const me) - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 29 eLOC 26 lLOC 17 Comment 30 Lines 37 - - Function: QTimeEvt_rearm - Parameters: (QTimeEvt * const me, QTimeEvtCtr const nTicks) - Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 - LOC 34 eLOC 30 lLOC 18 Comment 47 Lines 60 - - Function: QTimeEvt_ctr - Parameters: (QTimeEvt const * const me) - Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 - LOC 16 eLOC 15 lLOC 11 Comment 20 Lines 19 - - Function: QF_init - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 11 eLOC 10 lLOC 7 Comment 12 Lines 13 - - Function: QF_stop - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 - - Function: QF_run - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 5 Total 6 - LOC 48 eLOC 42 lLOC 24 Comment 45 Lines 75 - - Function: QActive_start_ - Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], - uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv - t const *ie) - Complexity Param 7 Return 1 Cyclo Vg 3 Total 11 - LOC 11 eLOC 9 lLOC 7 Comment 31 Lines 17 - - Function: QActive_stop - Parameters: (QActive * const me) - Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 - LOC 7 eLOC 6 lLOC 4 Comment 13 Lines 9 - - Function: QF_init - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 13 eLOC 12 lLOC 9 Comment 14 Lines 16 - - Function: QF_stop - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 - - Function: initial_events - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 - LOC 6 eLOC 4 lLOC 2 Comment 6 Lines 8 - - Function: QF_run - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 - LOC 12 eLOC 10 lLOC 7 Comment 12 Lines 14 - - Function: QActive_start_ - Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], - uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv - t const *ie) - Complexity Param 7 Return 1 Cyclo Vg 5 Total 13 - LOC 18 eLOC 15 lLOC 10 Comment 34 Lines 28 - - Function: QActive_stop - Parameters: (QActive * const me) - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 11 eLOC 9 lLOC 6 Comment 13 Lines 15 - - Function: QK_sched_ - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 3 Total 4 - LOC 15 eLOC 11 lLOC 7 Comment 21 Lines 19 - - Function: QK_activate_ - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 7 Total 8 - LOC 60 eLOC 52 lLOC 29 Comment 48 Lines 86 - - Function: QMutex_init - Parameters: (QMutex * const me, uint_fast8_t prio) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 4 eLOC 3 lLOC 2 Comment 17 Lines 4 - - Function: QMutex_lock - Parameters: (QMutex * const me) - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 16 eLOC 14 lLOC 7 Comment 28 Lines 23 - - Function: QMutex_unlock - Parameters: (QMutex * const me) - Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 - LOC 23 eLOC 20 lLOC 10 Comment 28 Lines 30 - - Function: QF_init - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 16 eLOC 15 lLOC 12 Comment 16 Lines 22 - - Function: QF_stop - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 - - Function: initial_events - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 - LOC 6 eLOC 4 lLOC 2 Comment 6 Lines 8 - - Function: QF_run - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 - LOC 12 eLOC 10 lLOC 7 Comment 13 Lines 15 - - Function: QActive_start_ - Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], - uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv - t const *ie) - Complexity Param 7 Return 1 Cyclo Vg 6 Total 14 - LOC 19 eLOC 16 lLOC 10 Comment 35 Lines 28 - - Function: QActive_stop - Parameters: (QActive * const me) - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 11 eLOC 9 lLOC 6 Comment 13 Lines 15 - - Function: QXK_sched_ - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 6 Total 7 - LOC 50 eLOC 40 lLOC 22 Comment 33 Lines 67 - - Function: QXK_activate_ - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 8 Total 9 - LOC 75 eLOC 65 lLOC 36 Comment 54 Lines 104 - - Function: QXK_current - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 9 eLOC 8 lLOC 6 Comment 2 Lines 13 - - Function: QXMutex_init - Parameters: (QXMutex * const me, uint_fast8_t prio) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 4 eLOC 3 lLOC 2 Comment 17 Lines 4 - - Function: QXMutex_lock - Parameters: (QXMutex * const me) - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 21 eLOC 19 lLOC 9 Comment 36 Lines 29 - - Function: QXMutex_unlock - Parameters: (QXMutex * const me) - Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 - LOC 29 eLOC 24 lLOC 13 Comment 39 Lines 37 - - Function: QXSemaphore_init - Parameters: (QXSemaphore * const me, uint_fast16_t count) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 4 eLOC 3 lLOC 2 Comment 16 Lines 4 - - Function: QXSemaphore_wait - Parameters: (QXSemaphore * const me, uint_fast16_t const nTicks, uint_fa - st8_t const tickRate) - Complexity Param 3 Return 1 Cyclo Vg 4 Total 8 - LOC 27 eLOC 23 lLOC 18 Comment 34 Lines 35 - - Function: QXSemaphore_signal - Parameters: (QXSemaphore * const me) - Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 - LOC 23 eLOC 19 lLOC 12 Comment 21 Lines 30 - - Function: QXThread_ctor - Parameters: (QXThread * const me, QXThreadHandler handler, uint_fast8_t - tickRate) - Complexity Param 3 Return 1 Cyclo Vg 1 Total 5 - LOC 13 eLOC 10 lLOC 5 Comment 24 Lines 16 - - Function: QXThread_init_ - Parameters: (QMsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 2 Lines 5 - - Function: QXThread_dispatch_ - Parameters: (QMsm * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 - - Function: QXThread_start_ - Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], - uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv - t const *ie) - Complexity Param 7 Return 1 Cyclo Vg 6 Total 14 - LOC 20 eLOC 17 lLOC 11 Comment 35 Lines 36 - - Function: QXThread_post_ - Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con - st margin) - Complexity Param 3 Return 1 Cyclo Vg 10 Total 14 - LOC 78 eLOC 64 lLOC 45 Comment 76 Lines 111 - - Function: QXThread_postLIFO_ - Parameters: (QActive * const me, QEvt const * const e) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 5 eLOC 4 lLOC 3 Comment 10 Lines 5 - - Function: QXThread_queueGet - Parameters: (uint_fast16_t const nTicks, uint_fast8_t const tickRate) - Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 - LOC 60 eLOC 52 lLOC 35 Comment 50 Lines 80 - - Function: QXThread_block_ - Parameters: (QXThread const * const me) - Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 - LOC 5 eLOC 4 lLOC 3 Comment 9 Lines 6 - - Function: QXThread_unblock_ - Parameters: (QXThread const * const me) - Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 - LOC 8 eLOC 5 lLOC 2 Comment 10 Lines 8 - - Function: QXThread_teArm_ - Parameters: (QXThread * const me, QSignal sig, uint_fast16_t const nTick - s, uint_fast8_t const tickRate) - Complexity Param 4 Return 1 Cyclo Vg 3 Total 8 - LOC 13 eLOC 9 lLOC 7 Comment 23 Lines 30 - - Function: QXThread_teDisarm_ - Parameters: (QXThread * const me) - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 11 eLOC 8 lLOC 5 Comment 11 Lines 13 - - Function: QXThread_delay - Parameters: (uint_fast16_t const nTicks, uint_fast8_t const tickRate) - Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 - LOC 18 eLOC 17 lLOC 14 Comment 10 Lines 29 - - Function: QXThread_delayCancel - Parameters: (QXThread * const me) - Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 - LOC 14 eLOC 11 lLOC 7 Comment 2 Lines 16 - - Function: QXK_threadRet_ - Parameters: (void) - Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 - LOC 10 eLOC 9 lLOC 7 Comment 12 Lines 12 - - Total: Functions - LOC 2392 eLOC 2008 lLOC 1287 InCmp 290 CycloCmp 361 - Function Points FP(LOC) 18.5 FP(eLOC) 15.5 FP(lLOC) 10.0 - - ------------------------------------------------------------------------ - - ~~ Project Functional Analysis ~~ - - Total Functions .......: 105 Total Physical Lines ..: 3313 - Total LOC .............: 2392 Total Function Pts LOC : 18.5 - Total eLOC ............: 2008 Total Function Pts eLOC: 15.5 - Total lLOC.............: 1287 Total Function Pts lLOC: 10.0 - Total Cyclomatic Comp. : 361 Total Interface Comp. .: 290 - Total Parameters ......: 185 Total Return Points ...: 105 - Total Comment Lines ...: 2699 Total Blank Lines .....: 492 - ------ ----- ----- ------ ------ ----- - Avg Physical Lines ....: 31.55 - Avg LOC ...............: 22.78 Avg eLOC ..............: 19.12 - Avg lLOC ..............: 12.26 Avg Cyclomatic Comp. ..: 3.44 - Avg Interface Comp. ...: 2.76 Avg Parameters ........: 1.76 - Avg Return Points .....: 1.00 Avg Comment Lines .....: 25.70 - ------ ----- ----- ------ ------ ----- - Max LOC ...............: 116 - Max eLOC ..............: 99 Max lLOC ..............: 62 - Max Cyclomatic Comp. ..: 16 Max Interface Comp. ...: 8 - Max Parameters ........: 7 Max Return Points .....: 1 - Max Comment Lines .....: 77 Max Total Lines .......: 157 - ------ ----- ----- ------ ------ ----- - Min LOC ...............: 3 - Min eLOC ..............: 2 Min lLOC ..............: 1 - Min Cyclomatic Comp. ..: 1 Min Interface Comp. ...: 1 - Min Parameters ........: 0 Min Return Points .....: 1 - Min Comment Lines .....: 1 Min Total Lines .......: 3 - - ------------------------------------------------------------------------ - - ~~ File Summary ~~ - - C Source Files *.c ....: 19 C/C++ Include Files *.h: 17 - C++ Source Files *.c* .: 0 C++ Include Files *.h* : 0 - C# Source Files *.cs ..: 0 Java Source File *.jav*: 0 - Other File Count ......: 0 Total File Count ......: 36 - ________________________________________________________________________ - -@endcode -*/ +/** @page metrics Code Metrics + +@code + Standard Code Metrics for QP/C 5.9.5 + + Resource Standard Metrics (TM) for C, C++, C# and Java + Version 7.75 - mSquaredTechnologies.com + + License Type: Windows Single User License + Licensed To : Quantum Leaps, LLC + License No. : WS2975 License Date: Dec 15, 2013 + Build Date : Sep 2 2009 Run Date: Jul 20, 2017 + (C)1996-2009 M Squared Technologies LLC + ________________________________________________________________________ + + ~~ Function Metrics ~~ + ~~ Complexity Detail Analysis ~~ + + File: ..\include\qassert.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 49 eLOC 48 lLOC 3 Comment 240 Lines 309 + ________________________________________________________________________ + End of File: ..\include\qassert.h + + + File: ..\include\qep.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 156 eLOC 152 lLOC 56 Comment 404 Lines 613 + ________________________________________________________________________ + End of File: ..\include\qep.h + + + File: ..\include\qequeue.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 33 eLOC 33 lLOC 15 Comment 180 Lines 233 + ________________________________________________________________________ + End of File: ..\include\qequeue.h + + + File: ..\include\qf.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 191 eLOC 191 lLOC 75 Comment 530 Lines 825 + ________________________________________________________________________ + End of File: ..\include\qf.h + + + File: ..\include\qk.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 64 eLOC 64 lLOC 24 Comment 105 Lines 177 + ________________________________________________________________________ + End of File: ..\include\qk.h + + + File: ..\include\qmpool.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 42 eLOC 42 lLOC 18 Comment 109 Lines 169 + ________________________________________________________________________ + End of File: ..\include\qmpool.h + + + File: ..\include\qp_port.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 4 eLOC 4 lLOC 0 Comment 40 Lines 45 + ________________________________________________________________________ + End of File: ..\include\qp_port.h + + + File: ..\include\qpc.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 66 eLOC 65 lLOC 8 Comment 125 Lines 223 + ________________________________________________________________________ + End of File: ..\include\qpc.h + + + File: ..\include\qpset.h + ________________________________________________________________________ + + Inline Function: QF_LOG2 + Parameters: (uint32_t x) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 3 + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 25 eLOC 18 lLOC 11 Comment 7 Lines 26 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 98 eLOC 91 lLOC 23 Comment 96 Lines 216 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 1 + Total Function LOC.....: 25 Total Function Pts LOC : 0.0 + Total Function eLOC....: 18 Total Function Pts eLOC: 0.0 + Total Function lLOC....: 11 Total Function Pts lLOC: 0.0 + Total Function Params .: 1 Total Function Return .: 1 + Total Cyclo Complexity : 4 Total Function Complex.: 6 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 25 Average Function LOC ..: 25.00 + Max Function eLOC .....: 18 Average Function eLOC .: 18.00 + Max Function lLOC .....: 11 Average Function lLOC .: 11.00 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 1 Avg Function Parameters: 1.00 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 2 Avg Interface Complex. : 2.00 + Max Cyclomatic Complex.: 4 Avg Cyclomatic Complex.: 4.00 + Max Total Complexity ..: 6 Avg Total Complexity ..: 6.00 + ________________________________________________________________________ + End of File: ..\include\qpset.h + + + File: ..\include\qs.h + ________________________________________________________________________ + + + NOTICE: The end of the source file has been reached where the + open brace count { 28 != 26 } close brace count + This is an indication of non-compilable code within the source + file. RSM processes all source code including code wrapped + with preprocessor directives. Accurate metrics requires that + all code present in this file must be compilable. + ~~ Total File Summary ~~ + + LOC 489 eLOC 481 lLOC 119 Comment 704 Lines 1199 + ________________________________________________________________________ + End of File: ..\include\qs.h + + + File: ..\include\qs_dummy.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 72 eLOC 72 lLOC 0 Comment 43 Lines 124 + ________________________________________________________________________ + End of File: ..\include\qs_dummy.h + + + File: ..\include\qv.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 25 eLOC 25 lLOC 2 Comment 80 Lines 111 + ________________________________________________________________________ + End of File: ..\include\qv.h + + + File: ..\include\qxk.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 71 eLOC 71 lLOC 28 Comment 122 Lines 204 + ________________________________________________________________________ + End of File: ..\include\qxk.h + + + File: ..\include\qxthread.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 32 eLOC 32 lLOC 15 Comment 132 Lines 177 + ________________________________________________________________________ + End of File: ..\include\qxthread.h + + + File: ..\src\qf_pkg.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 63 eLOC 63 lLOC 8 Comment 120 Lines 206 + ________________________________________________________________________ + End of File: ..\src\qf_pkg.h + + + File: ..\src\qs_pkg.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 25 eLOC 23 lLOC 6 Comment 59 Lines 93 + ________________________________________________________________________ + End of File: ..\src\qs_pkg.h + + + File: ..\src\qxk_pkg.h + ________________________________________________________________________ + + ~~ Total File Summary ~~ + + LOC 20 eLOC 19 lLOC 8 Comment 49 Lines 78 + ________________________________________________________________________ + End of File: ..\src\qxk_pkg.h + + + File: ..\src\qf\qep_hsm.c + ________________________________________________________________________ + + Function: QHsm_ctor + Parameters: (QHsm * const me, QStateHandler initial) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 9 eLOC 7 lLOC 4 Comment 21 Lines 9 + + Function: QHsm_init_ + Parameters: (QHsm * const me, QEvt const * const e) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 3 + Conditional if / else if: 1 + Logical and ( && ) : 2 + Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 + LOC 50 eLOC 47 lLOC 31 Comment 35 Lines 70 + + Function: QHsm_top + Parameters: (void const * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 18 Lines 5 + + Function: QHsm_dispatch_ + Parameters: (QHsm * const me, QEvt const * const e) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 4 + Loops for / foreach : 2 + Conditional if / else if: 5 + Logical and ( && ) : 1 + Complexity Param 2 Return 1 Cyclo Vg 13 Total 16 + LOC 106 eLOC 95 lLOC 62 Comment 67 Lines 147 + + Function: QHsm_tran_ + Parameters: (QHsm * const me, QStateHandler path[QHSM_MAX_NEST_DEPTH_]) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 4 + Conditional if / else if: 10 + Complexity Param 2 Return 1 Cyclo Vg 15 Total 18 + LOC 97 eLOC 76 lLOC 48 Comment 63 Lines 134 + + Function: QHsm_isIn + Parameters: (QHsm * const me, QStateHandler const state) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 1 + Conditional if / else if: 1 + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 16 eLOC 13 lLOC 9 Comment 21 Lines 21 + + Function: QHsm_childState_ + Parameters: (QHsm * const me, QStateHandler const parent) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 1 + Conditional if / else if: 1 + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 19 eLOC 15 lLOC 12 Comment 30 Lines 25 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 345 eLOC 298 lLOC 177 Comment 317 Lines 628 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 7 + Total Function LOC.....: 302 Total Function Pts LOC : 2.7 + Total Function eLOC....: 257 Total Function Pts eLOC: 2.3 + Total Function lLOC....: 169 Total Function Pts lLOC: 1.4 + Total Function Params .: 14 Total Function Return .: 7 + Total Cyclo Complexity : 43 Total Function Complex.: 64 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 106 Average Function LOC ..: 43.14 + Max Function eLOC .....: 95 Average Function eLOC .: 36.71 + Max Function lLOC .....: 62 Average Function lLOC .: 24.14 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 2 Avg Function Parameters: 2.00 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 3 Avg Interface Complex. : 3.00 + Max Cyclomatic Complex.: 15 Avg Cyclomatic Complex.: 6.14 + Max Total Complexity ..: 18 Avg Total Complexity ..: 9.14 + ________________________________________________________________________ + End of File: ..\src\qf\qep_hsm.c + + + File: ..\src\qf\qep_msm.c + ________________________________________________________________________ + + Function: QMsm_ctor + Parameters: (QMsm * const me, QStateHandler initial) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 9 eLOC 7 lLOC 4 Comment 28 Lines 10 + + Function: QMsm_init_ + Parameters: (QMsm * const me, QEvt const * const e) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 1 + Logical and ( && ) : 2 + Complexity Param 2 Return 1 Cyclo Vg 4 Total 7 + LOC 23 eLOC 22 lLOC 13 Comment 25 Lines 37 + + Function: QMsm_dispatch_ + Parameters: (QMsm * const me, QEvt const * const e) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 2 + Conditional if / else if: 13 + Complexity Param 2 Return 1 Cyclo Vg 16 Total 19 + LOC 116 eLOC 99 lLOC 61 Comment 77 Lines 157 + + Function: QMsm_execTatbl_ + Parameters: (QMsm * const me, QMTranActTable const *tatbl) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Conditional if / else if: 6 + Complexity Param 2 Return 1 Cyclo Vg 8 Total 11 + LOC 53 eLOC 43 lLOC 21 Comment 33 Lines 64 + + Function: QMsm_exitToTranSource_ + Parameters: (QMsm * const me, QMState const *s, QMState const *ts) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 1 + Conditional if / else if: 2 + Complexity Param 3 Return 1 Cyclo Vg 4 Total 8 + LOC 17 eLOC 12 lLOC 6 Comment 20 Lines 23 + + Function: QMsm_enterHistory_ + Parameters: (QMsm * const me, QMState const *const hist) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 2 + Conditional if / else if: 3 + Complexity Param 2 Return 1 Cyclo Vg 6 Total 9 + LOC 40 eLOC 33 lLOC 21 Comment 24 Lines 48 + + Function: QMsm_isInState + Parameters: (QMsm const * const me, QMState const * const state) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Conditional if / else if: 1 + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 11 eLOC 8 lLOC 6 Comment 16 Lines 12 + + Function: QMsm_childStateObj_ + Parameters: (QMsm const * const me, QMState const * const parent) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Conditional if / else if: 1 + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 19 eLOC 13 lLOC 9 Comment 20 Lines 23 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 315 eLOC 262 lLOC 146 Comment 300 Lines 582 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 8 + Total Function LOC.....: 288 Total Function Pts LOC : 2.5 + Total Function eLOC....: 237 Total Function Pts eLOC: 2.0 + Total Function lLOC....: 141 Total Function Pts lLOC: 1.1 + Total Function Params .: 17 Total Function Return .: 8 + Total Cyclo Complexity : 45 Total Function Complex.: 70 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 116 Average Function LOC ..: 36.00 + Max Function eLOC .....: 99 Average Function eLOC .: 29.63 + Max Function lLOC .....: 61 Average Function lLOC .: 17.63 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 3 Avg Function Parameters: 2.13 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 4 Avg Interface Complex. : 3.13 + Max Cyclomatic Complex.: 16 Avg Cyclomatic Complex.: 5.63 + Max Total Complexity ..: 19 Avg Total Complexity ..: 8.75 + ________________________________________________________________________ + End of File: ..\src\qf\qep_msm.c + + + File: ..\src\qf\qf_act.c + ________________________________________________________________________ + + Function: QF_add_ + Parameters: (QActive * const a) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical and ( && ) : 2 + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 15 eLOC 14 lLOC 8 Comment 23 Lines 25 + + Function: QF_remove_ + Parameters: (QActive * const a) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical and ( && ) : 2 + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 16 eLOC 15 lLOC 9 Comment 23 Lines 25 + + Function: QF_bzero + Parameters: (void * const start, uint_fast16_t len) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 1 + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 8 eLOC 6 lLOC 4 Comment 14 Lines 8 + + Inline Function: QF_LOG2 + Parameters: (uint32_t x) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 3 + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 25 eLOC 18 lLOC 11 Comment 1 Lines 26 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 148 eLOC 136 lLOC 35 Comment 123 Lines 276 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 4 + Total Function LOC.....: 64 Total Function Pts LOC : 1.2 + Total Function eLOC....: 53 Total Function Pts eLOC: 1.1 + Total Function lLOC....: 32 Total Function Pts lLOC: 0.3 + Total Function Params .: 5 Total Function Return .: 4 + Total Cyclo Complexity : 12 Total Function Complex.: 21 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 25 Average Function LOC ..: 16.00 + Max Function eLOC .....: 18 Average Function eLOC .: 13.25 + Max Function lLOC .....: 11 Average Function lLOC .: 8.00 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 2 Avg Function Parameters: 1.25 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 3 Avg Interface Complex. : 2.25 + Max Cyclomatic Complex.: 4 Avg Cyclomatic Complex.: 3.00 + Max Total Complexity ..: 6 Avg Total Complexity ..: 5.25 + ________________________________________________________________________ + End of File: ..\src\qf\qf_act.c + + + File: ..\src\qf\qf_actq.c + ________________________________________________________________________ + + Function: QActive_post_ + Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con + st margin) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 5 + Logical or ( || ) : 1 + Logical and ( && ) : 1 + Complexity Param 3 Return 1 Cyclo Vg 8 Total 12 + LOC 60 eLOC 50 lLOC 35 Comment 77 Lines 81 + + Function: QActive_postLIFO_ + Parameters: (QActive * const me, QEvt const * const e) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 4 + Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 + LOC 37 eLOC 31 lLOC 22 Comment 36 Lines 50 + + Function: QActive_get_ + Parameters: (QActive * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 2 + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 37 eLOC 33 lLOC 23 Comment 32 Lines 47 + + Function: QF_getQueueMin + Parameters: (uint_fast8_t const prio) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical and ( && ) : 1 + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 10 eLOC 9 lLOC 6 Comment 18 Lines 13 + + Function: QTicker_ctor + Parameters: (QTicker * const me, uint8_t tickRate) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 12 eLOC 10 lLOC 4 Comment 6 Lines 14 + + Function: QTicker_init_ + Parameters: (QHsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 + + Function: QTicker_dispatch_ + Parameters: (QHsm * const me, QEvt const * const e) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 12 eLOC 10 lLOC 8 Comment 4 Lines 15 + + Function: QTicker_post_ + Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con + st margin) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 + LOC 24 eLOC 21 lLOC 17 Comment 15 Lines 32 + + Function: QTicker_postLIFO_ + Parameters: (QActive * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 238 eLOC 208 lLOC 126 Comment 252 Lines 453 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 9 + Total Function LOC.....: 202 Total Function Pts LOC : 1.9 + Total Function eLOC....: 172 Total Function Pts eLOC: 1.6 + Total Function lLOC....: 121 Total Function Pts lLOC: 1.0 + Total Function Params .: 18 Total Function Return .: 9 + Total Cyclo Complexity : 25 Total Function Complex.: 52 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 60 Average Function LOC ..: 22.44 + Max Function eLOC .....: 50 Average Function eLOC .: 19.11 + Max Function lLOC .....: 35 Average Function lLOC .: 13.44 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 3 Avg Function Parameters: 2.00 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 4 Avg Interface Complex. : 3.00 + Max Cyclomatic Complex.: 8 Avg Cyclomatic Complex.: 2.78 + Max Total Complexity ..: 12 Avg Total Complexity ..: 5.78 + ________________________________________________________________________ + End of File: ..\src\qf\qf_actq.c + + + File: ..\src\qf\qf_defer.c + ________________________________________________________________________ + + Function: QActive_defer + Parameters: (QActive const * const me, QEQueue * const eq, QEvt const * + const e) + Complexity Param 3 Return 1 Cyclo Vg 1 Total 5 + LOC 4 eLOC 2 lLOC 2 Comment 24 Lines 5 + + Function: QActive_recall + Parameters: (QActive * const me, QEQueue * const eq) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 2 + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 19 eLOC 15 lLOC 10 Comment 33 Lines 36 + + Function: QActive_flushDeferred + Parameters: (QActive const * const me, QEQueue * const eq) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 10 eLOC 7 lLOC 7 Comment 17 Lines 12 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 47 eLOC 38 lLOC 19 Comment 121 Lines 167 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 3 + Total Function LOC.....: 33 Total Function Pts LOC : 0.4 + Total Function eLOC....: 24 Total Function Pts eLOC: 0.3 + Total Function lLOC....: 19 Total Function Pts lLOC: 0.1 + Total Function Params .: 7 Total Function Return .: 3 + Total Cyclo Complexity : 6 Total Function Complex.: 16 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 19 Average Function LOC ..: 11.00 + Max Function eLOC .....: 15 Average Function eLOC .: 8.00 + Max Function lLOC .....: 10 Average Function lLOC .: 6.33 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 3 Avg Function Parameters: 2.33 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 4 Avg Interface Complex. : 3.33 + Max Cyclomatic Complex.: 3 Avg Cyclomatic Complex.: 2.00 + Max Total Complexity ..: 6 Avg Total Complexity ..: 5.33 + ________________________________________________________________________ + End of File: ..\src\qf\qf_defer.c + + + File: ..\src\qf\qf_dyn.c + ________________________________________________________________________ + + Function: QEvt_ctor + Parameters: (QEvt * const me, enum_t const sig) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 9 Lines 6 + + Function: QF_poolInit + Parameters: (void * const poolSto, uint_fast32_t const poolSize, uint_fa + st16_t const evtSize) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical or ( || ) : 1 + Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 + LOC 9 eLOC 7 lLOC 4 Comment 38 Lines 13 + + Function: QF_newX_ + Parameters: (uint_fast16_t const evtSize, uint_fast16_t const margin, en + um_t const sig) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Conditional if / else if: 2 + Inlined if-else ( ? : ) : 1 + Complexity Param 3 Return 1 Cyclo Vg 5 Total 9 + LOC 29 eLOC 23 lLOC 14 Comment 37 Lines 39 + + Function: QF_gc + Parameters: (QEvt const * const e) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 2 + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 26 eLOC 22 lLOC 13 Comment 35 Lines 39 + + Function: QF_newRef_ + Parameters: (QEvt const * const e, QEvt const * const evtRef) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 10 eLOC 8 lLOC 5 Comment 16 Lines 15 + + Function: QF_poolGetMaxBlockSize + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 3 eLOC 2 lLOC 1 Comment 5 Lines 3 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 100 eLOC 84 lLOC 42 Comment 193 Lines 293 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 6 + Total Function LOC.....: 82 Total Function Pts LOC : 0.8 + Total Function eLOC....: 66 Total Function Pts eLOC: 0.7 + Total Function lLOC....: 40 Total Function Pts lLOC: 0.3 + Total Function Params .: 11 Total Function Return .: 6 + Total Cyclo Complexity : 14 Total Function Complex.: 31 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 29 Average Function LOC ..: 13.67 + Max Function eLOC .....: 23 Average Function eLOC .: 11.00 + Max Function lLOC .....: 14 Average Function lLOC .: 6.67 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 3 Avg Function Parameters: 1.83 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 4 Avg Interface Complex. : 2.83 + Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 2.33 + Max Total Complexity ..: 9 Avg Total Complexity ..: 5.17 + ________________________________________________________________________ + End of File: ..\src\qf\qf_dyn.c + + + File: ..\src\qf\qf_mem.c + ________________________________________________________________________ + + Function: QMPool_init + Parameters: (QMPool * const me, void * const poolSto, uint_fast32_t pool + Size, uint_fast16_t blockSize) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 2 + Logical and ( && ) : 2 + Complexity Param 4 Return 1 Cyclo Vg 5 Total 10 + LOC 36 eLOC 32 lLOC 24 Comment 58 Lines 52 + + Function: QMPool_put + Parameters: (QMPool * const me, void *b) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical and ( && ) : 1 + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 15 eLOC 14 lLOC 9 Comment 29 Lines 22 + + Function: QMPool_get + Parameters: (QMPool * const me, uint_fast16_t const margin) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 3 + Complexity Param 2 Return 1 Cyclo Vg 4 Total 7 + LOC 42 eLOC 36 lLOC 23 Comment 54 Lines 66 + + Function: QF_getPoolMin + Parameters: (uint_fast8_t const poolId) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical and ( && ) : 1 + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 10 eLOC 9 lLOC 6 Comment 13 Lines 14 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 115 eLOC 103 lLOC 62 Comment 201 Lines 302 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 4 + Total Function LOC.....: 103 Total Function Pts LOC : 0.9 + Total Function eLOC....: 91 Total Function Pts eLOC: 0.8 + Total Function lLOC....: 62 Total Function Pts lLOC: 0.5 + Total Function Params .: 9 Total Function Return .: 4 + Total Cyclo Complexity : 13 Total Function Complex.: 26 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 42 Average Function LOC ..: 25.75 + Max Function eLOC .....: 36 Average Function eLOC .: 22.75 + Max Function lLOC .....: 24 Average Function lLOC .: 15.50 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 4 Avg Function Parameters: 2.25 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 5 Avg Interface Complex. : 3.25 + Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 3.25 + Max Total Complexity ..: 10 Avg Total Complexity ..: 6.50 + ________________________________________________________________________ + End of File: ..\src\qf\qf_mem.c + + + File: ..\src\qf\qf_ps.c + ________________________________________________________________________ + + Function: QF_psInit + Parameters: (QSubscrList * const subscrSto, enum_t const maxSignal) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 7 eLOC 6 lLOC 3 Comment 32 Lines 12 + + Function: QF_publish_ + Parameters: (QEvt const * const e) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 1 + Conditional if / else if: 3 + Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 + LOC 36 eLOC 30 lLOC 21 Comment 50 Lines 63 + + Function: QActive_subscribe + Parameters: (QActive const * const me, enum_t const sig) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical and ( && ) : 4 + Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 + LOC 16 eLOC 15 lLOC 8 Comment 22 Lines 22 + + Function: QActive_unsubscribe + Parameters: (QActive const * const me, enum_t const sig) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical and ( && ) : 4 + Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 + LOC 16 eLOC 15 lLOC 8 Comment 29 Lines 25 + + Function: QActive_unsubscribeAll + Parameters: (QActive const * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Conditional if / else if: 1 + Logical and ( && ) : 2 + Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 + LOC 21 eLOC 18 lLOC 10 Comment 24 Lines 24 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 113 eLOC 101 lLOC 52 Comment 205 Lines 320 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 5 + Total Function LOC.....: 96 Total Function Pts LOC : 0.9 + Total Function eLOC....: 84 Total Function Pts eLOC: 0.8 + Total Function lLOC....: 50 Total Function Pts lLOC: 0.4 + Total Function Params .: 8 Total Function Return .: 5 + Total Cyclo Complexity : 21 Total Function Complex.: 34 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 36 Average Function LOC ..: 19.20 + Max Function eLOC .....: 30 Average Function eLOC .: 16.80 + Max Function lLOC .....: 21 Average Function lLOC .: 10.00 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 2 Avg Function Parameters: 1.60 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 3 Avg Interface Complex. : 2.60 + Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 4.20 + Max Total Complexity ..: 8 Avg Total Complexity ..: 6.80 + ________________________________________________________________________ + End of File: ..\src\qf\qf_ps.c + + + File: ..\src\qf\qf_qact.c + ________________________________________________________________________ + + Function: QActive_ctor + Parameters: (QActive * const me, QStateHandler initial) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 12 eLOC 10 lLOC 4 Comment 19 Lines 17 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 14 eLOC 12 lLOC 4 Comment 69 Lines 81 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 1 + Total Function LOC.....: 12 Total Function Pts LOC : 0.1 + Total Function eLOC....: 10 Total Function Pts eLOC: 0.1 + Total Function lLOC....: 4 Total Function Pts lLOC: 0.0 + Total Function Params .: 2 Total Function Return .: 1 + Total Cyclo Complexity : 1 Total Function Complex.: 4 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 12 Average Function LOC ..: 12.00 + Max Function eLOC .....: 10 Average Function eLOC .: 10.00 + Max Function lLOC .....: 4 Average Function lLOC .: 4.00 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 2 Avg Function Parameters: 2.00 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 3 Avg Interface Complex. : 3.00 + Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00 + Max Total Complexity ..: 4 Avg Total Complexity ..: 4.00 + ________________________________________________________________________ + End of File: ..\src\qf\qf_qact.c + + + File: ..\src\qf\qf_qeq.c + ________________________________________________________________________ + + Function: QEQueue_init + Parameters: (QEQueue * const me, QEvt const *qSto[], uint_fast16_t const + qLen) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 + LOC 16 eLOC 13 lLOC 9 Comment 22 Lines 18 + + Function: QEQueue_post + Parameters: (QEQueue * const me, QEvt const * const e, uint_fast16_t con + st margin) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 5 + Complexity Param 3 Return 1 Cyclo Vg 6 Total 10 + LOC 53 eLOC 44 lLOC 30 Comment 55 Lines 74 + + Function: QEQueue_postLIFO + Parameters: (QEQueue * const me, QEvt const * const e) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 4 + Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 + LOC 34 eLOC 29 lLOC 21 Comment 41 Lines 44 + + Function: QEQueue_get + Parameters: (QEQueue * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 3 + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 37 eLOC 32 lLOC 21 Comment 35 Lines 47 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 154 eLOC 132 lLOC 81 Comment 204 Lines 322 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 4 + Total Function LOC.....: 140 Total Function Pts LOC : 1.2 + Total Function eLOC....: 118 Total Function Pts eLOC: 1.0 + Total Function lLOC....: 81 Total Function Pts lLOC: 0.6 + Total Function Params .: 9 Total Function Return .: 4 + Total Cyclo Complexity : 17 Total Function Complex.: 30 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 53 Average Function LOC ..: 35.00 + Max Function eLOC .....: 44 Average Function eLOC .: 29.50 + Max Function lLOC .....: 30 Average Function lLOC .: 20.25 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 3 Avg Function Parameters: 2.25 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 4 Avg Interface Complex. : 3.25 + Max Cyclomatic Complex.: 6 Avg Cyclomatic Complex.: 4.25 + Max Total Complexity ..: 10 Avg Total Complexity ..: 7.50 + ________________________________________________________________________ + End of File: ..\src\qf\qf_qeq.c + + + File: ..\src\qf\qf_qmact.c + ________________________________________________________________________ + + Function: QMActive_ctor + Parameters: (QMActive * const me, QStateHandler initial) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 12 eLOC 10 lLOC 4 Comment 28 Lines 28 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 15 eLOC 13 lLOC 4 Comment 79 Lines 94 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 1 + Total Function LOC.....: 12 Total Function Pts LOC : 0.1 + Total Function eLOC....: 10 Total Function Pts eLOC: 0.1 + Total Function lLOC....: 4 Total Function Pts lLOC: 0.0 + Total Function Params .: 2 Total Function Return .: 1 + Total Cyclo Complexity : 1 Total Function Complex.: 4 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 12 Average Function LOC ..: 12.00 + Max Function eLOC .....: 10 Average Function eLOC .: 10.00 + Max Function lLOC .....: 4 Average Function lLOC .: 4.00 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 2 Avg Function Parameters: 2.00 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 3 Avg Interface Complex. : 3.00 + Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00 + Max Total Complexity ..: 4 Avg Total Complexity ..: 4.00 + ________________________________________________________________________ + End of File: ..\src\qf\qf_qmact.c + + + File: ..\src\qf\qf_time.c + ________________________________________________________________________ + + Function: QF_tickX_ + Parameters: (uint_fast8_t const tickRate) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Conditional if / else if: 5 + Complexity Param 1 Return 1 Cyclo Vg 7 Total 9 + LOC 66 eLOC 54 lLOC 36 Comment 53 Lines 94 + + Function: QF_noTimeEvtsActiveX + Parameters: (uint_fast8_t const tickRate) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 2 + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 14 eLOC 10 lLOC 6 Comment 13 Lines 17 + + Function: QTimeEvt_ctorX + Parameters: (QTimeEvt * const me, QActive * const act, enum_t const sig, + uint_fast8_t tickRate) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical and ( && ) : 1 + Complexity Param 4 Return 1 Cyclo Vg 2 Total 7 + LOC 11 eLOC 9 lLOC 8 Comment 32 Lines 31 + + Function: QTimeEvt_armX + Parameters: (QTimeEvt * const me, QTimeEvtCtr const nTicks, QTimeEvtCtr + const interval) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Logical and ( && ) : 4 + Complexity Param 3 Return 1 Cyclo Vg 6 Total 10 + LOC 28 eLOC 25 lLOC 16 Comment 49 Lines 50 + + Function: QTimeEvt_disarm + Parameters: (QTimeEvt * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 29 eLOC 26 lLOC 17 Comment 30 Lines 37 + + Function: QTimeEvt_rearm + Parameters: (QTimeEvt * const me, QTimeEvtCtr const nTicks) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 2 + Inlined if-else ( ? : ) : 1 + Logical and ( && ) : 3 + Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 + LOC 34 eLOC 30 lLOC 18 Comment 47 Lines 60 + + Function: QTimeEvt_ctr + Parameters: (QTimeEvt const * const me) + Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 + LOC 16 eLOC 15 lLOC 11 Comment 20 Lines 19 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 218 eLOC 189 lLOC 113 Comment 304 Lines 514 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 7 + Total Function LOC.....: 198 Total Function Pts LOC : 1.7 + Total Function eLOC....: 169 Total Function Pts eLOC: 1.5 + Total Function lLOC....: 112 Total Function Pts lLOC: 0.9 + Total Function Params .: 13 Total Function Return .: 7 + Total Cyclo Complexity : 28 Total Function Complex.: 48 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 66 Average Function LOC ..: 28.29 + Max Function eLOC .....: 54 Average Function eLOC .: 24.14 + Max Function lLOC .....: 36 Average Function lLOC .: 16.00 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 4 Avg Function Parameters: 1.86 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 5 Avg Interface Complex. : 2.86 + Max Cyclomatic Complex.: 7 Avg Cyclomatic Complex.: 4.00 + Max Total Complexity ..: 10 Avg Total Complexity ..: 6.86 + ________________________________________________________________________ + End of File: ..\src\qf\qf_time.c + + + File: ..\src\qv\qv.c + ________________________________________________________________________ + + Function: QF_init + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 11 eLOC 10 lLOC 7 Comment 12 Lines 13 + + Function: QF_stop + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 + + Function: QF_run + Parameters: (void) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Conditional if / else if: 3 + Complexity Param 0 Return 1 Cyclo Vg 5 Total 6 + LOC 48 eLOC 42 lLOC 24 Comment 45 Lines 75 + + Function: QActive_start_ + Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], + uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv + t const *ie) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Logical and ( && ) : 2 + Complexity Param 7 Return 1 Cyclo Vg 3 Total 11 + LOC 11 eLOC 9 lLOC 7 Comment 31 Lines 17 + + Function: QActive_stop + Parameters: (QActive * const me) + Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 + LOC 7 eLOC 6 lLOC 4 Comment 13 Lines 9 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 98 eLOC 87 lLOC 44 Comment 167 Lines 258 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 5 + Total Function LOC.....: 80 Total Function Pts LOC : 0.8 + Total Function eLOC....: 69 Total Function Pts eLOC: 0.7 + Total Function lLOC....: 43 Total Function Pts lLOC: 0.3 + Total Function Params .: 8 Total Function Return .: 5 + Total Cyclo Complexity : 11 Total Function Complex.: 24 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 48 Average Function LOC ..: 16.00 + Max Function eLOC .....: 42 Average Function eLOC .: 13.80 + Max Function lLOC .....: 24 Average Function lLOC .: 8.60 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 7 Avg Function Parameters: 1.60 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 8 Avg Interface Complex. : 2.60 + Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 2.20 + Max Total Complexity ..: 11 Avg Total Complexity ..: 4.80 + ________________________________________________________________________ + End of File: ..\src\qv\qv.c + + + File: ..\src\qk\qk.c + ________________________________________________________________________ + + Function: QF_init + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 13 eLOC 12 lLOC 9 Comment 14 Lines 16 + + Function: QF_stop + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 + + Function: initial_events + Parameters: (void) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 + LOC 6 eLOC 4 lLOC 2 Comment 6 Lines 8 + + Function: QF_run + Parameters: (void) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 + LOC 12 eLOC 10 lLOC 7 Comment 12 Lines 14 + + Function: QActive_start_ + Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], + uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv + t const *ie) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Logical and ( && ) : 3 + Complexity Param 7 Return 1 Cyclo Vg 5 Total 13 + LOC 18 eLOC 15 lLOC 10 Comment 34 Lines 28 + + Function: QActive_stop + Parameters: (QActive * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 11 eLOC 9 lLOC 6 Comment 13 Lines 15 + + Function: QK_sched_ + Parameters: (void) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 2 + Complexity Param 0 Return 1 Cyclo Vg 3 Total 4 + LOC 15 eLOC 11 lLOC 7 Comment 21 Lines 19 + + Function: QK_activate_ + Parameters: (void) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 1 + Conditional if / else if: 5 + Complexity Param 0 Return 1 Cyclo Vg 7 Total 8 + LOC 60 eLOC 52 lLOC 29 Comment 48 Lines 86 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 157 eLOC 134 lLOC 73 Comment 213 Lines 353 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 8 + Total Function LOC.....: 138 Total Function Pts LOC : 1.2 + Total Function eLOC....: 115 Total Function Pts eLOC: 1.0 + Total Function lLOC....: 71 Total Function Pts lLOC: 0.6 + Total Function Params .: 8 Total Function Return .: 8 + Total Cyclo Complexity : 23 Total Function Complex.: 39 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 60 Average Function LOC ..: 17.25 + Max Function eLOC .....: 52 Average Function eLOC .: 14.38 + Max Function lLOC .....: 29 Average Function lLOC .: 8.88 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 7 Avg Function Parameters: 1.00 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 8 Avg Interface Complex. : 2.00 + Max Cyclomatic Complex.: 7 Avg Cyclomatic Complex.: 2.88 + Max Total Complexity ..: 13 Avg Total Complexity ..: 4.88 + ________________________________________________________________________ + End of File: ..\src\qk\qk.c + + + File: ..\src\qk\qk_mutex.c + ________________________________________________________________________ + + Function: QMutex_init + Parameters: (QMutex * const me, uint_fast8_t prio) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 4 eLOC 3 lLOC 2 Comment 17 Lines 4 + + Function: QMutex_lock + Parameters: (QMutex * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Logical and ( && ) : 1 + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 16 eLOC 14 lLOC 7 Comment 28 Lines 23 + + Function: QMutex_unlock + Parameters: (QMutex * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 2 + Inlined if-else ( ? : ) : 1 + Logical and ( && ) : 1 + Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 + LOC 23 eLOC 20 lLOC 10 Comment 28 Lines 30 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 59 eLOC 52 lLOC 20 Comment 122 Lines 175 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 3 + Total Function LOC.....: 43 Total Function Pts LOC : 0.5 + Total Function eLOC....: 37 Total Function Pts eLOC: 0.4 + Total Function lLOC....: 19 Total Function Pts lLOC: 0.2 + Total Function Params .: 4 Total Function Return .: 3 + Total Cyclo Complexity : 9 Total Function Complex.: 16 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 23 Average Function LOC ..: 14.33 + Max Function eLOC .....: 20 Average Function eLOC .: 12.33 + Max Function lLOC .....: 10 Average Function lLOC .: 6.33 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 2 Avg Function Parameters: 1.33 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 3 Avg Interface Complex. : 2.33 + Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 3.00 + Max Total Complexity ..: 7 Avg Total Complexity ..: 5.33 + ________________________________________________________________________ + End of File: ..\src\qk\qk_mutex.c + + + File: ..\src\qxk\qxk.c + ________________________________________________________________________ + + Function: QF_init + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 16 eLOC 15 lLOC 12 Comment 16 Lines 22 + + Function: QF_stop + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 + + Function: initial_events + Parameters: (void) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 + LOC 6 eLOC 4 lLOC 2 Comment 6 Lines 8 + + Function: QF_run + Parameters: (void) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops for / foreach : 1 + Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 + LOC 12 eLOC 10 lLOC 7 Comment 13 Lines 15 + + Function: QActive_start_ + Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], + uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv + t const *ie) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Logical and ( && ) : 4 + Complexity Param 7 Return 1 Cyclo Vg 6 Total 14 + LOC 19 eLOC 16 lLOC 10 Comment 35 Lines 28 + + Function: QActive_stop + Parameters: (QActive * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 11 eLOC 9 lLOC 6 Comment 13 Lines 15 + + Function: QXK_sched_ + Parameters: (void) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 5 + Complexity Param 0 Return 1 Cyclo Vg 6 Total 7 + LOC 50 eLOC 40 lLOC 22 Comment 33 Lines 67 + + Function: QXK_activate_ + Parameters: (void) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Loops while / do : 1 + Conditional if / else if: 6 + Complexity Param 0 Return 1 Cyclo Vg 8 Total 9 + LOC 75 eLOC 65 lLOC 36 Comment 54 Lines 104 + + Function: QXK_current + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 9 eLOC 8 lLOC 6 Comment 2 Lines 13 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 221 eLOC 189 lLOC 105 Comment 238 Lines 444 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 9 + Total Function LOC.....: 201 Total Function Pts LOC : 1.7 + Total Function eLOC....: 169 Total Function Pts eLOC: 1.5 + Total Function lLOC....: 102 Total Function Pts lLOC: 0.8 + Total Function Params .: 8 Total Function Return .: 9 + Total Cyclo Complexity : 29 Total Function Complex.: 46 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 75 Average Function LOC ..: 22.33 + Max Function eLOC .....: 65 Average Function eLOC .: 18.78 + Max Function lLOC .....: 36 Average Function lLOC .: 11.33 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 7 Avg Function Parameters: 0.89 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 8 Avg Interface Complex. : 1.89 + Max Cyclomatic Complex.: 8 Avg Cyclomatic Complex.: 3.22 + Max Total Complexity ..: 14 Avg Total Complexity ..: 5.11 + ________________________________________________________________________ + End of File: ..\src\qxk\qxk.c + + + File: ..\src\qxk\qxk_mutex.c + ________________________________________________________________________ + + Function: QXMutex_init + Parameters: (QXMutex * const me, uint_fast8_t prio) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 4 eLOC 3 lLOC 2 Comment 17 Lines 4 + + Function: QXMutex_lock + Parameters: (QXMutex * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Inlined if-else ( ? : ) : 1 + Logical and ( && ) : 1 + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 21 eLOC 19 lLOC 9 Comment 36 Lines 29 + + Function: QXMutex_unlock + Parameters: (QXMutex * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 3 + Logical and ( && ) : 1 + Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 + LOC 29 eLOC 24 lLOC 13 Comment 39 Lines 37 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 70 eLOC 61 lLOC 25 Comment 141 Lines 202 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 3 + Total Function LOC.....: 54 Total Function Pts LOC : 0.5 + Total Function eLOC....: 46 Total Function Pts eLOC: 0.5 + Total Function lLOC....: 24 Total Function Pts lLOC: 0.2 + Total Function Params .: 4 Total Function Return .: 3 + Total Cyclo Complexity : 10 Total Function Complex.: 17 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 29 Average Function LOC ..: 18.00 + Max Function eLOC .....: 24 Average Function eLOC .: 15.33 + Max Function lLOC .....: 13 Average Function lLOC .: 8.00 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 2 Avg Function Parameters: 1.33 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 3 Avg Interface Complex. : 2.33 + Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 3.33 + Max Total Complexity ..: 7 Avg Total Complexity ..: 5.67 + ________________________________________________________________________ + End of File: ..\src\qxk\qxk_mutex.c + + + File: ..\src\qxk\qxk_sema.c + ________________________________________________________________________ + + Function: QXSemaphore_init + Parameters: (QXSemaphore * const me, uint_fast16_t count) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 4 eLOC 3 lLOC 2 Comment 16 Lines 4 + + Function: QXSemaphore_wait + Parameters: (QXSemaphore * const me, uint_fast16_t const nTicks, uint_fa + st8_t const tickRate) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Logical and ( && ) : 2 + Complexity Param 3 Return 1 Cyclo Vg 4 Total 8 + LOC 27 eLOC 23 lLOC 18 Comment 34 Lines 35 + + Function: QXSemaphore_signal + Parameters: (QXSemaphore * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 2 + Logical and ( && ) : 1 + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 23 eLOC 19 lLOC 12 Comment 21 Lines 30 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 69 eLOC 60 lLOC 32 Comment 120 Lines 187 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 3 + Total Function LOC.....: 54 Total Function Pts LOC : 0.5 + Total Function eLOC....: 45 Total Function Pts eLOC: 0.5 + Total Function lLOC....: 32 Total Function Pts lLOC: 0.3 + Total Function Params .: 6 Total Function Return .: 3 + Total Cyclo Complexity : 9 Total Function Complex.: 18 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 27 Average Function LOC ..: 18.00 + Max Function eLOC .....: 23 Average Function eLOC .: 15.00 + Max Function lLOC .....: 18 Average Function lLOC .: 10.67 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 3 Avg Function Parameters: 2.00 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 4 Avg Interface Complex. : 3.00 + Max Cyclomatic Complex.: 4 Avg Cyclomatic Complex.: 3.00 + Max Total Complexity ..: 8 Avg Total Complexity ..: 6.00 + ________________________________________________________________________ + End of File: ..\src\qxk\qxk_sema.c + + + File: ..\src\qxk\qxk_xthr.c + ________________________________________________________________________ + + Function: QXThread_ctor + Parameters: (QXThread * const me, QXThreadHandler handler, uint_fast8_t + tickRate) + Complexity Param 3 Return 1 Cyclo Vg 1 Total 5 + LOC 13 eLOC 10 lLOC 5 Comment 24 Lines 16 + + Function: QXThread_init_ + Parameters: (QMsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 2 Lines 5 + + Function: QXThread_dispatch_ + Parameters: (QMsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 + + Function: QXThread_start_ + Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], + uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv + t const *ie) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Logical and ( && ) : 4 + Complexity Param 7 Return 1 Cyclo Vg 6 Total 14 + LOC 20 eLOC 17 lLOC 11 Comment 35 Lines 36 + + Function: QXThread_post_ + Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con + st margin) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 9 + Complexity Param 3 Return 1 Cyclo Vg 10 Total 14 + LOC 78 eLOC 64 lLOC 45 Comment 76 Lines 111 + + Function: QXThread_postLIFO_ + Parameters: (QActive * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 10 Lines 5 + + Function: QXThread_queueGet + Parameters: (uint_fast16_t const nTicks, uint_fast8_t const tickRate) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 4 + Logical and ( && ) : 2 + Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 + LOC 60 eLOC 52 lLOC 35 Comment 50 Lines 80 + + Function: QXThread_block_ + Parameters: (QXThread const * const me) + Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 + LOC 5 eLOC 4 lLOC 3 Comment 9 Lines 6 + + Function: QXThread_unblock_ + Parameters: (QXThread const * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Logical and ( && ) : 1 + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 8 eLOC 5 lLOC 2 Comment 10 Lines 8 + + Function: QXThread_teArm_ + Parameters: (QXThread * const me, QSignal sig, uint_fast16_t const nTick + s, uint_fast8_t const tickRate) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 2 + Complexity Param 4 Return 1 Cyclo Vg 3 Total 8 + LOC 13 eLOC 9 lLOC 7 Comment 23 Lines 30 + + Function: QXThread_teDisarm_ + Parameters: (QXThread * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 11 eLOC 8 lLOC 5 Comment 11 Lines 13 + + Function: QXThread_delay + Parameters: (uint_fast16_t const nTicks, uint_fast8_t const tickRate) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 18 eLOC 17 lLOC 14 Comment 10 Lines 29 + + Function: QXThread_delayCancel + Parameters: (QXThread * const me) + Cyclomatic Complexity Vg Detail + Function Base : 1 + Conditional if / else if: 1 + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 14 eLOC 11 lLOC 7 Comment 2 Lines 16 + + Function: QXK_threadRet_ + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 10 eLOC 9 lLOC 7 Comment 12 Lines 12 + + ------------------------------------------------------------------------ + + ~~ Total File Summary ~~ + + LOC 311 eLOC 264 lLOC 156 Comment 325 Lines 631 + ------------------------------------------------------------------------ + + ~~ File Functional Summary ~~ + + File Function Count....: 14 + Total Function LOC.....: 265 Total Function Pts LOC : 2.4 + Total Function eLOC....: 218 Total Function Pts eLOC: 2.1 + Total Function lLOC....: 150 Total Function Pts lLOC: 1.2 + Total Function Params .: 31 Total Function Return .: 14 + Total Cyclo Complexity : 40 Total Function Complex.: 85 + ------ ----- ----- ------ ------ ----- + Max Function LOC ......: 78 Average Function LOC ..: 18.93 + Max Function eLOC .....: 64 Average Function eLOC .: 15.57 + Max Function lLOC .....: 45 Average Function lLOC .: 10.71 + ------ ----- ----- ------ ------ ----- + Max Function Parameters: 7 Avg Function Parameters: 2.21 + Max Function Returns ..: 1 Avg Function Returns ..: 1.00 + Max Interface Complex. : 8 Avg Interface Complex. : 3.21 + Max Cyclomatic Complex.: 10 Avg Cyclomatic Complex.: 2.86 + Max Total Complexity ..: 14 Avg Total Complexity ..: 6.07 + ________________________________________________________________________ + End of File: ..\src\qxk\qxk_xthr.c + + + ------------------------------------------------------------------------ + + ~~ Project Analysis For 36 Files ~~ + + ------------------------------------------------------------------------ + + ~~ Total Project Summary ~~ + + LOC 4307 eLOC 3899 lLOC 1724 Comment 6832 Lines 11284 + Average per File, metric/36 files + LOC 119 eLOC 108 lLOC 47 Comment 189 Lines 313 + + ------------------------------------------------------------------------ + + ~~ Project Functional Metrics ~~ + + Function: QF_LOG2 + Parameters: (uint32_t x) + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 25 eLOC 18 lLOC 11 Comment 7 Lines 26 + + Function: QHsm_ctor + Parameters: (QHsm * const me, QStateHandler initial) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 9 eLOC 7 lLOC 4 Comment 21 Lines 9 + + Function: QHsm_init_ + Parameters: (QHsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 + LOC 50 eLOC 47 lLOC 31 Comment 35 Lines 70 + + Function: QHsm_top + Parameters: (void const * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 18 Lines 5 + + Function: QHsm_dispatch_ + Parameters: (QHsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 13 Total 16 + LOC 106 eLOC 95 lLOC 62 Comment 67 Lines 147 + + Function: QHsm_tran_ + Parameters: (QHsm * const me, QStateHandler path[QHSM_MAX_NEST_DEPTH_]) + Complexity Param 2 Return 1 Cyclo Vg 15 Total 18 + LOC 97 eLOC 76 lLOC 48 Comment 63 Lines 134 + + Function: QHsm_isIn + Parameters: (QHsm * const me, QStateHandler const state) + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 16 eLOC 13 lLOC 9 Comment 21 Lines 21 + + Function: QHsm_childState_ + Parameters: (QHsm * const me, QStateHandler const parent) + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 19 eLOC 15 lLOC 12 Comment 30 Lines 25 + + Function: QMsm_ctor + Parameters: (QMsm * const me, QStateHandler initial) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 9 eLOC 7 lLOC 4 Comment 28 Lines 10 + + Function: QMsm_init_ + Parameters: (QMsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 4 Total 7 + LOC 23 eLOC 22 lLOC 13 Comment 25 Lines 37 + + Function: QMsm_dispatch_ + Parameters: (QMsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 16 Total 19 + LOC 116 eLOC 99 lLOC 61 Comment 77 Lines 157 + + Function: QMsm_execTatbl_ + Parameters: (QMsm * const me, QMTranActTable const *tatbl) + Complexity Param 2 Return 1 Cyclo Vg 8 Total 11 + LOC 53 eLOC 43 lLOC 21 Comment 33 Lines 64 + + Function: QMsm_exitToTranSource_ + Parameters: (QMsm * const me, QMState const *s, QMState const *ts) + Complexity Param 3 Return 1 Cyclo Vg 4 Total 8 + LOC 17 eLOC 12 lLOC 6 Comment 20 Lines 23 + + Function: QMsm_enterHistory_ + Parameters: (QMsm * const me, QMState const *const hist) + Complexity Param 2 Return 1 Cyclo Vg 6 Total 9 + LOC 40 eLOC 33 lLOC 21 Comment 24 Lines 48 + + Function: QMsm_isInState + Parameters: (QMsm const * const me, QMState const * const state) + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 11 eLOC 8 lLOC 6 Comment 16 Lines 12 + + Function: QMsm_childStateObj_ + Parameters: (QMsm const * const me, QMState const * const parent) + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 19 eLOC 13 lLOC 9 Comment 20 Lines 23 + + Function: QF_add_ + Parameters: (QActive * const a) + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 15 eLOC 14 lLOC 8 Comment 23 Lines 25 + + Function: QF_remove_ + Parameters: (QActive * const a) + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 16 eLOC 15 lLOC 9 Comment 23 Lines 25 + + Function: QF_bzero + Parameters: (void * const start, uint_fast16_t len) + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 8 eLOC 6 lLOC 4 Comment 14 Lines 8 + + Function: QF_LOG2 + Parameters: (uint32_t x) + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 25 eLOC 18 lLOC 11 Comment 1 Lines 26 + + Function: QActive_post_ + Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con + st margin) + Complexity Param 3 Return 1 Cyclo Vg 8 Total 12 + LOC 60 eLOC 50 lLOC 35 Comment 77 Lines 81 + + Function: QActive_postLIFO_ + Parameters: (QActive * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 + LOC 37 eLOC 31 lLOC 22 Comment 36 Lines 50 + + Function: QActive_get_ + Parameters: (QActive * const me) + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 37 eLOC 33 lLOC 23 Comment 32 Lines 47 + + Function: QF_getQueueMin + Parameters: (uint_fast8_t const prio) + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 10 eLOC 9 lLOC 6 Comment 18 Lines 13 + + Function: QTicker_ctor + Parameters: (QTicker * const me, uint8_t tickRate) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 12 eLOC 10 lLOC 4 Comment 6 Lines 14 + + Function: QTicker_init_ + Parameters: (QHsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 + + Function: QTicker_dispatch_ + Parameters: (QHsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 12 eLOC 10 lLOC 8 Comment 4 Lines 15 + + Function: QTicker_post_ + Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con + st margin) + Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 + LOC 24 eLOC 21 lLOC 17 Comment 15 Lines 32 + + Function: QTicker_postLIFO_ + Parameters: (QActive * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 + + Function: QActive_defer + Parameters: (QActive const * const me, QEQueue * const eq, QEvt const * + const e) + Complexity Param 3 Return 1 Cyclo Vg 1 Total 5 + LOC 4 eLOC 2 lLOC 2 Comment 24 Lines 5 + + Function: QActive_recall + Parameters: (QActive * const me, QEQueue * const eq) + Complexity Param 2 Return 1 Cyclo Vg 3 Total 6 + LOC 19 eLOC 15 lLOC 10 Comment 33 Lines 36 + + Function: QActive_flushDeferred + Parameters: (QActive const * const me, QEQueue * const eq) + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 10 eLOC 7 lLOC 7 Comment 17 Lines 12 + + Function: QEvt_ctor + Parameters: (QEvt * const me, enum_t const sig) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 9 Lines 6 + + Function: QF_poolInit + Parameters: (void * const poolSto, uint_fast32_t const poolSize, uint_fa + st16_t const evtSize) + Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 + LOC 9 eLOC 7 lLOC 4 Comment 38 Lines 13 + + Function: QF_newX_ + Parameters: (uint_fast16_t const evtSize, uint_fast16_t const margin, en + um_t const sig) + Complexity Param 3 Return 1 Cyclo Vg 5 Total 9 + LOC 29 eLOC 23 lLOC 14 Comment 37 Lines 39 + + Function: QF_gc + Parameters: (QEvt const * const e) + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 26 eLOC 22 lLOC 13 Comment 35 Lines 39 + + Function: QF_newRef_ + Parameters: (QEvt const * const e, QEvt const * const evtRef) + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 10 eLOC 8 lLOC 5 Comment 16 Lines 15 + + Function: QF_poolGetMaxBlockSize + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 3 eLOC 2 lLOC 1 Comment 5 Lines 3 + + Function: QMPool_init + Parameters: (QMPool * const me, void * const poolSto, uint_fast32_t pool + Size, uint_fast16_t blockSize) + Complexity Param 4 Return 1 Cyclo Vg 5 Total 10 + LOC 36 eLOC 32 lLOC 24 Comment 58 Lines 52 + + Function: QMPool_put + Parameters: (QMPool * const me, void *b) + Complexity Param 2 Return 1 Cyclo Vg 2 Total 5 + LOC 15 eLOC 14 lLOC 9 Comment 29 Lines 22 + + Function: QMPool_get + Parameters: (QMPool * const me, uint_fast16_t const margin) + Complexity Param 2 Return 1 Cyclo Vg 4 Total 7 + LOC 42 eLOC 36 lLOC 23 Comment 54 Lines 66 + + Function: QF_getPoolMin + Parameters: (uint_fast8_t const poolId) + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 10 eLOC 9 lLOC 6 Comment 13 Lines 14 + + Function: QF_psInit + Parameters: (QSubscrList * const subscrSto, enum_t const maxSignal) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 7 eLOC 6 lLOC 3 Comment 32 Lines 12 + + Function: QF_publish_ + Parameters: (QEvt const * const e) + Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 + LOC 36 eLOC 30 lLOC 21 Comment 50 Lines 63 + + Function: QActive_subscribe + Parameters: (QActive const * const me, enum_t const sig) + Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 + LOC 16 eLOC 15 lLOC 8 Comment 22 Lines 22 + + Function: QActive_unsubscribe + Parameters: (QActive const * const me, enum_t const sig) + Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 + LOC 16 eLOC 15 lLOC 8 Comment 29 Lines 25 + + Function: QActive_unsubscribeAll + Parameters: (QActive const * const me) + Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 + LOC 21 eLOC 18 lLOC 10 Comment 24 Lines 24 + + Function: QActive_ctor + Parameters: (QActive * const me, QStateHandler initial) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 12 eLOC 10 lLOC 4 Comment 19 Lines 17 + + Function: QEQueue_init + Parameters: (QEQueue * const me, QEvt const *qSto[], uint_fast16_t const + qLen) + Complexity Param 3 Return 1 Cyclo Vg 2 Total 6 + LOC 16 eLOC 13 lLOC 9 Comment 22 Lines 18 + + Function: QEQueue_post + Parameters: (QEQueue * const me, QEvt const * const e, uint_fast16_t con + st margin) + Complexity Param 3 Return 1 Cyclo Vg 6 Total 10 + LOC 53 eLOC 44 lLOC 30 Comment 55 Lines 74 + + Function: QEQueue_postLIFO + Parameters: (QEQueue * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 5 Total 8 + LOC 34 eLOC 29 lLOC 21 Comment 41 Lines 44 + + Function: QEQueue_get + Parameters: (QEQueue * const me) + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 37 eLOC 32 lLOC 21 Comment 35 Lines 47 + + Function: QMActive_ctor + Parameters: (QMActive * const me, QStateHandler initial) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 12 eLOC 10 lLOC 4 Comment 28 Lines 28 + + Function: QF_tickX_ + Parameters: (uint_fast8_t const tickRate) + Complexity Param 1 Return 1 Cyclo Vg 7 Total 9 + LOC 66 eLOC 54 lLOC 36 Comment 53 Lines 94 + + Function: QF_noTimeEvtsActiveX + Parameters: (uint_fast8_t const tickRate) + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 14 eLOC 10 lLOC 6 Comment 13 Lines 17 + + Function: QTimeEvt_ctorX + Parameters: (QTimeEvt * const me, QActive * const act, enum_t const sig, + uint_fast8_t tickRate) + Complexity Param 4 Return 1 Cyclo Vg 2 Total 7 + LOC 11 eLOC 9 lLOC 8 Comment 32 Lines 31 + + Function: QTimeEvt_armX + Parameters: (QTimeEvt * const me, QTimeEvtCtr const nTicks, QTimeEvtCtr + const interval) + Complexity Param 3 Return 1 Cyclo Vg 6 Total 10 + LOC 28 eLOC 25 lLOC 16 Comment 49 Lines 50 + + Function: QTimeEvt_disarm + Parameters: (QTimeEvt * const me) + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 29 eLOC 26 lLOC 17 Comment 30 Lines 37 + + Function: QTimeEvt_rearm + Parameters: (QTimeEvt * const me, QTimeEvtCtr const nTicks) + Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 + LOC 34 eLOC 30 lLOC 18 Comment 47 Lines 60 + + Function: QTimeEvt_ctr + Parameters: (QTimeEvt const * const me) + Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 + LOC 16 eLOC 15 lLOC 11 Comment 20 Lines 19 + + Function: QF_init + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 11 eLOC 10 lLOC 7 Comment 12 Lines 13 + + Function: QF_stop + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 + + Function: QF_run + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 5 Total 6 + LOC 48 eLOC 42 lLOC 24 Comment 45 Lines 75 + + Function: QActive_start_ + Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], + uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv + t const *ie) + Complexity Param 7 Return 1 Cyclo Vg 3 Total 11 + LOC 11 eLOC 9 lLOC 7 Comment 31 Lines 17 + + Function: QActive_stop + Parameters: (QActive * const me) + Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 + LOC 7 eLOC 6 lLOC 4 Comment 13 Lines 9 + + Function: QF_init + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 13 eLOC 12 lLOC 9 Comment 14 Lines 16 + + Function: QF_stop + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 + + Function: initial_events + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 + LOC 6 eLOC 4 lLOC 2 Comment 6 Lines 8 + + Function: QF_run + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 + LOC 12 eLOC 10 lLOC 7 Comment 12 Lines 14 + + Function: QActive_start_ + Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], + uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv + t const *ie) + Complexity Param 7 Return 1 Cyclo Vg 5 Total 13 + LOC 18 eLOC 15 lLOC 10 Comment 34 Lines 28 + + Function: QActive_stop + Parameters: (QActive * const me) + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 11 eLOC 9 lLOC 6 Comment 13 Lines 15 + + Function: QK_sched_ + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 3 Total 4 + LOC 15 eLOC 11 lLOC 7 Comment 21 Lines 19 + + Function: QK_activate_ + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 7 Total 8 + LOC 60 eLOC 52 lLOC 29 Comment 48 Lines 86 + + Function: QMutex_init + Parameters: (QMutex * const me, uint_fast8_t prio) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 4 eLOC 3 lLOC 2 Comment 17 Lines 4 + + Function: QMutex_lock + Parameters: (QMutex * const me) + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 16 eLOC 14 lLOC 7 Comment 28 Lines 23 + + Function: QMutex_unlock + Parameters: (QMutex * const me) + Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 + LOC 23 eLOC 20 lLOC 10 Comment 28 Lines 30 + + Function: QF_init + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 16 eLOC 15 lLOC 12 Comment 16 Lines 22 + + Function: QF_stop + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 3 eLOC 2 lLOC 1 Comment 14 Lines 4 + + Function: initial_events + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 + LOC 6 eLOC 4 lLOC 2 Comment 6 Lines 8 + + Function: QF_run + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 2 Total 3 + LOC 12 eLOC 10 lLOC 7 Comment 13 Lines 15 + + Function: QActive_start_ + Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], + uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv + t const *ie) + Complexity Param 7 Return 1 Cyclo Vg 6 Total 14 + LOC 19 eLOC 16 lLOC 10 Comment 35 Lines 28 + + Function: QActive_stop + Parameters: (QActive * const me) + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 11 eLOC 9 lLOC 6 Comment 13 Lines 15 + + Function: QXK_sched_ + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 6 Total 7 + LOC 50 eLOC 40 lLOC 22 Comment 33 Lines 67 + + Function: QXK_activate_ + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 8 Total 9 + LOC 75 eLOC 65 lLOC 36 Comment 54 Lines 104 + + Function: QXK_current + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 9 eLOC 8 lLOC 6 Comment 2 Lines 13 + + Function: QXMutex_init + Parameters: (QXMutex * const me, uint_fast8_t prio) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 4 eLOC 3 lLOC 2 Comment 17 Lines 4 + + Function: QXMutex_lock + Parameters: (QXMutex * const me) + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 21 eLOC 19 lLOC 9 Comment 36 Lines 29 + + Function: QXMutex_unlock + Parameters: (QXMutex * const me) + Complexity Param 1 Return 1 Cyclo Vg 5 Total 7 + LOC 29 eLOC 24 lLOC 13 Comment 39 Lines 37 + + Function: QXSemaphore_init + Parameters: (QXSemaphore * const me, uint_fast16_t count) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 4 eLOC 3 lLOC 2 Comment 16 Lines 4 + + Function: QXSemaphore_wait + Parameters: (QXSemaphore * const me, uint_fast16_t const nTicks, uint_fa + st8_t const tickRate) + Complexity Param 3 Return 1 Cyclo Vg 4 Total 8 + LOC 27 eLOC 23 lLOC 18 Comment 34 Lines 35 + + Function: QXSemaphore_signal + Parameters: (QXSemaphore * const me) + Complexity Param 1 Return 1 Cyclo Vg 4 Total 6 + LOC 23 eLOC 19 lLOC 12 Comment 21 Lines 30 + + Function: QXThread_ctor + Parameters: (QXThread * const me, QXThreadHandler handler, uint_fast8_t + tickRate) + Complexity Param 3 Return 1 Cyclo Vg 1 Total 5 + LOC 13 eLOC 10 lLOC 5 Comment 24 Lines 16 + + Function: QXThread_init_ + Parameters: (QMsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 2 Lines 5 + + Function: QXThread_dispatch_ + Parameters: (QMsm * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 1 Lines 5 + + Function: QXThread_start_ + Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], + uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv + t const *ie) + Complexity Param 7 Return 1 Cyclo Vg 6 Total 14 + LOC 20 eLOC 17 lLOC 11 Comment 35 Lines 36 + + Function: QXThread_post_ + Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con + st margin) + Complexity Param 3 Return 1 Cyclo Vg 10 Total 14 + LOC 78 eLOC 64 lLOC 45 Comment 76 Lines 111 + + Function: QXThread_postLIFO_ + Parameters: (QActive * const me, QEvt const * const e) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 5 eLOC 4 lLOC 3 Comment 10 Lines 5 + + Function: QXThread_queueGet + Parameters: (uint_fast16_t const nTicks, uint_fast8_t const tickRate) + Complexity Param 2 Return 1 Cyclo Vg 7 Total 10 + LOC 60 eLOC 52 lLOC 35 Comment 50 Lines 80 + + Function: QXThread_block_ + Parameters: (QXThread const * const me) + Complexity Param 1 Return 1 Cyclo Vg 1 Total 3 + LOC 5 eLOC 4 lLOC 3 Comment 9 Lines 6 + + Function: QXThread_unblock_ + Parameters: (QXThread const * const me) + Complexity Param 1 Return 1 Cyclo Vg 3 Total 5 + LOC 8 eLOC 5 lLOC 2 Comment 10 Lines 8 + + Function: QXThread_teArm_ + Parameters: (QXThread * const me, QSignal sig, uint_fast16_t const nTick + s, uint_fast8_t const tickRate) + Complexity Param 4 Return 1 Cyclo Vg 3 Total 8 + LOC 13 eLOC 9 lLOC 7 Comment 23 Lines 30 + + Function: QXThread_teDisarm_ + Parameters: (QXThread * const me) + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 11 eLOC 8 lLOC 5 Comment 11 Lines 13 + + Function: QXThread_delay + Parameters: (uint_fast16_t const nTicks, uint_fast8_t const tickRate) + Complexity Param 2 Return 1 Cyclo Vg 1 Total 4 + LOC 18 eLOC 17 lLOC 14 Comment 10 Lines 29 + + Function: QXThread_delayCancel + Parameters: (QXThread * const me) + Complexity Param 1 Return 1 Cyclo Vg 2 Total 4 + LOC 14 eLOC 11 lLOC 7 Comment 2 Lines 16 + + Function: QXK_threadRet_ + Parameters: (void) + Complexity Param 0 Return 1 Cyclo Vg 1 Total 2 + LOC 10 eLOC 9 lLOC 7 Comment 12 Lines 12 + + Total: Functions + LOC 2392 eLOC 2008 lLOC 1287 InCmp 290 CycloCmp 361 + Function Points FP(LOC) 18.5 FP(eLOC) 15.5 FP(lLOC) 10.0 + + ------------------------------------------------------------------------ + + ~~ Project Functional Analysis ~~ + + Total Functions .......: 105 Total Physical Lines ..: 3313 + Total LOC .............: 2392 Total Function Pts LOC : 18.5 + Total eLOC ............: 2008 Total Function Pts eLOC: 15.5 + Total lLOC.............: 1287 Total Function Pts lLOC: 10.0 + Total Cyclomatic Comp. : 361 Total Interface Comp. .: 290 + Total Parameters ......: 185 Total Return Points ...: 105 + Total Comment Lines ...: 2699 Total Blank Lines .....: 492 + ------ ----- ----- ------ ------ ----- + Avg Physical Lines ....: 31.55 + Avg LOC ...............: 22.78 Avg eLOC ..............: 19.12 + Avg lLOC ..............: 12.26 Avg Cyclomatic Comp. ..: 3.44 + Avg Interface Comp. ...: 2.76 Avg Parameters ........: 1.76 + Avg Return Points .....: 1.00 Avg Comment Lines .....: 25.70 + ------ ----- ----- ------ ------ ----- + Max LOC ...............: 116 + Max eLOC ..............: 99 Max lLOC ..............: 62 + Max Cyclomatic Comp. ..: 16 Max Interface Comp. ...: 8 + Max Parameters ........: 7 Max Return Points .....: 1 + Max Comment Lines .....: 77 Max Total Lines .......: 157 + ------ ----- ----- ------ ------ ----- + Min LOC ...............: 3 + Min eLOC ..............: 2 Min lLOC ..............: 1 + Min Cyclomatic Comp. ..: 1 Min Interface Comp. ...: 1 + Min Parameters ........: 0 Min Return Points .....: 1 + Min Comment Lines .....: 1 Min Total Lines .......: 3 + + ------------------------------------------------------------------------ + + ~~ File Summary ~~ + + C Source Files *.c ....: 19 C/C++ Include Files *.h: 17 + C++ Source Files *.c* .: 0 C++ Include Files *.h* : 0 + C# Source Files *.cs ..: 0 Java Source File *.jav*: 0 + Other File Count ......: 0 Total File Count ......: 36 + ________________________________________________________________________ + +@endcode +*/ diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewd b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewd index 3e40dff6..f6eedd1b 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewd +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewd @@ -1,4741 +1,4213 @@ - - + - 2 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 + 3 + + Debug + + ARM + 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 0 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + - - diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewp index c76d4a2c..d6d26f37 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewp @@ -1,3043 +1,3190 @@ - - + - 2 - - Debug - - ARM - - 1 - - General - 3 - - 24 - 1 + 3 + + Debug + + ARM + 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 24 - 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 24 - 1 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - efm32pg1b - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\source\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\source\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\source\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\source\qv.c - - - $PROJ_DIR$\..\..\..\..\..\source\qv_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\source\qs.c - - - $PROJ_DIR$\..\..\..\..\..\source\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\source\qs_rx.c - - + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + efm32pg1b + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c + + - - diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/test.c b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/test.c index aad3a14d..3cf216fc 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/test.c +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/test.c @@ -1,7 +1,7 @@ /***************************************************************************** * Product: DPP example -* Last Updated for Version: 5.9.4 -* Date of the Last Update: 2017-07-06 +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -76,6 +76,7 @@ static void Thread1_run(QXThread * const me) { /* some flating point code to exercise the VFP... */ x = 1.4142135F; x = x * 1.4142135F; + //QXThread_delay(1U, 0U); /*asserts (blocking while holding a mutex)*/ QXMutex_unlock(&l_mutex); QXThread_delay(BSP_TICKS_PER_SEC/7, 0U); /* BLOCK */ @@ -106,7 +107,9 @@ static void Thread2_run(QXThread * const me) { * that uses it. Alternatively, the semaphore can be initialized * before any thread runs. */ - QXSemaphore_init(&l_sema, 0U); /* start with zero count */ + QXSemaphore_init(&l_sema, + 0U, /* count==0 (signaling semaphore) */ + 1U); /* max_count==1 (binary semaphore) */ for (;;) { QEvt const *e; diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/ti/.cproject b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/ti/.cproject index 434781de..b1c9d055 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/ti/.cproject +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/ti/.cproject @@ -5,41 +5,41 @@ + - - - @@ -93,11 +93,11 @@ + - @@ -182,11 +182,11 @@ + - diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/ti/NewTargetConfiguration.ccxml b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/ti/NewTargetConfiguration.ccxml deleted file mode 100644 index 0d8842e7..00000000 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/ti/NewTargetConfiguration.ccxml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/test.c b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/test.c index 644027fb..9dc3a596 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/test.c +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/test.c @@ -1,7 +1,7 @@ /***************************************************************************** * Product: DPP example -* Last Updated for Version: 5.7.2 -* Date of the Last Update: 2016-09-27 +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -87,7 +87,9 @@ static void Thread2_run(QXThread * const me) { * that uses it. Alternatively, the semaphore can be initialized * before any thread runs. */ - QXSemaphore_init(&l_sema, 0U); /* start with zero count */ + QXSemaphore_init(&l_sema, + 0U, /* count==0 (signaling semaphore) */ + 1U); /* max_count==1 (binary semaphore) */ for (;;) { QEvt const *e; diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/ti/.cproject b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/ti/.cproject index a8bc6a4a..eccc8faf 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/ti/.cproject +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/ti/.cproject @@ -5,41 +5,41 @@ + - - - @@ -93,11 +93,11 @@ + - @@ -182,11 +182,11 @@ + - diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/test.c b/examples/arm-cm/dpp_nucleo-l053r8/qxk/test.c index 644027fb..3cd246d0 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/test.c +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/test.c @@ -1,7 +1,7 @@ /***************************************************************************** * Product: DPP example -* Last Updated for Version: 5.7.2 -* Date of the Last Update: 2016-09-27 +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -87,7 +87,9 @@ static void Thread2_run(QXThread * const me) { * that uses it. Alternatively, the semaphore can be initialized * before any thread runs. */ - QXSemaphore_init(&l_sema, 0U); /* start with zero count */ + QXSemaphore_init(&l_sema, + 0U, /* count==0 (signaling semaphore) */ + 1U); /* max_count==1 (binary semaphore) */ for (;;) { QEvt const *e; diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/test.c b/examples/arm-cm/dpp_stm32f4-discovery/qxk/test.c index 9540e2db..577b62f8 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/test.c +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/test.c @@ -1,7 +1,7 @@ /***************************************************************************** * Product: DPP example -* Last Updated for Version: 5.8.2 -* Date of the Last Update: 2017-01-28 +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -87,7 +87,9 @@ static void Thread2_run(QXThread * const me) { * that uses it. Alternatively, the semaphore can be initialized * before any thread runs. */ - QXSemaphore_init(&l_sema, 0U); /* start with zero count */ + QXSemaphore_init(&l_sema, + 0U, /* count==0 (signaling semaphore) */ + 1U); /* max_count==1 (binary semaphore) */ for (;;) { QEvt const *e; diff --git a/examples/arm-cm/dpp_stm32f746g-discovery/qxk/test.c b/examples/arm-cm/dpp_stm32f746g-discovery/qxk/test.c index 9540e2db..577b62f8 100644 --- a/examples/arm-cm/dpp_stm32f746g-discovery/qxk/test.c +++ b/examples/arm-cm/dpp_stm32f746g-discovery/qxk/test.c @@ -1,7 +1,7 @@ /***************************************************************************** * Product: DPP example -* Last Updated for Version: 5.8.2 -* Date of the Last Update: 2017-01-28 +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -87,7 +87,9 @@ static void Thread2_run(QXThread * const me) { * that uses it. Alternatively, the semaphore can be initialized * before any thread runs. */ - QXSemaphore_init(&l_sema, 0U); /* start with zero count */ + QXSemaphore_init(&l_sema, + 0U, /* count==0 (signaling semaphore) */ + 1U); /* max_count==1 (binary semaphore) */ for (;;) { QEvt const *e; diff --git a/include/qxthread.h b/include/qxthread.h index e75ffce1..d8e2b779 100644 --- a/include/qxthread.h +++ b/include/qxthread.h @@ -4,8 +4,8 @@ * @ingroup qxk * @cond ****************************************************************************** -* Last updated for version 5.9.5 -* Last updated on 2017-07-19 +* Last updated for version 5.9.6 +* Last updated on 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -158,15 +158,17 @@ QEvt const *QXThread_queueGet(uint_fast16_t const nTicks, /****************************************************************************/ /*! Counting Semaphore of the QXK preemptive kernel */ typedef struct { - uint_fast16_t count; QPSet waitSet; /*!< set of extended-threads waiting on this semaphore */ + uint_fast16_t count; + uint_fast16_t max_count; } QXSemaphore; /*! initialize the counting semaphore */ -void QXSemaphore_init(QXSemaphore * const me, uint_fast16_t count); +void QXSemaphore_init(QXSemaphore * const me, uint_fast16_t count, + uint_fast16_t max_count); /*! signal (unblock) the semaphore */ -void QXSemaphore_signal(QXSemaphore * const me); +bool QXSemaphore_signal(QXSemaphore * const me); /*! wait (block) on the semaphore */ bool QXSemaphore_wait(QXSemaphore * const me, diff --git a/include/stdint_c.h b/include/stdint_c.h new file mode 100644 index 00000000..0874ee02 --- /dev/null +++ b/include/stdint_c.h @@ -0,0 +1,87 @@ +/** +* @file +* @brief Macros for casting strongly-typed integer constants. +* +* @description This header file provides the standard C99 and C++11 +* macros of the form UINT8_C(), UINT_FAST8_C(), etc. for building +* strongly-typed constants of standard integers from . +* +* @cond +****************************************************************************** +* Last updated for version 5.9.5 +* Last updated on 2017-07-20 +* +* Q u a n t u m L e a P s +* --------------------------- +* innovating embedded systems +* +* Copyright (C) Quantum Leaps, LLC. All rights reserved. +* +* This program is open source software: you can redistribute it and/or +* modify it under the terms of the GNU General Public License as published +* by the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Alternatively, this program may be distributed and modified under the +* terms of Quantum Leaps commercial licenses, which expressly supersede +* the GNU General Public License and are specifically designed for +* licensees interested in retaining the proprietary status of their code. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Contact information: +* https://state-machine.com +* mailto:info@state-machine.com +****************************************************************************** +* @endcond +*/ +#ifndef stdint_c_h +#define stdint_c_h + +#ifndef UINT8_C +#define UINT8_C(x_) ((uint8_t)(x_)) +#endif + +#ifndef INT8_C +#define INT8_C(x_) ((int8_t)(x_)) +#endif + +#ifndef UINT_FAST8_C +#define UINT_FAST8_C(x_) ((uint_fast8_t)(x_)) +#endif + +#ifndef INT_FAST8_C +#define INT_FAST8_C(x_) ((int_fast8_t)(x_)) +#endif + +#ifndef UINT16_C +#define UINT16_C(x_) ((uint16_t)(x_)) +#endif + +#ifndef INT16_C +#define INT16_C(x_) ((int16_t)(x_)) +#endif + +#ifndef UINT_FAST16_C +#define UINT_FAST16_C(x_) ((uint_fast16_t)(x_)) +#endif + +#ifndef UINT32_C +#define UINT32_C(x_) ((uint32_t)(x_)) +#endif + +#ifndef INT32_C +#define INT32_C(x_) ((int32_t)(x_)) +#endif + +#ifndef UINT_FAST32_C +#define UINT_FAST32_C(x_) ((uint_fast32_t)(x_)) +#endif + +#endif /* stdint_c_h */ diff --git a/ports/arm-cm/qk/arm/qk_port.s b/ports/arm-cm/qk/arm/qk_port.s index 957b7613..517074f9 100644 --- a/ports/arm-cm/qk/arm/qk_port.s +++ b/ports/arm-cm/qk/arm/qk_port.s @@ -1,7 +1,7 @@ ;***************************************************************************** ; Product: QK port to ARM Cortex-M (M0,M0+,M3,M4,M7), ARM-KEIL assembler -; Last Updated for Version: 5.9.0 -; Date of the Last Update: 2017-03-17 +; Last Updated for Version: 5.9.6 +; Date of the Last Update: 2017-07-28 ; ; Q u a n t u m L e a P s ; --------------------------- @@ -111,16 +111,17 @@ QK_init FUNCTION LSLS r1,r1,#8 ORRS r1,r1,#QF_BASEPRI - LDR r3,=0xE000E004 ; Interrupt Controller Type Register - LDR r3,[r3] ; r3 := INTLINESUM + LDR r2,=0xE000E400 ; NVIC_PRI0 register + LDR r3,=0xE000E004 ; Interrupt Controller Type Register (ICTR) + LDR r3,[r3] + ANDS r3,r3,#7 ; r3 := ICTR[0:2] (INTLINESNUM) LSLS r3,r3,#3 - ADDS r3,r3,#8 ; r3 == number of NVIC_PRIO registers + ADDS r3,r3,#8 ; r3 == (# NVIC_PRIO registers)/4 ; loop over all implemented NVIC_PRIO registers for IRQs... QK_init_irq SUBS r3,r3,#1 - LDR r2,=0xE000E400 ; NVIC_PRI0 register - STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 + STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 CMP r3,#0 BNE QK_init_irq diff --git a/ports/arm-cm/qk/gnu/qk_port.s b/ports/arm-cm/qk/gnu/qk_port.s index b0f94f6b..623e8f26 100644 --- a/ports/arm-cm/qk/gnu/qk_port.s +++ b/ports/arm-cm/qk/gnu/qk_port.s @@ -1,7 +1,7 @@ /***************************************************************************** * Product: QK port to ARM Cortex-M (M0,M0+,M3,M4,M7), GNU-ARM assembler -* Last Updated for Version: 5.9.3 -* Date of the Last Update: 2017-06-17 +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-28 * * Q u a n t u m L e a P s * --------------------------- @@ -106,16 +106,18 @@ QK_init: LSLS r1,r1,#8 ORRS r1,r1,#QF_BASEPRI - LDR r3,=0xE000E004 /* Interrupt Controller Type Register */ - LDR r3,[r3] /* r3 := INTLINESUM */ + LDR r2,=0xE000E400 /* NVIC_PRI0 register */ + LDR r3,=0xE000E004 /* Interrupt Controller Type Register (ICTR) */ + LDR r3,[r3] + LDR r3,[r3] + ANDS r3,r3,#7 /* r3 := ICTR[0:2] (INTLINESNUM) */ LSLS r3,r3,#3 - ADDS r3,r3,#8 /* r3 == number of NVIC_PRIO registers */ + ADDS r3,r3,#8 /* r3 == (# NVIC_PRIO registers)/4 */ /* loop over all implemented NVIC_PRIO registers for IRQs... */ QK_init_irq: SUBS r3,r3,#1 - LDR r2,=0xE000E400 /* NVIC_PRI0 register */ - STR r1,[r2,r3,LSL #2] /* NVIC_PRI0[r3] := r1 */ + STR r1,[r2,r3,LSL #2] /* NVIC_PRI0[r3] := r1 */ CMP r3,#0 BNE QK_init_irq diff --git a/ports/arm-cm/qk/iar/qk_port.s b/ports/arm-cm/qk/iar/qk_port.s index 18844d3e..21200f06 100644 --- a/ports/arm-cm/qk/iar/qk_port.s +++ b/ports/arm-cm/qk/iar/qk_port.s @@ -1,7 +1,7 @@ ;***************************************************************************** ; Product: QK port to ARM Cortex-M (M0,M0+,M3,M4,M7), IAR-ARM assembler -; Last Updated for Version: 5.9.0 -; Date of the Last Update: 2017-03-17 +; Last Updated for Version: 5.9.6 +; Date of the Last Update: 2017-07-28 ; ; Q u a n t u m L e a P s ; --------------------------- @@ -110,16 +110,17 @@ QK_init: LSLS r1,r1,#8 ORRS r1,r1,#QF_BASEPRI - LDR r3,=0xE000E004 ; Interrupt Controller Type Register - LDR r3,[r3] ; r3 := INTLINESUM + LDR r2,=0xE000E400 ; NVIC_PRI0 register + LDR r3,=0xE000E004 ; Interrupt Controller Type Register (ICTR) + LDR r3,[r3] + ANDS r3,r3,#7 ; r3 := ICTR[0:2] (INTLINESNUM) LSLS r3,r3,#3 - ADDS r3,r3,#8 ; r3 == number of NVIC_PRIO registers + ADDS r3,r3,#8 ; r3 == (# NVIC_PRIO registers)/4 ; loop over all implemented NVIC_PRIO registers for IRQs... QK_init_irq: SUBS r3,r3,#1 - LDR r2,=0xE000E400 ; NVIC_PRI0 register - STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 + STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 CMP r3,#0 BNE QK_init_irq diff --git a/ports/arm-cm/qk/ti/qk_port.s b/ports/arm-cm/qk/ti/qk_port.s index 2289b45c..1da5a0e0 100644 --- a/ports/arm-cm/qk/ti/qk_port.s +++ b/ports/arm-cm/qk/ti/qk_port.s @@ -1,7 +1,7 @@ ;***************************************************************************** ; Product: QK port to ARM Cortex-M (M0,M0+,M3,M4,M7), TI-ARM assembler -; Last Updated for Version: 5.9.0 -; Date of the Last Update: 2017-03-17 +; Last Updated for Version: 5.9.6 +; Date of the Last Update: 2017-07-28 ; ; Q u a n t u m L e a P s ; --------------------------- @@ -109,16 +109,17 @@ QK_init: .asmfunc LSLS r1,r1,#8 ORRS r1,r1,#QF_BASEPRI - LDR r3,ICTR_addr ; Interrupt Controller Type Register - LDR r3,[r3] ; r3 := INTLINESUM + LDR r2,PRI0_addr ; NVIC_PRI0 register + LDR r3,ICTR_addr ; Interrupt Controller Type Register (ICTR) + LDR r3,[r3] ; r3 := ICTR + ANDS r3,r3,#7 ; r3 := ICTR[0:2] (INTLINESNUM) LSLS r3,r3,#3 - ADDS r3,r3,#8 ; r3 == number of NVIC_PRIO registers + ADDS r3,r3,#8 ; r3 == (# NVIC_PRIO registers)/4 ; loop over all implemented NVIC_PRIO registers for IRQs... QK_init_irq: SUBS r3,r3,#1 - LDR r2,PRI0_addr ; NVIC_PRI0 register - STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 + STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 CMP r3,#0 BNE QK_init_irq diff --git a/ports/arm-cm/qv/arm/qv_port.c b/ports/arm-cm/qv/arm/qv_port.c index 38cec46b..4b2fb427 100644 --- a/ports/arm-cm/qv/arm/qv_port.c +++ b/ports/arm-cm/qv/arm/qv_port.c @@ -3,8 +3,8 @@ * @brief QV/C port to ARM Cortex-M, ARM-KEIL toolset * @cond ****************************************************************************** -* Last Updated for Version: 5.8.1 -* Date of the Last Update: 2016-12-14 +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-28 * * Q u a n t u m L e a P s * --------------------------- @@ -75,7 +75,7 @@ void QV_init(void) { SCB_SYSPRI[3] |= (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI; /* set all implemented IRQ priories to QF_BASEPRI... */ - n = 8 + (*SCnSCB_ICTR << 3); /* # interrupt priority registers */ + n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3); /* (# NVIC_PRIO registers)/4 */ do { --n; NVIC_IP[n] = (QF_BASEPRI << 24) | (QF_BASEPRI << 16) diff --git a/ports/arm-cm/qv/gnu/qv_port.c b/ports/arm-cm/qv/gnu/qv_port.c index db1f18b2..89d7973b 100644 --- a/ports/arm-cm/qv/gnu/qv_port.c +++ b/ports/arm-cm/qv/gnu/qv_port.c @@ -3,8 +3,8 @@ * @brief QV/C port to ARM Cortex-M, GNU-ARM toolset * @cond ****************************************************************************** -* Last Updated for Version: 5.8.1 -* Date of the Last Update: 2016-12-14 +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-28 * * Q u a n t u m L e a P s * --------------------------- @@ -75,7 +75,7 @@ void QV_init(void) { SCB_SYSPRI[3] |= (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI; /* set all implemented IRQ priories to QF_BASEPRI... */ - n = 8 + (*SCnSCB_ICTR << 3); /* # interrupt priority registers */ + n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3); /* (# NVIC_PRIO registers)/4 */ do { --n; NVIC_IP[n] = (QF_BASEPRI << 24) | (QF_BASEPRI << 16) diff --git a/ports/arm-cm/qv/iar/qv_port.c b/ports/arm-cm/qv/iar/qv_port.c index 84d7d91f..e39a5144 100644 --- a/ports/arm-cm/qv/iar/qv_port.c +++ b/ports/arm-cm/qv/iar/qv_port.c @@ -3,8 +3,8 @@ * @brief QV/C port to ARM Cortex-M, ARM-KEIL toolset * @cond ****************************************************************************** -* Last Updated for Version: 5.8.1 -* Date of the Last Update: 2016-12-14 +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-28 * * Q u a n t u m L e a P s * --------------------------- @@ -75,7 +75,7 @@ void QV_init(void) { SCB_SYSPRI[3] |= (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI; /* set all implemented IRQ priories to QF_BASEPRI... */ - n = 8 + (*SCnSCB_ICTR << 3); /* # interrupt priority registers */ + n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3); /* (# NVIC_PRIO registers)/4 */ do { --n; NVIC_IP[n] = (QF_BASEPRI << 24) | (QF_BASEPRI << 16) diff --git a/ports/arm-cm/qv/ti/qv_port.s b/ports/arm-cm/qv/ti/qv_port.s index 1924de82..82f9ae46 100644 --- a/ports/arm-cm/qv/ti/qv_port.s +++ b/ports/arm-cm/qv/ti/qv_port.s @@ -1,7 +1,7 @@ ;***************************************************************************** -; Product: QV port to ARM Cortex-M (M0,M0+,M1,M3,M4,M7), TI-ARM assembler -; Last Updated for Version: 5.9.0 -; Date of the Last Update: 2017-03-17 +; Product: QV port to ARM Cortex-M (M0,M0+,M3,M4,M7), TI-ARM assembler +; Last Updated for Version: 5.9.6 +; Date of the Last Update: 2017-07-28 ; ; Q u a n t u m L e a P s ; --------------------------- @@ -139,16 +139,17 @@ QV_init: .asmfunc LSLS r1,r1,#8 ORRS r1,r1,#QF_BASEPRI + LDR r2,PRI0_addr ; NVIC_PRI0 register LDR r3,ICTR_addr ; Interrupt Controller Type Register - LDR r3,[r3] ; r3 := INTLINESUM + LDR r3,[r3] ; r3 := ICTR + ANDS r3,r3,#7 ; r3 := ICTR[0:2] (INTLINESNUM) LSLS r3,r3,#3 - ADDS r3,r3,#8 ; r3 == number of NVIC_PRIO registers + ADDS r3,r3,#8 ; r3 == (# NVIC_PRIO registers)/4 ; loop over all implemented NVIC_PRIO registers for IRQs... QV_init_irq: SUBS r3,r3,#1 - LDR r2,PRI0_addr ; NVIC_PRI0 register - STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 + STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 CMP r3,#0 BNE QV_init_irq diff --git a/ports/arm-cm/qxk/arm/qxk_port.s b/ports/arm-cm/qxk/arm/qxk_port.s index 6419e19c..aab96115 100644 --- a/ports/arm-cm/qxk/arm/qxk_port.s +++ b/ports/arm-cm/qxk/arm/qxk_port.s @@ -1,7 +1,7 @@ ;***************************************************************************** -; Product: QXK port to ARM Cortex-M (M0,M0+,M1,M3,M4,M7), ARM-Keil assembler -; Last Updated for Version: 5.9.4 -; Date of the Last Update: 2017-07-06 +; Product: QXK port to ARM Cortex-M (M0,M0+,M3,M4,M7), ARM-Keil assembler +; Last Updated for Version: 5.9.6 +; Date of the Last Update: 2017-07-28 ; ; Q u a n t u m L e a P s ; --------------------------- @@ -83,7 +83,7 @@ QXK_init FUNCTION ELSE ; Cortex-M3/M4/.. ; NOTE: - ; On Cortex-M3/M4/M7.., this QK port disables interrupts by means of + ; On Cortex-M3/M4/M7.., this QXK port disables interrupts by means of ; the BASEPRI register. However, this method cannot disable interrupt ; priority zero, which is the default for all interrupts out of reset. ; The following code changes the SysTick priority and all IRQ priorities @@ -124,16 +124,17 @@ QXK_init FUNCTION LSLS r1,r1,#8 ORRS r1,r1,#QF_BASEPRI - LDR r3,=0xE000E004 ; Interrupt Controller Type Register - LDR r3,[r3] ; r3 := INTLINESUM + LDR r2,=0xE000E400 ; NVIC_PRI0 register + LDR r3,=0xE000E004 ; Interrupt Controller Type Register (ICTR) + LDR r3,[r3] + ANDS r3,r3,#7 ; r3 := ICTR[0:2] (INTLINESNUM) LSLS r3,r3,#3 - ADDS r3,r3,#8 ; r3 == number of NVIC_PRIO registers + ADDS r3,r3,#8 ; r3 == (# NVIC_PRIO registers)/4 ; loop over all implemented NVIC_PRIO registers for IRQs... QXK_init_irq SUBS r3,r3,#1 - LDR r2,=0xE000E400 ; NVIC_PRI0 register - STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 + STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 CMP r3,#0 BNE QXK_init_irq diff --git a/ports/arm-cm/qxk/gnu/qxk_port.s b/ports/arm-cm/qxk/gnu/qxk_port.s index 64816696..0ce9f777 100644 --- a/ports/arm-cm/qxk/gnu/qxk_port.s +++ b/ports/arm-cm/qxk/gnu/qxk_port.s @@ -1,7 +1,7 @@ /***************************************************************************** -* Product: QXK port to ARM Cortex-M (M0,M0+,M1,M3,M4,M7), GNU-ARM assembler -* Last Updated for Version: 5.9.4 -* Date of the Last Update: 2017-07-06 +* Product: QXK port to ARM Cortex-M (M0,M0+,M3,M4,M7), GNU-ARM assembler +* Last Updated for Version: 5.9.6 +* Date of the Last Update: 2017-07-28 * * Q u a n t u m L e a P s * --------------------------- @@ -114,16 +114,17 @@ QXK_init: LSLS r1,r1,#8 ORRS r1,r1,#QF_BASEPRI - LDR r3,=0xE000E004 /* Interrupt Controller Type Register */ - LDR r3,[r3] /* r3 := INTLINESUM */ + LDR r2,=0xE000E400 /* NVIC_PRI0 register */ + LDR r3,=0xE000E004 /* Interrupt Controller Type Register (ICTR) */ + LDR r3,[r3] + ANDS r3,r3,#7 /* r3 := ICTR[0:2] (INTLINESNUM) */ LSLS r3,r3,#3 - ADDS r3,r3,#8 /* r3 == number of NVIC_PRIO registers */ + ADDS r3,r3,#8 /* r3 == (# NVIC_PRIO registers)/4 */ /* loop over all implemented NVIC_PRIO registers for IRQs... */ QXK_init_irq: SUBS r3,r3,#1 - LDR r2,=0xE000E400 /* NVIC_PRI0 register */ - STR r1,[r2,r3,LSL #2] /* NVIC_PRI0[r3] := r1 */ + STR r1,[r2,r3,LSL #2] /* NVIC_PRI0[r3] := r1 */ CMP r3,#0 BNE QXK_init_irq diff --git a/ports/arm-cm/qxk/iar/qxk_port.s b/ports/arm-cm/qxk/iar/qxk_port.s index 8dd425d2..1b77a813 100644 --- a/ports/arm-cm/qxk/iar/qxk_port.s +++ b/ports/arm-cm/qxk/iar/qxk_port.s @@ -1,7 +1,7 @@ ;***************************************************************************** ; Product: QXK port to ARM Cortex-M (M0,M0+,M3,M4,M7), IAR-ARM assembler -; Last Updated for Version: 5.9.4 -; Date of the Last Update: 2017-07-06 +; Last Updated for Version: 5.9.6 +; Date of the Last Update: 2017-07-28 ; ; Q u a n t u m L e a P s ; --------------------------- @@ -51,7 +51,7 @@ QXK_NEXT EQU 4 QXK_TOP_PRIO EQU 8 ; NOTE: keep in synch with the QMActive struct in "qf.h/qxk.h" !!! -QMACTIVE_OSOBJ EQU 40 +QMACTIVE_OSOBJ EQU 40 QMACTIVE_PRIO EQU 48 @@ -123,20 +123,21 @@ QXK_init: LSLS r1,r1,#8 ORRS r1,r1,#QF_BASEPRI - LDR r3,=0xE000E004 ; Interrupt Controller Type Register - LDR r3,[r3] ; r3 := INTLINESUM + LDR r2,=0xE000E400 ; NVIC_PRI0 register + LDR r3,=0xE000E004 ; Interrupt Controller Type Register (ICTR) + LDR r3,[r3] + ANDS r3,r3,#7 ; r3 := ICTR[0:2] (INTLINESNUM) LSLS r3,r3,#3 - ADDS r3,r3,#8 ; r3 == number of NVIC_PRIO registers + ADDS r3,r3,#8 ; r3 == (# NVIC_PRIO registers)/4 ; loop over all implemented NVIC_PRIO registers for IRQs... QXK_init_irq: SUBS r3,r3,#1 - LDR r2,=0xE000E400 ; NVIC_PRI0 register - STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 + STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 CMP r3,#0 BNE QXK_init_irq -#endif ; Cortex-M3/M4/... +#endif ; Cortex-M3/M4/M7 MOV r0,r12 ; r0 := original PRIMASK MSR PRIMASK,r0 ; PRIMASK := r0 diff --git a/ports/arm-cm/qxk/ti/qxk_port.s b/ports/arm-cm/qxk/ti/qxk_port.s index da662117..0480a27e 100644 --- a/ports/arm-cm/qxk/ti/qxk_port.s +++ b/ports/arm-cm/qxk/ti/qxk_port.s @@ -1,7 +1,7 @@ ;***************************************************************************** ; Product: QXK port to ARM Cortex-M (M0,M0+,M3,M4,M7), TI-ARM assembler -; Last Updated for Version: 5.9.4 -; Date of the Last Update: 2017-07-06 +; Last Updated for Version: 5.9.6 +; Date of the Last Update: 2017-07-28 ; ; Q u a n t u m L e a P s ; --------------------------- @@ -59,7 +59,7 @@ QXK_NEXT .equ 4 QXK_TOP_PRIO .equ 8 ; NOTE: keep in synch with the QMActive struct in "qf.h/qxk.h" !!! -QMACTIVE_OSOBJ .equ 44 +QMACTIVE_OSOBJ .equ 40 QMACTIVE_PRIO .equ 48 .text @@ -77,7 +77,7 @@ QXK_init: .asmfunc .if __TI_TMS470_V7M3__ | __TI_TMS470_V7M4__ ; | __TI_TMS470_V7M7__ ; M3/4/7? ; NOTE: - ; On Cortex-M3/M4/M7.., this QK port disables interrupts by means of + ; On Cortex-M3/M4/M7.., this QXK port disables interrupts by means of ; the BASEPRI register. However, this method cannot disable interrupt ; priority zero, which is the default for all interrupts out of reset. ; The following code changes the SysTick priority and all IRQ priorities @@ -118,16 +118,17 @@ QXK_init: .asmfunc LSLS r1,r1,#8 ORRS r1,r1,#QF_BASEPRI + LDR r2,PRI0_addr ; NVIC_PRI0 register LDR r3,ICTR_addr ; Interrupt Controller Type Register - LDR r3,[r3] ; r3 := INTLINESUM + LDR r3,[r3] ; r3 := INTLINESNUM + ANDS r3,r3,#7 ; r3 := ICTR[0:2] (INTLINESNUM) LSLS r3,r3,#3 - ADDS r3,r3,#8 ; r3 == number of NVIC_PRIO registers + ADDS r3,r3,#8 ; r3 == (# NVIC_PRIO registers)/4 ; loop over all implemented NVIC_PRIO registers for IRQs... QXK_init_irq: SUBS r3,r3,#1 - LDR r2,PRI0_addr ; NVIC_PRI0 register - STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 + STR r1,[r2,r3,LSL #2] ; NVIC_PRI0[r3] := r1 CMP r3,#0 BNE QXK_init_irq diff --git a/source/qxk.c b/source/qxk.c index e617364b..763eb472 100644 --- a/source/qxk.c +++ b/source/qxk.c @@ -4,8 +4,8 @@ * @ingroup qxk * @cond ****************************************************************************** -* Last updated for version 5.9.5 -* Last updated on 2017-07-19 +* Last updated for version 5.9.6 +* Last updated on 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -58,7 +58,7 @@ Q_DEFINE_THIS_MODULE("qxk") QXK_Attr QXK_attr_; /* global attributes of the QXK kernel */ /* Local-scope objects ******************************************************/ -static QXThread l_idleThread; +static QActive l_idleThread; /****************************************************************************/ /** @@ -86,7 +86,7 @@ void QF_init(void) { QXK_attr_.lockPrio = (uint_fast8_t)(QF_MAX_ACTIVE + 1); /* setup the QXK idle loop... */ - QF_active_[0] = &l_idleThread.super; /* register idle thread with QF */ + QF_active_[0] = &l_idleThread; /* register idle thread with QF */ QXK_attr_.actPrio = (uint_fast8_t)0; /* set the idle thread priority */ #ifdef QXK_INIT @@ -434,6 +434,9 @@ struct QActive *QXK_current(void) { QF_CRIT_ENTRY_(); curr = QXK_attr_.curr; + if (curr == (struct QActive *)0) { /* basic thread? */ + curr = QF_active_[QXK_attr_.actPrio]; + } QF_CRIT_EXIT_(); /** @post the current thread must be valid */ diff --git a/source/qxk_mutex.c b/source/qxk_mutex.c index f6524757..a15383fc 100644 --- a/source/qxk_mutex.c +++ b/source/qxk_mutex.c @@ -4,8 +4,8 @@ * @brief QXMutex_init(), QXMutex_lock and QXMutex_unlock() definitions. * @cond ****************************************************************************** -* Last updated for version 5.9.4 -* Last updated on 2017-07-05 +* Last updated for version 5.9.6 +* Last updated on 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -111,7 +111,7 @@ void QXMutex_lock(QXMutex * const me) { QF_CRIT_STAT_ QF_CRIT_ENTRY_(); - /** @pre scheduler cannot be locked from the ISR context + /** @pre The mutex cannot be locked from the ISR context * and the mutex must be unused */ Q_REQUIRE_ID(700, (!QXK_ISR_CONTEXT_()) @@ -130,7 +130,7 @@ void QXMutex_lock(QXMutex * const me) { QS_BEGIN_NOCRIT_(QS_SCHED_LOCK, (void *)0, (void *)0) QS_TIME_(); /* timestamp */ - QS_2U8_((uint8_t)me->prevPrio, /* the previouis lock prio */ + QS_2U8_((uint8_t)me->prevPrio, /* the previous lock prio */ (uint8_t)QXK_attr_.lockPrio); /* the new lock prio */ QS_END_NOCRIT_() @@ -168,8 +168,8 @@ void QXMutex_unlock(QXMutex * const me) { QF_CRIT_STAT_ QF_CRIT_ENTRY_(); - /** @pre scheduler cannot be unlocked from the ISR context - * and the mutex must NOT be unused + /** @pre The mutex cannot be unlocked from the ISR context + * and the mutex must be used (NOT unused) */ Q_REQUIRE_ID(800, (!QXK_ISR_CONTEXT_()) && (me->prevPrio != (uint_fast8_t)MUTEX_UNUSED)); @@ -178,25 +178,27 @@ void QXMutex_unlock(QXMutex * const me) { me->prevPrio = (uint_fast8_t)MUTEX_UNUSED; QXK_attr_.lockHolder = me->prevHolder; /* restore previous lock holder */ - QS_BEGIN_NOCRIT_(QS_SCHED_UNLOCK, (void *)0, (void *)0) - QS_TIME_(); /* timestamp */ - if (QXK_attr_.lockPrio > p) { + if (QXK_attr_.lockPrio > p) { + + QS_BEGIN_NOCRIT_(QS_SCHED_UNLOCK, (void *)0, (void *)0) + QS_TIME_(); /* timestamp */ QS_2U8_((uint8_t)QXK_attr_.lockPrio, /* previouis lock priority */ (uint8_t)p); /* new lock priority */ - } - else { - p = QXK_attr_.lockPrio; - QS_2U8_((uint8_t)p, /* previouis lock priority */ - (uint8_t)p); /* new lock priority */ - } - QS_END_NOCRIT_() - - if (QXK_attr_.lockPrio > p) { + QS_END_NOCRIT_() + QXK_attr_.lockPrio = p; /* restore the previous lock prio */ /* find the highest-prio thread ready to run */ if (QXK_sched_() != (uint_fast8_t)0) { /* priority found? */ QXK_activate_(); /* activate any unlocked basic threads */ } + } + else { + QS_BEGIN_NOCRIT_(QS_SCHED_UNLOCK, (void *)0, (void *)0) + QS_TIME_(); /* timestamp */ + p = QXK_attr_.lockPrio; + QS_2U8_((uint8_t)p, /* previouis lock priority */ + (uint8_t)p); /* new lock priority */ + QS_END_NOCRIT_() } QF_CRIT_EXIT_(); } diff --git a/source/qxk_sema.c b/source/qxk_sema.c index 7abd3091..7654c37a 100644 --- a/source/qxk_sema.c +++ b/source/qxk_sema.c @@ -4,8 +4,8 @@ * @ingroup qxk * @cond ****************************************************************************** -* Last updated for version 5.9.5 -* Last updated on 2017-07-20 +* Last updated for version 5.9.6 +* Last updated on 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -57,21 +57,30 @@ Q_DEFINE_THIS_MODULE("qxk_sema") /****************************************************************************/ /** * @description -* Initializes a semaphore with the specified count. If the semaphore is used -* for resource sharing, the initial value of the semaphore count should be -* set to the number of identical resources guarded by the semaphore. If the -* semaphore is used as a signaling mechanism, the initial count should set -* to 0. +* Initializes a semaphore with the specified count and maximum count. +* If the semaphore is used for resource sharing, both the initial count +* and maximum count should be set to the number of identical resources +* guarded by the semaphore. If the semaphore is used as a signaling +* mechanism, the initial count should set to 0 and maximum count to 1 +* (binary semaphore). * * @param[in,out] me pointer (see @ref oop) * @param[in] count initial value of the semaphore counter +* @param[in] max_count maximum value of the semaphore counter. +* The purpose of the max_count is to limit the counter +* so that the semaphore cannot unblock more times than +* the maximum. * * @note * QXSemaphore_init() must be called **before** the semaphore can be used * (signaled or waited on). */ -void QXSemaphore_init(QXSemaphore * const me, uint_fast16_t count) { +void QXSemaphore_init(QXSemaphore * const me, uint_fast16_t count, + uint_fast16_t max_count) +{ + Q_REQUIRE_ID(100, max_count > (uint_fast16_t)0); me->count = count; + me->max_count = max_count; QPSet_setEmpty(&me->waitSet); } @@ -109,9 +118,15 @@ bool QXSemaphore_wait(QXSemaphore * const me, QF_CRIT_ENTRY_(); thr = (QXThread *)QXK_attr_.curr; - Q_REQUIRE_ID(100, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ + /** @pre this function must: + * (1) NOT be called from an ISR; (2) be called from an extended thread; + * (3) the thread must NOT be holding a mutex and + * (4) the thread must NOT be already blocked on any object. + */ + Q_REQUIRE_ID(200, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ && (thr != (QXThread *)0) /* current thread must be extended */ - && (thr->super.super.temp.obj == (QMState const *)0)); /* !blocked */ + && (QXK_attr_.lockPrio == (uint_fast8_t)0) /* not holding a mutex */ + && (thr->super.super.temp.obj == (QMState *)0)); /* not blocked */ if (me->count > (uint_fast16_t)0) { --me->count; @@ -129,7 +144,7 @@ bool QXSemaphore_wait(QXSemaphore * const me, QF_CRIT_ENTRY_(); /* the blocking object must be this semaphore */ - Q_ASSERT_ID(110, thr->super.super.temp.obj == (QMState const *)me); + Q_ASSERT_ID(210, thr->super.super.temp.obj == (QMState const *)me); thr->super.super.temp.obj = (QMState const *)0; /* clear */ } QF_CRIT_EXIT_(); @@ -150,11 +165,15 @@ bool QXSemaphore_wait(QXSemaphore * const me, * * @param[in,out] me pointer (see @ref oop) * +* @returns true when the semaphore signaled and false when the semaphore +* count exceeded the maximum. +* * @note * A semaphore can be signaled from many places, including from ISRs, basic * threads (AOs), and extended threads. */ -void QXSemaphore_signal(QXSemaphore * const me) { +bool QXSemaphore_signal(QXSemaphore * const me) { + bool signaled = true; /* assume that the semaphore will be signaled */ QF_CRIT_STAT_ QF_CRIT_ENTRY_(); @@ -162,14 +181,14 @@ void QXSemaphore_signal(QXSemaphore * const me) { uint_fast8_t p; QXThread *thr; + /* find the highest-priority thread waiting on this semaphore */ QPSet_findMax(&me->waitSet, p); QPSet_insert(&QXK_attr_.readySet, p); QPSet_remove(&me->waitSet, p); + thr = (QXThread *)QF_active_[p]; - thr = (QXThread *)QF_active_[p]; /* thread waiting on the semaphore */ - - Q_ASSERT_ID(210, - (thr->super.osObject != (struct QActive *)0) /* must be extended */ + Q_ASSERT_ID(210, (thr != (QXThread *)0) /* must be registered */ + && (thr->super.osObject != (struct QActive *)0) /* extended thr.*/ && (me->count == (uint_fast16_t)0)); /* sema counter must be 0 */ /* disarm the internal time event */ @@ -180,8 +199,15 @@ void QXSemaphore_signal(QXSemaphore * const me) { } } else { - ++me->count; + if (me->count < me->max_count) { + ++me->count; + } + else { + signaled = false; /* semaphore NOT signaled */ + } } QF_CRIT_EXIT_(); + + return signaled; } diff --git a/source/qxk_xthr.c b/source/qxk_xthr.c index 6b8a1ce7..0d5afe69 100644 --- a/source/qxk_xthr.c +++ b/source/qxk_xthr.c @@ -4,8 +4,8 @@ * @ingroup qxk * @cond ****************************************************************************** -* Last updated for version 5.9.4 -* Last updated on 2017-07-06 +* Last updated for version 5.9.6 +* Last updated on 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -386,9 +386,15 @@ QEvt const *QXThread_queueGet(uint_fast16_t const nTicks, QF_CRIT_ENTRY_(); thr = (QXThread *)QXK_attr_.curr; + /** @pre this function must: + * (1) NOT be called from an ISR; (2) be called from an extended thread; + * (3) the thread must NOT be holding a mutex and + * (4) the thread must NOT be already blocked on any object. + */ Q_REQUIRE_ID(500, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ - && (thr != (QXThread *)0) /* current thread must be extended */ - && (thr->super.super.temp.obj == (QMState const *)0)); /* !blocked */ + && (thr != (QXThread *)0) /* current thread must be extended */ + && (QXK_attr_.lockPrio == (uint_fast8_t)0) /* not holding a mutex */ + && (thr->super.super.temp.obj == (QMState *)0)); /* not blocked */ /* is the queue empty? */ if (thr->super.eQueue.frontEvt == (QEvt *)0) { @@ -467,7 +473,7 @@ QEvt const *QXThread_queueGet(uint_fast16_t const nTicks, * must be called from within a critical section */ void QXThread_block_(QXThread const * const me) { - /*! @pre the thread holding the lock cannot block! */ + /** @pre the thread holding the lock cannot block! */ Q_REQUIRE_ID(600, me->super.prio != QXK_attr_.lockPrio); QPSet_remove(&QXK_attr_.readySet, me->super.prio); (void)QXK_sched_(); @@ -503,7 +509,7 @@ void QXThread_teArm_(QXThread * const me, QSignal sig, uint_fast16_t const nTicks, uint_fast8_t const tickRate) { - /* the time event must be unused */ + /** @pre the time event must be unused */ Q_REQUIRE_ID(700, me->timeEvt.ctr == (QTimeEvtCtr)0); me->timeEvt.super.sig = sig; @@ -564,8 +570,15 @@ bool QXThread_delay(uint_fast16_t const nTicks, uint_fast8_t const tickRate) { QF_CRIT_ENTRY_(); thr = (QXThread *)QXK_attr_.curr; - /* the delaying thread must not be blocked on any object */ - Q_REQUIRE_ID(900, thr->super.super.temp.obj == (QMState const *)0); + /** @pre this function must: + * (1) NOT be called from an ISR; (2) be called from an extended thread; + * (3) the thread must NOT be holding a mutex and + * (4) the thread must NOT be already blocked on any object. + */ + Q_REQUIRE_ID(900, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ + && (thr != (QXThread *)0) /* current thread must be extended */ + && (QXK_attr_.lockPrio == (uint_fast8_t)0) /* not holding a mutex */ + && (thr->super.super.temp.obj == (QMState *)0)); /* not blocked */ /* remember the blocking object */ thr->super.super.temp.obj = (QMState const *)&thr->timeEvt; diff --git a/src/qxk/qxk.c b/src/qxk/qxk.c index e617364b..763eb472 100644 --- a/src/qxk/qxk.c +++ b/src/qxk/qxk.c @@ -4,8 +4,8 @@ * @ingroup qxk * @cond ****************************************************************************** -* Last updated for version 5.9.5 -* Last updated on 2017-07-19 +* Last updated for version 5.9.6 +* Last updated on 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -58,7 +58,7 @@ Q_DEFINE_THIS_MODULE("qxk") QXK_Attr QXK_attr_; /* global attributes of the QXK kernel */ /* Local-scope objects ******************************************************/ -static QXThread l_idleThread; +static QActive l_idleThread; /****************************************************************************/ /** @@ -86,7 +86,7 @@ void QF_init(void) { QXK_attr_.lockPrio = (uint_fast8_t)(QF_MAX_ACTIVE + 1); /* setup the QXK idle loop... */ - QF_active_[0] = &l_idleThread.super; /* register idle thread with QF */ + QF_active_[0] = &l_idleThread; /* register idle thread with QF */ QXK_attr_.actPrio = (uint_fast8_t)0; /* set the idle thread priority */ #ifdef QXK_INIT @@ -434,6 +434,9 @@ struct QActive *QXK_current(void) { QF_CRIT_ENTRY_(); curr = QXK_attr_.curr; + if (curr == (struct QActive *)0) { /* basic thread? */ + curr = QF_active_[QXK_attr_.actPrio]; + } QF_CRIT_EXIT_(); /** @post the current thread must be valid */ diff --git a/src/qxk/qxk_mutex.c b/src/qxk/qxk_mutex.c index f6524757..a15383fc 100644 --- a/src/qxk/qxk_mutex.c +++ b/src/qxk/qxk_mutex.c @@ -4,8 +4,8 @@ * @brief QXMutex_init(), QXMutex_lock and QXMutex_unlock() definitions. * @cond ****************************************************************************** -* Last updated for version 5.9.4 -* Last updated on 2017-07-05 +* Last updated for version 5.9.6 +* Last updated on 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -111,7 +111,7 @@ void QXMutex_lock(QXMutex * const me) { QF_CRIT_STAT_ QF_CRIT_ENTRY_(); - /** @pre scheduler cannot be locked from the ISR context + /** @pre The mutex cannot be locked from the ISR context * and the mutex must be unused */ Q_REQUIRE_ID(700, (!QXK_ISR_CONTEXT_()) @@ -130,7 +130,7 @@ void QXMutex_lock(QXMutex * const me) { QS_BEGIN_NOCRIT_(QS_SCHED_LOCK, (void *)0, (void *)0) QS_TIME_(); /* timestamp */ - QS_2U8_((uint8_t)me->prevPrio, /* the previouis lock prio */ + QS_2U8_((uint8_t)me->prevPrio, /* the previous lock prio */ (uint8_t)QXK_attr_.lockPrio); /* the new lock prio */ QS_END_NOCRIT_() @@ -168,8 +168,8 @@ void QXMutex_unlock(QXMutex * const me) { QF_CRIT_STAT_ QF_CRIT_ENTRY_(); - /** @pre scheduler cannot be unlocked from the ISR context - * and the mutex must NOT be unused + /** @pre The mutex cannot be unlocked from the ISR context + * and the mutex must be used (NOT unused) */ Q_REQUIRE_ID(800, (!QXK_ISR_CONTEXT_()) && (me->prevPrio != (uint_fast8_t)MUTEX_UNUSED)); @@ -178,25 +178,27 @@ void QXMutex_unlock(QXMutex * const me) { me->prevPrio = (uint_fast8_t)MUTEX_UNUSED; QXK_attr_.lockHolder = me->prevHolder; /* restore previous lock holder */ - QS_BEGIN_NOCRIT_(QS_SCHED_UNLOCK, (void *)0, (void *)0) - QS_TIME_(); /* timestamp */ - if (QXK_attr_.lockPrio > p) { + if (QXK_attr_.lockPrio > p) { + + QS_BEGIN_NOCRIT_(QS_SCHED_UNLOCK, (void *)0, (void *)0) + QS_TIME_(); /* timestamp */ QS_2U8_((uint8_t)QXK_attr_.lockPrio, /* previouis lock priority */ (uint8_t)p); /* new lock priority */ - } - else { - p = QXK_attr_.lockPrio; - QS_2U8_((uint8_t)p, /* previouis lock priority */ - (uint8_t)p); /* new lock priority */ - } - QS_END_NOCRIT_() - - if (QXK_attr_.lockPrio > p) { + QS_END_NOCRIT_() + QXK_attr_.lockPrio = p; /* restore the previous lock prio */ /* find the highest-prio thread ready to run */ if (QXK_sched_() != (uint_fast8_t)0) { /* priority found? */ QXK_activate_(); /* activate any unlocked basic threads */ } + } + else { + QS_BEGIN_NOCRIT_(QS_SCHED_UNLOCK, (void *)0, (void *)0) + QS_TIME_(); /* timestamp */ + p = QXK_attr_.lockPrio; + QS_2U8_((uint8_t)p, /* previouis lock priority */ + (uint8_t)p); /* new lock priority */ + QS_END_NOCRIT_() } QF_CRIT_EXIT_(); } diff --git a/src/qxk/qxk_sema.c b/src/qxk/qxk_sema.c index 7abd3091..7654c37a 100644 --- a/src/qxk/qxk_sema.c +++ b/src/qxk/qxk_sema.c @@ -4,8 +4,8 @@ * @ingroup qxk * @cond ****************************************************************************** -* Last updated for version 5.9.5 -* Last updated on 2017-07-20 +* Last updated for version 5.9.6 +* Last updated on 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -57,21 +57,30 @@ Q_DEFINE_THIS_MODULE("qxk_sema") /****************************************************************************/ /** * @description -* Initializes a semaphore with the specified count. If the semaphore is used -* for resource sharing, the initial value of the semaphore count should be -* set to the number of identical resources guarded by the semaphore. If the -* semaphore is used as a signaling mechanism, the initial count should set -* to 0. +* Initializes a semaphore with the specified count and maximum count. +* If the semaphore is used for resource sharing, both the initial count +* and maximum count should be set to the number of identical resources +* guarded by the semaphore. If the semaphore is used as a signaling +* mechanism, the initial count should set to 0 and maximum count to 1 +* (binary semaphore). * * @param[in,out] me pointer (see @ref oop) * @param[in] count initial value of the semaphore counter +* @param[in] max_count maximum value of the semaphore counter. +* The purpose of the max_count is to limit the counter +* so that the semaphore cannot unblock more times than +* the maximum. * * @note * QXSemaphore_init() must be called **before** the semaphore can be used * (signaled or waited on). */ -void QXSemaphore_init(QXSemaphore * const me, uint_fast16_t count) { +void QXSemaphore_init(QXSemaphore * const me, uint_fast16_t count, + uint_fast16_t max_count) +{ + Q_REQUIRE_ID(100, max_count > (uint_fast16_t)0); me->count = count; + me->max_count = max_count; QPSet_setEmpty(&me->waitSet); } @@ -109,9 +118,15 @@ bool QXSemaphore_wait(QXSemaphore * const me, QF_CRIT_ENTRY_(); thr = (QXThread *)QXK_attr_.curr; - Q_REQUIRE_ID(100, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ + /** @pre this function must: + * (1) NOT be called from an ISR; (2) be called from an extended thread; + * (3) the thread must NOT be holding a mutex and + * (4) the thread must NOT be already blocked on any object. + */ + Q_REQUIRE_ID(200, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ && (thr != (QXThread *)0) /* current thread must be extended */ - && (thr->super.super.temp.obj == (QMState const *)0)); /* !blocked */ + && (QXK_attr_.lockPrio == (uint_fast8_t)0) /* not holding a mutex */ + && (thr->super.super.temp.obj == (QMState *)0)); /* not blocked */ if (me->count > (uint_fast16_t)0) { --me->count; @@ -129,7 +144,7 @@ bool QXSemaphore_wait(QXSemaphore * const me, QF_CRIT_ENTRY_(); /* the blocking object must be this semaphore */ - Q_ASSERT_ID(110, thr->super.super.temp.obj == (QMState const *)me); + Q_ASSERT_ID(210, thr->super.super.temp.obj == (QMState const *)me); thr->super.super.temp.obj = (QMState const *)0; /* clear */ } QF_CRIT_EXIT_(); @@ -150,11 +165,15 @@ bool QXSemaphore_wait(QXSemaphore * const me, * * @param[in,out] me pointer (see @ref oop) * +* @returns true when the semaphore signaled and false when the semaphore +* count exceeded the maximum. +* * @note * A semaphore can be signaled from many places, including from ISRs, basic * threads (AOs), and extended threads. */ -void QXSemaphore_signal(QXSemaphore * const me) { +bool QXSemaphore_signal(QXSemaphore * const me) { + bool signaled = true; /* assume that the semaphore will be signaled */ QF_CRIT_STAT_ QF_CRIT_ENTRY_(); @@ -162,14 +181,14 @@ void QXSemaphore_signal(QXSemaphore * const me) { uint_fast8_t p; QXThread *thr; + /* find the highest-priority thread waiting on this semaphore */ QPSet_findMax(&me->waitSet, p); QPSet_insert(&QXK_attr_.readySet, p); QPSet_remove(&me->waitSet, p); + thr = (QXThread *)QF_active_[p]; - thr = (QXThread *)QF_active_[p]; /* thread waiting on the semaphore */ - - Q_ASSERT_ID(210, - (thr->super.osObject != (struct QActive *)0) /* must be extended */ + Q_ASSERT_ID(210, (thr != (QXThread *)0) /* must be registered */ + && (thr->super.osObject != (struct QActive *)0) /* extended thr.*/ && (me->count == (uint_fast16_t)0)); /* sema counter must be 0 */ /* disarm the internal time event */ @@ -180,8 +199,15 @@ void QXSemaphore_signal(QXSemaphore * const me) { } } else { - ++me->count; + if (me->count < me->max_count) { + ++me->count; + } + else { + signaled = false; /* semaphore NOT signaled */ + } } QF_CRIT_EXIT_(); + + return signaled; } diff --git a/src/qxk/qxk_xthr.c b/src/qxk/qxk_xthr.c index 6b8a1ce7..0d5afe69 100644 --- a/src/qxk/qxk_xthr.c +++ b/src/qxk/qxk_xthr.c @@ -4,8 +4,8 @@ * @ingroup qxk * @cond ****************************************************************************** -* Last updated for version 5.9.4 -* Last updated on 2017-07-06 +* Last updated for version 5.9.6 +* Last updated on 2017-07-27 * * Q u a n t u m L e a P s * --------------------------- @@ -386,9 +386,15 @@ QEvt const *QXThread_queueGet(uint_fast16_t const nTicks, QF_CRIT_ENTRY_(); thr = (QXThread *)QXK_attr_.curr; + /** @pre this function must: + * (1) NOT be called from an ISR; (2) be called from an extended thread; + * (3) the thread must NOT be holding a mutex and + * (4) the thread must NOT be already blocked on any object. + */ Q_REQUIRE_ID(500, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ - && (thr != (QXThread *)0) /* current thread must be extended */ - && (thr->super.super.temp.obj == (QMState const *)0)); /* !blocked */ + && (thr != (QXThread *)0) /* current thread must be extended */ + && (QXK_attr_.lockPrio == (uint_fast8_t)0) /* not holding a mutex */ + && (thr->super.super.temp.obj == (QMState *)0)); /* not blocked */ /* is the queue empty? */ if (thr->super.eQueue.frontEvt == (QEvt *)0) { @@ -467,7 +473,7 @@ QEvt const *QXThread_queueGet(uint_fast16_t const nTicks, * must be called from within a critical section */ void QXThread_block_(QXThread const * const me) { - /*! @pre the thread holding the lock cannot block! */ + /** @pre the thread holding the lock cannot block! */ Q_REQUIRE_ID(600, me->super.prio != QXK_attr_.lockPrio); QPSet_remove(&QXK_attr_.readySet, me->super.prio); (void)QXK_sched_(); @@ -503,7 +509,7 @@ void QXThread_teArm_(QXThread * const me, QSignal sig, uint_fast16_t const nTicks, uint_fast8_t const tickRate) { - /* the time event must be unused */ + /** @pre the time event must be unused */ Q_REQUIRE_ID(700, me->timeEvt.ctr == (QTimeEvtCtr)0); me->timeEvt.super.sig = sig; @@ -564,8 +570,15 @@ bool QXThread_delay(uint_fast16_t const nTicks, uint_fast8_t const tickRate) { QF_CRIT_ENTRY_(); thr = (QXThread *)QXK_attr_.curr; - /* the delaying thread must not be blocked on any object */ - Q_REQUIRE_ID(900, thr->super.super.temp.obj == (QMState const *)0); + /** @pre this function must: + * (1) NOT be called from an ISR; (2) be called from an extended thread; + * (3) the thread must NOT be holding a mutex and + * (4) the thread must NOT be already blocked on any object. + */ + Q_REQUIRE_ID(900, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ + && (thr != (QXThread *)0) /* current thread must be extended */ + && (QXK_attr_.lockPrio == (uint_fast8_t)0) /* not holding a mutex */ + && (thr->super.super.temp.obj == (QMState *)0)); /* not blocked */ /* remember the blocking object */ thr->super.super.temp.obj = (QMState const *)&thr->timeEvt;