-
Notifications
You must be signed in to change notification settings - Fork 0
/
K8055.h
36 lines (31 loc) · 1.06 KB
/
K8055.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "USBPlatine.h"
#include "../jodersky_k8055/src/k8055.h"
class K8055 : public USBPlatine {
public:
K8055(int devnr, bool debug);
~K8055();
/// @param f_speed 0...255
virtual void setPWM(int f_speed);
virtual void setDir(unsigned char dir);
virtual void commit();
virtual void fullstop(bool stopAll, bool emergencyStop);
private:
int write_output ( unsigned char a1, unsigned char a2, unsigned char d );
int read_input ( unsigned char *a1, unsigned char *a2, unsigned char *d, unsigned short *c1, unsigned short *c2 );
void benchmark ( );
void onebench();
// nicht verwendetes zeug:
int write_empty_command ( unsigned char command );
int write_dbt_command ( unsigned char command,unsigned char t1, unsigned char t2 );
int msec_to_dbt_code ( int msec );
int set_counter1_bouncetime ( int msec );
int set_counter2_bouncetime ( int msec );
int reset_counter1 ( );
int reset_counter2 ( );
private:
int takeover_device( int interface );
k8055_device *dev;
// TODO: das raushaun, das steht auch im *dev drinnen
unsigned char dir;
unsigned char pwm;
};