Changeset 261 for tools/FAD


Ignore:
Timestamp:
07/22/10 12:02:25 (14 years ago)
Author:
dneise
Message:
FAD SPI SLCK can be controled via sclkon & sclkoff see help
Location:
tools/FAD/simple_daq
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tools/FAD/simple_daq/cmd_send.cpp

    r248 r261  
    6363                CMD_Buffer[0] = htons (CMD_DWRITE_STOP);
    6464                printf ("# DWRITE LOW ->\n");
     65                printf ("# 0x%.4X\n", ntohs (CMD_Buffer[0]));
     66        }
     67       
     68        else if (strncmp (Buffer, "sclkon\n", 6) == 0)
     69        {
     70                CMD_Buffer[0] = htons (CMD_SCLK_ON);
     71                printf ("# SCLK ENABLED ->\n");
     72                printf ("# 0x%.4X\n", ntohs (CMD_Buffer[0]));
     73        }
     74        else if (strncmp (Buffer, "sclkoff\n", 7) == 0)
     75        {
     76                CMD_Buffer[0] = htons (CMD_SCLK_OFF);
     77                printf ("# SCLK DISABLED ->\n");
    6578                printf ("# 0x%.4X\n", ntohs (CMD_Buffer[0]));
    6679        }
     
    236249                printf ("    dd:         DENABLE LOW\n");
    237250                printf ("    dr:         DWRITE HIGH\n");
    238                 printf ("    ds:         DWRITE LOW\n\n");
     251                printf ("    ds:         DWRITE LOW\n");
     252                printf ("    sclkon:     Switch SPI SLCK on\n");
     253                printf ("    sclkoff:    Switch SPI SLCK off\n");
    239254                printf ("    tc:         Continuous Trigger\n");
    240255                printf ("    ts:         Stop Trigger\n");
  • tools/FAD/simple_daq/simple_daq.cpp

    r256 r261  
    158158
    159159// note: verbose is not used, but anyway defined.
    160 SimpleDaqConfiguration *getConfig (char *path, int verbose) {
     160SimpleDaqConfiguration *getConfig (const char *path, int verbose) {
    161161FILE* ConfigFile;
    162162// try to open config file
  • tools/FAD/simple_daq/simple_daq.h

    r256 r261  
    2525#define CMD_DWRITE_RUN 0x0800   // DWRITE possibly HIGH
    2626#define CMD_DWRITE_STOP 0x0900  // DWRITE always LOW
     27
     28#define CMD_SCLK_ON 0x1000 
     29#define CMD_SCLK_OFF 0x1100
     30
    2731#define CMD_Trigger_C 0xB000    // continous trigger
    2832#define CMD_Trigger_S 0x2000    // stop continous trigger
     
    5559void int_handler (int sig); // Handle signal SIGINT (CTRL-C)
    5660void exit_program (int exit_status); // Cleanup and exit
    57 SimpleDaqConfiguration *getConfig (char *path, int verbose = 0);
     61SimpleDaqConfiguration *getConfig (const char *path, int verbose = 0);
    5862
    5963#endif /*SOCKETCLIENT_H_*/
Note: See TracChangeset for help on using the changeset viewer.