LSH-Core
Deterministic firmware core for Controllino-based Labo Smart Home nodes
 
Loading...
Searching...
No Matches
lsh_user_macros.hpp File Reference

Provides the user-facing macros (LSH_ACTUATOR, LSH_BUTTON, LSH_INDICATOR) for device configuration. More...

Include dependency graph for lsh_user_macros.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LSH_ACTUATOR(var_name, pin)   Actuator var_name(::lsh::core::PinTag<(pin)>{})
 Defines an Actuator object bound to one compile-time pin.
 
#define LSH_BUTTON(var_name, pin)   Clickable var_name(::lsh::core::PinTag<(pin)>{})
 Defines a Clickable object bound to one compile-time pin.
 
#define LSH_INDICATOR(var_name, pin)   Indicator var_name(::lsh::core::PinTag<(pin)>{})
 Defines an IndicatorLight.
 

Detailed Description

Provides the user-facing macros (LSH_ACTUATOR, LSH_BUTTON, LSH_INDICATOR) for device configuration.

Author
Jacopo Labardi (labodj)

Copyright 2026 Jacopo Labardi

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Macro Definition Documentation

◆ LSH_ACTUATOR

#define LSH_ACTUATOR (   var_name,
  pin 
)    Actuator var_name(::lsh::core::PinTag<(pin)>{})

Defines an Actuator object bound to one compile-time pin.

Parameters
var_nameThe name of the variable to declare (e.g., rel0).
pinThe hardware pin for the actuator.

◆ LSH_BUTTON

#define LSH_BUTTON (   var_name,
  pin 
)    Clickable var_name(::lsh::core::PinTag<(pin)>{})

Defines a Clickable object bound to one compile-time pin.

Parameters
var_nameThe name of the variable to declare (e.g., btn0).
pinThe hardware pin for the clickable.

◆ LSH_INDICATOR

#define LSH_INDICATOR (   var_name,
  pin 
)    Indicator var_name(::lsh::core::PinTag<(pin)>{})

Defines an IndicatorLight.

Does not require an ID.

Parameters
var_nameThe name of the variable to declare (e.g., light0).
pinThe hardware pin for the indicator.