RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches

Overview

General Purpose I/O (GPIO) driver.

This module provides functions to configure and control GPIO input/output and interrupt behavior.

Usage & Initialization.

This is an example show how to instantiate GPIO Driver with gpio_instance_t.

#include "gpio/gpio.h"
#define GPIO_0 (gpio_hwreg_t*)SYSTEM_GPIO_0_IO_CTRL
void gpio_init(){
gpio_instance_t gpio_0 = {
.hwreg = GPIO_0,
.output = 0x00, // Set GPIO Output pin Value
.outputEnable = 0x0E, // Set to Enable GPIO pin as OUTPUT.
};
gpio_applyConfig(&gpio_0);
}
GPIO driver API definitions.
void gpio_applyConfig(gpio_instance_t *inst)
Apply stored GPIO configuration to hardware.
Definition gpio.c:87
GPIO instance.
Definition gpio.h:104
See also
Example GPIO Demo - Learn how to use the driver for basic operations

Topics

 API Functions
 Function definitions for GPIO driver.
 Data Structures
 Structs and Enums used by the driver.