/*! * @defgroup RSLK * @brief RSLK motor interface
RSLK RSLK motor pins
TM4C MSPM0 Description
PF2 PB4 Motor_PWML, ML+, IN3, PB.4/TIMA1_C0;
PF3 PB1 Motor_PWMR, MR+, IN1, PB.1/TIMA1_C1;
PA3 PB0 Motor_DIR_L,ML-, IN4, 1 means forward, 0 means backward
PA2 PB16 Motor_DIR_R,MR-, IN2
* @{*/ /** * @file Motor.h * @brief RSLK dual H-bridge driver * @details RSLK motor interface
* @version RSLK v2.02 * @author Daniel Valvano and Jonathan Valvano * @copyright Copyright 2024 by Jonathan W. Valvano, valvano@mail.utexas.edu, * @warning AS-IS * @note For more information see http://users.ece.utexas.edu/~valvano/ * @date June 28, 2024
RSLK Bumper switches
TM4C MSPM0 Description
PF2 PB4 Motor_PWML, ML+, IN3, PB.4/TIMA1_C0;
PF3 PB1 Motor_PWMR, MR+, IN1, PB.1/TIMA1_C1;
PA3 PB0 Motor_DIR_L,ML-, IN4, 1 means forward, 0 means backward
PA2 PB16 Motor_DIR_R,MR-, IN2
******************************************************************************/ #ifndef __MOTOR_H__ #define __MOTOR_H__ /** * Initialize RSLK motors * @param none * @return none * @brief Initialize motors * @note period is 10000 us */ void Motor_Init(void); /** * Set RSLK motor power forward
* @param dutyLeft 2 to 99998 us * @param dutyRight 2 to 99998 us * @return none * @note period is 10000 us * @brief Go forward */ void Motor_Forward(uint32_t dutyLeft, uint32_t dutyRight); /** * Set RSLK motor power backward
* @param dutyLeft 2 to 99998 us * @param dutyRight 2 to 99998 us * @return none * @note period is 10000 us * @brief Go backward */ void Motor_Backward(uint32_t dutyLeft, uint32_t dutyRight); /** * Set RSLK motor power right turn
* @param dutyLeft 2 to 99998 us * @param dutyRight 2 to 99998 us * @return none * @note period is 10000 us * @brief Turn right */ void Motor_Right(uint32_t dutyLeft, uint32_t dutyRight); /** * Set RSLK motor power left turn
* @param dutyLeft 2 to 99998 us * @param dutyRight 2 to 99998 us * @return none * @note period is 10000 us * @brief Turn left */void Motor_Left(uint32_t dutyLeft, uint32_t dutyRight); #endif