hack port of a lib from arduino

Dependents:   template_sd