main/task_out.h

Sun, 10 Sep 2023 17:29:15 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 10 Sep 2023 17:29:15 +0200
changeset 37
50dbb626fbab
parent 9
1659bd3c7a2b
permissions
-rw-r--r--

Version 0.4.3. Attempt to fix the sunlight overflow of the APDS9930 sensor in the private part of the esp-idf-lib. Removed some error checks from functions that always return OK. Store light sensor registers in the state record and report the values in the json result string.

/**
 * @file task_out.h
 * @brief The FreeRTOS task to drive the output relays and dimmed leds.
 */

#ifndef	_TASK_OUT_H
#define	_TASK_OUT_H

/*
 * Error codes in this task
 */
#define	OUT_ERR_NONE			0	///< No errors
#define OUT_ERR_READ			1


/**
 * @brief Structure containing the variables for the out task.
 */
typedef struct {
    int			error;			///< Error result
    uint8_t		out1;			///< Actual output state
    uint8_t		out2;
    uint8_t		out3;
    uint8_t		out4;
} OUT_State;


/**
 * @brief The FreeRTOS task to update the outputs.
 * @param pvParameters Parameters for the task.
 */
void task_out(void *pvParameters);


#endif

mercurial