stm32f103rb_hal_ds18b20

Index Commits Files Refs README
app/inc/task_actuator_attribute.h (1825B)
   1 /*
   2  * Copyright (c) 2023 Juan Manuel Cruz <jcruz@fi.uba.ar> <jcruz@frba.utn.edu.ar>.
   3  * Copyright (c) 2026 Martin Javier Klöckner <mklockner@fi.uba.ar>
   4  *
   5  * See file `LICENSE` for full details
   6  */
   7 
   8 
   9 #ifndef TASK_INC_TASK_ACTUATOR_ATTRIBUTE_H_
  10 #define TASK_INC_TASK_ACTUATOR_ATTRIBUTE_H_
  11 
  12 #ifdef __cplusplus
  13 extern "C" {
  14 #endif
  15 
  16 /* Actuator Statechart - State Transition Table
  17  *
  18  * +--------------+--------------+---------+--------------+----------------+
  19  * | Current      | Event        |         | Next         |                |
  20  * | State        | (Parameters) | [Guard] | State        | Actions        |
  21  * +==============+==============+=========+==============+================+
  22  * |              | EV_LED_ON    |         | ST_LED_BLINK | turn_led_on()  |
  23  * | ST_LED_BLINK +--------------+         +--------------+----------------+
  24  * |              | EV_LED_OFF   |         | ST_LED_BLINK | turn_led_off() |
  25  * +--------------+--------------+---------+--------------+----------------+
  26  *
  27  */
  28 
  29 /* Events to excite Task Actuator */
  30 typedef enum task_actuator_ev {
  31     EV_LED_ON,
  32     EV_LED_OFF
  33 } task_actuator_ev_t;
  34 
  35 /* States of Task Actuator */
  36 typedef enum task_actuator_st {
  37     ST_LED_BLINK
  38 } task_actuator_st_t;
  39 
  40 typedef enum task_actuator_id {
  41     ID_LED_A
  42 } task_actuator_id_t;
  43 
  44 typedef struct {
  45     task_actuator_id_t identifier;
  46     GPIO_TypeDef       *gpio_port;
  47     uint16_t           pin;
  48     GPIO_PinState      led_on;
  49     GPIO_PinState      led_off;
  50 } task_actuator_cfg_t;
  51 
  52 typedef struct {
  53     task_actuator_st_t state;
  54     task_actuator_ev_t event;
  55     bool               flag;
  56 } task_actuator_dta_t;
  57 
  58 extern task_actuator_dta_t task_actuator_dta_list[];
  59 
  60 #ifdef __cplusplus
  61 }
  62 #endif
  63 
  64 #endif /* TASK_INC_TASK_ACTUATOR_ATTRIBUTE_H_ */