Commit 2e0e536a authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added path variables for both the STM32_hal and STM32_libraries repositories.

Solved a bug in the bioloid_dyn_master_servos.c which used a Darwin robot register identifier.
parent e87ff495
Pipeline #109 skipped
# setup
# modified by zerom for WinARM 8/2010
STM32_HAL_PATH=/home/shernand/humanoids/stm32_hal
STM32_LIBRARIES_PATH=/home/shernand/humanoids/stm32_libraries
PROJECT_NAME=bioloid_firmware
TARGET_FILES=$(wildcard src/*.c)
TARGET_PROCESSOR=STM32F407VG
HAL_PATH=../../STM32_processor/hal/f4
HAL_PATH=$(STM32_HAL_PATH)/f4
include $(HAL_PATH)/select_processor.mk
STM32_STARTUP_FILES_PATH = $(HAL_PATH)/startup_code/
STM32_LINKER_SCRIPTS_PATH = ./linker_script
UTILS_PATH=../../STM32_processor/libraries/utils
COMM_PATH=../../STM32_processor/libraries/comm
USART_PATH=../../STM32_processor/libraries/f4/usart
DYNAMIXEL_PATH=../../STM32_processor/libraries/dynamixel_base
UTILS_PATH=$(STM32_LIBRARIES_PATH)/utils
COMM_PATH=$(STM32_LIBRARIES_PATH)/comm
USART_PATH=$(STM32_LIBRARIES_PATH)/f4/usart
DYNAMIXEL_PATH=$(STM32_LIBRARIES_PATH)/dynamixel_base
BUILD_PATH=build
COMPILE_OPTS = -mlittle-endian -mcpu=cortex-m4 -mthumb -mthumb-interwork
......
#include "bioloid_dyn_master_servos.h"
#include "bioloid_time.h"
#include "usart1.h"
#include "ram.h"
#include "bioloid_registers.h"
#define ENABLE_RX_EN_GPIO_CLK __GPIOA_CLK_ENABLE()
#define RX_EN_PIN GPIO_PIN_8
......@@ -94,12 +96,12 @@ void bioloid_dyn_master_servos_init(void)
inline void bioloid_dyn_master_servos_enable_power(void)
{
HAL_GPIO_WritePin(POWER_GPIO_PORT,POWER_PIN,GPIO_PIN_SET);
ram_data[DARWIN_MM_CNTRL]|=MANAGER_EN_PWR;
ram_data[BIOLOID_MM_CNTRL]|=MANAGER_EN_PWR;
}
inline void bioloid_dyn_master_servos_disable_power(void)
{
HAL_GPIO_WritePin(POWER_GPIO_PORT,POWER_PIN,GPIO_PIN_RESET);
ram_data[DARWIN_MM_CNTRL]&=(~MANAGER_EN_PWR);
ram_data[BIOLOID_MM_CNTRL]&=(~MANAGER_EN_PWR);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment