summaryrefslogtreecommitdiffstats
path: root/libk8055/k8055.h
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-06-06 07:01:09 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-06-06 07:01:09 +0200
commitb019e00751a521524a5a3f8869cbf0f152ded52e (patch)
tree6e3406f6b695ea80ffb1e38edd7b52497c732257 /libk8055/k8055.h
parent1dcf7f69f49dd11108c01c97025bfc1abd3b75d2 (diff)
downloadk8055-b019e00751a521524a5a3f8869cbf0f152ded52e.zip
k8055-b019e00751a521524a5a3f8869cbf0f152ded52e.tar.gz
rename k8055_digital_x to k8055_digital_input_x, add k8055_digital_output_x, same for analog
Diffstat (limited to 'libk8055/k8055.h')
-rw-r--r--libk8055/k8055.h41
1 files changed, 26 insertions, 15 deletions
diff --git a/libk8055/k8055.h b/libk8055/k8055.h
index d1f8359..259d00b 100644
--- a/libk8055/k8055.h
+++ b/libk8055/k8055.h
@@ -42,19 +42,29 @@ extern "C" {
unsigned char data_in[PACKET_LEN+1];
unsigned char data_out[PACKET_LEN+1];
};
+ /* create/destroy struct */
struct k8055_dev* k8055_alloc( void );
void k8055_free( struct k8055_dev* dev );
-
+ /* read data_in / write data_out */
int k8055_read( struct k8055_dev* dev );
int k8055_write( struct k8055_dev* dev );
- int k8055_digital_1( struct k8055_dev* dev );
- int k8055_digital_2( struct k8055_dev* dev );
- int k8055_digital_3( struct k8055_dev* dev );
- int k8055_digital_4( struct k8055_dev* dev );
- int k8055_digital_5( struct k8055_dev* dev );
- int k8055_analog_1( struct k8055_dev* dev );
- int k8055_analog_2( struct k8055_dev* dev );
+ /* access output data */
+ int k8055_digital_output_1( struct k8055_dev* dev );
+ int k8055_digital_output_2( struct k8055_dev* dev );
+ int k8055_digital_output_3( struct k8055_dev* dev );
+ int k8055_digital_output_4( struct k8055_dev* dev );
+ int k8055_digital_output_5( struct k8055_dev* dev );
+ int k8055_analog_output_1( struct k8055_dev* dev );
+ int k8055_analog_output_2( struct k8055_dev* dev );
+ /* access input data */
+ int k8055_digital_input_1( struct k8055_dev* dev );
+ int k8055_digital_input_2( struct k8055_dev* dev );
+ int k8055_digital_input_3( struct k8055_dev* dev );
+ int k8055_digital_input_4( struct k8055_dev* dev );
+ int k8055_digital_input_5( struct k8055_dev* dev );
+ int k8055_analog_input_1( struct k8055_dev* dev );
+ int k8055_analog_input_2( struct k8055_dev* dev );
int k8055_counter_1( struct k8055_dev* dev );
int k8055_counter_2( struct k8055_dev* dev );
@@ -66,24 +76,25 @@ extern "C" {
int k8055_open_device( struct k8055_dev* dev, int board_address );
int k8055_close_device( struct k8055_dev* dev );
+ /* analog outputs */
int k8055_set_analog_channel( struct k8055_dev* dev, int channel );
int k8055_clear_analog_channel( struct k8055_dev* dev, int channel );
- int k8055_read_analog_channel( struct k8055_dev* dev, int channel );
int k8055_write_analog_channel( struct k8055_dev* dev ,int channel, int data );
-
int k8055_set_all_analog( struct k8055_dev* dev );
int k8055_clear_all_analog( struct k8055_dev* dev );
- int k8055_read_all_analog( struct k8055_dev* dev, int* data1, int* data2 );
int k8055_write_all_analog( struct k8055_dev* dev, int data1, int data2 );
-
+ /* analog inputs */
+ int k8055_read_analog_channel( struct k8055_dev* dev, int channel );
+ int k8055_read_all_analog( struct k8055_dev* dev, int* data1, int* data2 );
+ /* digital outputs */
int k8055_set_digital_channel( struct k8055_dev* dev, int channel );
int k8055_clear_digital_channel( struct k8055_dev* dev, int channel );
- int k8055_read_digital_channel( struct k8055_dev* dev, int channel );
-
int k8055_set_all_digital( struct k8055_dev* dev );
int k8055_clear_all_digital( struct k8055_dev* dev );
- int k8055_read_all_digital( struct k8055_dev* dev );
int k8055_write_all_digital( struct k8055_dev* dev, int data );
+ /* digital inputs */
+ int k8055_read_digital_channel( struct k8055_dev* dev, int channel );
+ int k8055_read_all_digital( struct k8055_dev* dev );
int k8055_set_all_values( struct k8055_dev* dev, int d_data, int a_data1, int a_data2 );
int k8055_read_all_values( struct k8055_dev* dev, int* data1, int* data2, int* data3, int* data4, int* data5 );