| AVR Z-LINKŪ | |||||
Definition in file ftdi.h.
#include <stdint.h>
#include "compiler.h"
Include dependency graph for ftdi.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | FTDI_CONFIGURE_PIN_CHANGE_INTERRUPT() ( EICRB &= ~( ( 1 << ISC71 ) | ( 1 << ISC70 ) ) ) |
| #define | FTDI_DDR DDRE |
| #define | FTDI_DISABLE_RECEIVER() (EIMSK &= ~( 1 << FTDI_RX_PIN ) ) |
| #define | FTDI_ENABLE_RECEIVER() ( EIMSK |= ( 1 << FTDI_RX_PIN ) ) |
| #define | FTDI_ENABLE_TX() ( FTDI_DDR &= ~( 1 << FTDI_TX_PIN ) ) |
| #define | FTDI_Fifo ( ( volatile uint8_t * )FTDI_FIFO_ADDRESS ) |
| #define | FTDI_FIFO_ADDRESS 0xF000 |
| #define | FTDI_PIN PINE |
| #define | FTDI_PORT PORTE |
| #define | FTDI_RX_PIN PINE7 |
| #define | FTDI_TX_MASK ( 1 << FTDI_TX_PIN ) |
| #define | FTDI_TX_PIN PINE6 |
| #define | LOW 0x00 |
| #define | XRAM_DISABLE() XMCRA &= ~( 1 << SRE ) |
| #define | XRAM_ENABLE() XMCRA |= ( 1 << SRE ); XMCRB |= ( 1 << XMBK ) |
Functions | |
| void | ftdiInitialization (void) |
| Initialize the USB FIFO. | |
| void | ftdiSendSymbol (const uint8_t symbol) |
| Send one symbol to the USB FIFO. | |
| #define FTDI_CONFIGURE_PIN_CHANGE_INTERRUPT | ( | ) | ( EICRB &= ~( ( 1 << ISC71 ) | ( 1 << ISC70 ) ) ) |
| #define FTDI_DISABLE_RECEIVER | ( | ) | (EIMSK &= ~( 1 << FTDI_RX_PIN ) ) |
| #define FTDI_ENABLE_RECEIVER | ( | ) | ( EIMSK |= ( 1 << FTDI_RX_PIN ) ) |
| #define FTDI_ENABLE_TX | ( | ) | ( FTDI_DDR &= ~( 1 << FTDI_TX_PIN ) ) |
| #define FTDI_Fifo ( ( volatile uint8_t * )FTDI_FIFO_ADDRESS ) |
| #define FTDI_PIN PINE |
| #define FTDI_TX_MASK ( 1 << FTDI_TX_PIN ) |
| #define LOW 0x00 |
| #define XRAM_ENABLE | ( | ) | XMCRA |= ( 1 << SRE ); XMCRB |= ( 1 << XMBK ) |
| void ftdiInitialization | ( | void | ) |
Initialize the USB FIFO.
Definition at line 36 of file ftdi.c.
References FTDI_CONFIGURE_PIN_CHANGE_INTERRUPT, FTDI_ENABLE_RECEIVER, FTDI_ENABLE_TX, and XRAM_ENABLE.
Referenced by serialInterfaceInitialization().
00036 { 00037 00038 XRAM_ENABLE( ); 00039 00040 /* make sure USB_RXF and USB_TXE are inputs */ 00041 FTDI_ENABLE_TX( ); 00042 00043 //Enable external interrupt on FTDI_RX pin. 00044 FTDI_CONFIGURE_PIN_CHANGE_INTERRUPT( ); 00045 FTDI_ENABLE_RECEIVER( ); 00046 }
| void ftdiSendSymbol | ( | const uint8_t | symbol | ) |
Send one symbol to the USB FIFO.
This function passes one symbol (8 bits) to the FTDI USB FIFO chip.
| symbol | Symbol to be sent. |
Definition at line 57 of file ftdi.c.
References FTDI_Fifo, FTDI_PIN, FTDI_TX_MASK, and LOW.
Referenced by sendSymbol().
00057 { 00058 00059 //Wait until the fifo is ready. 00060 while( ( FTDI_TX_MASK & FTDI_PIN ) != LOW ){ 00061 ; 00062 } 00063 00064 //Write symbol to memory address. 00065 *FTDI_Fifo = ( symbol ); 00066 }
Generated on Sat Dec 2 16:05:51 2006 for AVR414 User's Guide - ATAVRRZ502 - Accessory Kit by 1.4.7
|