From 59d6682282f9f94a2050196e33294011b9367bea Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Fri, 19 May 2017 18:02:30 +0200
Subject: [PATCH] Changed the path of the STM32 HAL and libraries. Removed a
 duplicatd register.

---
 Makefile                   | 4 ++--
 include/darwin_registers.h | 3 +--
 src/system_stm32f1xx.c     | 4 +++-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 3a546a5..c31048f 100755
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 # setup
 # modified by zerom for WinARM 8/2010
 
-STM32_HAL_PATH=~/humanoids/stm32_hal
-STM32_LIBRARIES_PATH=~/humanoids/stm32_libraries
+STM32_HAL_PATH=$(HOME)/humanoids/stm32_hal
+STM32_LIBRARIES_PATH=$(HOME)/humanoids/stm32_libraries
 
 PROJECT_NAME=darwin_firmware
 #TARGET_FILES=$(wildcard src/*.c)
diff --git a/include/darwin_registers.h b/include/darwin_registers.h
index 929e720..cd1398b 100644
--- a/include/darwin_registers.h
+++ b/include/darwin_registers.h
@@ -83,8 +83,7 @@ extern "C" {
 #define GRIPPER_RIGHT_MAX_ANGLE         ((unsigned short int)0x005C)
 #define GRIPPER_RIGHT_MIN_ANGLE         ((unsigned short int)0x005E)
 #define GRIPPER_RIGHT_MAX_FORCE         ((unsigned short int)0x0060)
-#define GRIPPER_RIGHT_MAX_FORCE         ((unsigned short int)0x0062)
-#define SMART_CHARGER_PERIOD            ((unsigned short int)0x0064)
+#define SMART_CHARGER_PERIOD            ((unsigned short int)0x0062)
 
 #define LAST_EEPROM_OFFSET              ((unsigned short int)0x00FF)
 
diff --git a/src/system_stm32f1xx.c b/src/system_stm32f1xx.c
index 6014fa9..3d64390 100644
--- a/src/system_stm32f1xx.c
+++ b/src/system_stm32f1xx.c
@@ -139,7 +139,9 @@
   uint32_t SystemCoreClock         = 72000000;        /*!< System Clock Frequency (Core Clock) */
 #endif
 
-__IO const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
+const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
+const uint8_t APBPrescTable[8] =  {0, 0, 0, 0, 1, 2, 3, 4};
+
 /**
   * @}
   */
-- 
GitLab