SDK3.5
This document shows Ameba SDK 3.5 APIs
Functions
GPIO_EX

gpio extended functions More...

Functions

void gpio_direct_write (gpio_t *obj, BOOL value)
 Sets value to the selected output port pin. More...
 
void gpio_pull_ctrl (gpio_t *obj, PinMode pull_type)
 Sets pull type to the selected pin. More...
 
void gpio_deinit (gpio_t *obj)
 Deinitializes the GPIO device, include mode/direction/pull control registers. More...
 
void gpio_change_dir (gpio_t *obj, PinDirection direction)
 Set GPIO direction. More...
 

Detailed Description

gpio extended functions

Function Documentation

void gpio_change_dir ( gpio_t *  obj,
PinDirection  direction 
)

Set GPIO direction.

Parameters
objgpio object define in application software.
directionthis parameter can be one of the following values:
  • PIN_INPUT: this pin is input
  • PIN_OUTPUT: this pin is output
Return values
none
void gpio_deinit ( gpio_t *  obj)

Deinitializes the GPIO device, include mode/direction/pull control registers.

Parameters
objgpio object define in application software.
Return values
none
void gpio_direct_write ( gpio_t *  obj,
BOOL  value 
)

Sets value to the selected output port pin.

Parameters
objgpio object define in application software.
valuespecifies the value to be written to the selected pin This parameter can be one of the following values:
  • 0: Pin state set to low
  • 1: Pin state set to high
Return values
none
void gpio_pull_ctrl ( gpio_t *  obj,
PinMode  pull_type 
)

Sets pull type to the selected pin.

Parameters
objgpio object define in application software.
pull_typethis parameter can be one of the following values:
  • PullNone: HighZ, user can input high or low use this pin
  • OpenDrain(is OpenDrain output): no pull + OUT + GPIO[gpio_bit] = 0
  • PullDown: pull down
  • PullUp: pull up
Return values
none