我想开发一个新的设备端跟PC端的VDJ软件进行沟通。
在论坛里面逛了很久终于稍微有点头绪了,不知道对不对,大家可否给我点 步骤或者资料链接,或者开发的方法,那就太感谢了。
以下是我逛完论坛后的初步方法步骤:
第一步:定义你的命令存储块。
原文是这样说的(原文是HID Implement)
When you design your firmware for HID, you first need to decide on the location of the elements in your memory block.
You usually end up with a table looking like this:
bit 7 6 5 4 3 2 1 0
byte 0 LEFT_PLAY LEFT_PAUSE LEFT_CUE LEFT_STOP LEFT_LOOPIN LEFT_LOOPOUT LEFT_CUE1 LEFT_CUE2
byte 1 LEFT_CUE3 LEFT_SYNC LEFT_FX - - - - -
byte 2 RIGHT_PLAY RIGHT_PAUSE RIGHT_CUE RIGHT_STOP RIGHT_LOOPIN RIGHT_LOOPOUT RIGHT_CUE1 RIGHT_CUE2
byte 3 RIGHT_CUE3 RIGHT_SYNC RIGHT_FX - BROWSER_FOLDER BROWSER_UP BROWSER_DOWN BROWSER_ENTER
byte 5 LEFT_PITCH
byte 6 RIGHT_PITCH
.....
第二步:根据你的第一步的命令定义,设计你设备端的固件。
原文是这样说的:
Once you have decided on the memory table, you can then write your firmware to change the bits and bytes in the HID memory block according to your table.
第三步:书写PC端VirtualDJ软件用于识别你的命令的 definition file。
原文是这样说的:
Then, you can write the definition file so that VirtualDJ can read the HID blocks from your device and react accordingly.
(or, you can just send this table to our engineers, who will write the definition file for you).
第四步:定义PC端发给设备的命令,例如命令让设备上的哪个LED灯亮。
原文是这样说的:
LEDs
In order to implement LEDs, you use the same concept of "memory block", but this time it's the computer software who writes in the table, and your firmware reads from it.
So first, you need to implement a second table:
bit 7 6 5 4 3 2 1 0
byte 0 LEFT_PLAY - LEFT_CUE LEFT_STOP - LEFT_LOOPOUT LEFT_CUE1 LEFT_CUE2
byte 1 LEFT_CUE3 LEFT_SYNC LEFT_FX - - - - -
byte 2 RIGHT_PLAY - RIGHT_CUE RIGHT_STOP - RIGHT_LOOPOUT RIGHT_CUE1 RIGHT_CUE2
byte 3 RIGHT_CUE3 RIGHT_SYNC RIGHT_FX - BROWSER_FOLDER - - -
Then, your firmware just reads from the memory block the corresponding bits to know if a LED needs to be lit or not.
以上就是我的理解,希望有开发经验没开发经验的兄弟们给我些建议。
我用的设备端的芯片是STM32F103的USB全速接口,开发基于这个硬件。我按照DENON的MC6000样机,分析它的枚举过程(用USB逻辑分析仪)后得到它的整个描述符,在我的STM32上,描述符也就是跟DENON的一模一样的了。PC也能识别出我的是复合的音频设备,但是当我打开VDJ软件的时候VDJ却弹出一个错误说:无法识别你的声卡。(不过我的STM32固件里还没有任何命令的处理,或者数据的发送,可以说只实现了枚举过程吧。)到底是哪里出了问题?
难道是因为我没有做第三步里面的 definition file。没有写mapper file?
难道我就不能不写 definition file,mapper file这两个文件去开发一个新的设备(完全照搬DENON MC6000)吗?我用DENON MC6000的时候也是直接插上电脑,然后打开VDJ软件就能用了,完全不用拷贝或者安装什么 definition file,mapper file这两个文件。难道开发一个新的类似的设备,我上面提到的开发步骤都要走吗?我的开发步骤对不对呢?还望各位可以帮帮我。受我以渔...
我该怎么办?
Who can help me ?
在论坛里面逛了很久终于稍微有点头绪了,不知道对不对,大家可否给我点 步骤或者资料链接,或者开发的方法,那就太感谢了。
以下是我逛完论坛后的初步方法步骤:
第一步:定义你的命令存储块。
原文是这样说的(原文是HID Implement)
When you design your firmware for HID, you first need to decide on the location of the elements in your memory block.
You usually end up with a table looking like this:
bit 7 6 5 4 3 2 1 0
byte 0 LEFT_PLAY LEFT_PAUSE LEFT_CUE LEFT_STOP LEFT_LOOPIN LEFT_LOOPOUT LEFT_CUE1 LEFT_CUE2
byte 1 LEFT_CUE3 LEFT_SYNC LEFT_FX - - - - -
byte 2 RIGHT_PLAY RIGHT_PAUSE RIGHT_CUE RIGHT_STOP RIGHT_LOOPIN RIGHT_LOOPOUT RIGHT_CUE1 RIGHT_CUE2
byte 3 RIGHT_CUE3 RIGHT_SYNC RIGHT_FX - BROWSER_FOLDER BROWSER_UP BROWSER_DOWN BROWSER_ENTER
byte 5 LEFT_PITCH
byte 6 RIGHT_PITCH
.....
第二步:根据你的第一步的命令定义,设计你设备端的固件。
原文是这样说的:
Once you have decided on the memory table, you can then write your firmware to change the bits and bytes in the HID memory block according to your table.
第三步:书写PC端VirtualDJ软件用于识别你的命令的 definition file。
原文是这样说的:
Then, you can write the definition file so that VirtualDJ can read the HID blocks from your device and react accordingly.
(or, you can just send this table to our engineers, who will write the definition file for you).
第四步:定义PC端发给设备的命令,例如命令让设备上的哪个LED灯亮。
原文是这样说的:
LEDs
In order to implement LEDs, you use the same concept of "memory block", but this time it's the computer software who writes in the table, and your firmware reads from it.
So first, you need to implement a second table:
bit 7 6 5 4 3 2 1 0
byte 0 LEFT_PLAY - LEFT_CUE LEFT_STOP - LEFT_LOOPOUT LEFT_CUE1 LEFT_CUE2
byte 1 LEFT_CUE3 LEFT_SYNC LEFT_FX - - - - -
byte 2 RIGHT_PLAY - RIGHT_CUE RIGHT_STOP - RIGHT_LOOPOUT RIGHT_CUE1 RIGHT_CUE2
byte 3 RIGHT_CUE3 RIGHT_SYNC RIGHT_FX - BROWSER_FOLDER - - -
Then, your firmware just reads from the memory block the corresponding bits to know if a LED needs to be lit or not.
以上就是我的理解,希望有开发经验没开发经验的兄弟们给我些建议。
我用的设备端的芯片是STM32F103的USB全速接口,开发基于这个硬件。我按照DENON的MC6000样机,分析它的枚举过程(用USB逻辑分析仪)后得到它的整个描述符,在我的STM32上,描述符也就是跟DENON的一模一样的了。PC也能识别出我的是复合的音频设备,但是当我打开VDJ软件的时候VDJ却弹出一个错误说:无法识别你的声卡。(不过我的STM32固件里还没有任何命令的处理,或者数据的发送,可以说只实现了枚举过程吧。)到底是哪里出了问题?
难道是因为我没有做第三步里面的 definition file。没有写mapper file?
难道我就不能不写 definition file,mapper file这两个文件去开发一个新的设备(完全照搬DENON MC6000)吗?我用DENON MC6000的时候也是直接插上电脑,然后打开VDJ软件就能用了,完全不用拷贝或者安装什么 definition file,mapper file这两个文件。难道开发一个新的类似的设备,我上面提到的开发步骤都要走吗?我的开发步骤对不对呢?还望各位可以帮帮我。受我以渔...
我该怎么办?
Who can help me ?
Posté Tue 23 Aug 11 @ 10:35 pm
This is a very important problem,but I have the same trouble in it!
Posté Sun 28 Aug 11 @ 8:21 pm
how about u project now?
Posté Thu 01 Sep 11 @ 9:56 am
Hi Teddyvision, contact is not allowed here by no license user. Thanks for the understanding.
Regards.
Regards.
Posté Tue 13 Sep 11 @ 11:44 am
有点深奥!看不懂!
Posté Thu 17 Nov 11 @ 9:55 am
Hey guys...Does anyone has experience in built a new hid controller? I have been read some hid specification ,and know hid report descriptor already.but as you know , report descriptor is the most difficult thing to define. Anybody can help me how to do this descriptor in my controller?
Any help would be fine!
Any help would be fine!
Posté Sat 26 Nov 11 @ 3:08 am