| AVR Z-LINKŪ |

# ftdi.h

Go to the documentation of this file.

    00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
    00023 #ifndef FTDI_H
    00024 #define FTDI_H
    00025
    00026 /* === Includes ============================================================ */
    00027 #include<stdint.h>
    00028 #include "compiler.h"
    00029 /* ==== Macros ============================================================= */
    00030 #define LOW 0x00
    00031
    00032 #define XRAM_ENABLE( )     XMCRA |= ( 1 << SRE ); XMCRB |= ( 1 << XMBK )
    00033 #define XRAM_DISABLE( )    XMCRA &= ~( 1 << SRE )
    00034
    00035 #define FTDI_PORT                       PORTE
    00036 #define FTDI_DDR                        DDRE
    00037 #define FTDI_PIN                        PINE
    00038 #define FTDI_TX_PIN                             PINE6 //Transmit buffer empty. PE6
    00039 #define FTDI_TX_MASK                    ( 1 << FTDI_TX_PIN )
    00040 #define FTDI_RX_PIN                             PINE7 //Receive buffer full. PE7
    00041 #define FTDI_FIFO_ADDRESS       0xF000
    00042 #define FTDI_Fifo ( ( volatile uint8_t * )FTDI_FIFO_ADDRESS )
    00043
    00044 #define FTDI_ENABLE_TX( )                                               ( FTDI_DDR &= ~( 1 << FTDI_TX_PIN ) )
    00045 #define FTDI_CONFIGURE_PIN_CHANGE_INTERRUPT( )  ( EICRB &= ~( ( 1 << ISC71 ) | ( 1 << ISC70 ) ) )
    00046 #define FTDI_ENABLE_RECEIVER( )                                 ( EIMSK |= ( 1 << FTDI_RX_PIN ) )
    00047 #define FTDI_DISABLE_RECEIVER( )                                (EIMSK &= ~( 1 << FTDI_RX_PIN ) )
    00048 /* === Typedefs ============================================================ */
    00049 /* === Static Variables ==================================================== */
    00050 /* === Prototypes ========================================================== */
    00051 void ftdiInitialization( void );
    00052 void ftdiSendSymbol( const uint8_t symbol );
    00053 #endif

@DOC_TITLE@