initial commit
This commit is contained in:
46
hal/hal_dc_motor/hal_interface_motor.c
Executable file
46
hal/hal_dc_motor/hal_interface_motor.c
Executable file
@@ -0,0 +1,46 @@
|
||||
/*************************************************
|
||||
File name : hal_interface_doorbell.c
|
||||
Module : hal doorbell interface typedefs
|
||||
Author : nian.xiao@anker.com
|
||||
Version :
|
||||
Created on : 2021-03-27
|
||||
Description :
|
||||
Data structure and function definitions required by
|
||||
the doorbell interface
|
||||
|
||||
Modify History:
|
||||
1. Date: Author: Modification:
|
||||
2021-03-27 nia.xiao create
|
||||
*************************************************/
|
||||
#include "hal_product_config.h"
|
||||
#include "hal_interface_dc_motor.h"
|
||||
#if (HAL_CFG_DC_MOTOR_TYPE == HAL_CFG_DC_MOTOR_TYPE_T31)
|
||||
#include "dc_motor.h"
|
||||
#endif
|
||||
|
||||
static ST_HAL_MOTOR_INTERFACE gHalDcmotorInterface =
|
||||
{
|
||||
#if (HAL_CFG_DC_MOTOR_TYPE == HAL_CFG_DC_MOTOR_TYPE_T31)
|
||||
.pfnInit = HAL_dc_motor_Init,
|
||||
.pfnDeinit = HAL_dc_motor_Deinit,
|
||||
.pfnRun = HAL_dc_motor_Run,
|
||||
.pfnReverse = HAL_dc_motor_Reverse,
|
||||
.pfnStop = HAL_dc_motor_Stop,
|
||||
.pfnBreak = HAL_dc_motor_Break,
|
||||
.pfnGetadc = HAL_dc_motor_Getadc,
|
||||
.pfnGetstate = HAL_dc_motor_Getstate,
|
||||
#else
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
ST_HAL_MOTOR_INTERFACE *HAL_Dc_motor_GetInterface(int32_t channel)
|
||||
{
|
||||
#if (HAL_CFG_DC_MOTOR_TYPE == HAL_CFG_DC_MOTOR_TYPE_T31)
|
||||
return &gHalDcmotorInterface;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user