Add lock/unlock for speed, macro for switch OD/PP GPIO mode