[En-Nut-Discussion] EIR pin multiplexing.
Harald Kipp
harald.kipp at egnite.de
Tue Nov 16 12:25:02 CET 2010
On 16.11.2010 11:16, samkelo tyatyantsi wrote:
> Thanks for the response, I did try to check if its possible to do
> this on the configurator, but I did'nt find any settings relating to
> RTS/CTS emulation, or do I need to define them in some file??
Mmmmh... you are refering to Nut/OS version 4.8? Indeed, in the
Configurator it's available for AVR only. On 4.9 this is available for
all platforms.
When looking into 4.8 source code, it looks like it is supported. But in
fact its a dumb copy of the AVR code and will not compile on ARM.
If you want to stick with 4.8, you can add
http://ethernut.svn.sourceforge.net/viewvc/ethernut/trunk/nut/arch/arm/dev/usartat91.c
http://ethernut.svn.sourceforge.net/viewvc/ethernut/trunk/nut/arch/arm/dev/usart0at91.c
http://ethernut.svn.sourceforge.net/viewvc/ethernut/trunk/nut/arch/arm/dev/usart0at91.c
to the local directory of your application code. Then add usart0at91.c
and usart1at91.c to your Makefile. This way the new drivers will replace
those of the system.
Now add
HWDEF += -DUART1_RTS_BIT=0
HWDEF += -DUART1_RTS_PIO_ID=PIOB_ID
HWDEF += -DUART1_CTS_BIT=1
HWDEF += -DUART1_CTS_PIO_ID=PIOB_ID
to the app's Makefile (immediately after "include ../Makedefs) to
configure the driver. Of course you need to replace the bit and PIO IDs
with those of your hardware.
Regards,
Harald
More information about the En-Nut-Discussion
mailing list