...
*/
+/*
+ * Block mask documentation
+ * ------------------------
+ *
+ * This S-function has only the PIN_NAME parameter, but the block mask
+ * has two parameters for pin selection: PIN and PIN_NAME. PIN
+ * parameter is shown as a popup list with pin names available on the
+ * given board. When a pin is selected from this list, the callback
+ * function copies the value from PIN to PIN_NAME parameter. By
+ * default, PIN_NAME is not shown in the dialog.
+ *
+ * It might happen that a model designed for one board is opened for
+ * another board (i.e. rpp_setup was called when the RPP C library was
+ * compiled for another board). If we had only the PIN popup and the
+ * other board had different pin names, than the value of the PIN
+ * parameter would be lost (Simulink would set the parameter to the
+ * default value). With our two parameters, PIN_NAME is not changed
+ * (it's an edit box) and PIN is set to the default value '---', which
+ * results in PIN_NAME to be shown to the user. This way, the user
+ * sees the original pin name and can select the appropriate pin on
+ * the new board from the PIN list.
+ */
+
#define S_FUNCTION_NAME sfunction_gio_in
#include "header.c"