[U-Boot-Users] at91rm9200 serial frequency fix 2

trimarchi at gandalf.sssup.it trimarchi at gandalf.sssup.it
Mon Aug 20 01:29:32 CEST 2007


Quoting Håvard Skinnemoen <hskinnemoen at gmail.com>:

> On 8/19/07, michael trimarchi <trimarchi at gandalf.sssup.it> wrote:
>
>> +#define BAUDRATE(mck, baud) \
>> +       ((((mck) * 10) % ((baud) * 16)) >= 5) ? \
>> +       (mck / (baud * 16) + 1) : ((mck) / (baud * 16))
>
> That's an awfully complicated way of doing
>
> (mck + baud * 8) / (baud * 16)
>
Ok
> isn't it? Or are you trying to do something different than rounding
> (mck / (16 *baud)) to the nearest integer?
>
Ok

Regards Michael


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the U-Boot mailing list