summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon/src/twi_specific.h
diff options
context:
space:
mode:
authorFlorent Duchon2012-05-16 17:08:48 +0200
committerFlorent Duchon2012-05-16 17:43:09 +0200
commit1d36a77e506bb5beb5ac4d0a33d72be7faef7d47 (patch)
tree015e6604854078ef5c8e41f02edfb9400ba4c330 /digital/beacon/src/twi_specific.h
parent63cb73a6ee91deb2ca0f1458595eb45bc172632e (diff)
digital/beacon: add twi specific
Diffstat (limited to 'digital/beacon/src/twi_specific.h')
-rw-r--r--digital/beacon/src/twi_specific.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/digital/beacon/src/twi_specific.h b/digital/beacon/src/twi_specific.h
new file mode 100644
index 00000000..ee244cb7
--- /dev/null
+++ b/digital/beacon/src/twi_specific.h
@@ -0,0 +1,68 @@
+/* twi_specific.h */
+/* twi specific funtion. {{{
+ *
+ * Copyright (C) 2012 Florent Duchon
+ *
+ * APBTeam:
+ * Web: http://apbteam.org/
+ * Email: team AT apbteam DOT org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+
+#ifndef _TWI_SPECIFIC_H
+#define _TWI_SPECIFIC_H
+
+#define TWI_TASK_PERIOD 4L
+
+
+typedef enum
+{
+ TWI_RX_CRC_FIELD,
+ TWI_RX_SEQ_FIELD,
+ TWI_RX_JACK_FIELD,
+ TWI_RX_NB_ADV_FIELD,
+ TWI_RX_X_MSB_FIELD,
+ TWI_RX_X_LSB_FIELD,
+ TWI_RX_Y_MSB_FIELD,
+ TWI_RX_Y_LSB_FIELD
+} TTWI_RX_field;
+
+typedef enum
+{
+ TWI_TX_CRC_FIELD,
+ TWI_TX_RFU1_FIELD,
+ TWI_TX_RFU2_FIELD,
+ TWI_TX_SEQ_FIELD,
+ TWI_TX_X1_MSB_FIELD,
+ TWI_TX_X1_LSB_FIELD,
+ TWI_TX_Y1_MSB_FIELD,
+ TWI_TX_Y1_LSB_FIELD,
+ TWI_TX_TRUST1_FIELD,
+ TWI_TX_X2_MSB_FIELD,
+ TWI_TX_X2_LSB_FIELD,
+ TWI_TX_Y2_MSB_FIELD,
+ TWI_TX_Y2_LSB_FIELD,
+ TWI_TX_TRUST2_FIELD
+} TTWI_TX_field;
+
+/* This function manages the TWI RX/RX transferts */
+void twi_task(void);
+
+/* Initialisze specific TWI */
+void twi_init_specific(void);
+
+#endif \ No newline at end of file