Init must be called before any other operation of the module.
Reader should be spawned by the caller. It opens the pointer device specified by file , and sends a value ( id, err ) on channel pid . On success, id is the process ID of the spawned process and err is nil; on an error, err is a diagnostic, and id is undefined. If the file was opened successfully, reader continually reads the pointer device and sends Pointer adts over the channel posn . If file is nil , the default device is /dev/pointer .
Bytes2ptr converts the array of bytes buf to a Pointer and returns a reference to it. Buf should consist of exactly Devpointer->Size bytes and be in the format returned by /dev/pointer .
Ptr2bytes provides the inverse transformation of bytes2ptr : it packs the data into an array of bytes of appropriate format, which it returns.