[En-Nut-Discussion] CR + LF or LF + CR
Ulrich Prinz
uprinz2 at netscape.net
Sun Sep 6 14:04:46 CEST 2009
[SNIP]
>>
>>
>>
> Hi Ulrich,
>
> thanks for your answer! Too bad to spend hours for a detail....
>
> In the moment I have no ARM board avail, but the source looks correct.
>
> In the AVR debug1.c and debug0.c I exchange to line of code:
>
> Original:
> /*!
> * \brief Send a single character to debug device 0.
> *
> * A carriage return character will be automatically appended
> * to any linefeed.
> */
> static void DebugPut(char ch)
> {
> while((USR & BV(UDRE)) == 0);
> UDR = ch;
> if(ch == '\n')
> DebugPut('\r');
> }
>
> Modified:
> /*!
> * \brief Send a single character to debug device 0.
> *
> * A carriage return character will be automatically appended
> * to any linefeed.
> */
> static void DebugPut(char ch)
> {
> if(ch == '\n')
> DebugPut('\r');
> while((USR & BV(UDRE)) == 0);
> UDR = ch;
> }
>
> Bye the way... I am beginner with Nut/OS (less then 1 week). What is the
> correct way to make this changes permanently? I had also found an issue
> in "cfg/arch/porttran.h" that prevents my 1-wire interface to work
> correctly. So long this modification is not in the common code base,
> nobody can use my interface.
I didn't want to do a recursive call as I could not forsee if there is a
way to get a dead loop. So I did it the hard way :)
If you're a beginner, the best way is to do it like you did. Post the
problem here and some of the NutO/S guys will catch up. You can add
DIFFs to your posts or someone will ask you for your modifications and
integrate them. After a while there are options, that you can get write
access to the repository.
So don't hasitate to write any bugreports and / or solutions. You're not
alone :)
Best regards,
Ulrich
More information about the En-Nut-Discussion
mailing list