summaryrefslogtreecommitdiff
path: root/digital/io/src/asserv.c
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-14 12:01:42 +0200
committerJérémy Dufour2008-04-14 12:01:42 +0200
commit78055db00a4089116e17c5d2d6b02acc74e42ef7 (patch)
tree5da516f20253ae0caac99a71c25db0413e32c9af /digital/io/src/asserv.c
parenta87f059b7acdc9f00b2102249a647a51f8389de4 (diff)
* digital/io/src
- manage command retransmission (when not acknowledge by the asserv) ; - integrate retransmission and update of the asserv into the main.
Diffstat (limited to 'digital/io/src/asserv.c')
-rw-r--r--digital/io/src/asserv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/digital/io/src/asserv.c b/digital/io/src/asserv.c
index 4302ce10..d7d383c4 100644
--- a/digital/io/src/asserv.c
+++ b/digital/io/src/asserv.c
@@ -138,6 +138,20 @@ asserv_move_arm_absolute (uint16_t position, uint8_t speed);
*/
static uint16_t asserv_arm_current_position;
+/**
+ * Send a prepared command to the asserv board using TWI module.
+ * It will reset the counter retransmission value and store the length for
+ * future retransmission.
+ * In comparison with \a asserv_twi_send_command this function is internal and
+ * used by \a asserv_twi_send_command.
+ * @param length th length of the complete command with parameters.
+ * @return
+ * - 0 if no error occurred.
+ * - 1 if TWI transmission failed.
+ */
+static inline uint8_t
+asserv_twi_send (uint8_t length);
+
/* Update TWI module until request (send or receive) is finished. */
static inline void
asserv_twi_update (void)