zfm20: Initial implementation

This driver implements support for the ZFM20 fingerprint module.  It
was tested on a Grove Fingerprint Sensor.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Zion Orent <zorent@ics.com>
Signed-off-by: John Van Drasek <john.r.van.drasek@intel.com>
This commit is contained in:
Jon Trulson
2015-03-30 18:02:08 -06:00
committed by John Van Drasek
parent bdaf952e91
commit 8bf92be1ab
12 changed files with 1818 additions and 0 deletions

26
src/zfm20/pyupm_zfm20.i Normal file
View File

@@ -0,0 +1,26 @@
%module pyupm_zfm20
%include "../upm.i"
%include "../carrays_uint16_t.i"
%include "../carrays_uint32_t.i"
%include "cpointer.i"
%feature("autodoc", "3");
%typemap(in) uint16_t * {
void *argp = 0 ;
int res = SWIG_ConvertPtr($input, &argp,SWIGTYPE_p_uint16Array, 0 | 0 );
$1 = reinterpret_cast< uint16_t * >(argp);
}
%typemap(in) uint32_t {
$1 = PyInt_AsLong($input);
}
/* Send "int *" to python as intp */
%pointer_functions(int, intp);
%{
#include "zfm20.h"
speed_t int_B57600 = B57600;
%}
%include "zfm20.h"
speed_t int_B57600 = B57600;