User Manual
GAMMA instabus
Release: December 2011
API-Reference for Bus Interface Modules M130, M131, M132, M135
KNX-Processors 184/01, 184/11, 184/21
Siemens AG pages 28 Technical Manual
Infrastructure and Cities Sector,
Building Technologies
Control Products and Systems © Siemens AG 2011 page 3
P. O. Box 10 09 53, Subject to change without further notice.
D-93009 Regensburg
1 Introduction
This document describes the application programming interface for the Siemens B
us
Interface Modules BIM M130, BIM M131, BIM M132 and BIM M135.
To call any of the following functions write U._<function name>.
Example: if (U._TestObject(3) == TRUE) {…}
2 API-Reference
2.1 Debouncing
The following functions are used to debounce input pins of the BIM in software.
2.1.1 Function DebounceInit
Prototype:
void DebounceInit(DEBOUNCEKIT* kit, USHORT initvalue)
Description
:
This function initializes the structure DEBOUCEKIT. This is necessary before you can
call ‘Debounce’ for this DEBOUCEKIT.
Parameters:
DEBOUNCEKIT* kit:
A pointer to a structure of type DEBOUNCEKIT
USHORT initvalue:
The initial value of the debounced value in structure DEBOUNCEKIT
Return values
:
none
Callable in / at:
init, main
Stack used: 18 bytes
Comment:
---
2.1.2 Function Debounce
Prototype:
void Debounce(USHORT sample, USHORT mask, DEBOUNCEKIT* kit,
USHORT debouncetime)
Description
:
This function is used to debounce the result of the logical AND of ‘sample’ and
‘mask’. If the result has been unchanged for at least ‘debouncetime’, the new value is
stored in ‘kit’.
Parameters:
USHORT sample:
The actual value that should be debounced
USHORT mask:
Specifies the bits in sample that should be debounced