hooks.c 403 Bytes
Newer Older
1 2
#include <ppsi/ppsi.h>

baujc's avatar
baujc committed
3 4 5 6 7
/* proto-standard hooks */

static 	void state_change(struct pp_instance *ppi) {
	if ( ppi->state==PPS_SLAVE && ppi->next_state!=PPS_UNCALIBRATED ) {
		/* Leave SLAVE state : We must stop the timing output generation */
8 9
		if ( !GOPTS(GLBS(ppi))->forcePpsGen )
			TOPS(ppi)->enable_timing_output(GLBS(ppi),0);
baujc's avatar
baujc committed
10 11 12 13 14
	}
}
struct pp_ext_hooks pp_hooks={
		.state_change = state_change
};