*
* \version $Id$
*
- * \author Andrea Grandi <andrea@develer.com>
+ * \author Daniele Basile <asterix@develer.com>
*/
-#ifndef SIPO_H
-#define SIPO_H
+#ifndef DRV_SIPO_H
+#define DRV_SIPO_H
-#include "hw/hw_sipo.h"
+#include <kern/kfile.h>
-#include <avr/io.h>
+/**
+ * Sipo KFile context structure.
+ */
+typedef struct Sipo
+{
+ KFile fd; ///< File descriptor.
+} Sipo;
+
+/**
+ * ID for sipo.
+ */
+#define KFT_SIPO MAKE_ID('S', 'I', 'P', 'O')
+
+/**
+ * Convert + ASSERT from generic KFile to Sipo.
+ */
+INLINE Sipo * SIPO_CAST(KFile *fd)
+{
+ ASSERT(fd->_type == KFT_SIPO);
+ return (Sipo *)fd;
+}
-void sipo_init(void);
-void sipo_putchar(uint8_t c);
+void sipo_init(Sipo *fd);
-#endif // SIPO_H
+#endif // DRV_SIPO_H