* and so the delay is do with a for cycle.
*
* \version $Id$
- *
* \author Daniele Basile <asterix@develer.com>
*/
#include "hw/pwm_map.h" // For PwmDev and channel avaible on thi target
#include "cfg/cfg_pwm.h"
-
-#include <cfg/log.h> // for logging system
#include <cfg/macros.h>
#include <cfg/debug.h>
+// Define logging setting (for cfg/log.h module).
+#define LOG_LEVEL PWM_LOG_LEVEL
+#define LOG_FORMAT PWM_LOG_FORMAT
+#include <cfg/log.h> // for logging system
+
#include <cpu/types.h>
#include <cpu/irq.h>
* Setup all needed to test PWM on AT91
*
*/
-int pwm_testSetup(void)
+int pwm_testSetUp(void)
{
LOG_INFO("Init pwm..");
pwm_init();
*/
int pwm_testRun(void)
{
- int duty = 0;
+ pwm_duty_t duty = 0;
int delay = 0;
- pwm_testSetup();
+ pwm_testSetUp();
LOG_INFO("\n\n===== BeRTOS PWM test =====\n\n");
}
//Reset duty cycle overflow
- if (duty >= 0xFFFF)
+ if (duty >= (pwm_duty_t)0xFFFF)
{
duty = 0;
for (int i = 0; i < PWM_CNT; i++)
delay++;
}
- return 0;
+ return 0;
}
/**