main_ubi_sdk v 0.1.3
This is UBI4 documentation
motor_controller.h File Reference
#include "../Drivers/motor_driver.h"
#include "stdbool.h"
Include dependency graph for motor_controller.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  motor_controller_base_init_t
 
struct  motor_controller_base_movement_info_t
 
struct  motor_controller_base_t
 

Typedefs

typedef void(* MotorSelfFunc_t) (void *self)
 
typedef void(* MotorSelfFuncWithSpeed_t) (void *self, uint8_t speed)
 
typedef void(* MotorSelfFuncWithCallback_t) (void *self, MotorSelfFunc_t Callback)
 
typedef void(* MotorSelfFuncWithReason_t) (void *self, uint8_t reason)
 
typedef void(* UpdateMotorParam_t) (void *self, uint32_t value)
 
typedef void(* MoveMotorToPosFunc_t) (void *self, uint8_t speed, uint8_t delay, uint8_t power, uint8_t force)
 

Enumerations

enum  motor_state_enum { MSE_IDLE = 0 , MSE_BREAK , MSE_MOVE }
 
enum  MOT_DIR { MOT_STOP = 0 , MOT_OPEN , MOT_CLOSE }
 
enum  drive_move_mode_enum { FMME_CURRENT_CONTROL = 1<<0 , FMME_ENCODER_CONTROL = 1<<1 , FMME_TIME_CONTROL = 1<<2 }
 
enum  mot_stop_reason_enum {
  MOT_ENCODER_TARGET_POS_FINISH = 0 , MOT_SMALL_CURENT_STOP , MOT_OVERCURENT_STOP , MOT_MANUAL_STOP ,
  MOT_TIMEOUT_STOP
}
 

Functions

bool MotorControllerBaseInit (motor_controller_base_t *self, motor_controller_base_init_t *init, motor_driver_base_t *driver)
 

Typedef Documentation

◆ MotorSelfFunc_t

typedef void(* MotorSelfFunc_t) (void *self)

◆ MotorSelfFuncWithCallback_t

typedef void(* MotorSelfFuncWithCallback_t) (void *self, MotorSelfFunc_t Callback)

◆ MotorSelfFuncWithReason_t

typedef void(* MotorSelfFuncWithReason_t) (void *self, uint8_t reason)

◆ MotorSelfFuncWithSpeed_t

typedef void(* MotorSelfFuncWithSpeed_t) (void *self, uint8_t speed)

◆ MoveMotorToPosFunc_t

typedef void(* MoveMotorToPosFunc_t) (void *self, uint8_t speed, uint8_t delay, uint8_t power, uint8_t force)

◆ UpdateMotorParam_t

typedef void(* UpdateMotorParam_t) (void *self, uint32_t value)

Enumeration Type Documentation

◆ drive_move_mode_enum

Enumerator
FMME_CURRENT_CONTROL 
FMME_ENCODER_CONTROL 
FMME_TIME_CONTROL 

◆ MOT_DIR

enum MOT_DIR
Enumerator
MOT_STOP 
MOT_OPEN 
MOT_CLOSE 

◆ mot_stop_reason_enum

Enumerator
MOT_ENCODER_TARGET_POS_FINISH 
MOT_SMALL_CURENT_STOP 
MOT_OVERCURENT_STOP 
MOT_MANUAL_STOP 
MOT_TIMEOUT_STOP 

◆ motor_state_enum

Enumerator
MSE_IDLE 
MSE_BREAK 
MSE_MOVE 

Function Documentation

◆ MotorControllerBaseInit()

bool MotorControllerBaseInit ( motor_controller_base_t * self,
motor_controller_base_init_t * init,
motor_driver_base_t * driver )
Here is the call graph for this function:
Here is the caller graph for this function: