Files
2025-02-MPX/ccs/motor.h
2025-12-10 02:26:47 +09:00

28 lines
473 B
C
Executable File

#ifndef _motor_h_
#define _motor_h_
#include "msp.h"
#include "pwm.h"
#include <stdint.h>
#define MOTOR_PERIOD 15000
/**
* @brief 모터 핀과 PWM 초기화
* P2.6 P2.7 : PWM 출력
* P5.4 P5.5 : 방향 제어
* P3.6 P3.7 : 전원 공급
*/
void motor_init(void);
/**
* @brief Set motor speeds.
* @param left 왼쪽 모터 PWM
* @param right 오른쪽 모터 PWM (-1000 ~ 1000)
*/
void motor_move(int32_t left, int32_t right);
void motor_stop(void);
#endif