Skip to content

Commit

Permalink
forbid the include of GwHardware.h in user task headers
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Oct 28, 2023
1 parent a98693a commit 1ff7c44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/hardware/GwHardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifdef _NOGWHARDWAREUT
#error "you are not allowed to include GwHardware.h in your user task header"
#endif
#ifndef _GWHARDWARE_H
#define _GWHARDWARE_H
#define GWSERIAL_TYPE_UNI 1
Expand Down
2 changes: 2 additions & 0 deletions lib/usercode/GwUserCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ class GwUserCapability{
userCapabilities[name]=value;
}
};
#define _NOGWHARDWAREUT
#include "GwUserTasks.h"
#undef _NOGWHARDWAREUT

class TaskDataEntry{
public:
Expand Down

0 comments on commit 1ff7c44

Please sign in to comment.