Please run the following command on the MATLAB command line:
This will launch examples of different types of Simulink S-functions.
For your case, please go to C-file S functions -> Data typed I/O. You may refer to those blocks and C-code to include different datatypes (including boolean) in your S-function.
Hope this helps.