Skip to content
Snippets Groups Projects
Commit 2c920545 authored by Miguel Gómez Sexto's avatar Miguel Gómez Sexto Committed by Samuel Iglesias Gonsálvez
Browse files

Define constants for default time and timestamps thresholds


Signed-off-by: default avatarMiguel Gomez <magomez@igalia.com>
Signed-off-by: default avatarSamuel Iglesias Gonsalvez <siglesias@igalia.com>
parent eb21175d
No related merge requests found
......@@ -321,9 +321,9 @@ int tdc_fmc_probe(struct fmc_device *dev)
/* Initialize DAC */
tdc_set_dac_word(tdc, 0xA8F5);
/* Initialize timestamp threshold */
tdc_set_irq_tstamp_thresh(tdc, 0x10);
tdc_set_irq_tstamp_thresh(tdc, DEFAULT_TSTAMP_THRESH);
/* Initialize time threshold */
tdc_set_irq_time_thresh(tdc, 0x10);
tdc_set_irq_time_thresh(tdc, DEFAULT_TIME_THRESH);
/* Prepare the irq work */
INIT_WORK(&tdc->irq_work, tdc_fmc_irq_work);
......
......@@ -34,11 +34,11 @@ static ZIO_ATTR_DEFINE_STD(ZIO_DEV, tdc_zattr_dev_std) = {
static struct zio_attribute tdc_zattr_dev[] = {
ZIO_ATTR_EXT("version", S_IRUGO, TDC_ATTR_DEV_VERSION, TDC_VERSION),
ZIO_ATTR_EXT("tstamp_thresh", _RW_, TDC_ATTR_DEV_TSTAMP_THRESH, 100),
ZIO_ATTR_EXT("time_thresh", _RW_, TDC_ATTR_DEV_TIME_THRESH, 100),
ZIO_ATTR_EXT("tstamp_thresh", _RW_, TDC_ATTR_DEV_TSTAMP_THRESH, DEFAULT_TSTAMP_THRESH),
ZIO_ATTR_EXT("time_thresh", _RW_, TDC_ATTR_DEV_TIME_THRESH, DEFAULT_TIME_THRESH),
ZIO_ATTR_EXT("current_utc_time", S_IRUGO, TDC_ATTR_DEV_CURRENT_UTC, 0),
ZIO_ATTR_EXT("set_utc_time", S_IWUGO, TDC_ATTR_DEV_SET_UTC, 0),
ZIO_ATTR_EXT("channel_term", _RW_, TDC_ATTR_DEV_INPUT_ENABLED, 0x1F),
ZIO_ATTR_EXT("channel_term", _RW_, TDC_ATTR_DEV_INPUT_ENABLED, 0),
ZIO_ATTR_EXT("dac_word", _RW_, TDC_ATTR_DEV_DAC_WORD, 0),
ZIO_ATTR_EXT("activate_acquisition", _RW_,
TDC_ATTR_DEV_ACTIVATE_ACQUISITION, 0),
......
......@@ -18,6 +18,9 @@ extern int slot[MAX_DEVICES];
extern unsigned int nslot;
extern char *gateware;
#define DEFAULT_TIME_THRESH 0x10
#define DEFAULT_TSTAMP_THRESH 0x10
struct tdc_event {
u32 fine_time; /* In BIN (81 ps resolution) */
u32 coarse_time; /* 8 ns resolution */
......
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