URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 502 |
Rev 549 |
Line 39... |
Line 39... |
void gpio_reset( void )
|
void gpio_reset( void )
|
{
|
{
|
static int first_time = 1;
|
static int first_time = 1;
|
unsigned i, j;
|
unsigned i, j;
|
|
|
if ( !config.ngpios )
|
|
config.gpios_enabled = 0;
|
|
if ( !config.gpios_enabled )
|
|
return;
|
|
|
|
if ( first_time ) {
|
if ( first_time ) {
|
memset( gpios, 0, sizeof(gpios) );
|
memset( gpios, 0, sizeof(gpios) );
|
first_time = 0;
|
first_time = 0;
|
}
|
}
|
|
|
|
|
for ( i = 0; i < config.ngpios; ++ i ) {
|
for ( i = 0; i < config.ngpios; ++ i ) {
|
struct gpio_device *gpio = &(gpios[i]);
|
struct gpio_device *gpio = &(gpios[i]);
|
|
|
gpio->gpio_number = i;
|
gpio->gpio_number = i;
|
gpio->baseaddr = config.gpios[i].baseaddr;
|
gpio->baseaddr = config.gpios[i].baseaddr;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.