Skip to content
This repository
Browse code

formatting

  • Loading branch information...
commit 5694310a408e5c3183f6f40817389994b221e228 1 parent 9b292ff
Simen Svale Skogsrud authored January 31, 2011
3  eeprom.c
@@ -124,6 +124,9 @@ void eeprom_put_char( unsigned int addr, unsigned char new_value )
124 124
 	sei(); // Restore interrupt flag state.
125 125
 }
126 126
 
  127
+// Extensions added as part of Grbl 
  128
+
  129
+
127 130
 void memcpy_to_eeprom_with_checksum(unsigned int destination, char *source, unsigned int size) {
128 131
   unsigned char checksum = 0;
129 132
   for(; size > 0; size--) { 
2  script/console
... ...
@@ -1,4 +1,4 @@
1  
-socat -d -d READLINE /dev/tty.usbmodem26221,nonblock=1,clocal=1
  1
+socat -d -d READLINE /dev/tty.usbmodem24121,nonblock=1,clocal=1
2 2
 socat -d -d READLINE /dev/tty.usbserial-A9007QcR,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1
3 3
 
4 4
 #socat -d -d READLINE /dev/tty.FireFly-A964-SPP-1,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1
9  stepper.c
@@ -32,7 +32,12 @@
32 32
 #include "stepper_plan.h"
33 33
 #include "wiring_serial.h"
34 34
 
35  
-void set_step_events_per_minute(uint32_t steps_per_minute);
  35
+
  36
+// Some useful constants
  37
+#define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits
  38
+#define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits
  39
+#define STEPPING_MASK (STEP_MASK | DIRECTION_MASK) // All stepping-related bits (step/direction)
  40
+#define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT)) // All limit bits
36 41
 
37 42
 #define ENABLE_STEPPER_DRIVER_INTERRUPT()  TIMSK1 |= (1<<OCIE1A)
38 43
 #define DISABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 &= ~(1<<OCIE1A)
@@ -72,6 +77,8 @@ static uint32_t trapezoid_adjusted_rate;      // The current rate of step_events
72 77
 //  The slope of acceleration is always +/- block->rate_delta and is applied at a constant rate by trapezoid_generator_tick()
73 78
 //  that is called ACCELERATION_TICKS_PER_SECOND times per second.
74 79
 
  80
+void set_step_events_per_minute(uint32_t steps_per_minute);
  81
+
75 82
 // Initializes the trapezoid generator from the current block. Called whenever a new 
76 83
 // block begins.
77 84
 inline void trapezoid_generator_reset() {

0 notes on commit 5694310

Please sign in to comment.
Something went wrong with that request. Please try again.