diff --git a/include/industry/foc/fixed16/foc_angle.h b/include/industry/foc/fixed16/foc_angle.h index 28fad7a52..721d3f962 100644 --- a/include/industry/foc/fixed16/foc_angle.h +++ b/include/industry/foc/fixed16/foc_angle.h @@ -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 */ diff --git a/include/industry/foc/float/foc_angle.h b/include/industry/foc/float/foc_angle.h index 1ffb53416..14f38f24f 100644 --- a/include/industry/foc/float/foc_angle.h +++ b/include/industry/foc/float/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 */ diff --git a/industry/foc/fixed16/foc_angle.c b/industry/foc/fixed16/foc_angle.c index 2f255f10a..79f4b1bdc 100644 --- a/industry/foc/fixed16/foc_angle.c +++ b/industry/foc/fixed16/foc_angle.c @@ -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); } diff --git a/industry/foc/float/foc_angle.c b/industry/foc/float/foc_angle.c index 8673e789f..ece477255 100644 --- a/industry/foc/float/foc_angle.c +++ b/industry/foc/float/foc_angle.c @@ -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); }