main/task_user.h

Sun, 14 Jun 2020 14:53:06 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 14 Jun 2020 14:53:06 +0200
changeset 57
232f318a6b51
parent 44
e52d11b8f252
permissions
-rw-r--r--

Code cleanup, doxygen comments added.

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
44
e52d11b8f252 Removed dead code. Added more doxygen documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 41
diff changeset
10 #define PIN_SDA (CONFIG_I2C_MASTER_SDA) ///< GPIO pin for I2C SDA
e52d11b8f252 Removed dead code. Added more doxygen documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 41
diff changeset
11 #define PIN_SCL (CONFIG_I2C_MASTER_SCL) ///< GPIO pin for I2C SCL
e52d11b8f252 Removed dead code. Added more doxygen documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 41
diff changeset
12 #define ROT_ENC_A_GPIO (CONFIG_ROT_ENC_A_GPIO) ///< GPIO pin for rotary encoder A
e52d11b8f252 Removed dead code. Added more doxygen documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 41
diff changeset
13 #define ROT_ENC_B_GPIO (CONFIG_ROT_ENC_B_GPIO) ///< GPIO pin for rotary encoder B
e52d11b8f252 Removed dead code. Added more doxygen documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 41
diff changeset
14 #define ROT_ENC_SW_GPIO (CONFIG_ROT_ENC_SW_GPIO) ///< GPIO pin for rotary encoder pushbutton
41
d327e0aff62f Updated doxygen comments. Removed some development debug logs. Increased user inactivity time to 4 minutes. More Dutch translations in the OTA update screens.
Michiel Broek <mbroek@mbse.eu>
parents: 38
diff changeset
15 #define INACTIVITY 240 ///< User inactivity time
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
16
23
58a328e91881 Added error logging for failed locks
Michiel Broek <mbroek@mbse.eu>
parents: 22
diff changeset
17 #define EDIT_TYPE_TEXT 0 ///< Editor type is text, special chars and digits.
58a328e91881 Added error logging for failed locks
Michiel Broek <mbroek@mbse.eu>
parents: 22
diff changeset
18 #define EDIT_TYPE_CAPS 1 ///< Editor alpha capitals, some specials and digits.
58a328e91881 Added error logging for failed locks
Michiel Broek <mbroek@mbse.eu>
parents: 22
diff changeset
19 #define EDIT_TYPE_INT 2 ///< Editor type is integer
58a328e91881 Added error logging for failed locks
Michiel Broek <mbroek@mbse.eu>
parents: 22
diff changeset
20 #define EDIT_TYPE_FLOAT 3 ///< Editor type is float
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
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
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
23
22
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
24 /**
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
25 * @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
26 */
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
27 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
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 /**
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
31 * @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
32 */
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
33 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
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 /**
cceb36fd3a2a Better update of the user screens. Added more internal documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 21
diff changeset
37 * @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
38 * @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
39 */
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
40 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
41
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
42
26
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
43
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
44 /**
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
45 * @brief Write messages on the screen during binary update.
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
46 * @param m1 Message 1 or NULL.
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
47 * @param m2 Message 2 or NULL.
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
48 */
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
49 void screen_updating(char *m1, char *m2);
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
50
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
51
8a3696620c0a Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
52
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
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 * @brief The FreeRTOS task to run the user interface.
44
e52d11b8f252 Removed dead code. Added more doxygen documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 41
diff changeset
55 * @param pvParameters Parameters for the task.
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
56 */
44
e52d11b8f252 Removed dead code. Added more doxygen documentation.
Michiel Broek <mbroek@mbse.eu>
parents: 41
diff changeset
57 void task_user(void *pvParameters);
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
58
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
59
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
60 #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
61

mercurial