ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 1 | /* |
| 2 | * ANT Stack |
| 3 | * |
| 4 | * Copyright 2011 Dynastream Innovations |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
| 17 | */ |
| 18 | /*******************************************************************************\ |
| 19 | * |
| 20 | * FILE NAME: ant_driver_defines.h |
| 21 | * |
| 22 | * BRIEF: |
| 23 | * This file defines ANT specific HCI values used by the ANT chip for a |
| 24 | * sample TTY implementation. |
| 25 | * |
| 26 | * |
| 27 | \*******************************************************************************/ |
| 28 | |
| 29 | #ifndef __VFS_PRERELEASE_H |
| 30 | #define __VFS_PRERELEASE_H |
| 31 | |
| 32 | // ----------------------------------------- |
| 33 | // | Header | Data | Footer | |
| 34 | // |----------------------|-----------------| |
| 35 | // |Optional| Data | Opt. | ... | Optional | |
| 36 | // | Opcode | Size | Sync | | Checksum | |
James Bootsma | 84f4b53 | 2017-10-12 17:27:48 -0600 | [diff] [blame^] | 37 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 38 | // Data may include any number of ANT packets, with no sync byte or checksum. |
| 39 | // A read from the driver may return any number of ANT HCI packets. |
| 40 | |
| 41 | |
| 42 | // ---------------------- REQUIRED |
| 43 | |
| 44 | // Which chip is this library being built for: |
| 45 | #define ANT_CHIP_NAME "Qualcomm SMD" |
| 46 | |
| 47 | // Set the file name the driver creates for the ANT device: |
| 48 | // If chip uses separate command and data paths: |
| 49 | #define ANT_COMMANDS_DEVICE_NAME "/dev/smd5" |
| 50 | #define ANT_DATA_DEVICE_NAME "/dev/smd6" |
| 51 | // OR |
| 52 | // If chip uses one path: |
| 53 | // #define ANT_DEVICE_NAME "/dev/Z" |
| 54 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 55 | // Set to the number of bytes of header is for Opcode: |
| 56 | #define ANT_HCI_OPCODE_SIZE 0 |
James Bootsma | 84f4b53 | 2017-10-12 17:27:48 -0600 | [diff] [blame^] | 57 | |
| 58 | // Set to the number of bytes of header for channel ID |
| 59 | #define ANT_HCI_CHANNEL_SIZE 0 |
| 60 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 61 | // Set to the number of bytes of header is for Data Size: |
| 62 | #define ANT_HCI_SIZE_SIZE 1 |
James Bootsma | 84f4b53 | 2017-10-12 17:27:48 -0600 | [diff] [blame^] | 63 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 64 | // Set to the number of bytes of header is for Sync: |
| 65 | #define ANT_HCI_SYNC_SIZE 0 |
James Bootsma | 84f4b53 | 2017-10-12 17:27:48 -0600 | [diff] [blame^] | 66 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 67 | // Set to the number of bytes of footer is for Checksum: |
| 68 | #define ANT_HCI_CHECKSUM_SIZE 0 |
James Bootsma | 84f4b53 | 2017-10-12 17:27:48 -0600 | [diff] [blame^] | 69 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 70 | // ---------------------- OPTIONAL |
| 71 | |
| 72 | // If hard reset is supported, define ANT_IOCTL_RESET |
| 73 | // #define ANT_IOCTL_RESET _IOW('U', 210, int) |
| 74 | // #define ANT_IOCTL_RESET_PARAMETER (0) |
| 75 | |
| 76 | // If the chip sends flow control messages: |
| 77 | // Define the Opcode for a Flow Control message: |
| 78 | #define ANT_MESG_FLOW_CONTROL ((ANT_U8)0xC9) |
| 79 | // AND |
| 80 | // define the message content: |
| 81 | // That signals Flow Go: |
| 82 | #define ANT_FLOW_GO ((ANT_U8)0x00) |
James Bootsma | 84f4b53 | 2017-10-12 17:27:48 -0600 | [diff] [blame^] | 83 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 84 | // That signals Flow Stop: |
| 85 | #define ANT_FLOW_STOP ((ANT_U8)0x80) |
| 86 | |
| 87 | #endif /* ifndef __VFS_PRERELEASE_H */ |