mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
This commit is contained in:
@@ -101,7 +101,7 @@ int board_adc_setup(void)
|
||||
adc = lpc17_adcinitialize();
|
||||
if (adc == NULL)
|
||||
{
|
||||
adbg("ERROR: Failed to get ADC interface\n");
|
||||
aerr("ERROR: Failed to get ADC interface\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ int board_adc_setup(void)
|
||||
ret = adc_register("/dev/adc0", adc);
|
||||
if (ret < 0)
|
||||
{
|
||||
adbg("adc_register failed: %d\n", ret);
|
||||
aerr("adc_register failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,14 +81,14 @@ int dac_devinit(void)
|
||||
dac = lpc17_dacinitialize();
|
||||
if (dac == NULL)
|
||||
{
|
||||
adbg("ERROR: Failed to get dac interface\n");
|
||||
aerr("ERROR: Failed to get dac interface\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = dac_register("/dev/dac0", dac);
|
||||
if (ret < 0)
|
||||
{
|
||||
adbg("dac_register failed: %d\n", ret);
|
||||
aerr("dac_register failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ struct usbhost_connection_s *arch_usbhost_initialize(void)
|
||||
ret = usbhost_hub_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret);
|
||||
uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -65,14 +65,14 @@
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LEDS
|
||||
# define leddbg llerr
|
||||
# define lederr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define ledinfo llerr
|
||||
# else
|
||||
# define ledinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define leddbg(x...)
|
||||
# define lederr(x...)
|
||||
# define ledinfo(x...)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ int board_pwm_setup(void)
|
||||
pwm = lpc17_pwminitialize(0);
|
||||
if (!pwm)
|
||||
{
|
||||
adbg("Failed to get the LPC17XX PWM lower half\n");
|
||||
aerr("Failed to get the LPC17XX PWM lower half\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -109,14 +109,14 @@ int board_pwm_setup(void)
|
||||
ret = pwm_register("/dev/pwm0", pwm);
|
||||
if (ret < 0)
|
||||
{
|
||||
adbg("pwm_register failed: %d\n", ret);
|
||||
aerr("pwm_register failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
mcpwm = lpc17_mcpwminitialize(0);
|
||||
if (!mcpwm)
|
||||
{
|
||||
adbg("Failed to get the LPC17XX MOTOR PWM lower half\n");
|
||||
aerr("Failed to get the LPC17XX MOTOR PWM lower half\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -125,14 +125,14 @@ int board_pwm_setup(void)
|
||||
ret = pwm_register("/dev/mcpwm0", mcpwm);
|
||||
if (ret < 0)
|
||||
{
|
||||
adbg("mcpwm_register failed: %d\n", ret);
|
||||
aerr("mcpwm_register failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
timer = lpc17_timerinitialize(0);
|
||||
if (!timer)
|
||||
{
|
||||
adbg("Failed to get the LPC17XX TIMER lower half\n");
|
||||
aerr("Failed to get the LPC17XX TIMER lower half\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ int board_pwm_setup(void)
|
||||
ret = pwm_register("/dev/timer0", timer);
|
||||
if (ret < 0)
|
||||
{
|
||||
adbg("timer_register failed: %d\n", ret);
|
||||
aerr("timer_register failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user