main/task_user.h

Thu, 07 Nov 2019 11:47:15 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 07 Nov 2019 11:47:15 +0100
changeset 22
cceb36fd3a2a
parent 21
043ae27633f8
child 23
58a328e91881
permissions
-rw-r--r--

Better update of the user screens. Added more internal documentation.

21
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /**
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 * @file task_user.h
22
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
3 * @brief The FreeRTOS task to run the user interface.
21
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 */
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 #ifndef _TASK_USER_H
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 #define _TASK_USER_H
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 #define PIN_SDA (CONFIG_I2C_MASTER_SDA)
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 #define PIN_SCL (CONFIG_I2C_MASTER_SCL)
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 #define ROT_ENC_A_GPIO (CONFIG_ROT_ENC_A_GPIO)
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 #define ROT_ENC_B_GPIO (CONFIG_ROT_ENC_B_GPIO)
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 #define ROT_ENC_SW_GPIO (CONFIG_ROT_ENC_SW_GPIO)
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 #define INACTIVITY 120 ///< User inactivity time
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 #define EDIT_TYPE_TEXT 0 ///< Editor type is text
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 #define EDIT_TYPE_INT 1 ///< Editor type is integer
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 #define EDIT_TYPE_FLOAT 2 ///< Editor type is float
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
22
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
23 /**
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
24 * @brief Called after a power on or hard reset.
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
25 */
21
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 void user_cold(void);
22
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
27
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
28
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
29 /**
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
30 * @brief Called after wakeup by the user.
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
31 */
21
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 void user_wakeup(void);
22
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
33
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
34
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
35 /**
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
36 * @brief Refresh screens that are in focus.
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
37 */
21
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 void user_refresh(void);
22
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
39
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
40
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
41 /**
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
42 * @brief Test is user interface is busy and active
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
43 * @return Returns true if the user interface is active, false otherwise.
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
44 */
21
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45 bool user_busy(void);
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
46
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
47
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
48 /**
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
49 * @brief The FreeRTOS task to run the user interface.
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
50 */
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
51 void task_user(void *);
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
52
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
53
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
54 #endif
043ae27633f8 Moved the user interface into a separate task. Added a real seconds timer to this task.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
55

mercurial