Clean up code. Add comments. Init module with callback to register all
[bertos.git] / bertos / net / protocol.h
index 5c0d92a4f468bad825d6d58f679a493ce05067da..a733e05a35f51e5b28b103d0b84349091dd892d3 100644 (file)
  * invalidate any other reasons why the executable file might be covered by
  * the GNU General Public License.
  *
- * Copyright 2003, 2004, 2006 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2003, 2004, 2006, 2012 Develer S.r.l. (http://www.develer.com/)
  * Copyright 2000 Bernie Innocenti <bernie@codewiz.org>
  *
  * -->
  *
- * \brief Implementation of the command protocol between the board and the host
+ * \brief Protocol parser interface.
  *
  * \author Marco Benelli <marco@develer.com>
+ * \author Daniele Basile <asterix@develer.com>
  */
 
 
 #ifndef NET_PROTOCOL_H
 #define NET_PROTOCOL_H
 
-#include <drv/sipo.h>
-
 #include <io/kfile.h>
 
-void protocol_init(KFile *fd);
+typedef void (*protocol_t)(void);
+
 void protocol_run(KFile *fd);
+void protocol_init(KFile *fd, protocol_t cmds_register);
 
 #endif /* NET_PROTOCOL_H */