device: Document and add C wrapper