Add commands for DIGIO channels to profile parser and add base construct to the profile interpreter

This commit is contained in:
Mario Hüttel 2021-12-26 20:27:20 +01:00
parent bf6a222c9d
commit 45f91a7c5a
3 changed files with 15 additions and 0 deletions

View File

@ -41,6 +41,9 @@ enum pl_command_type {
PL_LOUDSPEAKER_SET, /**< @brief Set the loudspeaker/beeper */ PL_LOUDSPEAKER_SET, /**< @brief Set the loudspeaker/beeper */
PL_OFF, /**< @brief Disable the temperature output and shutdown the PID controller */ PL_OFF, /**< @brief Disable the temperature output and shutdown the PID controller */
PL_CLEAR_FLAGS, /**< @brief Try clear all flags */ PL_CLEAR_FLAGS, /**< @brief Try clear all flags */
PL_DIGIO_CONF, /**< @brief Configure a DIGIO pin */
PL_DIGIO_SET, /**< @brief Set a DIGIO pin */
PL_DIGIO_WAIT, /**< @brief Wait until a DIGIO pin is set to the specified level */
_PL_NUM_CMDS, /**< @brief Sentinel to determine the total amount of commands */ _PL_NUM_CMDS, /**< @brief Sentinel to determine the total amount of commands */
}; };

View File

@ -250,6 +250,15 @@ int temp_profile_executer_handle(void)
cmd_ack_flags(); cmd_ack_flags();
advance = true; advance = true;
break; break;
case PL_DIGIO_CONF:
advance = true;
break;
case PL_DIGIO_SET:
advance = true;
break;
case PL_DIGIO_WAIT:
advance = true;
break;
default: default:
tpe_abort(); tpe_abort();
advance = true; advance = true;

View File

@ -48,6 +48,9 @@ static const struct pl_command_list_map cmd_list_map[_PL_NUM_CMDS] = {
{PL_LOUDSPEAKER_SET, "beep", 1u}, {PL_LOUDSPEAKER_SET, "beep", 1u},
{PL_OFF, "temp_off", 0u}, {PL_OFF, "temp_off", 0u},
{PL_CLEAR_FLAGS, "clear_flags", 0u}, {PL_CLEAR_FLAGS, "clear_flags", 0u},
{PL_DIGIO_CONF, "digio_conf", 2u},
{PL_DIGIO_SET, "digio_set", 2u},
{PL_DIGIO_WAIT, "digio_wait", 2u},
}; };
/** /**