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

Subversion Repositories potato

[/] [potato/] [trunk/] [benchmarks/] [sha256/] [gpio.c] - Blame information for rev 55

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 skordal
// The Potato Processor Benchmark Applications
2
// (c) Kristian Klomsten Skordal 2015 <kristian.skordal@wafflemail.net>
3
// Report bugs and issues on <http://opencores.org/project,potato,bugtracker>
4
 
5
#include "gpio.h"
6
#include "platform.h"
7
 
8
void gpio_set_direction(volatile uint32_t * base, uint32_t direction)
9
{
10
        base[GPIO_DIR >> 2] = direction;
11
}
12
 
13
void gpio_set_output(volatile uint32_t * base, uint32_t output)
14
{
15
        base[GPIO_OUTPUT >> 2] = output;
16
}
17
 
18
uint32_t gpio_get_value(volatile uint32_t * base)
19
{
20
        return base[GPIO_INPUT >> 2];
21
}
22
 
23
 

powered by: WebSVN 2.1.0

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