industry/foc/*/foc_velocity.c: run method should return int

This commit is contained in:
raiden00pl 2021-10-29 11:59:10 +02:00 committed by Xiang Xiao
parent cb78f6d0df
commit 2e61b3e310
4 changed files with 16 additions and 16 deletions

View File

@ -74,9 +74,9 @@ struct foc_velocity_ops_b16_s
/* Run */
CODE void (*run)(FAR foc_velocity_b16_t *h,
FAR struct foc_velocity_in_b16_s *in,
FAR struct foc_velocity_out_b16_s *out);
CODE int (*run)(FAR foc_velocity_b16_t *h,
FAR struct foc_velocity_in_b16_s *in,
FAR struct foc_velocity_out_b16_s *out);
};
/* Velocity handler - sensor or sensorless */
@ -114,8 +114,8 @@ int foc_velocity_cfg_b16(FAR foc_velocity_b16_t *h, FAR void *cfg);
* Name: foc_velocity_run_b16
****************************************************************************/
void foc_velocity_run_b16(FAR foc_velocity_b16_t *h,
FAR struct foc_velocity_in_b16_s *in,
FAR struct foc_velocity_out_b16_s *out);
int foc_velocity_run_b16(FAR foc_velocity_b16_t *h,
FAR struct foc_velocity_in_b16_s *in,
FAR struct foc_velocity_out_b16_s *out);
#endif /* __INDUSTRY_FOC_FIXED16_FOC_VELOCITY_H */

View File

@ -74,9 +74,9 @@ struct foc_velocity_ops_f32_s
/* Run velocity handler */
CODE void (*run)(FAR foc_velocity_f32_t *h,
FAR struct foc_velocity_in_f32_s *in,
FAR struct foc_velocity_out_f32_s *out);
CODE int (*run)(FAR foc_velocity_f32_t *h,
FAR struct foc_velocity_in_f32_s *in,
FAR struct foc_velocity_out_f32_s *out);
};
/* Velocity handler - sensor or sensorless */
@ -114,8 +114,8 @@ int foc_velocity_cfg_f32(FAR foc_velocity_f32_t *h, FAR void *cfg);
* Name: foc_velocity_run_f32
****************************************************************************/
void foc_velocity_run_f32(FAR foc_velocity_f32_t *h,
FAR struct foc_velocity_in_f32_s *in,
FAR struct foc_velocity_out_f32_s *out);
int foc_velocity_run_f32(FAR foc_velocity_f32_t *h,
FAR struct foc_velocity_in_f32_s *in,
FAR struct foc_velocity_out_f32_s *out);
#endif /* __INDUSTRY_FOC_FLOAT_FOC_VELOCITY_H */

View File

@ -143,7 +143,7 @@ int foc_velocity_cfg_b16(FAR foc_velocity_b16_t *h, FAR void *cfg)
*
****************************************************************************/
void foc_velocity_run_b16(FAR foc_velocity_b16_t *h,
int foc_velocity_run_b16(FAR foc_velocity_b16_t *h,
FAR struct foc_velocity_in_b16_s *in,
FAR struct foc_velocity_out_b16_s *out)
{
@ -153,5 +153,5 @@ void foc_velocity_run_b16(FAR foc_velocity_b16_t *h,
/* Run velocity handler */
h->ops->run(h, in, out);
return h->ops->run(h, in, out);
}

View File

@ -143,7 +143,7 @@ int foc_velocity_cfg_f32(FAR foc_velocity_f32_t *h, FAR void *cfg)
*
****************************************************************************/
void foc_velocity_run_f32(FAR foc_velocity_f32_t *h,
int foc_velocity_run_f32(FAR foc_velocity_f32_t *h,
FAR struct foc_velocity_in_f32_s *in,
FAR struct foc_velocity_out_f32_s *out)
{
@ -153,5 +153,5 @@ void foc_velocity_run_f32(FAR foc_velocity_f32_t *h,
/* Run velocity handler */
h->ops->run(h, in, out);
return h->ops->run(h, in, out);
}