Commit b29fd91d authored by Miguel Gómez Sexto's avatar Miguel Gómez Sexto

Added function to get internal buffer pointer to the library

Signed-off-by: Miguel Gómez Sexto's avatarMiguel Gomez <magomez@igalia.com>
parent d540ccbb
...@@ -262,6 +262,11 @@ int tdc_get_active_channels(struct tdc_board *b, uint32_t *config) ...@@ -262,6 +262,11 @@ int tdc_get_active_channels(struct tdc_board *b, uint32_t *config)
return __tdc_sysfs_get(b, "input_enable", config); return __tdc_sysfs_get(b, "input_enable", config);
} }
int tdc_get_circular_buffer_pointer(struct tdc_board *b, uint32_t *ptr)
{
return __tdc_sysfs_get(b, "get_wr_pointer", ptr);
}
static int __tdc_valid_channel(struct tdc_board *b, int chan) static int __tdc_valid_channel(struct tdc_board *b, int chan)
{ {
if (chan < 0 || chan > 4) { if (chan < 0 || chan > 4) {
......
...@@ -49,6 +49,8 @@ extern int tdc_get_timestamp_threshold(struct tdc_board *b, uint32_t *thres); ...@@ -49,6 +49,8 @@ extern int tdc_get_timestamp_threshold(struct tdc_board *b, uint32_t *thres);
extern int tdc_set_active_channels(struct tdc_board *b, uint32_t config); extern int tdc_set_active_channels(struct tdc_board *b, uint32_t config);
extern int tdc_get_active_channels(struct tdc_board *b, uint32_t *config); extern int tdc_get_active_channels(struct tdc_board *b, uint32_t *config);
extern int tdc_get_circular_buffer_ptr(struct tdc_board *b, uint32_t *ptr);
extern int tdc_read(struct tdc_board *b, int chan, struct tdc_time *t, extern int tdc_read(struct tdc_board *b, int chan, struct tdc_time *t,
int n, int flags); int n, int flags);
extern int tdc_fread(struct tdc_board *b, int chan, struct tdc_time *t, int n); extern int tdc_fread(struct tdc_board *b, int chan, struct tdc_time *t, int n);
......
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