Merged in raiden00/apps (pull request #134)
examples/powerled: add arch initialization; examples/smps: fixes in some printf and in Kconfig Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
parent
0be2f16e3f
commit
4d38b98054
@ -478,6 +478,12 @@ int powerled_main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_NSH_BUILTIN_APPS
|
||||||
|
/* Perform architecture-specific initialization (if configured) */
|
||||||
|
|
||||||
|
(void)boardctl(BOARDIOC_INIT, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Set LED current limit */
|
/* Set LED current limit */
|
||||||
|
|
||||||
powerled_limits.current = (((float)CONFIG_EXAMPLES_POWERLED_CURRENT_LIMIT)/1000.0);
|
powerled_limits.current = (((float)CONFIG_EXAMPLES_POWERLED_CURRENT_LIMIT)/1000.0);
|
||||||
|
@ -366,31 +366,31 @@ errout:
|
|||||||
static void feedback_print(FAR struct smps_feedback_s *fb)
|
static void feedback_print(FAR struct smps_feedback_s *fb)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SMPS_HAVE_INPUT_VOLTAGE
|
#ifdef CONFIG_SMPS_HAVE_INPUT_VOLTAGE
|
||||||
printf("v_out: %0.3f\t", fb->v_out);
|
printf("v_out: %.3f\t", fb->v_out);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SMPS_HAVE_OUTPUT_VOLTAGE
|
#ifdef CONFIG_SMPS_HAVE_OUTPUT_VOLTAGE
|
||||||
printf("v_in: %0.3f\t", fb->v_in);
|
printf("v_in: %.3f\t", fb->v_in);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SMPS_HAVE_OUTPUT_CURRENT
|
#ifdef CONFIG_SMPS_HAVE_OUTPUT_CURRENT
|
||||||
printf("i_out: %0.3f\t", fb->i_out);
|
printf("i_out: %.3f\t", fb->i_out);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SMPS_HAVE_INPUT_CURRENT
|
#ifdef CONFIG_SMPS_HAVE_INPUT_CURRENT
|
||||||
printf("i_in: %0.3f\t", fb->i_in);
|
printf("i_in: %.3f\t", fb->i_in);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SMPS_HAVE_OUTPUT_POWER
|
#ifdef CONFIG_SMPS_HAVE_OUTPUT_POWER
|
||||||
printf("p_in: %0.3f\t", fb->p_in);
|
printf("p_in: %.3f\t", fb->p_in);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SMPS_HAVE_INPUT_POWER
|
#ifdef CONFIG_SMPS_HAVE_INPUT_POWER
|
||||||
printf("p_out: %0.3f\t", fb->p_out);
|
printf("p_out: %.3f\t", fb->p_out);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SMPS_HAVE_EFFICIENCY
|
#ifdef CONFIG_SMPS_HAVE_EFFICIENCY
|
||||||
printf("eff: %0.3f\t", fb->eff);
|
printf("eff: %.3f\t", fb->eff);
|
||||||
#endif
|
#endif
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_info(struct smps_limits_s *limits, struct smps_params_s *params,
|
static void print_info(struct smps_limits_s *limits, struct smps_params_s *params,
|
||||||
uint8_t *mode, struct args_s *args)
|
uint8_t *mode, struct args_s *args)
|
||||||
{
|
{
|
||||||
printf("-------------------------------------\n");
|
printf("-------------------------------------\n");
|
||||||
printf("Current SMPS settings:\n");
|
printf("Current SMPS settings:\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user