#include <types.h>#include <broadway.h>Go to the source code of this file.
Enumerations | |
| enum | gpio_pin_t { GPIO_POWER = (1 << 0), GPIO_SHUTDOWN = (1 << 1), GPIO_FAN_SPEED = (1 << 2), GPIO_DC_DC = (1 << 3), GPIO_DI_SPIN = (1 << 4), GPIO_SLOT_LED = (1 << 5), GPIO_EJECT = (1 << 6), GPIO_SLOT_IN = (1 << 7), GPIO_SENSOR_BAR = (1 << 8), GPIO_DI_EJECT = (1 << 9), GPIO_EEP_CS = (1 << 10), GPIO_EEP_CLK = (1 << 11), GPIO_EEP_MOSI = (1 << 12), GPIO_EEP_MISO = (1 << 13), GPIO_AVE_CLK = (1 << 14), GPIO_AVE_DATA = (1 << 15), GPIO_DEBUG0 = (1 << 16), GPIO_DEBUG1 = (1 << 17), GPIO_DEBUG2 = (1 << 18), GPIO_DEBUG3 = (1 << 19), GPIO_DEBUG4 = (1 << 20), GPIO_DEBUG5 = (1 << 21), GPIO_DEBUG6 = (1 << 22), GPIO_DEBUG7 = (1 << 23) } |
Functions | |
| int | gpio_initialize (void) |
| Initialize the GPIO subsystem. | |
| int | gpio_shutdown (void) |
| Shut down the GPIO subsystem. | |
| gpio_pin_t | gpio_read (void) |
| Reads GPIO data. | |
| void | gpio_write (gpio_pin_t gpios) |
| Writes GPIO output data. | |
| void | gpio_set (gpio_pin_t gpios) |
| Sets GPIO output data bits. | |
| void | gpio_clear (gpio_pin_t gpios) |
| Clears GPIO output data bits. | |
| void | gpio_mask (gpio_pin_t setgpios, gpio_pin_t clrgpios) |
| Masks GPIO output data bits. | |
| void | gpio_switch (gpio_pin_t gpios) |
| Switches GPIO output data bits. | |
| int | gpio_direction (gpio_pin_t pin, int dir) |
| Sets GPIO direction. | |
General Purpose I/O control
| enum gpio_pin_t |
| void gpio_clear | ( | gpio_pin_t | gpios | ) |
Clears GPIO output data bits.
| gpios | The GPIO states to clear. |
| int gpio_direction | ( | gpio_pin_t | pin, | |
| int | dir | |||
| ) |
Sets GPIO direction.
| dir | the new GPIO direction. -1 is input, 1 is output, 0 is no change. |
| int gpio_initialize | ( | void | ) |
Initialize the GPIO subsystem.
Initializes the GPIO subsystem, registers the handler for the GPIO interrupt and performs all other required initialization tasks.
| void gpio_mask | ( | gpio_pin_t | setgpios, | |
| gpio_pin_t | clrgpios | |||
| ) |
Masks GPIO output data bits.
| setgpios | The GPIO states to set. | |
| clrgpios | The GPIO states to clear. |
| gpio_pin_t gpio_read | ( | void | ) |
Reads GPIO data.
Reads data from the GPIOs.
| void gpio_set | ( | gpio_pin_t | gpios | ) |
Sets GPIO output data bits.
| gpios | The GPIO states to set. |
| int gpio_shutdown | ( | void | ) |
Shut down the GPIO subsystem.
Shuts down the GPIO subsystem, unregisters the handler for the GPIO interrupt and performs all other required shut down tasks.
| void gpio_switch | ( | gpio_pin_t | gpios | ) |
Switches GPIO output data bits.
| gpios | The GPIO states to switch. |
| void gpio_write | ( | gpio_pin_t | gpios | ) |
Writes GPIO output data.
| gpios | The GPIO state to output. |
1.6.3