diff options
Diffstat (limited to 'spaghetti-monster/fsm-channels.h')
| -rw-r--r-- | spaghetti-monster/fsm-channels.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-channels.h b/spaghetti-monster/fsm-channels.h index b86e9ba..ba2d3fa 100644 --- a/spaghetti-monster/fsm-channels.h +++ b/spaghetti-monster/fsm-channels.h @@ -14,11 +14,19 @@ typedef SetLevelFunc * SetLevelFuncPtr; typedef bool GradualTickFunc(uint8_t gt); typedef GradualTickFunc * GradualTickFuncPtr; +// TODO: implement custom 3H handlers +typedef void ChannelArgFunc(); +typedef ChannelArgFunc * ChannelArgFuncPtr; + typedef struct Channel { SetLevelFuncPtr set_level; #ifdef USE_SET_LEVEL_GRADUALLY GradualTickFuncPtr gradual_tick; #endif + #ifdef USE_CUSTOM_3H_HANDLERS + // TODO: implement custom 3H handlers + ChannelArgFuncPtr ramp_channel_arg; + #endif #ifdef USE_CHANNEL_MODE_ARGS bool has_args; //uint8_t arg; // is in the config struct, not here @@ -30,7 +38,7 @@ Channel channels[]; // values are defined in the hwdef-*.c // TODO: size-optimize the case with only 1 channel mode? // (the arrays and stuff shouldn't be needed) -#ifdef USE_CFG +#if defined(USE_CFG) && (NUM_CHANNEL_MODES > 1) #define CH_MODE cfg.channel_mode #else // current multi-channel mode |
