27 avr_error(
"Cannot open SPI Source input file '%s'", fileName);
31 *timeToNextStepIn_ns = 100000;
32 for(
unsigned i=0;i<2;++i){
33 while(f.getline(buffer, len)){
34 if(buffer[0] ==
'#')
continue;
37 *timeToNextStepIn_ns = 1000000;
39 f.seekg (0, ios::beg);
45 if(!_spiFile)
return 0;
47 char lineBuffer[1024];
49 if(!
readNextLine(_spiFile,lineBuffer,
sizeof(lineBuffer),timeToNextStepIn_ns)){
55 unsigned long ss = strtoul(p, &p, 0);
56 unsigned long sclk = strtoul(p, &p, 0);
57 unsigned long output = strtoul(p, &p, 0);
60 _sclk = (sclk)?
'H':
'L';
61 _mosi = (output)?
'H':
'L';
long long SystemClockOffset
static char * readNextLine(std::ifstream &f, char *buffer, unsigned len, SystemClockOffset *timeToNextStepIn_ns)
int Step(bool &trueHwStep, SystemClockOffset *timeToNextStepIn_ns=0)
Return nonzero if a breakpoint was hit.
SpiSource(const char *fileName, Net &ssNet, Net &sclkNet, Net &mosiNet)
Connect Pins to each other and transfers a output change from a pin to input values for all pins...