aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKen Sarkies2012-11-11 07:22:42 +1030
committerKen Sarkies2012-11-13 18:41:31 +1030
commit7d55ebbe0c8d5cbda1d4f21f1be7d08d35138fcc (patch)
tree2dc2ca930c67d868737dfb6d0fbf939de92e3b5c /lib
parente34ad9b3d229a7637b0c0317747c672a0807bab2 (diff)
Adjustments to fix documentation
Diffstat (limited to 'lib')
-rw-r--r--lib/stm32/common/gpio_common_f24.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/stm32/common/gpio_common_f24.c b/lib/stm32/common/gpio_common_f24.c
index 2a7c127..d464a50 100644
--- a/lib/stm32/common/gpio_common_f24.c
+++ b/lib/stm32/common/gpio_common_f24.c
@@ -29,12 +29,12 @@ On reset all ports are configured as digital floating input.
@section gpio_api_ex Basic GPIO Handling API.
-Example 1: Push-pull digital output actions on ports C2 and C9
+Example 1: Push-pull digital output actions with pullup on ports C2 and C9
@code
gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT,
GPIO_PUPD_PULLUP, GPIO2 | GPIO9);
- gpio_output_options((GPIOC, GPIO_OTYPE_PP,
+ gpio_output_options(GPIOC, GPIO_OTYPE_PP,
GPIO_OSPEED_25MHZ, GPIO2 | GPIO9);
gpio_set(GPIOC, GPIO2 | GPIO9);
gpio_clear(GPIOC, GPIO2);
@@ -42,10 +42,10 @@ Example 1: Push-pull digital output actions on ports C2 and C9
gpio_port_write(GPIOC, 0x204);
@endcode
-Example 1: Digital input on port C12
+Example 2: Digital input on port C12 with pullup
@code
- gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT,
+ gpio_mode_setup(GPIOC, GPIO_MODE_INPUT,
GPIO_PUPD_PULLUP, GPIO12);
reg16 = gpio_port_read(GPIOC);
@endcode
@@ -86,7 +86,7 @@ for a set of GPIO pins on a given GPIO port.
@param[in] mode Unsigned int8. Pin mode @ref gpio_mode
@param[in] pull_up_down Unsigned int8. Pin pullup/pulldown configuration @ref gpio_pup
@param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id
- If multiple pins are to be set, use logical OR '|' to separate them.
+ If multiple pins are to be set, use bitwise OR '|' to separate them.
*/
void gpio_mode_setup(u32 gpioport, u8 mode, u8 pull_up_down, u16 gpios)
{
@@ -125,7 +125,7 @@ open drain/push pull) and speed, for a set of GPIO pins on a given GPIO port.
@param[in] otype Unsigned int8. Pin output type @ref gpio_output_type
@param[in] speed Unsigned int8. Pin speed @ref gpio_speed
@param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id
- If multiple pins are to be set, use logical OR '|' to separate them.
+ If multiple pins are to be set, use bitwise OR '|' to separate them.
*/
void gpio_set_output_options(u32 gpioport, u8 otype, u8 speed, u16 gpios)
{
@@ -164,7 +164,7 @@ this would rarely be useful as each pin is likely to require a different number.
@param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id
@param[in] alt_func_num Unsigned int8. Pin alternate function number @ref gpio_af_num
@param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id
- If multiple pins are to be set, use logical OR '|' to separate them.
+ If multiple pins are to be set, use bitwise OR '|' to separate them.
*/
void gpio_set_af(u32 gpioport, u8 alt_func_num, u16 gpios)
{