Improved comments

This commit is contained in:
Gregory Nutt 2014-12-21 14:09:04 -06:00
parent 240b57428f
commit 467521ba33
4 changed files with 58 additions and 16 deletions

View File

@ -835,9 +835,17 @@ int tiva_configgpio(uint32_t cfgset)
flags = irqsave();
/* Enable power and clocking for this GPIO peripheral. */
/* Enable power and clocking for this GPIO peripheral.
*
* - Enable Power (TM4C129 family only): Applies power (only) to the GPIO
* peripheral. This is not an essential step since enabling clocking
* will also apply power. The only significance is that the GPIO state
* will be retained if the GPIO clocking is subsequently disabled.
* - Enable Clocking (All families): Applies both power and clocking to
* the GPIO peripheral, bringing it a fully functional state.
*/
tiva_gpio_enablepwr(port); /* State will be retained of clocking disabled */
tiva_gpio_enablepwr(port);
tiva_gpio_enableclk(port);
/* First, set the port to digital input. This is the safest state in which

View File

@ -1520,10 +1520,18 @@ static int tiva_i2c_initialize(struct tiva_i2c_priv_s *priv, uint32_t frequency)
i2cvdbg("I2C%d: refs=%d\n", config->devno, priv->refs);
/* Enable clocking to the I2C peripheral */
/* Enable power and clocking to the I2C peripheral.
*
* - Enable Power (TM4C129 family only): Applies power (only) to the I2C
* peripheral. This is not an essential step since enabling clocking
* will also apply power. The only significance is that the I2C state
* will be retained if the I2C clocking is subsequently disabled.
* - Enable Clocking (All families): Applies both power and clocking to
* the I2C peripheral, bringing it a fully functional state.
*/
#ifdef TIVA_SYSCON_RCGCI2C
tiva_i2c_enablepwr(config->devno); /* State will be retained if clocking stopped */
tiva_i2c_enablepwr(config->devno);
tiva_i2c_enableclk(config->devno);
i2cvdbg("I2C%d: RCGI2C[%08x]=%08x\n",

View File

@ -255,10 +255,17 @@ void up_lowsetup(void)
/* Enable the selected UARTs and configure GPIO pins needed by the
* the selected UARTs. NOTE: The serial driver later depends on
* this pin configuration -- whether or not a serial console is selected.
*
* - Enable Power (TM4C129 family only): Applies power (only) to the UART
* peripheral. This is not an essential step since enabling clocking
* will also apply power. The only significance is that the UART state
* will be retained if the UART clocking is subsequently disabled.
* - Enable Clocking (All families): Applies both power and clocking to
* the UART peripheral, bringing it a fully functional state.
*/
#ifdef CONFIG_TIVA_UART0
tiva_uart0_enablepwr(); /* State will be retained if clocking disabled */
tiva_uart0_enablepwr();
tiva_uart0_enableclk();
tiva_configgpio(GPIO_UART0_RX);
@ -266,7 +273,7 @@ void up_lowsetup(void)
#endif
#ifdef CONFIG_TIVA_UART1
tiva_uart1_enablepwr(); /* State will be retained if clocking disabled */
tiva_uart1_enablepwr();
tiva_uart1_enableclk();
tiva_configgpio(GPIO_UART1_RX);
@ -274,7 +281,7 @@ void up_lowsetup(void)
#endif
#ifdef CONFIG_TIVA_UART2
tiva_uart2_enablepwr(); /* State will be retained if clocking disabled */
tiva_uart2_enablepwr();
tiva_uart2_enableclk();
tiva_configgpio(GPIO_UART2_RX);
@ -282,7 +289,7 @@ void up_lowsetup(void)
#endif
#ifdef CONFIG_TIVA_UART3
tiva_uart3_enablepwr(); /* State will be retained if clocking disabled */
tiva_uart3_enablepwr();
tiva_uart3_enableclk();
tiva_configgpio(GPIO_UART3_RX);
@ -290,7 +297,7 @@ void up_lowsetup(void)
#endif
#ifdef CONFIG_TIVA_UART4
tiva_uart4_enablepwr(); /* State will be retained if clocking disabled */
tiva_uart4_enablepwr();
tiva_uart4_enableclk();
tiva_configgpio(GPIO_UART4_RX);
@ -298,7 +305,7 @@ void up_lowsetup(void)
#endif
#ifdef CONFIG_TIVA_UART5
tiva_uart5_enablepwr(); /* State will be retained if clocking disabled */
tiva_uart5_enablepwr();
tiva_uart5_enableclk();
tiva_configgpio(GPIO_UART5_RX);
@ -306,7 +313,7 @@ void up_lowsetup(void)
#endif
#ifdef CONFIG_TIVA_UART6
tiva_uart6_enablepwr(); /* State will be retained if clocking disabled */
tiva_uart6_enablepwr();
tiva_uart6_enableclk();
tiva_configgpio(GPIO_UART6_RX);
@ -314,7 +321,7 @@ void up_lowsetup(void)
#endif
#ifdef CONFIG_TIVA_UART7
tiva_uart7_enablepwr(); /* State will be retained if clocking disabled */
tiva_uart7_enablepwr();
tiva_uart7_enableclk();
tiva_configgpio(GPIO_UART7_RX);

View File

@ -1475,9 +1475,18 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
priv = &g_ssidev[SSI0_NDX];
/* Enable power and clocking to the SSI0 peripheral */
/* Enable power and clocking to the SSI0 peripheral.
*
* - Enable Power (TM4C129 family only): Applies power (only) to the
* SSI0 peripheral. This is not an essential step since enabling
* clocking will also apply power. The only significance is that
* the SSI0 state will be retained if the SSI0 clocking is
* subsequently disabled.
* - Enable Clocking (All families): Applies both power and clocking
* to the SSI0 peripheral, bringing it a fully functional state.
*/
tiva_ssi0_enablepwr(); /* State will be ratained if clocking disabled */
tiva_ssi0_enablepwr();
tiva_ssi0_enableclk();
/* Configure SSI0 GPIOs (NOTE that SS is not initialized here, the
@ -1497,9 +1506,19 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
priv = &g_ssidev[SSI1_NDX];
/* Enable power and clocking to the SSI1 peripheral */
/* Enable power and clocking to the SSI1 peripheral.
*
* - Enable Power (TM4C129 family only): Applies power (only) to the
* SSI1 peripheral. This is not an essential step since enabling
* clocking will also apply power. The only significance is that
* the SSI1 state will be retained if the SSI1 clocking is
* subsequently disabled.
* - Enable Clocking (All families): Applies both power and clocking
* to the SSI1 peripheral, bringing it a fully functional state.
*/
tiva_ssi1_enablepwr(); /* State will be ratained if clocking disabled */
tiva_ssi1_enablepwr();
tiva_ssi1_enableclk();
/* Configure SSI1 GPIOs */