Commit d2adf8cd authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

software/lib: added function to choose between native and raw readout modes

parent e624534a
...@@ -76,6 +76,10 @@ fdelay_device_t *fdelay_create_minibone(char *iface, char *mac_addr, uint32_t ba ...@@ -76,6 +76,10 @@ fdelay_device_t *fdelay_create_minibone(char *iface, char *mac_addr, uint32_t ba
fdelay_time_t fdelay_from_picos(const uint64_t ps); fdelay_time_t fdelay_from_picos(const uint64_t ps);
int64_t fdelay_to_picos(const fdelay_time_t t); int64_t fdelay_to_picos(const fdelay_time_t t);
/* Enables/disables raw timestamp readout mode (debugging only) */
int fdelay_raw_readout(fdelay_device_t *dev, int raw_moide);
/* Initializes and calibrates the device. 0 = success, negative = error */ /* Initializes and calibrates the device. 0 = success, negative = error */
int fdelay_init(fdelay_device_t *dev); int fdelay_init(fdelay_device_t *dev);
......
...@@ -869,7 +869,7 @@ int fdelay_init(fdelay_device_t *dev) ...@@ -869,7 +869,7 @@ int fdelay_init(fdelay_device_t *dev)
dev->priv_fd = (void *) hw; dev->priv_fd = (void *) hw;
hw->raw_mode = 1; hw->raw_mode = 0;
hw->base_addr = dev->base_addr; hw->base_addr = dev->base_addr;
hw->base_i2c = 0x100; hw->base_i2c = 0x100;
hw->base_onewire = dev->base_addr + 0x500; hw->base_onewire = dev->base_addr + 0x500;
...@@ -1129,6 +1129,13 @@ static int poll_rbuf(fdelay_device_t *dev, uint32_t *o_tsbcr) ...@@ -1129,6 +1129,13 @@ static int poll_rbuf(fdelay_device_t *dev, uint32_t *o_tsbcr)
return 0; return 0;
} }
int fdelay_raw_readout(fdelay_device_t *dev, int raw_mode)
{
fd_decl_private(dev)
hw->raw_mode = raw_mode;
return 0;
}
/* TODO: chan_mask */ /* TODO: chan_mask */
int fdelay_configure_readout(fdelay_device_t *dev, int enable) int fdelay_configure_readout(fdelay_device_t *dev, int enable)
{ {
......
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