Skip to content

Commit 2152ad0

Browse files
author
camilo
committed
Update kernel ref. Update documentation
1 parent 327305a commit 2152ad0

File tree

8 files changed

+602
-548
lines changed

8 files changed

+602
-548
lines changed

doc/Doxygen

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "OS"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v7.3.3
41+
PROJECT_NUMBER = v7.3.4
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

doc/pages/_2_foundations.dox

Lines changed: 218 additions & 164 deletions
Large diffs are not rendered by default.

doc/pages/_3_gettingstarted.dox

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Download the latest release from the official repository :
66
*
77
* <a style="font-weight:bold" href="https://github.com/kmilo17pet/QuarkTS/releases">QuarkTS Releases</a>
8-
*
8+
*
99
* Unpack the release package and add the sources files to your project.
1010
*
1111
* @subsection q_cloneos Cloning QuarkTS
@@ -35,8 +35,8 @@
3535
* @endcode
3636
*
3737
* @subsection q_getqconfig Get a copy of the OS configuration file
38-
* The file @c qconfig.h provides specific @ref q_configmacros to customize
39-
* several aspects of the OS. In order to build your solution with QuarkTS, you
38+
* The file @c qconfig.h provides specific @ref q_configmacros to customize
39+
* several aspects of the OS. In order to build your solution with QuarkTS, you
4040
* should provided your own copy of this configuration file. You can obtain a copy
4141
* with the default configuration by issuing the following command:
4242
*
@@ -45,61 +45,61 @@
4545
* @endcode
4646
*
4747
@section q_firststeps First steps
48-
* Include the source files to your project. Also, make sure you add a copy of
49-
* the file @c qconfig.h and modify it according to your needs. Setup your
50-
* compiler including the path of the OS directory. Include the header file
51-
* @c QuarkTS.h and setup the instance of the kernel using the qOS_Setup()
52-
* inside the main thread to initialize te kernel, specify the reference clock and
53-
* the idle-task ( see @ref q_timmingapproach). Additional configuration to the
48+
* Include the source files to your project. Also, make sure you add a copy of
49+
* the file @c qconfig.h and modify it according to your needs. Setup your
50+
* compiler including the path of the OS directory. Include the header file
51+
* @c QuarkTS.h and setup the instance of the kernel using the qOS_Setup()
52+
* inside the main thread to initialize te kernel, specify the reference clock and
53+
* the idle-task ( see @ref q_timmingapproach). Additional configuration to the
5454
* target compiler may be required to add the path to the directory of header files.
5555
* The code below shows a common initialization procedure in the main source file.
5656
*
5757
* File @c main.c
5858
* @code{.c}
5959
* #include "QuarkTS.h"
6060
* #define TIMER_TICK ( 0.001f ) // 1ms
61-
*
61+
*
6262
* void main( void ) {
6363
* //device startup with hardware-specific code
6464
* HardwareSetup();
6565
* Configure_Periodic_Timer_Interrupt_1ms();
6666
* //end of device startup with hardware-specific code
67-
* qOS_Setup( NULL , TIMER_TICK , IdleTask_Callback );
67+
* qOS_Setup( NULL , TIMER_TICK , IdleTask_Callback, NULL );
6868
* // TODO: add Tasks to the scheduler scheme and run the OS
6969
* }
7070
* @endcode
7171
*
7272
* In the above code, the following considerations should be taken:
7373
* - The function qOS_Setup() must be called before any interaction with the OS.
74-
* - The procedure @c HardwareSetup() should be a function with all the hardware
74+
* - The procedure @c HardwareSetup() should be a function with all the hardware
7575
* instructions needed to initialize the target system.
76-
* - The procedure @c Configure_Periodic_Timer_Interrupt_1ms() should be a
77-
* function with all the hardware instructions needed to initialize and enable a
76+
* - The procedure @c Configure_Periodic_Timer_Interrupt_1ms() should be a
77+
* function with all the hardware instructions needed to initialize and enable a
7878
* timer with an overflow tick of one millisecond.
7979
*
80-
* Tasks can be later added to the scheduling scheme by simply calling
80+
* Tasks can be later added to the scheduling scheme by simply calling
8181
* qOS_Add_Task() or any of the other available APIs for specific purpose tasks.
8282
*
8383
* @section q_os_demo Two simple demonstrative examples
8484
*
8585
* @subsection q_os_example1 A simple scheduling
86-
* This example demonstrates a simple environment setup for multiple tasks.
87-
* Initially, only @c task1 and @c task2 are enabled. @c task1 runs every 2
88-
* seconds 10 times and then stops. @c task2 runs every 3 seconds indefinitely.
89-
* @c task1 enables @c task3 at its first run. @c task3 run every 5 seconds.
90-
* @c task1 disables @c task3 on its last iteration and change @c task2 to run
91-
* every 1/2 seconds. In the end, @c task2 is the only task running every 1/2
86+
* This example demonstrates a simple environment setup for multiple tasks.
87+
* Initially, only @c task1 and @c task2 are enabled. @c task1 runs every 2
88+
* seconds 10 times and then stops. @c task2 runs every 3 seconds indefinitely.
89+
* @c task1 enables @c task3 at its first run. @c task3 run every 5 seconds.
90+
* @c task1 disables @c task3 on its last iteration and change @c task2 to run
91+
* every 1/2 seconds. In the end, @c task2 is the only task running every 1/2
9292
* seconds.
9393
*
9494
* @code{.c}
9595
* #include <stdio.h>
9696
* #include <stdlib.h>
9797
* #include <stdint.h>
9898
* #include "BSP.h"
99-
*
99+
*
100100
* #include "QuarkTS.h"
101101
* #define TIMER_TICK ( 0.001f ) /* 1ms */
102-
*
102+
*
103103
* qTask_t task1, task2, task3; /*task nodes*/
104104
* /*==================================================================*/
105105
* void interrupt Timer0_ISR( void ) {
@@ -108,11 +108,11 @@
108108
* /*==================================================================*/
109109
* void Task1_Callback( qEvent_t e ) {
110110
* BSP_UART1_WriteString( "Task1" );
111-
*
111+
*
112112
* if ( e->FirstIteration ) {
113113
* qTask_Resume( &Task3 );
114114
* }
115-
*
115+
*
116116
* if ( e->LastIteration ) {
117117
* qTask_Suspend( &Task3 );
118118
* qTask_Set_Time( &Task2, 0.5 );
@@ -131,8 +131,8 @@
131131
* HardwareSetup(); /*hardware initialization function*/
132132
* /*function to fire an interrupt at 1ms - timer tick*/
133133
* Configure_Periodic_Timer0_Interrupt_1ms();
134-
*
135-
* qOS_Setup( NULL, TIMER_TICK, NULL );
134+
*
135+
* qOS_Setup( NULL, TIMER_TICK, NULL, NULL );
136136
* qOS_Add_Task( &Task1, Task1_Callback, 50, 2.0f, 10, qEnabled, NULL );
137137
* qOS_Add_Task( &Task2, Task2_Callback, 50, 3.0f, qPeriodic, qEnabled, NULL );
138138
* qOS_Add_Task( &Task2, Task3_Callback, 50, 5.0f, qPeriodic, qDisabled, NULL );
@@ -144,17 +144,17 @@
144144
*
145145
* @subsection q_os_example2 Using the task argument
146146
* When adding tasks, they can accept a parameter of type pointer to void @c void*
147-
* also called the storage pointer. This parameter could be used for multiple
147+
* also called the storage pointer. This parameter could be used for multiple
148148
* applications, including storage, task identification, duplication removal and
149-
* others. The following example shows the usage of this argument to avoid
149+
* others. The following example shows the usage of this argument to avoid
150150
* callback duplication among tasks with the same behavior.
151151
*
152-
* Consider a scenario where you have to build a digital controller for several
152+
* Consider a scenario where you have to build a digital controller for several
153153
* physical variables, for example, a PID controller for temperature, humidity and
154-
* light. The PID algorithm will be the same for all variables. The only
155-
* difference will be the variable input, the controlled output action and the
156-
* PID gains. In this case, each of the PID tasks will utilize the same callback
157-
* methods. The only difference will be the I/O parameters (specific for each
154+
* light. The PID algorithm will be the same for all variables. The only
155+
* difference will be the variable input, the controlled output action and the
156+
* PID gains. In this case, each of the PID tasks will utilize the same callback
157+
* methods. The only difference will be the I/O parameters (specific for each
158158
* PID controller).
159159
*
160160
* Let’s define a PID data structure with the I/O variables and gains.
@@ -169,7 +169,7 @@
169169
* float sp; /*Set-Point*/
170170
* float Kc, Ki, Kd; /*PID Gains*/
171171
* } PID_Params_t;
172-
*
172+
*
173173
* PID_Params_t TemperatureControl = {
174174
* 0.0f, 0.0f, 0.0f, 0.0f, /*Initial IO state of yt and ut*/
175175
* 1.5f, /*time step*/
@@ -190,7 +190,7 @@
190190
* };
191191
* @endcode
192192
*
193-
* A task will be added to the scheme to collect the sensor data and apply
193+
* A task will be added to the scheme to collect the sensor data and apply
194194
* the respective control output.
195195
*
196196
* @code{.c}
@@ -208,8 +208,8 @@
208208
* }
209209
* @endcode
210210
*
211-
* Then, three different tasks are created to apply the respective PID controller.
212-
* Note that these tasks refer to the same callback method and we assign
211+
* Then, three different tasks are created to apply the respective PID controller.
212+
* Note that these tasks refer to the same callback method and we assign
213213
* pointers to the respective variables.
214214
*
215215
* @code{.c}

0 commit comments

Comments
 (0)