src/liblpfk.c

changeset 2
071056e12321
parent 1
3e775df109e6
child 3
93f5d26366ad
     1.1 --- a/src/liblpfk.c	Tue Aug 26 13:18:18 2008 +0100
     1.2 +++ b/src/liblpfk.c	Tue Aug 26 18:45:10 2008 +0100
     1.3 @@ -57,7 +57,7 @@
     1.4  #include "liblpfk.h"
     1.5  
     1.6  /* lpfk_open {{{ */
     1.7 -int lpfk_open(const char *port, LPFK_CTX *ctx)
     1.8 +int lpfk_open(LPFK_CTX *ctx, const char *port)
     1.9  {
    1.10  	struct termios newtio;
    1.11  	int status;
    1.12 @@ -148,9 +148,8 @@
    1.13  		ctx->led_mask = 0;
    1.14  		ctx->fd = fd;
    1.15  
    1.16 -		// Enable the LPFK
    1.17 -		write(fd, "\x08", 1);
    1.18 -		ctx->enabled = true;
    1.19 +		// Disable LPFK keyboard scanning
    1.20 +		lpfk_enable(ctx, false);
    1.21  
    1.22  		// Return OK status
    1.23  		return LPFK_E_OK;