So what's wrong with a function like what I wrote? Is every hardware device driven by a different line of code?