forked from modmaker/BeBoPr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbebopr.h
61 lines (48 loc) · 2.07 KB
/
bebopr.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef _BEBOPR_H
#define _BEBOPR_H
// Define the frequency of the PRUSS clock
#define TIMER_CLOCK 200.0E6
// Identification values for axes
typedef enum {
x_axis, y_axis, z_axis, e_axis
} axis_e;
// Early init that pushes configuration to subsystems
extern int bebopr_pre_init( void);
// Late init that enables I/O power
extern int bebopr_post_init( void);
// Configuration
extern int config_e_axis_is_always_relative( void);
extern char config_keep_alive_char( void);
// determines stepper driver control
extern int config_use_pololu_drivers( void);
// these all return either 0 for false or 1 for true
extern int config_axis_has_min_limit_switch( axis_e axis);
extern int config_axis_has_max_limit_switch( axis_e axis);
extern int config_min_limit_switch_is_active_low( axis_e axis);
extern int config_max_limit_switch_is_active_low( axis_e axis);
extern int config_reverse_axis( axis_e axis);
// these all return a hardware dimenstion
extern double config_axis_get_min_pos( axis_e axis);
extern double config_axis_get_max_pos( axis_e axis);
extern double config_axis_get_min_limsw_pos( axis_e axis);
extern double config_axis_get_max_limsw_pos( axis_e axis);
extern double config_get_step_size( axis_e axis);
// these all return physical limitations
extern double config_get_max_feed( axis_e axis);
extern double config_get_max_accel( axis_e axis);
// these return preferred settings
extern double config_get_home_max_feed( axis_e axis);
extern double config_get_home_release_feed( axis_e axis);
// workaround for defines from pinio until removed from code
/* the axis enable signals are handled in the PRUSS code! */
#define x_enable() do { /* void */ } while (0)
#define y_enable() do { /* void */ } while (0)
#define z_enable() do { /* void */ } while (0)
#define e_enable() do { /* void */ } while (0)
#define x_disable() do { /* void */ } while (0)
#define y_disable() do { /* void */ } while (0)
#define z_disable() do { /* void */ } while (0)
#define e_disable() do { /* void */ } while (0)
#define power_on() do { /* void */ } while (0)
#define power_off() do { /* void */ } while (0)
#endif