diff -uNr --exclude=.svn sys.ORIG/arch/i386/conf/GENERIC sys/arch/i386/conf/GENERIC --- sys.ORIG/arch/i386/conf/GENERIC Sat Sep 16 15:01:30 2006 +++ sys/arch/i386/conf/GENERIC Tue Apr 17 04:43:15 2007 @@ -683,6 +683,13 @@ #owid* at onewire? # ID #owtemp* at onewire? # Temperature +# Motion control for robotics and machinery +#option MOTIONCONTROL # Real-time motion control extensions +#servo0 at gpio1 offset 0 mask 0x3 # Motor with clock/direction interface +#cncpanel0 at gpio1 offset 0 mask 0x3 # Machine tool control panel +#estop0 at gpio1 offset 0 mask 0x1 # Emergency stop or limit switch +#encoder0 at gpio1 offset 0 mask 0x3 # Position encoder (quadrature signal) + pseudo-device pctr 1 pseudo-device mtrr 1 # Memory range attributes control pseudo-device nvram 1 diff -uNr --exclude=.svn sys.ORIG/arch/i386/conf/files.i386 sys/arch/i386/conf/files.i386 --- sys.ORIG/arch/i386/conf/files.i386 Tue Aug 1 07:13:25 2006 +++ sys/arch/i386/conf/files.i386 Sat Apr 21 00:46:37 2007 @@ -406,6 +406,11 @@ # include "dev/sdmmc/files.sdmmc" +# +# Machine-independent CNC drivers +# +include "dev/cnc/files.cnc" + include "../../../dev/acpi/files.acpi" file arch/i386/i386/acpi_machdep.c acpi diff -uNr --exclude=.svn sys.ORIG/arch/i386/i386/conf.c sys/arch/i386/i386/conf.c --- sys.ORIG/arch/i386/i386/conf.c Tue Aug 1 07:13:25 2006 +++ sys/arch/i386/i386/conf.c Thu Apr 26 08:49:30 2007 @@ -204,6 +204,7 @@ #include "pf.h" #include "hotplug.h" #include "gpio.h" +#include "cnc.h" struct cdevsw cdevsw[] = { @@ -317,6 +318,7 @@ cdev_gpio_init(NGPIO,gpio), /* 83: GPIO interface */ cdev_nvram_init(NNVRAM,nvram), /* 84: NVRAM interface */ cdev_acpi_init(NACPI,acpi), /* 85: ACPI */ + cdev_cnc_init(NCNC,cnc), /* 86: CNC control interface */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff -uNr --exclude=.svn sys.ORIG/conf/GENERIC sys/conf/GENERIC --- sys.ORIG/conf/GENERIC Thu Aug 3 16:59:34 2006 +++ sys/conf/GENERIC Thu Apr 26 08:47:47 2007 @@ -81,6 +81,7 @@ pseudo-device ccd 4 # concatenated disk devices pseudo-device ksyms 1 # kernel symbols device pseudo-device systrace 1 # system call tracing device +#pseudo-device cnc 1 # controller for machinery and robots # clonable devices pseudo-device bpfilter # packet filter diff -uNr --exclude=.svn sys.ORIG/sys/conf.h sys/sys/conf.h --- sys.ORIG/sys/conf.h Tue Aug 1 07:14:38 2006 +++ sys/sys/conf.h Thu Apr 26 08:51:48 2007 @@ -476,6 +476,12 @@ (dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \ (dev_type_mmap((*))) enodev } +/* open, close, write, ioctl */ +#define cdev_cnc_init(c,n) { \ + dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ + dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ + 0, seltrue, (dev_type_mmap((*))) enodev } + #endif /* @@ -630,6 +636,7 @@ cdev_decl(hotplug); cdev_decl(gpio); +cdev_decl(cnc); #endif