added init pin mode, rise event handler stubs