Resistive Touch-screen Driver missing in MQX 3.7?

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

Resistive Touch-screen Driver missing in MQX 3.7?

跳至解决方案
8,961 次查看
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 项奖励
回复
1 解答
8,258 次查看
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

在原帖中查看解决方案

0 项奖励
回复
21 回复数
403 次查看
PavelM
NXP Employee
NXP Employee

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

0 项奖励
回复