split to GPIO  api wrapper and deviceLib api wrapper