Commit 2f883ce3 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

wrcore_v2: replacing gpio.h with syscon.h

parent 20e1cc91
#include "board.h"
#include "gpio.h"
#include "syscon.h"
#define DNA_DATA 1
#define DNA_CLK 4
......@@ -47,4 +47,4 @@ void dna_read(uint32_t *lo, uint32_t *hi)
*hi = (uint32_t) (dna >> 32);
*lo = (uint32_t) dna;
}
\ No newline at end of file
}
#include "types.h"
#include "board.h"
#include "gpio.h"
#include "syscon.h"
#define I2C_DELAY 100
......@@ -10,9 +10,9 @@ static void mi2c_delay()
for(i=0;i<I2C_DELAY;i++) asm volatile ("nop");
}
#define M_SDA_OUT(x) { gpio_out(GPIO_PIN_SDA_OUT, x); mi2c_delay(); }
#define M_SCL_OUT(x) { gpio_out(GPIO_PIN_SCL_OUT, x); mi2c_delay(); }
#define M_SDA_IN gpio_in(GPIO_PIN_SDA_IN)
#define M_SDA_OUT(x) { gpio_out(GPIO_SDA, x); mi2c_delay(); }
#define M_SCL_OUT(x) { gpio_out(GPIO_SCL, x); mi2c_delay(); }
#define M_SDA_IN gpio_in(GPIO_SDA)
void mi2c_start()
{
......@@ -81,11 +81,6 @@ void mi2c_get_byte(unsigned char *data)
void mi2c_init()
{
gpio_dir(GPIO_PIN_SDA_OUT, 1);
gpio_dir(GPIO_PIN_SCL_OUT, 1);
gpio_dir(GPIO_PIN_SDA_IN, 0);
M_SCL_OUT(1);
M_SDA_OUT(1);
}
......
......@@ -13,7 +13,6 @@ White Rabbit Softcore PLL (SoftPLL)
#include <hw/softpll_regs.h>
#include "gpio.h"
#include "softpll.h"
/* Bit size of phase tags generated by the DMTDs. Used to sign-extend the tags. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment