Skip to content
Snippets Groups Projects
Commit 29cb86e1 authored by Patrick Robbe's avatar Patrick Robbe
Browse files

Clean library for slow control

parent 799adcf0
Branches
Tags
1 merge request!56links
......@@ -2,6 +2,7 @@
#include "pcie40_b2slc.h"
#include <unistd.h>
#include <stdio.h>
#include <vector>
#include "pcie40_ecs.h"
///////////////////////////////////////////////////////////////////////////
......@@ -18,6 +19,16 @@ int pcie40_resetWriteFifo( int dev , int ch ) {
return ret ;
}
int pcie40_resetReadFifo( int dev , int ch ) {
unsigned ret = 0 ;
ret = ecs_write( dev , SLC_BAR , SLC_WFIFO_RESET_ADD ,
1 << SLC_WFIFO_RESET_BIT ) ;
if ( ret != 0 ) return -1 ;
ret = ecs_write( dev , SLC_BAR , SLC_WFIFO_RESET_ADD , 0 ) ;
if ( ret != 0 ) return -1 ;
return ret ;
}
int pcie40_writeToFifo( int dev , int ch , std::vector< int > & data ) {
std::vector< int >::iterator it ;
unsigned ret = 0 ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment