mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-07 13:37:21 +00:00
industry/foc/*/foc_angle.c: run method should return int
This commit is contained in:
parent
27c282a58a
commit
cb78f6d0df
4 changed files with 18 additions and 18 deletions
|
|
@ -76,9 +76,9 @@ struct foc_angle_ops_b16_s
|
|||
|
||||
/* Run */
|
||||
|
||||
CODE void (*run)(FAR foc_angle_b16_t *h,
|
||||
FAR struct foc_angle_in_b16_s *in,
|
||||
FAR struct foc_angle_out_b16_s *out);
|
||||
CODE int (*run)(FAR foc_angle_b16_t *h,
|
||||
FAR struct foc_angle_in_b16_s *in,
|
||||
FAR struct foc_angle_out_b16_s *out);
|
||||
};
|
||||
|
||||
/* Angle handler - sensor or sensorless */
|
||||
|
|
@ -135,8 +135,8 @@ int foc_angle_cfg_b16(FAR foc_angle_b16_t *h, FAR void *cfg);
|
|||
* Name: foc_angle_run_b16
|
||||
****************************************************************************/
|
||||
|
||||
void foc_angle_run_b16(FAR foc_angle_b16_t *h,
|
||||
FAR struct foc_angle_in_b16_s *in,
|
||||
FAR struct foc_angle_out_b16_s *out);
|
||||
int foc_angle_run_b16(FAR foc_angle_b16_t *h,
|
||||
FAR struct foc_angle_in_b16_s *in,
|
||||
FAR struct foc_angle_out_b16_s *out);
|
||||
|
||||
#endif /* __INDUSTRY_FOC_FIXED16_FOC_ANGLE_H */
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ struct foc_angle_ops_f32_s
|
|||
|
||||
/* Run angle handler */
|
||||
|
||||
CODE void (*run)(FAR foc_angle_f32_t *h,
|
||||
FAR struct foc_angle_in_f32_s *in,
|
||||
FAR struct foc_angle_out_f32_s *out);
|
||||
CODE int (*run)(FAR foc_angle_f32_t *h,
|
||||
FAR struct foc_angle_in_f32_s *in,
|
||||
FAR struct foc_angle_out_f32_s *out);
|
||||
};
|
||||
|
||||
/* Angle handler - sensor or sensorless */
|
||||
|
|
@ -135,8 +135,8 @@ int foc_angle_cfg_f32(FAR foc_angle_f32_t *h, FAR void *cfg);
|
|||
* Name: foc_angle_run_f32
|
||||
****************************************************************************/
|
||||
|
||||
void foc_angle_run_f32(FAR foc_angle_f32_t *h,
|
||||
FAR struct foc_angle_in_f32_s *in,
|
||||
FAR struct foc_angle_out_f32_s *out);
|
||||
int foc_angle_run_f32(FAR foc_angle_f32_t *h,
|
||||
FAR struct foc_angle_in_f32_s *in,
|
||||
FAR struct foc_angle_out_f32_s *out);
|
||||
|
||||
#endif /* __INDUSTRY_FOC_FLOAT_FOC_ANGLE_H */
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ int foc_angle_cfg_b16(FAR foc_angle_b16_t *h, FAR void *cfg)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void foc_angle_run_b16(FAR foc_angle_b16_t *h,
|
||||
int foc_angle_run_b16(FAR foc_angle_b16_t *h,
|
||||
FAR struct foc_angle_in_b16_s *in,
|
||||
FAR struct foc_angle_out_b16_s *out)
|
||||
{
|
||||
|
|
@ -153,5 +153,5 @@ void foc_angle_run_b16(FAR foc_angle_b16_t *h,
|
|||
|
||||
/* Run angle handler */
|
||||
|
||||
h->ops->run(h, in, out);
|
||||
return h->ops->run(h, in, out);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,9 +143,9 @@ int foc_angle_cfg_f32(FAR foc_angle_f32_t *h, FAR void *cfg)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void foc_angle_run_f32(FAR foc_angle_f32_t *h,
|
||||
FAR struct foc_angle_in_f32_s *in,
|
||||
FAR struct foc_angle_out_f32_s *out)
|
||||
int foc_angle_run_f32(FAR foc_angle_f32_t *h,
|
||||
FAR struct foc_angle_in_f32_s *in,
|
||||
FAR struct foc_angle_out_f32_s *out)
|
||||
{
|
||||
DEBUGASSERT(h);
|
||||
DEBUGASSERT(in);
|
||||
|
|
@ -153,5 +153,5 @@ void foc_angle_run_f32(FAR foc_angle_f32_t *h,
|
|||
|
||||
/* Run angle handler */
|
||||
|
||||
h->ops->run(h, in, out);
|
||||
return h->ops->run(h, in, out);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue