/*------------------------------------------------------------------------------------ ** pnp.h - PNP functions **------------------------------------------------------------------------------------ */ #ifndef PNP_H #define PNP_H struct pattern_generator_3{ unsigned int duration[9]; unsigned int repeat; unsigned int data[9]; } ; struct pattern_generator_4{ unsigned int duration[9]; unsigned int ss; unsigned int data[9]; } ; struct fifo_buffer{ int size; int position; unsigned short *buffer; unsigned short *type; }; #define FIFO_DIGIO 1 #define FIFO_PPG4 2 #define FIFO_SPG4 3 #define FIFO_SPG3 4 #define SERIAL_PG4 0x0000 #define PARALLEL_PG4 0x0001 struct pattern_generator_4 ppg4; struct pattern_generator_4 pg4; void pnp_print_pg4(char *s, struct pattern_generator_4 *pg4); int pnp_start(ce_t *Ce); int pnp_stop(ce_t *Ce); int pnp_shutter_open(ce_t *Ce); int pnp_shutter_close(ce_t *Ce); int pnp_digio_low(ce_t *Ce, unsigned int value); int pnp_set_ppg4(ce_t *Ce, struct pattern_generator_4 *ppg4); int pnp_set_ppg4_value(ce_t *Ce, unsigned int value); int pnp_set_spg4(ce_t *Ce, struct pattern_generator_4 *spg4); int pnp_set_spg3(ce_t *Ce, struct pattern_generator_3 *spg3); int pnp_run_ppg4(ce_t *Ce, unsigned int iter); int pnp_run_spg(ce_t *Ce, unsigned int iter); #endif /* PNP_H */