main/task_user.h

Tue, 03 Oct 2023 17:24:06 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 03 Oct 2023 17:24:06 +0200
changeset 77
15dc572a7fcb
parent 44
e52d11b8f252
permissions
-rw-r--r--

Version 0.3.0. Backported network code from experimental roaming project. Will now connect after reset to the strongest AP. Id the signal level drops below -67, extra scans are done to see for a better AP. Nothing is done yet. Removed config.conf file, all info is taken from the project menu and live tests. Better log the board type and send it via json mqtt. Send bssid and current channel too.

/**
 * @file task_user.h
 * @brief The FreeRTOS task to run the user interface.
 */

#ifndef	_TASK_USER_H
#define	_TASK_USER_H


#define PIN_SDA                 (CONFIG_I2C_MASTER_SDA)			///< GPIO pin for I2C SDA
#define PIN_SCL                 (CONFIG_I2C_MASTER_SCL)			///< GPIO pin for I2C SCL
#define ROT_ENC_A_GPIO          (CONFIG_ROT_ENC_A_GPIO)			///< GPIO pin for rotary encoder A
#define ROT_ENC_B_GPIO          (CONFIG_ROT_ENC_B_GPIO)			///< GPIO pin for rotary encoder B
#define ROT_ENC_SW_GPIO         (CONFIG_ROT_ENC_SW_GPIO)		///< GPIO pin for rotary encoder pushbutton
#define INACTIVITY              240                                     ///< User inactivity time

#define EDIT_TYPE_TEXT          0                                       ///< Editor type is text, special chars and digits.
#define	EDIT_TYPE_CAPS		1					///< Editor alpha capitals, some specials and digits.
#define EDIT_TYPE_INT           2                                       ///< Editor type is integer
#define EDIT_TYPE_FLOAT         3                                       ///< Editor type is float



/**
 * @brief Called after a power on or hard reset.
 */
void user_cold(void);


/**
 * @brief Refresh screens that are in focus.
 */
void user_refresh(void);


/**
 * @brief Test is user interface is busy and active
 * @return Returns true if the user interface is active, false otherwise.
 */
bool user_busy(void);



/**
 * @brief Write messages on the screen during binary update.
 * @param m1 Message 1 or NULL.
 * @param m2 Message 2 or NULL.
 */
void screen_updating(char *m1, char *m2);



/**
 * @brief The FreeRTOS task to run the user interface.
 * @param pvParameters Parameters for the task.
 */
void task_user(void *pvParameters);


#endif

mercurial