Version 1.6.0 of ant-hal
diff --git a/src/common/inc/ant_version.h b/src/common/inc/ant_version.h
index f6effae..a682134 100644
--- a/src/common/inc/ant_version.h
+++ b/src/common/inc/ant_version.h
@@ -20,7 +20,7 @@
#define __ANT_VERSION_H
#define LIBANT_STACK_MAJOR "1"
-#define LIBANT_STACK_MINOR "4"
+#define LIBANT_STACK_MINOR "6"
#define LIBANT_STACK_INCRE "0"
#endif // __ANT_VERSION_H
diff --git a/src/vfs/ant_native_chardev.c b/src/vfs/ant_native_chardev.c
index 80ca0d1..df209c2 100644
--- a/src/vfs/ant_native_chardev.c
+++ b/src/vfs/ant_native_chardev.c
@@ -270,8 +270,11 @@
if (g_fnStateCallback)
g_fnStateCallback(RADIO_STATUS_RESETTING);
- for (eChannel = 0; eChannel < NUM_ANT_CHANNELS; eChannel++)
- ioctl(stRxThreadInfo.astChannels[eChannel].iFd, ANT_IOCTL_RESET); //TODO only one?
+#ifdef ANT_IOCTL_RESET_PARAMETER
+ ioctl(stRxThreadInfo.astChannels[0].iFd, ANT_IOCTL_RESET, ANT_IOCTL_RESET_PARAMETER);
+#else
+ ioctl(stRxThreadInfo.astChannels[0].iFd, ANT_IOCTL_RESET);
+#endif // ANT_IOCTL_RESET_PARAMETER
ant_disable();
diff --git a/src/vfs/ste/cg29xx/ant_driver_defines.h b/src/vfs/ste/cg29xx/ant_driver_defines.h
index 238782b..aa75ffa 100644
--- a/src/vfs/ste/cg29xx/ant_driver_defines.h
+++ b/src/vfs/ste/cg29xx/ant_driver_defines.h
@@ -17,10 +17,11 @@
*/
/*******************************************************************************\
*
-* FILE NAME: ant_driver_defines.h
+* FILE NAME: ant_driver_defines.h
*
* BRIEF:
-* This file defines constants for the ST-E CG29XX implementation
+* This file defines ANT specific HCI values used by the ANT stack for a
+* ST-E CG29XX.
*
*
\*******************************************************************************/
@@ -28,31 +29,59 @@
#ifndef __VFS_PRERELEASE_H
#define __VFS_PRERELEASE_H
-#define ANT_CHIP_NAME "ST-E CG29XX"
-
-#define ANT_COMMANDS_DEVICE_NAME "/dev/cg2900_antradio_cmd"
-#define ANT_DATA_DEVICE_NAME "/dev/cg2900_antradio_data"
-
-// TODO Must define ANT_IOCTL_RESET to value driver is expecting
-#define ANT_IOCTL_RESET _IO('H', 160)
-
+// ANT HCI Packet Structure
// -----------------------------------------
// | Header | Data | Footer |
// |----------------------|-----------------|
// |Optional| Data | Opt. | ... | Optional |
// | Opcode | Size | Sync | | Checksum |
+// Data may include any number of ANT packets, with no sync byte or checksum.
+// A read from the driver may return any number of ANT HCI packets.
+
+// ---------------------- REQUIRED
+
+// Which chip is this library being built for:
+#define ANT_CHIP_NAME "ST-E CG29XX"
+
+// Set the file name the driver creates for the ANT device:
+// If chip uses separate command and data paths:
+#define ANT_COMMANDS_DEVICE_NAME "/dev/cg2900_antradio_cmd"
+#define ANT_DATA_DEVICE_NAME "/dev/cg2900_antradio_data"
+// OR
+// If chip uses one path:
+// #define ANT_DEVICE_NAME "/dev/Z"
+
+// Set to the number of bytes of header is for Opcode:
#define ANT_HCI_OPCODE_SIZE 0
+// Set to the number of bytes of header is for Data Size:
#define ANT_HCI_SIZE_SIZE 1
+// Set to the number of bytes of header is for Sync:
#define ANT_HCI_SYNC_SIZE 0
+// Set to the number of bytes of footer is for Checksum:
#define ANT_HCI_CHECKSUM_SIZE 0
+
+// ---------------------- OPTIONAL
+
+// If hard reset is supported, define ANT_IOCTL_RESET
+#define ANT_IOCTL_RESET _IOW('U', 210, int)
+#define ANT_IOCTL_RESET_PARAMETER (0)
+
+// If the chip sends flow control messages:
+// Define the Opcode for a Flow Control message:
#define ANT_MESG_FLOW_CONTROL ((ANT_U8)0xC9)
-
+// AND
+// define the message content:
+// That signals Flow Go:
#define ANT_FLOW_GO ((ANT_U8)0x00)
+// That signals Flow Stop:
+#define ANT_FLOW_STOP ((ANT_U8)0x80)
-// ---------------------- Not chip specific
+
+// ---------------------- NOT CHIP SPECIFIC
+// These should not need to be modified, but should be verified they are correct
#define ANT_HCI_HEADER_SIZE ((ANT_HCI_OPCODE_SIZE) + (ANT_HCI_SIZE_SIZE) + (ANT_HCI_SYNC_SIZE))
@@ -61,7 +90,6 @@
#define ANT_HCI_SYNC_OFFSET ((ANT_HCI_SIZE_OFFSET) + (ANT_HCI_SIZE_SIZE))
#define ANT_HCI_DATA_OFFSET (ANT_HCI_HEADER_SIZE)
-#define ANT_FLOW_STOP ((ANT_U8)0x80)
#define ANT_FLOW_GO_WAIT_TIMEOUT_SEC 10
#endif /* ifndef __VFS_PRERELEASE_H */