/*	$OpenBSD$	*/
/*	Public domain	*/

#include "cnc_math.h"
#include "cnc_quintic.h"

extern const char *cnc_insn_names[];
extern struct cnc_device *cnc_servos[CNC_NAXES];
extern struct cnc_device *cnc_spindles[CNC_MAX_SPINDLES];
extern struct cnc_device *cnc_estops[CNC_MAX_ESTOPS];
extern int cnc_nservos;
extern int cnc_nspindles;
extern int cnc_nestops;
extern u_long cnc_timebase;

int cncopen(dev_t, int, int, struct proc *);
int cncclose(dev_t, int, int, struct proc *);
int cncioctl(dev_t, u_long, caddr_t, int, struct proc *);
int cncwrite(dev_t, struct uio *, int);
void cncattach(int);
int cncdetach(struct device *, int);
int cncactivate(struct device *, enum devact);

void cnc_cal_update(void *);
int cnc_move(struct cnc_insn *);
int cnc_prog_exec(void);
void cnc_prog_reset(void);
__inline void cnc_move_axis(enum cnc_axis, int);
__inline struct cnc_device *cnc_get_spindle(int);
__inline void cnc_move_delay(const struct cnc_quintic_profile *, cnc_real_t,
                             cnc_real_t);
u_long cnc_calibrate_timebase(void);
__inline int cnc_estop_raised(void);

