ioctl

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ioctl

423 Views
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

Tags (1)
0 Kudos
1 Reply

286 Views
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 Kudos