implement flexible write configuration
bit shifting
Merge pull request #1 from scyu-tw/master

Merge