Resistive Touch-screen Driver missing in MQX 3.7?

cancel
Showing results for 
Search instead for 
Did you mean: 

Resistive Touch-screen Driver missing in MQX 3.7?

Jump to solution
934 Views
madifazio
Contributor III

Hi,

Im converting a MQX 3.6 to MQX3.7 project, and I'm found that "tchres:" device no longer exists in the list of installed drivers.

I use the same options in user_config.h that is #define BSPCFG_ENABLE_TCHSRES    1

I've found a difference in the init_bsp.c file between 3.6 and 3.7

the lines 

 

#if BSPCFG_ENABLE_TCHSRES   _mcf52xx_tchres_install("tchscr:", &_bsp_tchscr_resisitve_init);#endif

 no longer exists in init_bsp.c file from MQX 3.7

 

how do I enable the Resistive Touch-screen Driver in MQX 3.7

 

 

Regards

0 Kudos
1 Solution
231 Views
Gargy
NXP Employee
NXP Employee

Hi,

I found out why the touch screen driver doesn't work under MQX 3.7. The MQX3.7 contains the completely new touch screen driver that change little bit  phylosophy of using driver and (it start using standard MQX ADC driver) and the ADC driver and Touch screen driver must be installed by user like this:

 

const ADC_INIT_STRUCT adc_init = {
    ADC_RESOLUTION_12BIT,// ADC_RESOLUTION_DEFAULT,     /* resolution */
};

extern TCHRES_INIT_STRUCT _bsp_tchscr_resisitve_init;

 

d4d_task()

{

 MQX_FILE_PTR   adc_file;
  
   adc_file = fopen(BSP_TCHRES_ADC_DEVICE, (const char*)&adc_init);
   if( adc_file == NULL )
   {
      _mqx_exit(0);
   }
   ioctl( adc_file, ADC_IOCTL_CALIBRATE, NULL );
   _io_tchres_install("tchscr:", &_bsp_tchscr_resisitve_init, adc_file );

 

.......

}

 

Check the Kinetis K40 demo, there is good main.c file, in other MQX3.7 demos was used old version of file, sorry for this.

 

Gargy

View solution in original post

0 Kudos
21 Replies
27 Views
PavelM
NXP Employee
NXP Employee

Yes, tchres is not supported on 51CN in MQX 3.7. Please wait for next release.

0 Kudos