From 5c506a9f89cf8273b8b790fb77416fc68d96d20b Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Thu, 14 Jun 2012 17:00:53 +0200 Subject: use stdbool --- src/k8055.c | 6 +++--- src/k8055.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/k8055.c b/src/k8055.c index d136a4a..e383f3c 100644 --- a/src/k8055.c +++ b/src/k8055.c @@ -131,7 +131,7 @@ #include "k8055.h" /** Represents a Vellemean K8055 USB board. */ -typedef struct k8055_device { +struct k8055_device { /** Data last read from device, used by read_data(). */ unsigned char data_in[PACKET_LENGTH]; @@ -141,7 +141,7 @@ typedef struct k8055_device { /** Underlying libusb handle to device. NULL if the device is not open. */ libusb_device_handle *device_handle; -} k8055_device; +}; /** Libusb context. */ static libusb_context* context = NULL; @@ -392,7 +392,7 @@ int k8055_set_debounce_time(k8055_device* device, int counter, int debounce) { return k8055_write_data(device); } -int k8055_get_all_input(k8055_device* device, int *bitmask, int *analog0, int *analog1, int *counter0, int *counter1, int quick) { +int k8055_get_all_input(k8055_device* device, int *bitmask, int *analog0, int *analog1, int *counter0, int *counter1, bool quick) { int cycles = 2; if (quick) cycles = 1; int r = read_data(device, cycles); diff --git a/src/k8055.h b/src/k8055.h index 9b29a29..d287098 100644 --- a/src/k8055.h +++ b/src/k8055.h @@ -29,6 +29,8 @@ #ifndef K8055_H_ #define K8055_H_ +#include + #ifdef __cplusplus extern "C" { #endif @@ -123,7 +125,7 @@ int k8055_set_debounce_time(k8055_device*, int counter, int debounce); * @return 0 on success * @return K8055_ERROR_CLOSED if the given device is not open * @return K8055_ERROR_READ if another error occurred during the read process */ -int k8055_get_all_input(k8055_device*, int *digitalBitmask, int *analog0, int *analog1, int *counter0, int *counter1, int quick); +int k8055_get_all_input(k8055_device*, int *digitalBitmask, int *analog0, int *analog1, int *counter0, int *counter1, bool quick); #ifdef __cplusplus } -- cgit v1.2.3