ioctl

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

ioctl

898 次查看
wangtsungli
Contributor IV

I'm using MQX4.0 to work my touch panel, but i stock at the function ioctl(tchscr_dev_ptr->ADC_CHANNEL_X, ADC_IOCTL_FIRE_TRIGGER, (pointer) tchscr_dev_ptr->ADC_CHANNEL_X_STRUCT->trigger)!

ioctl.bmp

I don't know how this function work, please help me on this problem!

Best regard

Victor

标记 (1)
0 项奖励
回复
1 回复

761 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Wang:

The two IOCTL commands is to use two different ADC modules to read X/Y axis.

ioctl(tchscr_dev_ptr->ADC_CHANNEL_X, ADC_IOCTL_FIRE_TRIGGER, (pointer) tchscr_dev_ptr->ADC_CHANNEL_X_STRUCT->trigger)

 will call function  _adc_ioctl (mqx/source/io/adc) , case ADC_IOCTL_FIRE_TRIGGER.

I assume you are using Kinties MCU, the function will then call function _adt_trigger (mqx/source/io/adc/kadc),

starts channel measurement , and get the adc value.

You can read the chapter 8 ADC driver in MQX_IO_User_Guide.pdf  for more details about ADC. This file located in MQX installation folder.

Freescale_MQX_4_0\doc\mqx\MQX_IO_User_Guide.pdf

Regards

Daniel

0 项奖励
回复