[go: up one dir, main page]

TWI626543B - Peripheral device controlling method by using storage device and storage device capable of controlling peripheral devices - Google Patents

Peripheral device controlling method by using storage device and storage device capable of controlling peripheral devices Download PDF

Info

Publication number
TWI626543B
TWI626543B TW106125611A TW106125611A TWI626543B TW I626543 B TWI626543 B TW I626543B TW 106125611 A TW106125611 A TW 106125611A TW 106125611 A TW106125611 A TW 106125611A TW I626543 B TWI626543 B TW I626543B
Authority
TW
Taiwan
Prior art keywords
data storage
peripheral device
file
storage device
host
Prior art date
Application number
TW106125611A
Other languages
Chinese (zh)
Other versions
TW201911062A (en
Inventor
鄭經煒
Original Assignee
同星科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 同星科技股份有限公司 filed Critical 同星科技股份有限公司
Priority to TW106125611A priority Critical patent/TWI626543B/en
Application granted granted Critical
Publication of TWI626543B publication Critical patent/TWI626543B/en
Publication of TW201911062A publication Critical patent/TW201911062A/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本發明主要提供一種透過資料儲存裝置控制週邊裝置之方法與可控制週邊裝置的資料儲存裝置;其中,所述可控制週邊裝置的資料儲存裝置,其主要包括:一微處理單元、一第一通訊單元與一儲存單元;其中,本發明係基於一檔案系統而將儲存單元分割為複數個資料儲存區塊與一檔案表區塊,並進一步地將儲存有至少一操作資料檔案的至少一個資料儲存區塊設定或定義為至少一週邊裝置控制區塊。如此規劃,主機僅需要變更或編輯儲存於所述資料儲存裝置之週邊裝置控制區塊之中的操作資料檔案之內容,便可以達成操作週邊裝置之目的。因此,週邊裝置的開發商僅僅需要開發所述資料儲存裝置的驅動程式以及用來存取所述操作資料檔案的一特定操作資料存取程式,不需要同時開發相容於微軟的視窗作業系統、iOS系統、MAC系統、Android系統、與Linux作業系統的週邊裝置驅動程式。The present invention mainly provides a method for controlling a peripheral device through a data storage device and a data storage device for controlling the peripheral device. The data storage device for controlling the peripheral device mainly includes: a micro processing unit and a first communication The unit and a storage unit; wherein the present invention divides the storage unit into a plurality of data storage blocks and a file table block based on a file system, and further stores at least one data stored in the at least one operation data file The block is set or defined as at least one peripheral device control block. In this way, the host only needs to change or edit the content of the operation data file stored in the control device of the peripheral device of the data storage device, so as to achieve the purpose of operating the peripheral device. Therefore, the developer of the peripheral device only needs to develop the driver of the data storage device and a specific operation data access program for accessing the operation data file, and does not need to simultaneously develop a Windows operating system compatible with Microsoft. Peripheral device driver for iOS system, MAC system, Android system, and Linux operating system.

Description

透過資料儲存裝置控制週邊裝置之方法與可控制週邊裝置的資料儲存裝置Method for controlling peripheral device through data storage device and data storage device for controlling peripheral device

本發明係關於電子週邊產品之技術領域,尤指一種透過資料儲存裝置控制週邊裝置之方法與可控制週邊裝置的資料儲存裝置。The invention relates to the technical field of electronic peripheral products, in particular to a method for controlling peripheral devices through a data storage device and a data storage device for controlling peripheral devices.

隨著電子科技的發展,使用者對於電腦或電子產品的附加功能的要求也越來越多,是以各種週邊裝置因此對應地被設計與開發,例如:手寫板、印表機、標籤機、喇叭、隨身硬碟、隨身碟、遊戲搖桿、光碟機、無線網卡、與數位攝影機。如圖1所顯示的電腦主機之立體圖所示,為了使得電腦主機內的中央處理器能夠操作該些週邊裝置,各種輸入/輸出(Input/Output, I/O)介面也因而被整合於主機板之上。早期,火線介面(Firewire, IEEE-1394)、通用串行總線(Universal serial bus, USB)、序列資料通訊介面(EIA-RS-232, RS232)、並列資料通訊介面(Parallel Port)、乙太網路介面(Ethernet port, RJ45)經常為電腦主機不可或缺的輸入/輸出介面;然而,隨著電腦科技與可攜式電子裝置的快速發展,能夠支援隨插即用(Plug-and-Play, PNP)的通訊介面逐漸成為電子產品之間I/O介面的主流,例如:USB介面、並行ATA介面(Parallel advanced technology attachment, PATA)、串行ATA介面(Serial advanced technology attachment, SATA)、ISA介面(Industry standard architecture, ISA)。With the development of electronic technology, users have more and more requirements for additional functions of computers or electronic products. Therefore, various peripheral devices are correspondingly designed and developed, such as: tablet, printer, label machine, Speakers, portable hard drives, flash drives, game joysticks, CD players, wireless network cards, and digital cameras. As shown in the perspective view of the computer mainframe shown in FIG. 1, various input/output (I/O) interfaces are integrated into the motherboard in order to enable the central processing unit in the mainframe to operate the peripheral devices. Above. Early, Firewire (IEEE-1394), Universal Serial Bus (USB), Serial Data Communication Interface (EIA-RS-232, RS232), Parallel Port, Parallel Port, Ethernet The Ethernet interface (RJ45) is often an indispensable input/output interface for computer mainframes; however, with the rapid development of computer technology and portable electronic devices, it can support Plug-and-Play (Plug-and-Play, The communication interface of PNP) has gradually become the mainstream of I/O interface between electronic products, such as: USB interface, Parallel advanced technology attachment (PATA), Serial ATA interface (SATA), ISA interface. (Industry standard architecture, ISA).

通用序列匯流排技術(Universal Serial Bus, USB)支援熱插拔與隨插即用的特性使得如桌上型電腦與筆記型電腦之主機易於連接一具備USB介面的週邊設備。當一USB週邊裝置被耦接至電腦主機時,作業系統會對該USB週邊裝置進行一列舉程序(USB Enumeration)。以微軟的視窗作業系統XP (Windows XP)為例,該列舉程序包括以下步驟: (S1’):視窗作業系統初始化該USB週邊裝置,並將該USB週邊裝置之一裝置位址預設為0; (S2’):視窗作業系統要求USB週邊裝置回覆總長度為64 bytes的一裝置描述資訊(Device Descriptors); (S3’):重置USB週邊裝置,並送出一設定位址指令(Set Address command)至該USB週邊裝置,進而給予USB週邊裝置一個裝置位址; (S4’):視窗作業系統要求USB週邊裝置回覆總長度為18 bytes的裝置描述資訊,以獲知該USB週邊裝置的基礎資訊,例如供應商ID(Vender ID, VID)與產品ID(Product ID, PID); (S5’):視窗作業系統要求USB週邊裝置回覆一模式描述資訊(Configuration Descriptors),以獲知該USB週邊裝置的介面數量(bNumInterfaces); (S6’):視窗作業系統要求USB週邊裝置回覆介面描述資訊(Interface Descriptors),以獲知該USB週邊裝置的端點的數量(bNumEndpoints); (S7’):視窗作業系統要求USB週邊裝置回覆端點描述資訊(Endpoint Descriptors),以獲知該端點的資料傳輸模式(bmAttributes);以及 (S8’):於作業系統中自動安裝該USB週邊裝置的驅動程式(必要時使用者必須下載驅動程式並手動安裝)。The Universal Serial Bus (USB) supports hot-swap and plug-and-play features that make it easy to connect a host computer with a laptop to a peripheral device with a USB interface. When a USB peripheral device is coupled to the host computer, the operating system performs a USB Enumeration on the USB peripheral device. Taking Microsoft's Windows operating system XP (Windows XP) as an example, the enumeration program includes the following steps: (S1'): The Windows operating system initializes the USB peripheral device, and presets a device address of the USB peripheral device to 0. (S2'): The Windows operating system requires the USB peripheral device to reply to a device description (Device Descriptors) with a total length of 64 bytes; (S3'): reset the USB peripheral device and send a set address command (Set Address Command) to the USB peripheral device, and then give a USB peripheral device a device address; (S4'): The Windows operating system requires the USB peripheral device to reply to the device description information with a total length of 18 bytes to know the basic information of the USB peripheral device. For example, Vendor ID (VID) and Product ID (PID); (S5'): The Windows operating system requires the USB peripheral device to reply to a Configuration Descriptors to know the USB peripheral device. Interface number (bNumInterfaces); (S6'): Windows operating system requires USB peripheral device to reply to interface description information (Interface Descriptors) to know the USB peripheral device Number of endpoints (bNumEndpoints); (S7'): The Windows operating system requires the USB peripheral device to reply to the Endpoint Descriptors to know the data transfer mode (bmAttributes) of the endpoint; and (S8'): The driver for the USB peripheral device is automatically installed in the operating system (the user must download the driver and install it manually if necessary).

如熟悉週邊裝置設計與製造的工程師所熟知的,其它作業系統,例如:蘋果的iOS系統、蘋果的MAC系統、谷歌的Android系統、或Linux作業系統,其所使用的列舉程序的執行步驟可能不會完全相同於上述之列舉步驟(S1’)-(S8’)。除此之外,針對所述USB週邊裝置,供應商可能僅對應地開發了相容於視窗作業系統的驅動程式,而沒有開發相容於iOS系統、MAC系統;Android系統、與/或Linux作業系統的驅動程式。因為這個原因,導致部分市售的USB週邊裝置僅能夠支援安裝特定作業系統的電腦主機。是以,如何令USB週邊裝置能夠相容各種不同的作業系統,於是成為USB週邊裝置供應商的最大課題。As is familiar to engineers familiar with the design and manufacture of peripheral devices, other operating systems, such as Apple's iOS system, Apple's MAC system, Google's Android system, or Linux operating system, may not use the enumeration procedures. It will be identical to the enumeration steps (S1')-(S8') described above. In addition, for the USB peripheral device, the vendor may only develop a driver compatible with the Windows operating system, and the development is compatible with the iOS system, the MAC system, the Android system, and/or the Linux operation. The driver for the system. For this reason, some commercially available USB peripheral devices can only support computer hosts that install a specific operating system. Therefore, how to make USB peripheral devices compatible with various operating systems has become the biggest issue for USB peripheral device suppliers.

美國專利號US7,921,244揭示一種USB週邊裝置。根據圖2所示的USB週邊裝置的架構圖,吾人可以得知此USB週邊裝置1’為一資料儲存裝置,並包括:一微處理器11’、一第一USB單元12’、 一第二USB單元13’、與一儲存單元14’;其中,該第一USB單元12’用以連接至一第一主機(Host)2’所具有的一第一USB介面21’,且該第二USB單元13’則用以連接至一第二主機3’所具有的一第二USB介面31’。如此,第一主機2’內的第一中央處理器22’便可透過第一USB介面21’與第一USB單元12’所建立的輸入/輸出通道而存取儲存於該儲存單元14’內的資料;同樣地,第二主機3’內的第二中央處理器32’也可以透過第二USB介面31’與第二USB單元13’所建立的輸入/輸出通道而存取儲存於該儲存單元14’內的資料。U.S. Patent No. 7,921,244 discloses a USB peripheral device. According to the architecture diagram of the USB peripheral device shown in FIG. 2, we can know that the USB peripheral device 1' is a data storage device, and includes: a microprocessor 11', a first USB unit 12', and a second The USB unit 13' is connected to a storage unit 14'; wherein the first USB unit 12' is connected to a first USB interface 21' of a first host 2', and the second USB is The unit 13' is connected to a second USB interface 31' of a second host 3'. In this manner, the first central processing unit 22 ′ in the first host 2 ′ can be accessed and stored in the storage unit 14 ′ through the input/output channels established by the first USB interface 21 ′ and the first USB unit 12 ′. Similarly, the second central processing unit 32' in the second host 3' can also be accessed and stored in the storage through the input/output channels established by the second USB interface 31' and the second USB unit 13'. Information within unit 14'.

值得說明的是,USB週邊裝置1’的儲存單元14’之中係儲存有大量驅動程式,且微處理器11’的暫存器內嵌有一自動安裝程式。如此設置,當第一主機2’或第二主機3’完成所述USB週邊裝置1’的列舉程序(USB Enumeration)之後,該自動安裝程式即立刻地於該些大量驅動程式之中找出可與第一主機2’或第二主機3’的作業系統相容的驅動程式,然後將該驅動程式儲存至第一主機2’內的第一儲存裝置23’與第二主機3’內的第二儲存裝置33’;最終,自動安裝程式會自動地將相容版本的驅動程式安裝於第一主機2’與第二主機3’作業系統之中。It should be noted that a large number of drivers are stored in the storage unit 14' of the USB peripheral device 1', and an automatic installer is embedded in the register of the microprocessor 11'. In this way, after the first host 2' or the second host 3' completes the enumeration process (USB Enumeration) of the USB peripheral device 1', the automatic installer immediately finds among the large number of drivers. a driver compatible with the operating system of the first host 2' or the second host 3', and then storing the driver to the first storage device 23' and the second host 3' in the first host 2' Second, the storage device 33'; finally, the automatic installer automatically installs the compatible version of the driver in the first host 2' and the second host 3' operating system.

熟悉週邊電子裝置設計與製造的工程師可以很快地發現,美國專利號US7,921,244係透過將相容於各種不同的作業系統的驅動程式全部儲存於所述USB週邊裝置1’之中,藉以解決該USB週邊裝置1’於不同作業系統之中的相容性問題;然而,美國專利號US7,921,244所提出的解決方案於實務應用上顯示出諸多缺陷: (1)肇因於大量的驅動程式佔據了USB週邊裝置1’(即,資料儲存裝置)的儲存單元14’太多記憶空間,造成該USB週邊裝置1’的終端使用者權利受到損害。更詳細地說,假設終端使用者所購買的USB週邊裝置1’理論上應具有4GB,然而實際上卻可能僅剩下3.5GB。 (2)另一方面,若所述USB週邊裝置1’同時具有例如RS-232介面或SATA介面等非USB單元,使用者將此USB週邊裝置1’連接至具有RS-232介面或SATA介面的主機之後,又自行下載並於該主機的作業系統內安裝相關的驅動程式。可想而知,週邊裝置的供應商不可能把相容於各種作業系統的非USB介面的驅動程式一併預儲存於USB週邊裝置1’的儲存單元14’內。Engineers familiar with the design and manufacture of peripheral electronic devices can quickly find that U.S. Patent No. 7,921,244 is solved by storing all drivers compatible with various operating systems in the USB peripheral device 1'. The compatibility of the USB peripheral device 1' in different operating systems; however, the solution proposed by US Pat. No. 7,921,244 shows many drawbacks in practical applications: (1) Due to a large number of drivers The storage unit 14' occupying the USB peripheral device 1' (ie, the data storage device) has too much memory space, causing damage to the end user rights of the USB peripheral device 1'. In more detail, it is assumed that the USB peripheral device 1' purchased by the terminal user should theoretically have 4 GB, but in reality, only 3.5 GB may be left. (2) On the other hand, if the USB peripheral device 1' has a non-USB unit such as an RS-232 interface or a SATA interface, the user connects the USB peripheral device 1' to an RS-232 interface or a SATA interface. After the host, it downloads itself and installs the relevant drivers in the host's operating system. It is conceivable that the peripheral device supplier cannot pre-store the driver of the non-USB interface compatible with the various operating systems in the storage unit 14' of the USB peripheral device 1'.

基於上述理由,本案之發明人係極力加以研究發明,而終於研發完成本發明之一種透過資料儲存裝置控制週邊裝置之方法與一種可控制週邊裝置的資料儲存裝置。Based on the above reasons, the inventors of the present invention have tried their best to study the invention, and finally developed a method for controlling the peripheral device through the data storage device and a data storage device for controlling the peripheral device.

本發明主要提供一種透過資料儲存裝置控制週邊裝置之方法;並且,為了利於實現此方法,本發明同時提供一種可控制週邊裝置的資料儲存裝置,其主要包括:一微處理單元、一第一通訊單元與一儲存單元;其中,本發明係基於一檔案系統而將儲存單元分割為複數個資料儲存區塊與一檔案表區塊,並進一步地將儲存有至少一操作資料檔案的至少一個資料儲存區塊設定或定義為至少一週邊裝置控制區塊。如此規劃,主機僅需要變更或編輯儲存於所述資料儲存裝置之週邊裝置控制區塊之中的操作資料檔案之內容,便可以達成操作週邊裝置之目的。因此,週邊裝置的開發商僅僅需要開發所述資料儲存裝置的驅動程式以及用來存取所述操作資料檔案的一特定操作資料存取程式,不需要同時開發相容於視窗作業系統、iOS系統、MAC系統、Android系統、與Linux作業系統的週邊裝置驅動程式。The present invention mainly provides a method for controlling a peripheral device through a data storage device; and, in order to facilitate the implementation of the method, the present invention also provides a data storage device capable of controlling a peripheral device, which mainly includes: a micro processing unit, a first communication The unit and a storage unit; wherein the present invention divides the storage unit into a plurality of data storage blocks and a file table block based on a file system, and further stores at least one data stored in the at least one operation data file The block is set or defined as at least one peripheral device control block. In this way, the host only needs to change or edit the content of the operation data file stored in the control device of the peripheral device of the data storage device, so as to achieve the purpose of operating the peripheral device. Therefore, the developer of the peripheral device only needs to develop the driver of the data storage device and a specific operation data access program for accessing the operation data file, and does not need to simultaneously develop and be compatible with the Windows operating system and the iOS system. , MAC system, Android system, peripheral device driver with Linux operating system.

為了達成上述本發明之主要目的,本案之發明人係首先提供所述透過資料儲存裝置控制週邊裝置之方法之一實施例,係包括以下步驟: (1)將一資料儲存裝置連接至一週邊裝置,其中,該週邊裝置係直接與一主機相互通訊或透過該資料儲存裝置與該主機相互通訊;並且,該資料儲存裝置之中的一資料儲存單元係基於一檔案系統而配置有複數個資料儲存區塊與至少一檔案表區塊;並且,該主機的一作業系統係安裝有一操作資料存取程式; (2)自該檔案表區塊之中讀取至少一檔案表,並透過該檔案表於該資料儲存單元之中找出儲存有至少一操作資料檔案的至少一個資料儲存區塊; (3)將所述儲存有操作資料檔案的資料儲存區塊設定為一週邊裝置控制區塊;以及 (4)利用該操作資料存取程式變更該操作資料檔案之內容,使得該週邊裝置根據變更後的該操作資料檔案之內容而進行相應作動。In order to achieve the above-mentioned primary object of the present invention, the inventor of the present invention first provides an embodiment of the method for controlling a peripheral device through the data storage device, which comprises the following steps: (1) connecting a data storage device to a peripheral device The peripheral device communicates with a host directly or communicates with the host through the data storage device; and a data storage unit of the data storage device is configured with a plurality of data storages based on a file system. a block and at least one file table block; and, an operating system of the host is installed with an operation data access program; (2) reading at least one file table from the file table block, and through the file table Locating at least one data storage block storing at least one operation data file in the data storage unit; (3) setting the data storage block storing the operation data file as a peripheral device control block; (4) using the operation data access program to change the content of the operation data file, so that the peripheral device is based on the changed operation Contents of data files and the corresponding actuator.

並且,為了達成上述本發明之主要目的,本案之發明人同時提供所述可控制週邊裝置的資料儲存裝置之一實施例,係包括: 一微處理單元; 一通訊單元,係耦接該微處理單元,並用以連接一週邊裝置的一第一通訊介面;其中,該週邊裝置係以其一第二通訊介面連接一主機; 一儲存單元,係基於一檔案系統而被分割為複數個資料儲存區塊與一檔案表區塊;其中,儲存有至少一操作資料檔案的該些資料儲存區塊被設為至少一週邊裝置控制區塊,且該檔案表區塊內係儲存有至少一檔案表; 其中,所述主機可透過該微處理單元查詢該檔案表以獲知所述週邊裝置控制區塊的位址,並進一步地藉由變更該操作資料檔案之內容的方式,操作該週邊裝置。And, in order to achieve the above-mentioned primary object of the present invention, the inventor of the present invention simultaneously provides an embodiment of the data storage device of the controllable peripheral device, comprising: a micro processing unit; a communication unit coupled to the micro processing And a first communication interface for connecting a peripheral device; wherein the peripheral device is connected to a host by a second communication interface; a storage unit is divided into a plurality of data storage areas based on a file system a block and a file table block; wherein the data storage blocks storing at least one operation data file are set as at least one peripheral device control block, and the file table block stores at least one file table; The host may query the file table through the micro processing unit to learn the address of the peripheral device control block, and further operate the peripheral device by changing the content of the operation data file.

進一步地,為了達成上述本發明之主要目的,本案之發明人又在提供所述可控制週邊裝置的資料儲存裝置之另一實施例,係包括: 一微處理單元; 一第一通訊單元,係耦接該微處理單元,並用以連接一週邊裝置的一通訊介面; 一第二通訊單元,係耦接該微處理單元,並用以連接一主機的一輸入/輸出介面;以及 一儲存單元,係基於一檔案系統而被分割為複數個資料儲存區塊與一檔案表區塊;其中,儲存有至少一操作資料檔案的該些資料儲存區塊被設為至少一週邊裝置控制區塊,且該檔案表區塊內係儲存有至少一檔案表; 其中,所述主機可透過該微處理單元查詢該檔案表以獲知所述週邊裝置控制區塊的位址,並進一步地藉由變更該操作資料檔案之內容的方式,操作該週邊裝置。Further, in order to achieve the above-mentioned primary object of the present invention, the inventor of the present invention further provides another embodiment of the data storage device of the controllable peripheral device, comprising: a micro processing unit; a first communication unit The second processing unit is coupled to the micro processing unit and coupled to an input/output interface of a host; and a storage unit is coupled to the micro processing unit and coupled to a communication interface of a peripheral device; Dividing into a plurality of data storage blocks and a file table block based on a file system; wherein the data storage blocks storing at least one operation data file are set as at least one peripheral device control block, and the Storing at least one file table in the file table block; wherein the host can query the file table through the micro processing unit to learn the address of the peripheral device control block, and further change the operation data The manner of the contents of the file, the peripheral device is operated.

為了能夠更清楚地描述本發明所提出之一種透過資料儲存裝置控制週邊裝置之方法與一種可控制週邊裝置的資料儲存裝置,以下將配合圖式,詳盡說明本發明之較佳實施例。In order to more clearly describe a method for controlling a peripheral device through a data storage device and a data storage device for controlling a peripheral device, a preferred embodiment of the present invention will be described in detail below with reference to the drawings.

開始說明本發明之一種可控制週邊裝置的資料儲存裝置之前,必須介紹用以協助資料儲存裝置有系統地組織、配置資料的檔案系統(File system)。FAT為習知的一種檔案系統,是由微軟所開發且被稱為檔案分配表(File allocation table)。值得說明的是,依據最大可分割磁碟區(Volume)進行分類,FAT又可以進一步地分為FAT12、FAT16、FAT32、與exFAT(FAT64)。不同於微軟基於檔案分配表所開發的各種FAT檔案系統,Linux陣營也提出所謂的延伸檔案系統(Extended file system, ext)。當然,除了上述提及的檔案系統以外,還包括例如NTFS、HFS+等其他檔案系統。Before beginning to explain a data storage device for controlling a peripheral device of the present invention, it is necessary to introduce a file system for assisting the data storage device to systematically organize and configure data. FAT is a well-known file system developed by Microsoft and called the File Allocation Table. It is worth noting that the FAT can be further classified into FAT12, FAT16, FAT32, and exFAT (FAT64) according to the maximum separable disk volume. Unlike the various FAT file systems developed by Microsoft based on the file allocation table, the Linux camp also proposes the so-called Extended file system (ext). Of course, in addition to the file system mentioned above, other file systems such as NTFS, HFS+, etc. are also included.

請參閱圖3,係顯示FAT檔案系統的架構圖。如圖3所示,FAT檔案系統會於一資料儲存裝置的一資料儲存單元中規劃出一主啟動區F1、一檔案分配表F2、一根目錄F4、與一資料儲存區F5。另一方面,根據圖4所顯示ext檔案系統的架構圖,可以得知ext檔案系統會於一資料儲存單元中規劃出一開機區(boot sector)e1與多個群組區塊(block group),包括:群組區塊0(e2)、群組區塊1(e3)、群組區塊2(e4)等。進一步地,再於每個群組區塊之中,例如群組區塊1(e3),又分割成一備份用超級區(backup super block)e31、一檔案系統描述區(group descriptor)e32、一區塊位元圖(block bitmap)e33、一Inode位元圖(Inode bitmap)e34、一Inode表(Inode table)e35、與一資料儲存區e36。Please refer to Figure 3, which shows the architecture of the FAT file system. As shown in FIG. 3, the FAT file system plans a main boot area F1, a file allocation table F2, a directory F4, and a data storage area F5 in a data storage unit of a data storage device. On the other hand, according to the architecture diagram of the ext file system shown in FIG. 4, it can be known that the ext file system will plan a boot sector e1 and a plurality of block groups in a data storage unit. Including: group block 0 (e2), group block 1 (e3), group block 2 (e4), and the like. Further, in each group block, for example, group block 1 (e3), it is further divided into a backup super block e31, a file system description group e32, and a A block bitmap e33, an inode bitmap (enode bitmap) e34, an inode table e35, and a data storage area e36.

比較圖3與圖4可以得知,無論是FAT或ext檔案系統,皆會在資料儲存單元內規劃出用以紀錄儲存檔案與儲存區塊位址之關聯性的檔案表。以FAT檔案系統而言,所述檔案表包括檔案分配表F2與根目錄F4;並且,以ext檔案系統而言,所述檔案表則包括:檔案系統描述區e32、區塊位元圖e33、Inode位元圖e34、與Inode表e35。Comparing FIG. 3 with FIG. 4, it can be seen that both the FAT and the ext file system will plan an archive table for recording the association between the storage file and the storage block address in the data storage unit. In the case of the FAT file system, the file table includes a file allocation table F2 and a root directory F4; and, in the case of an ext file system, the file table includes: a file system description area e32, a block bit map e33, Inode bit map e34, and Inode table e35.

因此,本案發明人基於本身在資料儲存裝置與週邊裝置的長期設計經驗,開發出可令電腦主機透過資料儲存裝置內的檔案系統來控制週邊裝置之新技術,特別是指一種透過資料儲存裝置控制週邊裝置之方法以及一種可控制週邊裝置的資料儲存裝置。請參閱圖5,係顯示本發明之一種透過資料儲存裝置控制週邊裝置之方法的流程圖,主要包括以下步驟: 步驟(S1):將一資料儲存裝置連接至一週邊裝置,其中,該資料儲存裝置之中的一資料儲存單元係基於一檔案系統而配置有複數個資料儲存區塊與至少一檔案表區塊;並且,該主機的一作業系統係安裝有一操作資料存取程式; 步驟(S2):自該檔案表區塊之中讀取至少一檔案表,並透過該檔案表於該資料儲存單元之中找出儲存有至少一操作資料檔案的至少一個資料儲存區塊; 步驟(S3):將所述儲存有操作資料檔案的資料儲存區塊設定為一週邊裝置控制區塊;以及 步驟(S4):利用該操作資料存取程式變更該操作資料之內容,使得該週邊裝置根據變更後的該操作資料之內容而進行相應作動。Therefore, based on its long-term design experience in data storage devices and peripheral devices, the inventors of the present invention have developed new technologies that enable computer mainframes to control peripheral devices through file systems in data storage devices, especially one that is controlled by data storage devices. A method of peripheral devices and a data storage device that can control peripheral devices. Referring to FIG. 5, a flow chart of a method for controlling a peripheral device through a data storage device according to the present invention mainly includes the following steps: Step (S1): connecting a data storage device to a peripheral device, wherein the data storage device A data storage unit of the device is configured with a plurality of data storage blocks and at least one file table block based on a file system; and an operating system of the host is installed with an operation data access program; Step (S2) Reading at least one file table from the file table block, and finding at least one data storage block storing at least one operation data file in the data storage unit through the file table; Step (S3) : setting the data storage block storing the operation data file as a peripheral device control block; and step (S4): using the operation data access program to change the content of the operation data, so that the peripheral device is changed according to the The contents of the operation data are actuated accordingly.

為了使得本領域的技術人員能夠全然地理解前述說明之本發明的一種透過資料儲存裝置控制週邊裝置之方法的技術特徵,下文將透過裝置立體圖與裝置架構圖的輔助作出進一步的解釋說明。請參閱圖6,係顯示本發明之一種可控制週邊裝置的資料儲存裝置的立體圖;並且,請同時參閱圖7,係顯示可控制週邊裝置的資料儲存裝置的內部架構圖。圖6與圖7主要顯示所述可控制週邊裝置的資料儲存裝置1的第一實施例。於第一實施例中,所述可控制週邊裝置的資料儲存裝置1僅具有單一通訊介面,並以具有金手指電極(card-edge board connector)的記憶卡為其示範性實施例。並且,對應於週邊裝置2(peripheral device)為一顯示器(電子相框),此資料儲存裝置1(記憶卡)主要是用來儲存供所述顯示器顯示的一些儲存圖片資料與視訊資料。在第一實施例之中,本發明也利用此資料儲存裝置1儲存週邊裝置2的一些參數設定資料。In order to enable those skilled in the art to fully understand the technical features of the method of controlling a peripheral device through a data storage device of the present invention as described above, further explanation will be provided below through the assistance of the device perspective view and the device architecture diagram. Please refer to FIG. 6 , which is a perspective view showing a data storage device of a controllable peripheral device according to the present invention; and FIG. 7 is a view showing an internal structure of a data storage device capable of controlling peripheral devices. 6 and 7 mainly show a first embodiment of the data storage device 1 of the controllable peripheral device. In the first embodiment, the data storage device 1 of the controllable peripheral device has only a single communication interface, and a memory card having a card-edge board connector is an exemplary embodiment thereof. Moreover, the peripheral device 2 is a display (electronic photo frame). The data storage device 1 (memory card) is mainly used for storing some stored picture data and video data for display by the display. In the first embodiment, the present invention also utilizes the data storage device 1 to store some parameter setting data of the peripheral device 2.

如圖6與圖7所示,本發明之可控制週邊裝置的資料儲存裝置1(記憶卡)包括:一微處理單元11、一第一通訊單元12(金手指電極)與一儲存單元14,其中第一通訊單元12係耦接該微處理單元11,並用以連接週邊裝置2的第一通訊介面21(記憶卡插槽)。另一方面,週邊裝置2則係以其第二通訊介面22連接至用戶端的主機3(Host device)。As shown in FIG. 6 and FIG. 7, the data storage device 1 (memory card) of the controllable peripheral device of the present invention comprises: a micro processing unit 11, a first communication unit 12 (gold finger electrode) and a storage unit 14, The first communication unit 12 is coupled to the micro processing unit 11 and is configured to connect to the first communication interface 21 (memory card slot) of the peripheral device 2. On the other hand, the peripheral device 2 is connected to the host device 3 of the user terminal by its second communication interface 22.

特別地,本發明係基於一檔案系統而將資料儲存裝置1之中的儲存單元14分割為複數個資料儲存區塊141、至少一週邊裝置控制區塊142、以及一檔案表區塊143;其中,所述週邊裝置控制區塊142與所述檔案表區塊143係由至少一個資料儲存區塊141所組成,用以分別儲存至少一操作資料檔案與至少一檔案表。根據圖3與圖4所揭示內容,熟悉記憶卡與隨身碟設計與開發的電子工程師應該知道,本發明所稱檔案表區塊143可以被視為FAT檔案系統的檔案分配表F2與根目錄F4之集合,也可以被視為ext檔案系統的檔案系統描述區e32、區塊位元圖e33、Inode位元圖e34、與Inode表e35之集合。簡單地說,根據所應用的檔案系統種類上的不同,例如:FAT、FAT8、FAT12、FAT16、FAT32、exFAT、ISO9660、UDF、NTFS、HFS、HFS+、ext2、ext3、或ext4,實務上檔案表區塊143會有不同的實現方式。In particular, the present invention divides the storage unit 14 in the data storage device 1 into a plurality of data storage blocks 141, at least one peripheral device control block 142, and an archive table block 143 based on a file system; The peripheral device control block 142 and the file table block 143 are composed of at least one data storage block 141 for respectively storing at least one operation data file and at least one file table. According to the disclosures of FIG. 3 and FIG. 4, an electronic engineer familiar with the design and development of a memory card and a flash drive should know that the file table block 143 of the present invention can be regarded as the file allocation table F2 and the root directory F4 of the FAT file system. The set may also be regarded as a collection of the file system description area e32, the block bit map e33, the inode bit map e34, and the inode table e35 of the ext file system. Simply put, depending on the type of file system being applied, such as: FAT, FAT8, FAT12, FAT16, FAT32, exFAT, ISO9660, UDF, NTFS, HFS, HFS+, ext2, ext3, or ext4, the actual file table Block 143 will have different implementations.

請繼續地參閱圖3、圖4與圖7。與習知的檔案系統不同的是,本發明係將至少一個資料儲存區塊141定義為用以儲存所述操作資料檔案的週邊裝置控制區塊142。透過這樣的設計規劃,主機3便能夠透過微處理單元11與檔案表區塊143內所儲存的至少一檔案表獲知所述週邊裝置控制區塊142的位址,並進一步地藉由變更儲存於週邊裝置控制區塊142之中的操作資料檔案之內容的方式,達成操作該週邊裝置2之目的。在此,所述主機3可以是行動電子裝置、伺服主機、智慧型手機、平板電腦、智慧手錶、桌上型電腦、筆記型電腦、或工業電腦。Please continue to refer to Figures 3, 4 and 7. Unlike the conventional file system, the present invention defines at least one data storage block 141 as a peripheral device control block 142 for storing the operational data file. Through such a design plan, the host 3 can learn the address of the peripheral device control block 142 through the at least one file table stored in the file processing block 143 and further stored by the change. The manner in which the contents of the data file are manipulated in the peripheral device control block 142 achieves the purpose of operating the peripheral device 2. Here, the host 3 may be a mobile electronic device, a servo host, a smart phone, a tablet, a smart watch, a desktop computer, a notebook computer, or an industrial computer.

更仔細地解說主機3控制週邊裝置2的手段。當主機3的輸入/輸出介面31(USB介面)與週邊裝置2的第二通訊介面22(USB介面)建立通訊之後,主機3在開啟資料儲存裝置1之後便能夠找到monitor.xml檔案。接著,儲存有monitor.xml檔案的資料儲存區塊141會被設定或定義成所謂的週邊裝置控制區塊142。進一步地,主機3的作業系統32可以利用文字編輯軟體開啟monitor.xml並修改螢幕參數值,例如亮度、對比度等。並且,在主機3以修改後的monitor.xml覆寫資料儲存裝置1內的monitor.xml之後,週邊裝置2(顯示器)內的中央處理器20便會依據螢幕參數值而自動地執行相關調整與設定。另一方面,利用影像編輯軟體也可以存取資料儲存裝置1內的圖片檔或視訊檔;或者,作業系統32也可以將主機3的儲存裝置33所儲存圖片檔或視訊檔存入資料儲存區塊141,進而透過週邊裝置2(顯示器)顯示該圖片檔或視訊檔。The means by which the host 3 controls the peripheral device 2 will be explained more closely. After the input/output interface 31 (USB interface) of the host 3 establishes communication with the second communication interface 22 (USB interface) of the peripheral device 2, the host 3 can find the monitor.xml file after the data storage device 1 is turned on. Next, the data storage block 141 storing the monitor.xml file is set or defined as a so-called peripheral device control block 142. Further, the operating system 32 of the host 3 can use the text editing software to open the monitor.xml and modify the screen parameter values, such as brightness, contrast, and the like. Moreover, after the host 3 overwrites the monitor.xml in the data storage device 1 with the modified monitor.xml, the central processing unit 20 in the peripheral device 2 (display) automatically performs the relevant adjustment according to the screen parameter value. set up. On the other hand, the image file or the video file in the data storage device 1 can also be accessed by using the image editing software. Alternatively, the operating system 32 can also store the image file or the video file stored in the storage device 33 of the host computer 3 in the data storage area. Block 141, in turn, displays the picture file or video file through peripheral device 2 (display).

簡單地說,即使主機3的作業系統32沒有安裝用以驅動週邊裝置2(顯示器)的相關應用程式,其仍舊可以透過簡單的文字編輯軟體與影像編輯軟體來操作週邊裝置2(顯示器)。在此,本案發明人特別地將文字編輯軟體與影像編輯軟體簡稱為「操作資料存取程式」,被用來讀取或變更儲存於週邊裝置控制區塊142之中的所述操作資料檔案之內容。必須強調的是,圖6是以記憶卡作為所述資料儲存裝置1的示範性實施例,但並非以此限制資料儲存裝置1的可能實施態樣。因此,根據圖8所顯示的可控制週邊裝置的資料儲存裝置之立體圖,吾人可以得知所述資料儲存裝置1也可以是隨身碟(flash drive)或者隨身硬碟(external hard disk drive)。進一步地,根據圖7與圖8所揭示內容,可以得知主機3的輸入/輸出介面31、週邊裝置2的第一通訊介面21與第二通訊介面22、以及資料儲存裝置1的第一通訊單元12皆為一USB介面。當然,該輸入/輸出介面31、該第一通訊介面21、該第二通訊介面22、與該第一通訊單元12也可以是其它實體通訊介面(Physical communication interface),例如:SATA介面、PATA介面、Lightning介面、乙太網路介面等。Briefly, even if the operating system 32 of the host 3 does not have an associated application for driving the peripheral device 2 (display), it can still operate the peripheral device 2 (display) through a simple text editing software and image editing software. Here, the inventor of the present invention specifically refers to the text editing software and the video editing software as an "operation data access program", which is used to read or change the operation data file stored in the peripheral device control block 142. content. It must be emphasized that FIG. 6 is a memory card as an exemplary embodiment of the data storage device 1, but does not limit the possible implementation of the data storage device 1. Therefore, according to the perspective view of the data storage device of the controllable peripheral device shown in FIG. 8, it can be known that the data storage device 1 can also be a flash drive or an external hard disk drive. Further, according to the disclosures of FIG. 7 and FIG. 8, the input/output interface 31 of the host 3, the first communication interface 21 of the peripheral device 2 and the second communication interface 22, and the first communication of the data storage device 1 can be known. Units 12 are all a USB interface. Certainly, the input/output interface 31, the first communication interface 21, the second communication interface 22, and the first communication unit 12 may also be other physical communication interfaces, such as a SATA interface and a PATA interface. , Lightning interface, Ethernet interface, etc.

圖9係顯示可控制週邊裝置的資料儲存裝置之立體圖,其中顯示所述週邊裝置2也可以是一鏡頭裝置。如圖7與圖9所示,在輸入/輸出介面31與週邊裝置2的第二通訊介面22建立通訊之後,主機3的作業系統32也可以透過特別設計的操作資料存取程式來讀取儲存於該週邊裝置控制區塊142之中的操作資料檔案,進以修改週邊裝置2(鏡頭裝置)的一些參數值,例如曝光值、色彩、白平衡…等,透過這樣的方式達成對週邊裝置2的操作控制。另一方面,主機3的作業系統32可以在開啟資料儲存裝置1之後看到許多未經加工或轉檔的原始圖檔,例如: camera_4K.bmp、camera_8M.bmp等原始圖檔。此時,主機3的作業系統32便可以利用影像編輯軟體開啟該些原始圖檔。9 is a perspective view showing a data storage device that can control peripheral devices, wherein the peripheral device 2 is also shown as a lens device. As shown in FIG. 7 and FIG. 9, after the input/output interface 31 establishes communication with the second communication interface 22 of the peripheral device 2, the operating system 32 of the host computer 3 can also be read and stored through a specially designed operation data access program. The operating data file in the peripheral device control block 142 is modified to modify some parameter values of the peripheral device 2 (lens device), such as exposure value, color, white balance, etc., to achieve the peripheral device 2 in this manner. Operational control. On the other hand, the operating system 32 of the host 3 can see many raw images that have not been processed or transferred after the data storage device 1 is turned on, for example, original image files such as camera_4K.bmp, camera_8M.bmp, and the like. At this time, the operating system 32 of the host computer 3 can open the original image files by using the image editing software.

請參閱圖10,係顯示本發明之可控制週邊裝置的資料儲存裝置的立體圖;並且,請同時參閱圖11,係顯示可控制週邊裝置的資料儲存裝置的內部架構圖。根據圖10與圖11可以得知,所述可控制週邊裝置的資料儲存裝置1的示範性實施例為隨身碟,其具有一個USB通訊介面與一個串行端口終端(Serial port terminal);並且,所述週邊裝置2為一標籤機(Label printer)。如圖10與圖11所示,本發明之可控制週邊裝置的資料儲存裝置1包括一微處理單元11、一第一通訊單元12(串行端口終端)、一第二通訊單元13(USB介面)、與一儲存單元14,其中該第一通訊單元12係耦接該微處理單元11,並用以連接週邊裝置2的一第一通訊介面21(串行端口終端)。另一方面,第二通訊單元13係也是連接至該微處理單元11,並用以連接主機3的輸入/輸出介面31(USB介面)。Please refer to FIG. 10, which is a perspective view showing a data storage device of the controllable peripheral device of the present invention; and, referring to FIG. 11, a internal architecture diagram of a data storage device capable of controlling peripheral devices. 10 and FIG. 11, an exemplary embodiment of the data storage device 1 of the controllable peripheral device is a flash drive having a USB communication interface and a serial port terminal; The peripheral device 2 is a label printer. As shown in FIG. 10 and FIG. 11, the data storage device 1 of the controllable peripheral device of the present invention comprises a micro processing unit 11, a first communication unit 12 (serial port terminal), and a second communication unit 13 (USB interface). And a storage unit 14 , wherein the first communication unit 12 is coupled to the micro processing unit 11 and is configured to connect a first communication interface 21 (serial port terminal) of the peripheral device 2 . On the other hand, the second communication unit 13 is also connected to the micro processing unit 11 and is used to connect the input/output interface 31 (USB interface) of the host 3.

更詳細地說明實施例二。當主機3的輸入/輸出介面31(USB介面)與週邊裝置2的第二通訊介面22(USB介面)建立通訊之後,主機3在開啟資料儲存裝置1之後便能夠找到serial.io檔案。接著,儲存有serial.io檔案的資料儲存區塊141會被設定或定義成所謂的週邊裝置控制區塊142。進一步地,主機3的作業系統32可以利用編輯軟體開啟serial.io並修改其內容。之後,週邊裝置2(標籤機)內的中央處理器20便會依據serial.io的內容驅動標籤機執行相應作動作,例如印出一收貨單(Receipt)。The second embodiment will be described in more detail. After the input/output interface 31 (USB interface) of the host 3 establishes communication with the second communication interface 22 (USB interface) of the peripheral device 2, the host computer 3 can find the serial.io file after the data storage device 1 is turned on. Next, the data storage block 141 storing the serial.io file is set or defined as a so-called peripheral device control block 142. Further, the operating system 32 of the host 3 can use the editing software to open the serial.io and modify its contents. Thereafter, the central processing unit 20 in the peripheral device 2 (labeler) drives the labeling machine to perform a corresponding action according to the content of the serial.io, for example, printing a receipt (Receipt).

簡單地說,只要應用本發明之一種透過資料儲存裝置控制週邊裝置的方法,主機3的作業系統32之中不需要安裝任何用以驅動標籤機的應用程式,而只需要透過存取資料儲存裝置1之中所儲存的該標籤機的操作資料檔案(即,serial.io檔案)的方式,便可以直接地與週邊裝置2(標籤機)通訊。顯然地,本發明所提供的新式週邊裝置控制技術顯示出諸多優點,包括: (1)週邊裝置的開發商僅僅需要開發資料儲存裝置1的驅動程式以及用來讀取或變更儲存於週邊裝置控制區塊142之中的操作資料檔案之內容的「操作資料存取程式」,不需要同時開發相容於微軟的視窗作業系統(Windows)、蘋果的iOS系統、蘋果的麥金塔(MAC)系統、谷歌的Android系統、與Linux作業系統的週邊裝置驅動程式。 (2)另一方面,終端使用者只需要使用此資料儲存裝置1並於主機3的作業系統32內安裝對應的操作資料存取程式,便可以輕鬆地控制任何一種週邊裝置2。Briefly, as long as the method for controlling the peripheral device through the data storage device is applied, the application system 32 of the host computer 3 does not need to install any application for driving the labeling machine, but only needs to access the data storage device. The operation data file (ie, the serial.io file) of the labeler stored in 1 can be directly communicated with the peripheral device 2 (labeler). Obviously, the novel peripheral device control technology provided by the present invention exhibits many advantages, including: (1) The developer of the peripheral device only needs to develop the driver of the data storage device 1 and to read or change the storage device to be controlled by the peripheral device. The "Operational Data Access Program" of the contents of the operation data file in the block 142 does not need to simultaneously develop a Windows operating system (Windows) compatible with Microsoft, Apple's iOS system, and Apple's Macintosh system. , Google's Android system, and peripheral device drivers for the Linux operating system. (2) On the other hand, the terminal user can easily control any of the peripheral devices 2 by simply using the data storage device 1 and installing a corresponding operation data access program in the operating system 32 of the host computer 3.

必須加以強調的是,上述之詳細說明係針對本發明可行實施例之具體說明,惟該實施例並非用以限制本發明之專利範圍,凡未脫離本發明技藝精神所為之等效實施或變更,均應包含於本案之專利範圍中。It is to be understood that the foregoing detailed description of the embodiments of the present invention is not intended to Both should be included in the scope of the patent in this case.

<本發明>
S1~S4‧‧‧方法步驟
F1‧‧‧主啟動區
F2‧‧‧檔案分配表
F4‧‧‧根目錄
F5‧‧‧資料儲存區
e1‧‧‧開機區
e2‧‧‧群組區塊0
e3‧‧‧群組區塊1
e4‧‧‧群組區塊2
e31‧‧‧備份用超級區
e32‧‧‧檔案系統描述區
e33‧‧‧區塊位元圖
e34‧‧‧Inode位元圖
e35‧‧‧Inode表
e36‧‧‧資料儲存區
1‧‧‧資料儲存裝置
2‧‧‧週邊裝置
11‧‧‧微處理單元
12‧‧‧第一通訊單元
14‧‧‧儲存單元
21‧‧‧第一通訊介面
22‧‧‧第二通訊介面
3‧‧‧主機
141‧‧‧資料儲存區塊
142‧‧‧週邊裝置控制區塊
143‧‧‧檔案表區塊
31‧‧‧輸入/輸出介面
32‧‧‧作業系統
33‧‧‧儲存裝置
13‧‧‧第二通訊單元
20‧‧‧中央處理器
<present invention>
S1~S4‧‧‧ method steps
F1‧‧‧ main starting area
F2‧‧‧ file allocation table
F4‧‧‧ root directory
F5‧‧‧data storage area
E1‧‧‧ boot area
E2‧‧‧Group Block 0
E3‧‧‧Group Block 1
E4‧‧‧Group Block 2
E31‧‧‧Backup super zone
E32‧‧‧File System Description Area
E33‧‧‧ Block bitmap
E34‧‧‧Inode bit map
E35‧‧‧Inode table
E36‧‧‧data storage area
1‧‧‧ data storage device
2‧‧‧ peripheral devices
11‧‧‧Microprocessing unit
12‧‧‧First communication unit
14‧‧‧storage unit
21‧‧‧First Communication Interface
22‧‧‧Second communication interface
3‧‧‧Host
141‧‧‧data storage block
142‧‧‧ Peripheral device control block
143‧‧‧Archives block
31‧‧‧Input/Output Interface
32‧‧‧Operating system
33‧‧‧Storage device
13‧‧‧Second communication unit
20‧‧‧Central processor

<習知>
1’‧‧‧USB週邊裝置
11’‧‧‧微處理器
12’‧‧‧第一USB單元
13’‧‧‧第二USB單元
14’‧‧‧儲存單元
2’‧‧‧第一主機
21’‧‧‧第一USB介面
3’‧‧‧第二主機
31’‧‧‧第二USB介面
22’‧‧‧第一中央處理器
32’‧‧‧第二中央處理器
23'‧‧‧第一儲存裝置
33'‧‧‧第二儲存裝置
<知知>
1'‧‧‧USB peripheral device
11'‧‧‧Microprocessor
12'‧‧‧First USB Unit
13'‧‧‧Second USB unit
14'‧‧‧ storage unit
2'‧‧‧First host
21'‧‧‧First USB interface
3'‧‧‧Second host
31'‧‧‧Second USB interface
22'‧‧‧First Central Processing Unit
32'‧‧‧second central processor
23'‧‧‧First storage device
33'‧‧‧Second storage device

圖1係顯示電腦主機之立體圖; 圖2係USB週邊裝置的架構圖; 圖3係顯示FAT檔案系統的架構圖; 圖4係顯示ext檔案系統的架構圖; 圖5係顯示本發明之一種透過資料儲存裝置控制週邊裝置之方法的流程圖; 圖6係顯示本發明之一種可控制週邊裝置的資料儲存裝置的立體圖; 圖7係顯示可控制週邊裝置的資料儲存裝置的內部架構圖; 圖8係顯示可控制週邊裝置的資料儲存裝置之立體圖; 圖9係顯示可控制週邊裝置的資料儲存裝置之立體圖; 圖10係顯示本發明之可控制週邊裝置的資料儲存裝置的立體圖; 圖11係顯示可控制週邊裝置的資料儲存裝置的內部架構圖。1 is a perspective view of a computer mainframe; FIG. 2 is an architectural diagram of a USB peripheral device; FIG. 3 is an architectural diagram showing a FAT file system; FIG. 4 is an architectural diagram showing an ext file system; FIG. 6 is a perspective view showing a data storage device of a controllable peripheral device of the present invention; FIG. 7 is a view showing an internal structure of a data storage device capable of controlling peripheral devices; Figure 11 is a perspective view showing a data storage device capable of controlling peripheral devices; Figure 9 is a perspective view showing a data storage device for controlling peripheral devices; Figure 10 is a perspective view showing a data storage device of the controllable peripheral device of the present invention; An internal architecture diagram of a data storage device that can control peripheral devices.

Claims (19)

一種透過資料儲存裝置控制週邊裝置之方法,係包括以下步驟: (1)將一資料儲存裝置連接至一週邊裝置,其中,該週邊裝置係直接與一主機相互通訊或透過該資料儲存裝置與該主機相互通訊;並且,該資料儲存裝置之中的一資料儲存單元係基於一檔案系統而配置有複數個資料儲存區塊與至少一檔案表區塊;並且,該主機的一作業系統係安裝有一操作資料存取程式; (2)自該檔案表區塊之中讀取至少一檔案表,並透過該檔案表於該資料儲存單元之中找出儲存有至少一操作資料檔案的至少一個資料儲存區塊; (3)將所述儲存有操作資料檔案的資料儲存區塊設定為一週邊裝置控制區塊;以及 (4)利用該操作資料存取程式變更該操作資料檔案之內容,使得該週邊裝置根據變更後的該操作資料檔案之內容而進行相應作動。A method for controlling a peripheral device through a data storage device includes the following steps: (1) connecting a data storage device to a peripheral device, wherein the peripheral device communicates directly with a host or through the data storage device Hosts communicate with each other; and a data storage unit of the data storage device is configured with a plurality of data storage blocks and at least one file table block based on a file system; and an operating system of the host is installed Operating the data access program; (2) reading at least one file table from the file table block, and searching through the file table for at least one data store storing at least one operation data file in the data storage unit a block; (3) setting the data storage block storing the operation data file as a peripheral device control block; and (4) using the operation data access program to change the content of the operation data file to make the periphery The device operates according to the content of the changed operation data file. 如申請專利範圍第1項所述之透過資料儲存裝置控制週邊裝置之方法,其中,所述檔案系統可為下列任一者:FAT、FAT8、FAT12、FAT16、FAT32、exFAT、ISO9660、UDF、NTFS、HFS、HFS+、ext2、ext3、或ext4。The method for controlling a peripheral device through a data storage device according to claim 1, wherein the file system can be any of the following: FAT, FAT8, FAT12, FAT16, FAT32, exFAT, ISO9660, UDF, NTFS. , HFS, HFS+, ext2, ext3, or ext4. 如申請專利範圍第1項所述之透過資料儲存裝置控制週邊裝置之方法,其中,所述主機可為下列任一者:行動電子裝置、伺服主機、智慧型手機、平板電腦、智慧手錶、桌上型電腦、筆記型電腦、或工業電腦。The method for controlling a peripheral device by using a data storage device according to the first aspect of the invention, wherein the host device can be any one of the following: a mobile electronic device, a server, a smart phone, a tablet computer, a smart watch, a table A laptop, laptop, or industrial computer. 如申請專利範圍第1項所述之透過資料儲存裝置控制週邊裝置之方法,其中,所述資料儲存裝置可為下列任一者:記憶卡、隨身碟、隨身硬碟、或內建於週邊裝置的記憶模組。The method for controlling a peripheral device through a data storage device according to claim 1, wherein the data storage device can be any one of the following: a memory card, a flash drive, a portable hard disk, or a built-in peripheral device. Memory module. 如申請專利範圍第1項所述之透過資料儲存裝置控制週邊裝置之方法,其中,所述作業系統可為下列任一者:微軟的視窗作業系統(Windows)、蘋果的iOS系統、蘋果的麥金塔(MAC)系統、谷歌的Android系統、或Linux作業系統。The method for controlling a peripheral device through a data storage device according to claim 1, wherein the operating system can be any one of the following: Microsoft Windows operating system (Windows), Apple's iOS system, and Apple's wheat. The Golden Tower (MAC) system, Google's Android system, or Linux operating system. 一種可控制週邊裝置的資料儲存裝置,係包括: 一微處理單元; 一通訊單元,係耦接該微處理單元,並用以連接一週邊裝置的一第一通訊介面;其中,該週邊裝置係以其一第二通訊介面連接一主機; 一儲存單元,係基於一檔案系統而被分割為複數個資料儲存區塊與一檔案表區塊;其中,儲存有至少一操作資料檔案的該些資料儲存區塊被設為至少一週邊裝置控制區塊,且該檔案表區塊內係儲存有至少一檔案表; 其中,所述主機可透過該微處理單元查詢該檔案表以獲知所述週邊裝置控制區塊的位址,並進一步地藉由變更該操作資料檔案之內容的方式,操作該週邊裝置。A data storage device for controlling a peripheral device, comprising: a micro processing unit; a communication unit coupled to the micro processing unit and configured to connect a first communication interface of a peripheral device; wherein the peripheral device is a second communication interface is connected to a host; a storage unit is divided into a plurality of data storage blocks and a file table block based on a file system; wherein the data storage storing at least one operation data file is stored The block is configured as at least one peripheral device control block, and the file table block stores at least one file table; wherein the host can query the file table through the micro processing unit to learn the peripheral device control The address of the block, and further operating the peripheral device by changing the content of the operational data file. 如申請專利範圍第6項所述之可控制週邊裝置的資料儲存裝置,其中,所述檔案系統可為下列任一者:FAT、FAT8、FAT12、FAT16、FAT32、exFAT、ISO9660、UDF、NTFS、HFS、HFS+、ext2、ext3、或ext4。The data storage device of the controllable peripheral device according to claim 6, wherein the file system can be any of the following: FAT, FAT8, FAT12, FAT16, FAT32, exFAT, ISO9660, UDF, NTFS, HFS, HFS+, ext2, ext3, or ext4. 如申請專利範圍第6項所述之可控制週邊裝置的資料儲存裝置,其中,所述主機可為下列任一者:行動電子裝置、伺服主機、智慧型手機、平板電腦、智慧手錶、桌上型電腦、筆記型電腦、或工業電腦。The data storage device of the controllable peripheral device according to claim 6, wherein the host can be any one of the following: mobile electronic device, servo host, smart phone, tablet computer, smart watch, table A computer, laptop, or industrial computer. 如申請專利範圍第6項所述之可控制週邊裝置的資料儲存裝置,其中,該主機內安裝有一操作資料存取程式,用以讀取或變更該操作資料檔案之內容。The data storage device of the controllable peripheral device of claim 6, wherein the host has an operation data access program for reading or changing the content of the operation data file. 如申請專利範圍第6項所述之可控制週邊裝置的資料儲存裝置,其中,所述資料儲存裝置可為下列任一者:記憶卡、隨身碟、隨身硬碟、或內建於週邊裝置的記憶模組。The data storage device of the controllable peripheral device according to claim 6, wherein the data storage device can be any one of the following: a memory card, a flash drive, a portable hard disk, or a built-in peripheral device. Memory module. 如申請專利範圍第6項所述之可控制週邊裝置的資料儲存裝置,其中,該通訊單元、該第一通訊介面與該第二通訊介面皆為一實體通訊介面。The data storage device of the controllable peripheral device of claim 6, wherein the communication unit, the first communication interface and the second communication interface are both a physical communication interface. 如申請專利範圍第6項所述之可控制週邊裝置的資料儲存裝置,其中,該通訊單元、該第一通訊介面與該第二通訊介面皆為一無線通訊介面。The data storage device of the controllable peripheral device of claim 6, wherein the communication unit, the first communication interface and the second communication interface are both a wireless communication interface. 一種可控制週邊裝置的資料儲存裝置,係包括: 一微處理單元; 一第一通訊單元,係耦接該微處理單元,並用以連接一週邊裝置的一通訊介面; 一第二通訊單元,係耦接該微處理單元,並用以連接一主機的一輸入/輸出介面;以及 一儲存單元,係基於一檔案系統而被分割為複數個資料儲存區塊與一檔案表區塊;其中,儲存有至少一操作資料檔案的該些資料儲存區塊被設為至少一週邊裝置控制區塊,且該檔案表區塊內係儲存有至少一檔案表; 其中,所述主機可透過該微處理單元查詢該檔案表以獲知所述週邊裝置控制區塊的位址,並進一步地藉由變更該操作資料檔案之內容的方式,操作該週邊裝置。A data storage device for controlling a peripheral device includes: a micro processing unit; a first communication unit coupled to the micro processing unit and configured to connect a communication interface of a peripheral device; and a second communication unit The data processing unit is coupled to an input/output interface of a host; and a storage unit is divided into a plurality of data storage blocks and a file table block based on a file system; wherein The data storage blocks of the at least one operation data file are set as at least one peripheral device control block, and the file table block stores at least one file table; wherein the host can query through the micro processing unit The file table is configured to learn the address of the peripheral device control block and further operate the peripheral device by changing the content of the operation data file. 如申請專利範圍第13項所述之可控制週邊裝置的資料儲存裝置,其中,所述檔案系統可為下列任一者:FAT、FAT8、FAT12、FAT16、FAT32、exFAT、ISO9660、UDF、NTFS、HFS、HFS+、ext2、ext3、或ext4。The data storage device of the controllable peripheral device according to claim 13 , wherein the file system can be any of the following: FAT, FAT8, FAT12, FAT16, FAT32, exFAT, ISO9660, UDF, NTFS, HFS, HFS+, ext2, ext3, or ext4. 如申請專利範圍第13項所述之可控制週邊裝置的資料儲存裝置,其中,所述主機可為下列任一者:行動電子裝置、伺服主機、智慧型手機、平板電腦、智慧手錶、桌上型電腦、筆記型電腦、或工業電腦。The data storage device of the controllable peripheral device according to claim 13 , wherein the host can be any of the following: mobile electronic device, servo host, smart phone, tablet computer, smart watch, table A computer, laptop, or industrial computer. 如申請專利範圍第13項所述之可控制週邊裝置的資料儲存裝置,其中,該主機內安裝有一操作資料存取程式,用以讀取或變更該操作資料檔案之內容。The data storage device of the controllable peripheral device according to claim 13 , wherein an operation data access program is installed in the host to read or change the content of the operation data file. 如申請專利範圍第13項所述之可控制週邊裝置的資料儲存裝置,其中,所述資料儲存裝置可為下列任一者:記憶卡、隨身碟、隨身硬碟、或內建於週邊裝置的記憶模組。The data storage device of the controllable peripheral device according to claim 13 , wherein the data storage device can be any of the following: a memory card, a flash drive, a portable hard disk, or a built-in peripheral device. Memory module. 如申請專利範圍第13項所述之可控制週邊裝置的資料儲存裝置,其中,該第一通訊單元、該通訊介面、該第二通訊單元、與該輸入/輸出介面皆為一實體通訊介面。The data storage device of the controllable peripheral device of claim 13 , wherein the first communication unit, the communication interface, the second communication unit, and the input/output interface are both a physical communication interface. 如申請專利範圍第13項所述之可控制週邊裝置的資料儲存裝置,其中,該第一通訊單元、該通訊介面、該第二通訊單元、與該輸入/輸出介面皆為一無線通訊介面。The data storage device of the controllable peripheral device of claim 13 , wherein the first communication unit, the communication interface, the second communication unit, and the input/output interface are both a wireless communication interface.
TW106125611A 2017-07-28 2017-07-28 Peripheral device controlling method by using storage device and storage device capable of controlling peripheral devices TWI626543B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106125611A TWI626543B (en) 2017-07-28 2017-07-28 Peripheral device controlling method by using storage device and storage device capable of controlling peripheral devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106125611A TWI626543B (en) 2017-07-28 2017-07-28 Peripheral device controlling method by using storage device and storage device capable of controlling peripheral devices

Publications (2)

Publication Number Publication Date
TWI626543B true TWI626543B (en) 2018-06-11
TW201911062A TW201911062A (en) 2019-03-16

Family

ID=63255785

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106125611A TWI626543B (en) 2017-07-28 2017-07-28 Peripheral device controlling method by using storage device and storage device capable of controlling peripheral devices

Country Status (1)

Country Link
TW (1) TWI626543B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040117610A1 (en) * 2002-12-17 2004-06-17 Hensley John Alan Method of altering a computer operating system to boot and run from protected media
TWI228658B (en) * 2002-12-27 2005-03-01 Neodio Technologies Corp Plug-and-play interconnection system and method with in-device storage module in peripheral device
US20070169129A1 (en) * 2006-01-18 2007-07-19 Microsoft Corporation Automated application configuration using device-provided data
US20070245345A1 (en) * 2006-02-28 2007-10-18 Brother Kogyo Kabushiki Kaisha Device, Method and Program for Creating Installer
TWI421691B (en) * 2008-09-29 2014-01-01 Intel Corp A method, an apparatus and a system of querying a device for information
US20160179556A1 (en) * 2014-12-17 2016-06-23 Intel Corporation Input/output (i/o) device configuration signature

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040117610A1 (en) * 2002-12-17 2004-06-17 Hensley John Alan Method of altering a computer operating system to boot and run from protected media
TWI228658B (en) * 2002-12-27 2005-03-01 Neodio Technologies Corp Plug-and-play interconnection system and method with in-device storage module in peripheral device
US20070169129A1 (en) * 2006-01-18 2007-07-19 Microsoft Corporation Automated application configuration using device-provided data
US20070245345A1 (en) * 2006-02-28 2007-10-18 Brother Kogyo Kabushiki Kaisha Device, Method and Program for Creating Installer
TWI421691B (en) * 2008-09-29 2014-01-01 Intel Corp A method, an apparatus and a system of querying a device for information
US20160179556A1 (en) * 2014-12-17 2016-06-23 Intel Corporation Input/output (i/o) device configuration signature

Also Published As

Publication number Publication date
TW201911062A (en) 2019-03-16

Similar Documents

Publication Publication Date Title
US11163442B2 (en) Self-formatting data storage device
US8868628B2 (en) Sharing computer data among computers
CN101815998B (en) Coded removable storage allowing change detection
US20150143095A1 (en) Bios failover update with service processor
US20080091935A1 (en) Hard disk drive with disk embedded dos boot image and firmware download method
US8661237B2 (en) System and method for booting a plurality of servers from a shared boot image stored on a USB boot image sharer
TW202014912A (en) Efficient file storage and retrieval system, method and apparatus
US20060282653A1 (en) Method for updating frimware of memory card
US6473655B1 (en) Data processing system and method for creating a virtual partition within an existing partition in a hard disk drive
US20050066129A1 (en) Portable data storage device allowing dynamic setting of disk type and the method of dynamically setting disk type thereof
TW201504937A (en) Virtual storage devices formed by selected partitions of a physical storage device
US20140365713A1 (en) Electronic system and operating method thereof
US8595426B2 (en) Handling commands within a write-once read-many storage device configuration
TW200414047A (en) Method of making any card capable of booting from a multi-card reader/writer
TWI626543B (en) Peripheral device controlling method by using storage device and storage device capable of controlling peripheral devices
JP6200091B2 (en) Camera that supports removable storage device divided into multiple partitions
Nikkel NVM express drives and digital forensics
US20190034361A1 (en) Peripheral device controlling method by using storage device and storage device capable of controlling peripheral devices
CN109308272A (en) Method for controlling peripheral device by data storage device and data storage device capable of controlling peripheral device
CN101366006A (en) Simulation Components for Data Backup Applications
CN106105166A (en) Enable the access of object oriented file on a storage device
CN102023873B (en) Application program execution method and system, storage media controller and storage device
US7895372B2 (en) Universal serial bus mass storage device asynchronous file and file system update while connected to a PC or other device
JP2019028668A (en) Method for controlling a peripheral device via a data storage device and data storage device capable of controlling the peripheral device
CN113950673B (en) Non-volatile storage partition identifier