#ifndef NOTE1_GET_SET_H #define NOTE1_GET_SET_H #define NOTE1_DELAY_BETWEEN_READS 10 #define NOTE1_DELAY_BETWEEN_WRITES 10 /* macro to compact the 2 bits we are reading for the get() function */ #define note1_get_stat_data(stat) ( ((stat & 0x20) >> 4) | (( stat & 0x08) >>3) ) /* puts data on the line and flushs it * returns non-zero if there is data pesent on the in line. */ u_int8_t note1_put(struct parport *port, u_int8_t dat); /*time preamble --its a mystery--*/ u_int8_t note1_time_pre( struct parport *port); /* returns the value of the last read. * should be run twice on initialization * a return value of 0xb8 means yits ready */ u_int8_t note1_check_data(struct parport *port); u_int8_t note1_sig_init( struct parport *port ); /* note1_per_get returns non-zero if there is some data on the line. */ u_int8_t note1_pre_get( struct parport *port ); /* returns the char at the end of the devices input buffer */ u_int8_t note1_get( struct parport *port ); /* advances to the next byte on the line. * returns non-zero of there is more data on the line. */ u_int8_t note1_get_adv( struct parport *port ); /* sends sysex, middle c on, middle c off. * then reads up to 32 char off the midi-in buffer */ void note1_selftest(struct parport * port); #endif