2014-08-28 16:56:48 +08:00
|
|
|
#include <generated/csr.h>
|
|
|
|
|
|
|
|
#include "rtio.h"
|
|
|
|
|
|
|
|
void rtio_init(void)
|
|
|
|
{
|
2014-11-30 00:13:54 +08:00
|
|
|
rtio_reset_write(1);
|
|
|
|
rtio_reset_write(0);
|
2015-05-02 11:47:11 +08:00
|
|
|
rtio_reset_phy_write(0);
|
2014-08-28 16:56:48 +08:00
|
|
|
}
|
|
|
|
|
2015-05-08 14:44:39 +08:00
|
|
|
long long int rtio_get_counter(void)
|
2014-08-28 16:56:48 +08:00
|
|
|
{
|
2015-05-08 14:44:39 +08:00
|
|
|
rtio_counter_update_write(1);
|
|
|
|
return rtio_counter_read();
|
2014-09-11 23:14:45 +08:00
|
|
|
}
|
|
|
|
|