Added code for BCD switch.

Signed-off-by: Thomas Helmke <thomas.helmke@gmx.de>