hostif_high.h
来自「本程序为ST公司开发的源代码」· C头文件 代码 · 共 818 行 · 第 1/3 页
H
818 行
#define CMD_RIPPING 0x0D #define CMD_DATA_READ 0x12 #define CMD_DATA_PAUSE 0x13 #define CMD_READ_UPDATE_FILENAME 0x14 #define CMD_UPDATE_ACTION 0x15 #define CMD_PLAY_NEXT 0x17 #define CMD_PLAY_PREVIOUS 0x18 #define CMD_PLAY_CURRENT 0x19 #define CMD_CHANGE_DIRECTORY 0x25 #define CMD_SOURCE_CHANGE 0x26 #define CMD_START_TOC 0x27 #define CMD_EM_EJECT 0x44 // TBD #define HOSTIF_GROUP_CMD_MEDIA_INFO 0x04 #define REQ_DISC_TYPE 0x01 #define REQ_DISC_ID 0x02 #define REQ_TRACK_INFO 0x03 #define REQ_PLAY_LIST 0x04 #define REQ_CA_FILE_INFO 0x05 #define REQ_DISC_LABEL 0x06 #define REQ_FOLDER_NUMBER 0x07 #define REQ_TOTAL_TIME 0x20 #define REQ_TIME_INFO 0x21 #define REQ_CURRENT_SOURCE 0x22 #define REQ_DEVICE_FILE_TYPE 0x23 #define REQ_READ_TOC 0x24 #define REQ_DIRECTORY_INFO 0x25 #define REQ_TEXT_INFO 0x45 #define REQ_DEVICE_INFO 0x46 #define REQ_DISC_CONTENT 0x47 #define REQ_ENTRY_NAME 0x48 #define REQ_DISC_INFO 0x49 #define REQ_DIR_CONTENT 0x4A #define REQ_AVAILABLE_PLAYLIST_FILES 0x80 #define REQ_CURRENT_PLAYLIST_CONTENT 0x81 #define REQ_LONG_ENTRY_NAME 0x82 #define REQ_CURRENT_PLAYLIST_ABS_CONTENT 0x83 #define REQ_USB_SERIAL_NUMBER 0x8D #define REQ_USB_DEVICE_INFO 0x8E#if 0 // [RB] will not be implemented#define HOSTIF_GROUP_CMD_FILE_COMMANDS 0x05 #define FILE_OPEN 0x01 #define FILE_CLOSE 0x02 #define FILE_STATUS 0x10 #define FILE_GET_POSITION 0x11 #define FILE_READ 0x20 #define FILE_SET_POSITION 0x22#endif#define HOSTIF_GROUP_CMD_BINARY_TRANSFER 0x06 #define CMD_BIN_TRANSFER_START 0x00 /*JS changed according to new AccordoPlusBinarytransferProtocol 0.4 */ #define HOST_UPDATE 0x01 #define IPOD 0x02 #define RESUME_INFO 0x03 #define CMD_BIN_TRANSFER_WRITE 0x01 #define CMD_BIN_TRANSFER_READ 0x02 #define CMD_BIN_TRANSFER_ABORT 0x03#if (STM_HOSTIF_USE_DEBUG_AND_TRACE==1)#define HOSTIF_GROUP_CMD_STM_DEBUG_AND_TRACE 0x10#endif/* Definitions for Module to Host *//* GROUP - ID - PAR1 */#define HOSTIF_GROUP_MSG_PLAYER_INFO 0x01 #define MSG_PRODUCT_VERSION 0x01 #define MSG_TEMPERATURE 0x04 #define MSG_CMD_EVAL 0x05 #define CMDE_NO_ERROR 0x00 #define CMDE_LENGTH_ERROR 0x01 #define CMDE_CHECK_SUM_ERROR 0x02 #define CMDE_ILLEGAL_COMMAND 0x03 #define CMDE_ILLEGAL_PARAMETER 0x04 #define CMDE_RESERVED 0x05 #define CMDE_FLOW_CONTROL 0x06 #define MSG_CONFIG_VALUE 0x06 #define MSG_MECH_PARAMETER 0x12 #define MSG_MECH_MEASUREMENTS 0x13 #define MSG_MISSING_ITEMS 0x16 #define MSG_USB_HIGH_Z 0x18#define HOSTIF_GROUP_MSG_PLAYER_FUNC 0x03 #define MSG_POWER_MODE 0x01 #define PWM_INIT 0x40 // internal #define PWM_POWER_OFF 0x00 #define PWM_STANDBY 0x01 #define PWM_INITIALIZING 0x02 #define PWM_NORMAL 0x0F #define PWM_POWER_ON PWM_NORMAL #define PWM_GOING_TO_POWER_OFF 0xFF #define MSG_PLAYER_MODE 0x02 #define PLM_INIT 0x40 // internal #define PLMA_NONE 0xAA // internal #define PLM_STOP 0x01 #define PLM_STARTUP 0x02 #define PLM_PAUSE 0x03 #define PLMA_RESUME_NOT_POSSIBLE 0x00 // internal #define PLMA_RESUME_POSSIBLE 0x01 // internal #define PLM_ACCESSING 0x04 #define PLMA_ACCESSING_TO_STOP PLM_STOP #define PLMA_ACCESSING_TO_PLAY PLM_PLAY #define PLM_PLAY 0x06 #define PLM_FAST_FW 0x07 #define PLMA_FAST_SPEED_1X 0x01 #define PLMA_FAST_SPEED_2X 0x02 #define PLMA_FAST_SPEED_4X 0x04 #define PLMA_FAST_SPEED_8X 0x08 #define PLMA_FAST_SPEED_32X 0x20 #define PLM_FAST_BW 0x08 #define PLMA_TRANSITION_DONE 0x00 //JS added for MagPlayerMode CIS 0.09 #define PLMA_TRANSITION_PROCESS 0x01 #define PLMA_RESUME_NOT_AVAILABLE 0x00 #define PLMA_RESUME_AVAILABLE 0x02 #define PLM_MOUNT 0x41 // internal#if (0 != HAVE_UPDATE) #define PLM_UPDATE 0x09#endif /* HAVE_UPDATE */ #define MSG_LOADER_MODE 0x03 #define LDM_INIT 0x40 // internal #define LDMA_NONE 0xAA // internal #define LDM_NO_DISC 0x00 #define LDM_EJECT 0x01 #define LDM_EJECTING 0x02 #define LDM_EM_EJECTING 0x06 // internal #define LDM_INSERTING 0x03 #define LDMA_INSERTING_BY_USER 0x00 #define LDMA_INSERTING_BY_PUSHBACK 0x01 #define LDMA_INSERTING_BY_AUTOLOAD 0x02 #define LDMA_INSERTING_AT_RESET 0x03 #define LDMA_INSERTING_BY_COMMAND 0x04 #define LDM_STOP 0x04 #define LDM_DISC_BLOCKED 0x05 #define LDMA_UNKNOWN_ERROR 0x00 #define LDMA_GENERAL_LOADER_ERROR 0x01 #define LDMA_MEDIA_GRIP_ERROR 0x02 #define LDMA_LOAD_PROCESS_ERROR 0x03 #define LDMA_EJECT_PROCESS_ERROR 0x04 #define MSG_ERROR_MODE 0x04 #define ERM_NO_ERROR 0x00 #define ERM_READ_ERROR 0x01 #define ERM_NA_DISC_ERROR 0x03 #define ERM_NA_STATE_ERROR 0x04 #define ERM_INVALID_PARAMETER_ERROR 0x06 #define ERM_DISC_PHYSICAL_ERROR 0x07 #define ERM_NO_RESOURCES_ERROR 0x0A// #define ERM_ERROR 0xFE //[LL] next 2bytes identifies error code #define MSG_INSERT_MODE 0x05 #define INS_NO_USB 0x00 #define INS_NO_SDCARD 0x01 #define INS_NOT_RECOGNITION_DEVICE 0x02 #define INS_USB_INSERT 0x03 #define INSM_USB_PLUGGING 0x00 #define INSM_USB_RECOGNIZED 0x04 #define INSM_USB_READY 0x01 #define INSM_USB_UNSUPPORTED 0x10 //[LL] INSM_USB_UNKNOWN #define INSM_HUB_UNSUPPORTED 0x20 //[LL] INSM_USB_UNKNOWN #define INSM_USB_ERROR 0x03 #define INS_SDC_INSERT 0x04 #define INSM_SDC_PLUGGING 0x00 #define INSM_SDC_RECOGNIZED 0x04 #define INSM_SDC_READY 0x01 #define INSM_SDC_UNSUPPORTED 0x10 #define INSM_SDC_ERROR 0x03 #define INS_NO_IPOD 0x05 #define INS_IPOD_INSERT 0x06// #define INSM_IPOD_PLUGGING 0x00 //[LL] #define INSM_IPOD_RECOGNIZED 0x04 #define INSM_IPOD_READY 0x01 #define INSM_IPOD_UNSUPPORTED 0x10 #define INSM_IPOD_ERROR 0x03 #define MSG_CONTINUE 0x08 #define MSG_AUTOMATE_MODE 0x20#define HOSTIF_GROUP_MSG_MEDIA_INFO 0x04 #define MSG_DISC_TYPE 0x01 //disc type can be combined from defines below (CIS 0.09) #define DT_NO_DISC 0x00 #define DT_CDDA 0x01 #define DT_CDCA 0x02 #define DT_DATA 0x04 #define MSG_DISC_ID 0x02 #define MSG_TRACK_INFO 0x03 #define MSG_CA_FILE_INFO 0x05 #define MSG_DISC_LABEL 0x06 #define MSG_FOLDER_NUMBER 0x07 #define MSG_TOTAL_TIME 0x20 #define MSG_TIME_INFO 0x21 #define MSG_CURRENT_SOURCE 0x22 #define RESERVED_DEVICE 0x00 #define CD_DISC 0x01 #define USB_DEVICE 0x02 #define SD_CARD 0x03 #define MSG_DEVICE_FILE_TYPE 0x23 #define MSG_READ_TOC 0x24 #define MSG_DIRECTORY_INFO 0x25 #define MSG_TEXT_INFO 0x45 #define MSG_DEVICE_INFO 0x46 #define MSG_DISC_CONTENT 0x47 #define MSG_ENTRY_NAME 0x48 #define MSG_DIR_CONTENT 0x4A #define MSG_LAST_FILE_INFO 0x50 #define LAST_IN_DIR 0x01 #define LAST_ON_DISC 0x02 #define MSG_AVAILABLE_PLAYLIST_FILES 0x80 #define MSG_CURRENT_PLAYLIST_CONTENT 0x81 #define MSG_LONG_ENTRY_NAME 0x82 #define MSG_CURRENT_PLAYLIST_ABS_CONTENT 0x83 #define MSG_USB_SERIAL_NUMBER 0x8D #define MSG_USB_DEVICE_INFO 0x8E #define HOSTIF_GROUP_MSG_BINARY_TRANSFER 0x06 #define MSG_BINARY_PACKET 0x01 #define MSG_ACK_BINARY_PACKET 0x02 #define ACK_NO_ERROR 0x00 #define ACK_NO_DATA 0x01 #define ACK_DATA_ERROR 0x02 #define ACK_DATA_LENGTH_ERROR 0x03#if (STM_HOSTIF_USE_DEBUG_AND_TRACE==1)#define HOSTIF_GROUP_MSG_STM_DEBUG_AND_TRACE 0x10#endif /* Commad position params definition */#define CMD_PARAM_TIME_POSITION 0x0#define CMD_PARAM_LBA_POSITION 0x1#define CMD_PARAM_CURRENT_POSITION 0x2#define CMD_PARAM_END_OF_FILE_POSITION 0x3#define DUMMY_VALUE 0x0 /* not used in processing */#define CMD_PARAM_NAVIGATION_DIR 0x02/* CMD_BIN_TRANSFER_WRITE flag content */#define FIRST_PACKET 0x01#define CONTINUING_PACKET 0x02#define LAST_PACKET_OF_BLOCK 0x04#define LAST_PACKET_OF_FILE 0x08/************************************************** * * definitions to handle the storing of servo parameters * * *************************************************/typedef enum{ HSP_RESET_MODE_STARTUP, HSP_RESET_MODE_RESTART,} t_hsp_reset_mode;typedef enum{ HSP_STORING_MODE_STARTUP_OK, HSP_STORING_MODE_STARTUP_ERROR, HSP_STORING_MODE_RESTART_OK, HSP_STORING_MODE_RESTART_ERROR} t_hsp_storing_mode;#define STARTUP_STATUS_BYTE 0x00#define MIN_STARTUP_PARAMETER 0x01#define MIN_RESTART_PARAMETER 0x0D#define MAX_SERVO_PARAMETER 0x18typedef enum
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?