Diference between GPIOPinConfigure() and GPIOPinTypeXXX()

When working with the tivaware lib, you need two functions to configure the GPIOs to work with a given peripheral:
GPIOPinConfigure() and GPIOPinTypeXXX()

Now the discription of those functions where i little confusing (at least to me) so here is my explanation of how they work:

GPIOPinConfigure() and GPIOPinTypeXXX() are two parts of the same thing.

GPIOPinConfigure() configures the pin mux that selects the peripheral function
associated with a particular GPIO pin. ONLY AFFECTS THE MUX AND NOTHING MORE.

GPIOPinTypeXXX() on the other hand, configures the GPIO pins with the needed config
for the intended peripheral. For example if it was the I2C peripheral, the GPIOPinTypeI2C()
would configure the pins with internal pull-ups for the sda and sca lines and connect
the external pins to the I2C peripheral.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s