- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to use:
void gpio_configurePin(BYTE port, BYTE pin, UINT16 config, BYTE outputVal);
to put a GPIO in high impedance mode.
Should I use this:
GPIO_INPUT_DISABLE /*0x0600*/
as config ?
Solved! Go to Solution.
- Labels:
-
GPIO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In our firmware for a BCM20736S we use the following code to disable all GPIOs except the two for the peripheral UART:
int i;
for (i=GPIO_PIN_P0;i<=GPIO_PIN_P39;i++)
{
if ((i != GPIO_PIN_P32) && (i != GPIO_PIN_P33))
gpio_configurePin(i/16, i%16, GPIO_INPUT_DISABLE | GPIO_PULL_UP_DOWN_NONE, GPIO_PIN_INPUT_LOW);
}
This sets all GPIOs except P32 (PUART_TX) and P33 (PUART_RX) to high impedance mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In our firmware for a BCM20736S we use the following code to disable all GPIOs except the two for the peripheral UART:
int i;
for (i=GPIO_PIN_P0;i<=GPIO_PIN_P39;i++)
{
if ((i != GPIO_PIN_P32) && (i != GPIO_PIN_P33))
gpio_configurePin(i/16, i%16, GPIO_INPUT_DISABLE | GPIO_PULL_UP_DOWN_NONE, GPIO_PIN_INPUT_LOW);
}
This sets all GPIOs except P32 (PUART_TX) and P33 (PUART_RX) to high impedance mode.