From c594a2b99557a8c542b90c5a7bd5637f34d61400 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Thu, 24 Nov 2016 12:01:22 +0100 Subject: [PATCH] dda_queue.c/.h: make mb_head local. This doesn't change binary size or performance, but it increases encapsulation. --- dda_queue.c | 10 ++++++---- dda_queue.h | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dda_queue.c b/dda_queue.c index 05d566f..54efca9 100644 --- a/dda_queue.c +++ b/dda_queue.c @@ -16,10 +16,12 @@ #include "cpu.h" #include "memory_barrier.h" -/// movebuffer head pointer. Points to the last move in the queue. -/// this variable is used both in and out of interrupts, but is -/// only written outside of interrupts. -uint8_t mb_head = 0; +/** + Movebuffer head pointer. Points to the last move in the queue. This variable + is used both in and out of interrupts, but is only written outside of + interrupts. +*/ +static uint8_t mb_head = 0; /// movebuffer tail pointer. Points to the currently executing move /// this variable is read/written both in and out of interrupts. diff --git a/dda_queue.h b/dda_queue.h index 3f41ce0..a7712fe 100644 --- a/dda_queue.h +++ b/dda_queue.h @@ -11,7 +11,6 @@ */ // this is the ringbuffer that holds the current and pending moves. -extern uint8_t mb_head; extern uint8_t mb_tail; extern DDA movebuffer[MOVEBUFFER_SIZE];