diff --git a/planner.c b/planner.c index 16566bc..d1109bd 100644 --- a/planner.c +++ b/planner.c @@ -64,11 +64,11 @@ #include "wiring_serial.h" // The number of linear motions that can be in the plan at any give time -#define BLOCK_BUFFER_SIZE 20 +#define BLOCK_BUFFER_SIZE 16 static block_t block_buffer[BLOCK_BUFFER_SIZE]; // A ring buffer for motion instructions -static volatile int block_buffer_head; // Index of the next block to be pushed -static volatile int block_buffer_tail; // Index of the block to process now +static volatile uint8_t block_buffer_head; // Index of the next block to be pushed +static volatile uint8_t block_buffer_tail; // Index of the block to process now // The current position of the tool in absolute steps static int32_t position[3]; diff --git a/wiring_serial.c b/wiring_serial.c index 20f8756..5109d39 100644 --- a/wiring_serial.c +++ b/wiring_serial.c @@ -31,12 +31,12 @@ // using a ring buffer (I think), in which rx_buffer_head is the index of the // location to which to write the next incoming character and rx_buffer_tail // is the index of the location from which to read. -#define RX_BUFFER_SIZE 200 +#define RX_BUFFER_SIZE 256 unsigned char rx_buffer[RX_BUFFER_SIZE]; -int rx_buffer_head = 0; -int rx_buffer_tail = 0; +uint8_t rx_buffer_head = 0; +uint8_t rx_buffer_tail = 0; void beginSerial(long baud) {