OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [peripheral/] [gpio.c] - Diff between revs 502 and 549

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;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.