USB TMC Updates#724
Conversation
Fix buffer alignment in TMC device class
Replaces visa include with pyvisa, as visa use with PyVISA is being deprecated.
There was a problem hiding this comment.
the modificaiton of usbtmc_device.c looks good to me. Though can you also add the CFG_TUSB_MEM_SECTION to the usbtmc_state as well at line 128, that will help some mcu that has picky DMA.
CFG_TUSB_MEM_SECTION static usbtmc_interface_state_t usbtmc_state =
{
.itf_id = 0xFF,
};
For the visaQuery.py changes, I have no idea, @pigrew do you have time to help reviewing this.
|
My putting a particular RM DLL path was a bad idea, in retrospect. It was a hacky way for me to get it working on my laptop, and I shouldn't have done it. Also, it may not work for all installs of Windows. What are your thoughts about if we remove all of the os-detection, and just have a call to:
With that, one can create a (And, in general, it's good to see other people trying out the class driver. If you think there should be API changes, let me know.) |
This reverts commit dc2f00c.
|
PR is updated to only add the CFG_TUSB_MEM_ALIGN and CFG_TUSB_MEM_SECTION attributes to the usbtmc implementation. I will log an issue for how the test script is used for it to be handled external to this PR. |
|
Thanks. I'll create a PR to edit the python script. I'm happy to merge this PR. |
hathach
left a comment
There was a problem hiding this comment.
thanks @xmos-jmccarthy for your PR and @pigrew for reviewing it.
Describe the PR
Adds alignment to buffers in usbtmc_interface_state_t struct.
Updates the visaQuery.py script for PyVisa module import deprecation and to support Linux.
Additional context
It was found that the CFG_TUSB_MEM_ALIGN attributes were missing from the buffers in the usbtmc_interface_state_t struct. This caused exceptions due to alignment issues on the XCore platform. This addition is untested on other platforms.
Additionally the existing visaQuery.py script was hardcoded for use with Windows. Linux support was added.