Clean up the code. Manage the reconnection. Use the lwip error, insted
[bertos.git] / bertos / drv / mcp41.c
index 02cff086bb2a9ca7dcd1e3b4358066f0f21a5f0e..5dbd8c19969bf683500e86ae7a756b7615aecf99 100644 (file)
@@ -32,7 +32,6 @@
  *
  * \brief MCP41xxx digital potentiomenter driver (implementation)
  *
- * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  */
 
@@ -43,7 +42,7 @@
 
 #include <drv/timer.h>
 #include <drv/mcp41.h>
-#include <kern/kfile.h>
+#include <io/kfile.h>
 
 static KFile *ch;
 
@@ -57,7 +56,6 @@ void mcp41_setResistance(Mcp41Dev dev, mcp41_res_t res)
        kfile_putc(MCP41_WRITE_DATA, ch);
        kfile_putc(((MCP41_HW_MAX * (uint32_t)res)  + (MCP41_MAX / 2)) / MCP41_MAX, ch);
        kfile_flush(ch);
-       ser_drain(spi_ser);
 
        MCP41_OFF(dev);
 }