MQX - should I use GPIO_PIN_STRUCT or PE

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

MQX - should I use GPIO_PIN_STRUCT or PE

跳至解决方案
529 次查看
drummer
Contributor IV

I need your opinion.

I am still using MQX 3.6 with codewarrior 7.2.

I know if I upgrade to version 10 I can use MQX3.8 along with Proccessor Expert.

I have a work-around in MQX 3.6 where I produce the "c" code in a separate project and copy the code into my main project.

I have to do this in order to have interrupt driven inputs.

For all other I/O needs I use the GPIO_PIN_STRUCT method.

I am designing another M52259 product and I am tossed as to what approach would be better for handling all of my I/O needs.

I have previously used the GPIO_PIN_STRUCT method where you initialize your GPIO on the fly. I like this method because it doesn't involve bit manipulation of the GPIO  control registers directly in the BSP.

This saves time up front but is it the best method of controlling I/O?

Opinion?

标记 (3)
0 项奖励
1 解答
335 次查看
Martin_
NXP Employee
NXP Employee

Hi Rick,

lightweight functions/macros for reading/writing General purpose input/output signals would produce smaller code, less memory consumed and faster software IO (less instructions to set a GPIO or to read a GPIO input level), compared to GPIO_PIN_STRUCT method.

In MQX 4.0 there is /mqx/source/io/lwgpio. I beleive lwgpio.c, lwgpio.h, lwgpio_mcf5225.c and lwgpio_mcf5225.h can be integrated into MQX 3.6 application project.

在原帖中查看解决方案

0 项奖励
1 回复
336 次查看
Martin_
NXP Employee
NXP Employee

Hi Rick,

lightweight functions/macros for reading/writing General purpose input/output signals would produce smaller code, less memory consumed and faster software IO (less instructions to set a GPIO or to read a GPIO input level), compared to GPIO_PIN_STRUCT method.

In MQX 4.0 there is /mqx/source/io/lwgpio. I beleive lwgpio.c, lwgpio.h, lwgpio_mcf5225.c and lwgpio_mcf5225.h can be integrated into MQX 3.6 application project.

0 项奖励