/*************************************************************/ /** @file: usb_device.h @brief: USB 从机驱动重写,加入iAP协议 @details: @author: Bingquan Cai @date: 2013-10-11,09:34 @note: */ /*************************************************************/ #ifndef _IAP_H_ #define _IAP_H_ #include "generic/typedef.h" // #include "string.h" // #include "usb/usb_slave_api.h" #define IAP2_LINK_EN 1 #define IAP_USE_USB_HID_EN 1 //USB #define MAXP_SIZE_INTERRUPT_IN 0x40 //IIC crack #define AUTHENTICATION_CONTROL_STATUS 0x10 #define SIGNATURE_DATA_LENGTH 0x11 #define SIGNATURE_DATA 0x12 #define CHALLENGE_DATA_LENGTH 0x20 #define CHALLENGE_DATA 0x21 #define ACCESSORY_CERTIFICATE_DATA_LENGTH 0x30 #define ACCESSORY_CERTIFICATE_DATA 0x31 //iAP1 and iAP2 COMMON #define IAP2_VERSIONS 0x02 #define IAP1_VERSIONS 0x01 #define DEFAULT_SEQUENCE_NUM 0x0 #define EXTRA_SEQUENCE_NUM 0x1 //"Dock speaker" #define ACCESSORY_NAME 0x44, 0x6f, 0x63, 0x6b, 0x20, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x00 //"IPDLI13" #define ACCESSORY_MODEL_IDENTIFIER 0x49, 0x50, 0x44, 0x4c, 0x49, 0x31, 0x33, 0x00 //"I want it" #define ACCESSORY_MANUFACTURER 0x49, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x69, 0x74, 0x00 //"iAP Interface" #define ACCESSORY_SERIALNUMBER 0x69, 0x41, 0x50, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x00 //< hid #define HID_PREV_FILE USB_AUDIO_PREFILE #define HID_NEXT_FILE USB_AUDIO_NEXTFILE #define HID_PP USB_AUDIO_PP #define HID_PLAY USB_AUDIO_PLAY #define HID_PAUSE USB_AUDIO_PAUSE #define HID_VOL_DOWN USB_AUDIO_VOLDOWN #define HID_VOL_UP USB_AUDIO_VOLUP //>8) #define SW16(x) (((u16)(x) & 0x00ffU)<<8 | ((u16)(x) & 0xff00U)>>8) #endif /* _IAP_H_ */