projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo.
[bertos.git]
/
cpu
/
avr
/
drv
/
kdebug_avr.c
diff --git
a/cpu/avr/drv/kdebug_avr.c
b/cpu/avr/drv/kdebug_avr.c
index 0a3926451b603b87b76f5a7c2987441c08c21f8b..35d0645d6867a61485ca708f3f5a3ce333a5fde1 100644
(file)
--- a/
cpu/avr/drv/kdebug_avr.c
+++ b/
cpu/avr/drv/kdebug_avr.c
@@
-39,8
+39,9
@@
* \author Francesco Sacchi <batt@develer.com>
*/
* \author Francesco Sacchi <batt@develer.com>
*/
-#include <cpu/cpu.h>
-#include <cfg/macros.h> /* for BV() */
+#include <cpu/types.h>
+#include <cpu/attr.h>
+#include <cfg/macros.h> /* for BV(), DIV_ROUND */
#include <appconfig.h>
#include <hw_cpu.h> /* for CLOCK_FREQ */
#include <hw_ser.h> /* Required for bus macros overrides */
#include <appconfig.h>
#include <hw_cpu.h> /* for CLOCK_FREQ */
#include <hw_ser.h> /* Required for bus macros overrides */
@@
-222,7
+223,7
@@
INLINE void kdbg_hw_init(void)
SER_BITBANG_INIT;
#else /* CONFIG_KDEBUG_PORT != 666 */
/* Compute the baud rate */
SER_BITBANG_INIT;
#else /* CONFIG_KDEBUG_PORT != 666 */
/* Compute the baud rate */
- uint16_t period =
(((CLOCK_FREQ / 16UL) + (CONFIG_KDEBUG_BAUDRATE / 2)) /
CONFIG_KDEBUG_BAUDRATE) - 1;
+ uint16_t period =
DIV_ROUND(CLOCK_FREQ / 16UL,
CONFIG_KDEBUG_BAUDRATE) - 1;
#if (CPU_AVR_ATMEGA64 || CPU_AVR_ATMEGA128)
#if CONFIG_KDEBUG_PORT == 0
#if (CPU_AVR_ATMEGA64 || CPU_AVR_ATMEGA128)
#if CONFIG_KDEBUG_PORT == 0