This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM335X: GPIOPinWrite

Part Number: PROCESSOR-SDK-AM335X

Hi,

I am using PSDK TI-RTOS for skAM335x processor board on Windows host PC. Could you tell me the path of GPIOPinWrite(hwAttrs->baseAddr, pinNum, value) function definition.

In which file you wrote the definition of this function.

Declaration I got but I am not getting definition. It is declared in gpio_v2.h.

Calling this function in GPIO_v1.c file in static void GPIO_write_v1(uint32_t index, uint32_t value) function but I am not getting defintion of GPIOPinWrite function.

static void GPIO_write_v1(uint32_t index, uint32_t value)
{
uint32_t key;
GPIO_v1_HwAttrs *hwAttrs = NULL;
uint32_t pinConfig;
uint32_t pinNum;
uint32_t portNum;

/* Input parameter validation */
GPIO_osalAssert(!((((bool)true) == initCalled) &&
(index < GPIO_v1_config.numberOfPinConfigs)));

pinConfig = GPIO_v1_config.pinConfigs[index];
portNum = GPIO_GET_PORT_NUM(pinConfig);
pinNum = GPIO_GET_PIN_NUM(pinConfig);
if (((portNum > 0U) && (portNum <= NUM_PORTS)) &&
(pinNum < NUM_PINS_PER_PORT))
{
hwAttrs = (GPIO_v1_HwAttrs *)&GPIO_v1_hwAttrs[(portNum - 1U)];

key = GPIO_osalHardwareIntDisable();

/* Clear output from pinConfig */
GPIO_v1_config.pinConfigs[index] &= ~GPIO_CFG_OUT_HIGH;

if (value) {
/* Set the pinConfig output bit to high */
GPIO_v1_config.pinConfigs[index] |= GPIO_CFG_OUT_HIGH;
}

GPIOPinWrite(hwAttrs->baseAddr, pinNum, value);

GPIO_osalHardwareIntRestore(key);
}
}

Regards

Gaurav