![](/media/cache/profiles/98c39996bf1543e974747a2549b3107c.50x50_q85.png)
パラメータを適応変化させる事により圧縮率を向上させた動的ライス・ゴロム符号を利用した可逆圧縮方式。圧縮ソフト、圧縮率のMATLABシミュレーションは詳細はInterface誌2011年8月号に掲載されるRX62Nマイコン連動特集にて掲載予定。
USBHostLite/usbhost_ms.h@0:d920d64db582, 2011-03-30 (annotated)
- Committer:
- lynxeyed_atsu
- Date:
- Wed Mar 30 06:05:24 2011 +0000
- Revision:
- 0:d920d64db582
alpha
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lynxeyed_atsu | 0:d920d64db582 | 1 | /* |
lynxeyed_atsu | 0:d920d64db582 | 2 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 3 | * NXP USB Host Stack |
lynxeyed_atsu | 0:d920d64db582 | 4 | * |
lynxeyed_atsu | 0:d920d64db582 | 5 | * (c) Copyright 2008, NXP SemiConductors |
lynxeyed_atsu | 0:d920d64db582 | 6 | * (c) Copyright 2008, OnChip Technologies LLC |
lynxeyed_atsu | 0:d920d64db582 | 7 | * All Rights Reserved |
lynxeyed_atsu | 0:d920d64db582 | 8 | * |
lynxeyed_atsu | 0:d920d64db582 | 9 | * www.nxp.com |
lynxeyed_atsu | 0:d920d64db582 | 10 | * www.onchiptech.com |
lynxeyed_atsu | 0:d920d64db582 | 11 | * |
lynxeyed_atsu | 0:d920d64db582 | 12 | * File : usbhost_ms.h |
lynxeyed_atsu | 0:d920d64db582 | 13 | * Programmer(s) : Ravikanth.P |
lynxeyed_atsu | 0:d920d64db582 | 14 | * Version : |
lynxeyed_atsu | 0:d920d64db582 | 15 | * |
lynxeyed_atsu | 0:d920d64db582 | 16 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 17 | */ |
lynxeyed_atsu | 0:d920d64db582 | 18 | |
lynxeyed_atsu | 0:d920d64db582 | 19 | #ifndef USBHOST_MS_H |
lynxeyed_atsu | 0:d920d64db582 | 20 | #define USBHOST_MS_H |
lynxeyed_atsu | 0:d920d64db582 | 21 | |
lynxeyed_atsu | 0:d920d64db582 | 22 | /* |
lynxeyed_atsu | 0:d920d64db582 | 23 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 24 | * INCLUDE HEADER FILES |
lynxeyed_atsu | 0:d920d64db582 | 25 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 26 | */ |
lynxeyed_atsu | 0:d920d64db582 | 27 | |
lynxeyed_atsu | 0:d920d64db582 | 28 | #include "usbhost_inc.h" |
lynxeyed_atsu | 0:d920d64db582 | 29 | |
lynxeyed_atsu | 0:d920d64db582 | 30 | /* |
lynxeyed_atsu | 0:d920d64db582 | 31 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 32 | * MASS STORAGE SPECIFIC DEFINITIONS |
lynxeyed_atsu | 0:d920d64db582 | 33 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 34 | */ |
lynxeyed_atsu | 0:d920d64db582 | 35 | |
lynxeyed_atsu | 0:d920d64db582 | 36 | #define MS_GET_MAX_LUN_REQ 0xFE |
lynxeyed_atsu | 0:d920d64db582 | 37 | #define MASS_STORAGE_CLASS 0x08 |
lynxeyed_atsu | 0:d920d64db582 | 38 | #define MASS_STORAGE_SUBCLASS_SCSI 0x06 |
lynxeyed_atsu | 0:d920d64db582 | 39 | #define MASS_STORAGE_PROTOCOL_BO 0x50 |
lynxeyed_atsu | 0:d920d64db582 | 40 | |
lynxeyed_atsu | 0:d920d64db582 | 41 | #define INQUIRY_LENGTH 36 |
lynxeyed_atsu | 0:d920d64db582 | 42 | /* |
lynxeyed_atsu | 0:d920d64db582 | 43 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 44 | * SCSI SPECIFIC DEFINITIONS |
lynxeyed_atsu | 0:d920d64db582 | 45 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 46 | */ |
lynxeyed_atsu | 0:d920d64db582 | 47 | |
lynxeyed_atsu | 0:d920d64db582 | 48 | #define CBW_SIGNATURE 0x43425355 |
lynxeyed_atsu | 0:d920d64db582 | 49 | #define CSW_SIGNATURE 0x53425355 |
lynxeyed_atsu | 0:d920d64db582 | 50 | #define CBW_SIZE 31 |
lynxeyed_atsu | 0:d920d64db582 | 51 | #define CSW_SIZE 13 |
lynxeyed_atsu | 0:d920d64db582 | 52 | #define CSW_CMD_PASSED 0x00 |
lynxeyed_atsu | 0:d920d64db582 | 53 | #define SCSI_CMD_REQUEST_SENSE 0x03 |
lynxeyed_atsu | 0:d920d64db582 | 54 | #define SCSI_CMD_TEST_UNIT_READY 0x00 |
lynxeyed_atsu | 0:d920d64db582 | 55 | #define SCSI_CMD_INQUIRY 0x12 |
lynxeyed_atsu | 0:d920d64db582 | 56 | #define SCSI_CMD_READ_10 0x28 |
lynxeyed_atsu | 0:d920d64db582 | 57 | #define SCSI_CMD_READ_CAPACITY 0x25 |
lynxeyed_atsu | 0:d920d64db582 | 58 | #define SCSI_CMD_WRITE_10 0x2A |
lynxeyed_atsu | 0:d920d64db582 | 59 | |
lynxeyed_atsu | 0:d920d64db582 | 60 | /* |
lynxeyed_atsu | 0:d920d64db582 | 61 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 62 | * TYPE DEFINITIONS |
lynxeyed_atsu | 0:d920d64db582 | 63 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 64 | */ |
lynxeyed_atsu | 0:d920d64db582 | 65 | |
lynxeyed_atsu | 0:d920d64db582 | 66 | typedef enum ms_data_dir { |
lynxeyed_atsu | 0:d920d64db582 | 67 | |
lynxeyed_atsu | 0:d920d64db582 | 68 | MS_DATA_DIR_IN = 0x80, |
lynxeyed_atsu | 0:d920d64db582 | 69 | MS_DATA_DIR_OUT = 0x00, |
lynxeyed_atsu | 0:d920d64db582 | 70 | MS_DATA_DIR_NONE = 0x01 |
lynxeyed_atsu | 0:d920d64db582 | 71 | |
lynxeyed_atsu | 0:d920d64db582 | 72 | } MS_DATA_DIR; |
lynxeyed_atsu | 0:d920d64db582 | 73 | |
lynxeyed_atsu | 0:d920d64db582 | 74 | /* |
lynxeyed_atsu | 0:d920d64db582 | 75 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 76 | * FUNCTION PROTOTYPES |
lynxeyed_atsu | 0:d920d64db582 | 77 | ************************************************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 78 | */ |
lynxeyed_atsu | 0:d920d64db582 | 79 | |
lynxeyed_atsu | 0:d920d64db582 | 80 | USB_INT32S MS_BulkRecv ( USB_INT32U block_number, |
lynxeyed_atsu | 0:d920d64db582 | 81 | USB_INT16U num_blocks, |
lynxeyed_atsu | 0:d920d64db582 | 82 | volatile USB_INT08U *user_buffer); |
lynxeyed_atsu | 0:d920d64db582 | 83 | |
lynxeyed_atsu | 0:d920d64db582 | 84 | USB_INT32S MS_BulkSend ( USB_INT32U block_number, |
lynxeyed_atsu | 0:d920d64db582 | 85 | USB_INT16U num_blocks, |
lynxeyed_atsu | 0:d920d64db582 | 86 | volatile USB_INT08U *user_buffer); |
lynxeyed_atsu | 0:d920d64db582 | 87 | USB_INT32S MS_ParseConfiguration(void); |
lynxeyed_atsu | 0:d920d64db582 | 88 | USB_INT32S MS_TestUnitReady (void); |
lynxeyed_atsu | 0:d920d64db582 | 89 | USB_INT32S MS_ReadCapacity (USB_INT32U *numBlks, USB_INT32U *blkSize); |
lynxeyed_atsu | 0:d920d64db582 | 90 | USB_INT32S MS_GetMaxLUN (void); |
lynxeyed_atsu | 0:d920d64db582 | 91 | USB_INT32S MS_GetSenseInfo (void); |
lynxeyed_atsu | 0:d920d64db582 | 92 | USB_INT32S MS_Init (USB_INT32U *blkSize, USB_INT32U *numBlks, USB_INT08U *inquiryResult); |
lynxeyed_atsu | 0:d920d64db582 | 93 | USB_INT32S MS_Inquire (USB_INT08U *response); |
lynxeyed_atsu | 0:d920d64db582 | 94 | |
lynxeyed_atsu | 0:d920d64db582 | 95 | void Fill_MSCommand ( USB_INT32U block_number, |
lynxeyed_atsu | 0:d920d64db582 | 96 | USB_INT32U block_size, |
lynxeyed_atsu | 0:d920d64db582 | 97 | USB_INT16U num_blocks, |
lynxeyed_atsu | 0:d920d64db582 | 98 | MS_DATA_DIR direction, |
lynxeyed_atsu | 0:d920d64db582 | 99 | USB_INT08U scsi_cmd, |
lynxeyed_atsu | 0:d920d64db582 | 100 | USB_INT08U scsi_cmd_len); |
lynxeyed_atsu | 0:d920d64db582 | 101 | #endif |