TI E2E Community
35XX MADC driver embedded pointer w/CE 6?
I was looking to use the MADC driver from the A8_1.0.0 35XX BSP.
I wanted to pass some ADC reading to my user space application.
I noticed they are using embedded pointers to user space buffers in the IOCTRL calls. I was under the impression this is a big time no-no under CE 6.
Are my assumptions correct?
I suppose you are talking about pOutBuffer used in IOCTL_MADC_READVALUE. This is not exactly an "embedded pointer" as defined under WinCE, and which we should be very careful of as you pointed out. An embedded pointer would be the case where pOutbuffer points to a structure which contains a pointer to a user space memory location. In that case, you have to manually "marshall" this second pointer to properly use it inside your kernel mode driver. Pointers such as pOutbuffer and pInbuffer in drivers are automatically marshalled by the kernel before the XXX_IoControl function is called, and can be used safely as done in the MADC driver.
Adeneo Embedded Support teamContact us at email@example.com
Thank you for "pointing" out the difference. I knew it had something to do with pointers ...this is clear now.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.