X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Favr%2Fdrv%2Fser_avr.c;h=c4d4994520929b070c1c777ae2ed9fcdf3fccf98;hb=4cc44c9888a0336b9d01121ec0b7ad95f4a76195;hp=e9e1f5ec186907eb8033ed140c35fcb710eacfdd;hpb=345f93de1963f49bdb194d2b06c8c5d7ba0a3e5f;p=bertos.git diff --git a/bertos/cpu/avr/drv/ser_avr.c b/bertos/cpu/avr/drv/ser_avr.c index e9e1f5ec..c4d49945 100644 --- a/bertos/cpu/avr/drv/ser_avr.c +++ b/bertos/cpu/avr/drv/ser_avr.c @@ -27,53 +27,34 @@ * the GNU General Public License. * * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/) - * Copyright 2000 Bernardo Innocenti + * Copyright 2000 Bernie Innocenti * * --> * - * \brief AVR UART and SPI I/O driver - * - * Rationale for project_ks hardware. - * - * The serial 0 on the board_kf board is used to communicate with the - * smart card, which has the TX and RX lines connected together. To - * allow the smart card to drive the RX line of the CPU the CPU TX has - * to be in a high impedance state. - * Whenever a transmission is done and there is nothing more to send - * the transmitter is turn off. The output pin is held in input with - * pull-up enabled, to avoid capturing noise from the nearby RX line. - * - * The line on the KBus port must keep sending data, even when - * there is nothing to transmit, because a burst data transfer - * generates noise on the audio channels. - * This is accomplished using the multiprocessor mode of the - * ATmega64/128 serial. - * - * The receiver keeps the MPCM bit always on. When useful data - * is trasmitted the address bit is set. The receiver hardware - * consider the frame as address info and receive it. - * When useless fill bytes are sent the address bit is cleared - * and the receiver will ignore them, avoiding useless triggering - * of RXC interrupt. + * \brief AVR UART and SPI I/O driver (Implementation) * * \version $Id$ - * \author Bernardo Innocenti + * + * \author Bernie Innocenti * \author Stefano Fedrigo */ -#include -#include +#include "hw/hw_ser.h" /* Required for bus macros overrides */ +#include "hw/hw_cpu.h" /* CLOCK_FREQ */ -#include /* Required for bus macros overrides */ -#include /* CLOCK_FREQ */ -#include +#include "cfg/cfg_ser.h" #include /* DIV_ROUND */ #include + +#include +#include #include + #include #include + #if defined(__AVR_LIBC_VERSION__) && (__AVR_LIBC_VERSION__ >= 10400UL) #include #else