/** Interface for DAC management. * Each dac driver must implement all functions defined in the structure * dac_interface. * * Currently, dac and adc are tuned to the same frequency. * * Sampled data must be formated by the driver to FLOATS. * All functions return 1 if ok, or <0 if error */ struct dac_interface { /* this name must match the name selected in platforms.con */ const char *name; int (*readcfg) (char *filename, int *NsamplesIn, int *NsamplesOut); /** initialize dac. options may vary between dacs. * * Sampling is started during this function call. * * \timeSlot Returns the system time slot in microsec * \rxBuffer reception buffer * \txBuffer transmit buffer * \sync function that must be called each dac interrupt to synchronize the local processor timer (time slot). */ int (*init) (int *timeSlot, float *rxBuffer, float *txBuffer, void (*sync)(void)); /** close dac */ void (*close) (); };