From 00b5be289d749fe726f04d9c9412e0837a8e37b8 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 13 Apr 2015 18:48:14 +0200 Subject: [PATCH] Use C preprocessor in S-functions code and documentation --- rpp/blocks/config_rm48_hdk.h | 6 ++++++ rpp/blocks/sfunction_ain.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 rpp/blocks/config_rm48_hdk.h diff --git a/rpp/blocks/config_rm48_hdk.h b/rpp/blocks/config_rm48_hdk.h new file mode 100644 index 0000000..2f11181 --- /dev/null +++ b/rpp/blocks/config_rm48_hdk.h @@ -0,0 +1,6 @@ +#ifndef CONFIG_RM48_HDK_H +#define CONFIG_RM48_HDK_H + +#define SFUNCTION_AIN_PIN_COUNT 16 + +#endif diff --git a/rpp/blocks/sfunction_ain.c b/rpp/blocks/sfunction_ain.c index bde45f3..1a8654d 100644 --- a/rpp/blocks/sfunction_ain.c +++ b/rpp/blocks/sfunction_ain.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013, 2014 Czech Technical University in Prague +/* Copyright (C) 2013, 2014, 2015 Czech Technical University in Prague * * Authors: * - Carlos Jenkins @@ -35,7 +35,7 @@ Outputs: - { name: "ErrFlag", type: "bool" } Parameters: - - { name: "Pin number", type: "uint8", range: "[1–16]" } + - { name: "Pin number", type: "uint8", range: "[1–SFUNCTION_AIN_PIN_COUNT]" } # Description and Help is in Markdown mark-up Description: | -- 2.39.2