Browse Source

Fix a few comments with logical/bitwise OR reversed.

pull/588/merge
Jean-Philippe Ouellet 9 years ago
committed by Karl Palsson
parent
commit
1cca117e58
  1. 14
      lib/efm32/lg/gpio.c
  2. 10
      lib/stm32/common/gpio_common_all.c
  3. 6
      lib/stm32/f1/gpio.c

14
lib/efm32/lg/gpio.c

@ -68,7 +68,7 @@ void gpio_set_drive_strength(uint32_t gpio_port,
* @param[in] gpio_port GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....)
* @param[in] mode Mode (use GPIO_MODE_*)
* @param[in] gpios (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL,
* use logical OR '|' to separate)
* use bitwise OR '|' to separate)
*/
void gpio_mode_setup(uint32_t gpio_port, enum gpio_mode mode, uint16_t gpios)
{
@ -97,7 +97,7 @@ void gpio_mode_setup(uint32_t gpio_port, enum gpio_mode mode, uint16_t gpios)
* Set port pins output value (Atomic)
* @param[in] gpio_port GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....)
* @param[in] gpios (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL,
* use logical OR '|' to separate)
* use bitwise OR '|' to separate)
*/
void gpio_set(uint32_t gpio_port, uint16_t gpios)
{
@ -108,7 +108,7 @@ void gpio_set(uint32_t gpio_port, uint16_t gpios)
* Set port pins output value (Atomic)
* @param[in] gpio_port GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....)
* @param[in] gpios (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL,
* use logical OR '|' to separate)
* use bitwise OR '|' to separate)
*/
void gpio_clear(uint32_t gpio_port, uint16_t gpios)
{
@ -119,8 +119,8 @@ void gpio_clear(uint32_t gpio_port, uint16_t gpios)
* Get port pins input value
* @param[in] gpio_port GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....)
* @param[in] gpios (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL,
* use logical OR '|' to separate)
* @return masked pins value (separated by logical OR '|')
* use bitwise OR '|' to separate)
* @return masked pins value (separated by bitwise OR '|')
*/
uint16_t gpio_get(uint32_t gpio_port, uint16_t gpios)
{
@ -131,7 +131,7 @@ uint16_t gpio_get(uint32_t gpio_port, uint16_t gpios)
* Toggle port pins output value (Atomic)
* @param[in] gpio_port GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....)
* @param[in] gpios (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL,
* use logical OR '|' to separate)
* use bitwise OR '|' to separate)
*/
void gpio_toggle(uint32_t gpio_port, uint16_t gpios)
{
@ -167,7 +167,7 @@ void gpio_port_write(uint32_t gpio_port, uint16_t data)
*
* @param[in] gpio_port GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....)
* @param[in] gpios (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL,
* use logical OR '|' to separate)
* use bitwise OR '|' to separate)
*/
void gpio_port_config_lock(uint32_t gpio_port, uint16_t gpios)
{

10
lib/stm32/common/gpio_common_all.c

@ -34,7 +34,7 @@ Set one or more pins of the given GPIO port to 1 in an atomic operation.
@param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id
@param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id
If multiple pins are to be changed, use logical OR '|' to separate
If multiple pins are to be changed, use bitwise OR '|' to separate
them.
*/
void gpio_set(uint32_t gpioport, uint16_t gpios)
@ -49,7 +49,7 @@ Clear one or more pins of the given GPIO port to 0 in an atomic operation.
@param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id
@param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id
If multiple pins are to be changed, use logical OR '|' to separate
If multiple pins are to be changed, use bitwise OR '|' to separate
them.
*/
void gpio_clear(uint32_t gpioport, uint16_t gpios)
@ -62,7 +62,7 @@ void gpio_clear(uint32_t gpioport, uint16_t gpios)
@param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id
@param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id
If multiple pins are to be read, use logical OR '|' to separate
If multiple pins are to be read, use bitwise OR '|' to separate
them.
@return Unsigned int16 value of the pin values. The bit position of the pin
value returned corresponds to the pin number.
@ -80,7 +80,7 @@ the non-toggled pins are not affected.
@param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id
@param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id
If multiple pins are to be changed, use logical OR '|' to separate
If multiple pins are to be changed, use bitwise OR '|' to separate
them.
*/
void gpio_toggle(uint32_t gpioport, uint16_t gpios)
@ -125,7 +125,7 @@ reset.
@param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id
@param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id
If multiple pins are to be locked, use logical OR '|' to separate
If multiple pins are to be locked, use bitwise OR '|' to separate
them.
*/
void gpio_port_config_lock(uint32_t gpioport, uint16_t gpios)

6
lib/stm32/f1/gpio.c

@ -88,7 +88,7 @@ open drain/push pull), for a set of GPIO pins on a given GPIO port.
@param[in] mode Unsigned int8. Pin mode @ref gpio_mode
@param[in] cnf Unsigned int8. Pin configuration @ref gpio_cnf
@param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id
If multiple pins are to be set, use logical OR '|' to separate
If multiple pins are to be set, use bitwise OR '|' to separate
them.
*/
@ -161,7 +161,7 @@ this function as its current value cannot be ascertained from the hardware.
@param[in] swjdisable Unsigned int8. Disable parts of the SWJ capability @ref
afio_swj_disable.
@param[in] maps Unsigned int32. Logical OR of map enable controls from @ref
@param[in] maps Unsigned int32. Bitwise OR of map enable controls from @ref
afio_remap, @ref afio_remap_can1, @ref afio_remap_tim3, @ref afio_remap_tim2,
@ref afio_remap_tim1, @ref afio_remap_usart3. For connectivity line devices
only @ref afio_remap_cld are also available.
@ -182,7 +182,7 @@ gpio_primary_remap for the main set of remaps.
The AFIO remapping feature is used only with the STM32F10x series.
@param[in] maps Unsigned int32. Logical OR of map enable controls from @ref
@param[in] maps Unsigned int32. Bitwise OR of map enable controls from @ref
afio_remap2
*/
void gpio_secondary_remap(uint32_t maps)

Loading…
Cancel
Save