Resistive Touch-screen Driver missing in MQX 3.7?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Resistive Touch-screen Driver missing in MQX 3.7?

ソリューションへジャンプ
8,828件の閲覧回数
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,125件の閲覧回数
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 返答(返信)
402件の閲覧回数
PavelM
NXP Employee
NXP Employee

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

0 件の賞賛
返信