NOCHANGE

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

NOCHANGE

392 Views
wangtsungli
Contributor IV

I'm using MQX4.0 to work my touch panel, but i stock at the define LWGPIO_DIR_NOCHANGE !

function.bmp

I wanna know whether this define same as defining PIN to the open drain mode or not?

please help me on this problem!

best regard

victor

Tags (2)
0 Kudos
1 Reply

274 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Victor:

No, it is not open drain mode. Just means that this value should not be changed. Please refer to the implementation of LWGPIO_DIR_NOCHANGE.

void lwgpio_set_direction
(
    /* Pin handle to set direction on */
    LWGPIO_STRUCT_PTR  handle,
    /* Direction to be set */
    LWGPIO_DIR         dir
)
{
    if (dir == LWGPIO_DIR_INPUT) {
        handle->gpio_ptr->PDDR &= ~handle->pinmask;
        handle->flags |= LWGPIO_DIR_MASK; /* mark the pin is input */
    }
    else if (dir == LWGPIO_DIR_OUTPUT) {
        handle->gpio_ptr->PDDR |= handle->pinmask;
        handle->flags &= ~LWGPIO_DIR_MASK; /* mark the pin is output */
    }
    else { /* LWGPIO_DIR_NOCHANGE or other value */
    }
}

Regards

Daniel

0 Kudos