1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Initial Arduino IDE based on Processing.

This commit is contained in:
David A. Mellis
2005-08-25 21:06:28 +00:00
commit 9fc5aa63f6
373 changed files with 71081 additions and 0 deletions

View File

@ -0,0 +1,18 @@
/ataconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/cmdlineconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/encoderconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/fatconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/global.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/i2cconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/i2cswconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/ks0108conf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/lcdconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/mmcconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/readme-conf.txt/1.1.1.1/Wed Apr 27 14:06:09 2005//
/servoconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/sramswconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/sta013conf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/stxetxconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/uartsw2conf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
/uartswconf.h/1.1.1.1/Wed Apr 27 14:06:09 2005//
D

View File

@ -0,0 +1 @@
Arduino/wiringlite/avrlib/conf

View File

@ -0,0 +1 @@
:ext:mbanzi@cvs.arduino.berlios.de:/cvsroot/arduino

View File

@ -0,0 +1,44 @@
/*! \file ataconf.h \brief IDE-ATA interface driver configuration. */
//*****************************************************************************
//
// File Name : 'ataconf.h'
// Title : IDE-ATA interface driver for hard disks
// Author : Pascal Stang - Copyright (C) 2000-2002
// Date : 11/22/2000
// Revised : 12/29/2000
// Version : 0.3
// Target MCU : Atmel AVR Series)
// Editor Tabs : 4
//
// NOTE: This code is currently below version 1.0, and therefore is considered
// to be lacking in some functionality or documentation, or may not be fully
// tested. Nonetheless, you can expect most functions to work.
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef ATA_IFCONF_H
#define ATA_IFCONF_H
// constants
#define SECTOR_BUFFER_ADDR 0x1E00
// ATA register base address
#define ATA_REG_BASE 0x8000
// ATA register offset
#define ATA_REG_DATAL 0x00
#define ATA_REG_ERROR 0x01
#define ATA_REG_SECCOUNT 0x02
#define ATA_REG_STARTSEC 0x03
#define ATA_REG_CYLLO 0x04
#define ATA_REG_CYLHI 0x05
#define ATA_REG_HDDEVSEL 0x06
#define ATA_REG_CMDSTATUS1 0x07
#define ATA_REG_CMDSTATUS2 0x08
#define ATA_REG_ACTSTATUS 0x09
#define ATA_REG_DATAH 0x10
#endif

View File

@ -0,0 +1,46 @@
/*! \file cmdlineconf.h \brief Command-Line Interface Library Configuration. */
//*****************************************************************************
//
// File Name : 'cmdlineconf.h'
// Title : Command-Line Interface Library Configuration
// Author : Pascal Stang - Copyright (C) 2003
// Created : 2003.07.16
// Revised : 2003.07.21
// Version : 0.1
// Target MCU : Atmel AVR Series
// Editor Tabs : 4
//
// NOTE: This code is currently below version 1.0, and therefore is considered
// to be lacking in some functionality or documentation, or may not be fully
// tested. Nonetheless, you can expect most functions to work.
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef CMDLINECONF_H
#define CMDLINECONF_H
#include "global.h"
// constants/macros/typdefs
// size of command database
// (maximum number of commands the cmdline system can handle)
#define CMDLINE_MAX_COMMANDS 10
// maximum length (number of characters) of each command string
// (quantity must include one additional byte for a null terminator)
#define CMDLINE_MAX_CMD_LENGTH 15
// allotted buffer size for command entry
// (must be enough chars for typed commands and the arguments that follow)
#define CMDLINE_BUFFERSIZE 80
// number of lines of command history to keep
// (each history buffer is CMDLINE_BUFFERSIZE in size)
// ***** ONLY ONE LINE OF COMMAND HISTORY IS CURRENTLY SUPPORTED
#define CMDLINE_HISTORYSIZE 1
#endif

View File

@ -0,0 +1,167 @@
/*! \file encoderconf.h \brief Quadrature Encoder driver configuration. */
//*****************************************************************************
//
// File Name : 'encoderconf.h'
// Title : Quadrature Encoder driver configuration
// Author : Pascal Stang - Copyright (C) 2003-2004
// Created : 2003.01.26
// Revised : 2004.06.25
// Version : 0.2
// Target MCU : Atmel AVR Series
// Editor Tabs : 4
//
// The default number of encoders supported is 2 because most AVR processors
// have two external interrupts. To use more or fewer encoders, you must do
// four things:
//
// 1. Use a processor with at least as many external interrutps as number of
// encoders you want to have.
// 2. Set NUM_ENCODERS to the number of encoders you will use.
// 3. Comment/Uncomment the proper ENCx_SIGNAL defines for your encoders
// (the encoders must be used sequentially, 0 then 1 then 2 then 3)
// 4. Configure the various defines so that they match your processor and
// specific hardware. The notes below may help.
//
//
// -------------------- NOTES --------------------
// The external interrupt pins are mapped as follows on most AVR processors:
// (90s8515, mega161, mega163, mega323, mega16, mega32, etc)
//
// INT0 -> PD2 (PORTD, pin 2)
// INT1 -> PD3 (PORTD, pin 3)
//
// The external interrupt pins on the processors mega128 and mega64 are:
//
// INT0 -> PD0 (PORTD, pin 0)
// INT1 -> PD1 (PORTD, pin 1)
// INT2 -> PD2 (PORTD, pin 2)
// INT3 -> PD3 (PORTD, pin 3)
// INT4 -> PE4 (PORTE, pin 4)
// INT5 -> PE5 (PORTE, pin 5)
// INT6 -> PE6 (PORTE, pin 6)
// INT7 -> PE7 (PORTE, pin 7)
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef ENCODERCONF_H
#define ENCODERCONF_H
// constants/macros/typdefs
// defines for processor compatibility
// quick compatiblity for mega128, mega64
//#ifndef MCUCR
// #define MCUCR EICRA
//#endif
// Set the total number of encoders you wish to support
#define NUM_ENCODERS 2
// -------------------- Encoder 0 connections --------------------
// Phase A quadrature encoder output should connect to this interrupt line:
// *** NOTE: the choice of interrupt PORT, DDR, and PIN must match the external
// interrupt you are using on your processor. Consult the External Interrupts
// section of your processor's datasheet for more information.
// Interrupt Configuration
#define ENC0_SIGNAL SIG_INTERRUPT0 // Interrupt signal name
#define ENC0_INT INT0 // matching INTx bit in GIMSK/EIMSK
#define ENC0_ICR MCUCR // matching Int. Config Register (MCUCR,EICRA/B)
#define ENC0_ISCX0 ISC00 // matching Interrupt Sense Config bit0
#define ENC0_ISCX1 ISC01 // matching Interrupt Sense Config bit1
// PhaseA Port/Pin Configuration
// *** PORTx, DDRx, PINx, and Pxn should all have the same letter for "x" ***
#define ENC0_PHASEA_PORT PORTD // PhaseA port register
#define ENC0_PHASEA_DDR DDRD // PhaseA port direction register
#define ENC0_PHASEA_PORTIN PIND // PhaseA port input register
#define ENC0_PHASEA_PIN PD2 // PhaseA port pin
// Phase B quadrature encoder output should connect to this direction line:
// *** PORTx, DDRx, PINx, and Pxn should all have the same letter for "x" ***
#define ENC0_PHASEB_PORT PORTC // PhaseB port register
#define ENC0_PHASEB_DDR DDRC // PhaseB port direction register
#define ENC0_PHASEB_PORTIN PINC // PhaseB port input register
#define ENC0_PHASEB_PIN PC0 // PhaseB port pin
// -------------------- Encoder 1 connections --------------------
// Phase A quadrature encoder output should connect to this interrupt line:
// *** NOTE: the choice of interrupt pin and port must match the external
// interrupt you are using on your processor. Consult the External Interrupts
// section of your processor's datasheet for more information.
// Interrupt Configuration
#define ENC1_SIGNAL SIG_INTERRUPT1 // Interrupt signal name
#define ENC1_INT INT1 // matching INTx bit in GIMSK/EIMSK
#define ENC1_ICR MCUCR // matching Int. Config Register (MCUCR,EICRA/B)
#define ENC1_ISCX0 ISC10 // matching Interrupt Sense Config bit0
#define ENC1_ISCX1 ISC11 // matching Interrupt Sense Config bit1
// PhaseA Port/Pin Configuration
// *** PORTx, DDRx, PINx, and Pxn should all have the same letter for "x" ***
#define ENC1_PHASEA_PORT PORTD // PhaseA port register
#define ENC1_PHASEA_PORTIN PIND // PhaseA port input register
#define ENC1_PHASEA_DDR DDRD // PhaseA port direction register
#define ENC1_PHASEA_PIN PD3 // PhaseA port pin
// Phase B quadrature encoder output should connect to this direction line:
// *** PORTx, DDRx, PINx, and Pxn should all have the same letter for "x" ***
#define ENC1_PHASEB_PORT PORTC // PhaseB port register
#define ENC1_PHASEB_DDR DDRC // PhaseB port direction register
#define ENC1_PHASEB_PORTIN PINC // PhaseB port input register
#define ENC1_PHASEB_PIN PC1 // PhaseB port pin
// -------------------- Encoder 2 connections --------------------
// Phase A quadrature encoder output should connect to this interrupt line:
// *** NOTE: the choice of interrupt pin and port must match the external
// interrupt you are using on your processor. Consult the External Interrupts
// section of your processor's datasheet for more information.
// Interrupt Configuration
//#define ENC2_SIGNAL SIG_INTERRUPT6 // Interrupt signal name
#define ENC2_INT INT6 // matching INTx bit in GIMSK/EIMSK
#define ENC2_ICR EICRB // matching Int. Config Register (MCUCR,EICRA/B)
#define ENC2_ISCX0 ISC60 // matching Interrupt Sense Config bit0
#define ENC2_ISCX1 ISC61 // matching Interrupt Sense Config bit1
// PhaseA Port/Pin Configuration
// *** PORTx, DDRx, PINx, and Pxn should all have the same letter for "x" ***
#define ENC2_PHASEA_PORT PORTE // PhaseA port register
#define ENC2_PHASEA_PORTIN PINE // PhaseA port input register
#define ENC2_PHASEA_DDR DDRE // PhaseA port direction register
#define ENC2_PHASEA_PIN PE6 // PhaseA port pin
// Phase B quadrature encoder output should connect to this direction line:
// *** PORTx, DDRx, PINx, and Pxn should all have the same letter for "x" ***
#define ENC2_PHASEB_PORT PORTC // PhaseB port register
#define ENC2_PHASEB_DDR DDRC // PhaseB port direction register
#define ENC2_PHASEB_PORTIN PINC // PhaseB port input register
#define ENC2_PHASEB_PIN PC2 // PhaseB port pin
// -------------------- Encoder 3 connections --------------------
// Phase A quadrature encoder output should connect to this interrupt line:
// *** NOTE: the choice of interrupt pin and port must match the external
// interrupt you are using on your processor. Consult the External Interrupts
// section of your processor's datasheet for more information.
// Interrupt Configuration
//#define ENC3_SIGNAL SIG_INTERRUPT7 // Interrupt signal name
#define ENC3_INT INT7 // matching INTx bit in GIMSK/EIMSK
#define ENC3_ICR EICRB // matching Int. Config Register (MCUCR,EICRA/B)
#define ENC3_ISCX0 ISC70 // matching Interrupt Sense Config bit0
#define ENC3_ISCX1 ISC71 // matching Interrupt Sense Config bit1
// PhaseA Port/Pin Configuration
// *** PORTx, DDRx, PINx, and Pxn should all have the same letter for "x" ***
#define ENC3_PHASEA_PORT PORTE // PhaseA port register
#define ENC3_PHASEA_PORTIN PINE // PhaseA port input register
#define ENC3_PHASEA_DDR DDRE // PhaseA port direction register
#define ENC3_PHASEA_PIN PE7 // PhaseA port pin
// Phase B quadrature encoder output should connect to this direction line:
// *** PORTx, DDRx, PINx, and Pxn should all have the same letter for "x" ***
#define ENC3_PHASEB_PORT PORTC // PhaseB port register
#define ENC3_PHASEB_DDR DDRC // PhaseB port direction register
#define ENC3_PHASEB_PORTIN PINC // PhaseB port input register
#define ENC3_PHASEB_PIN PC3 // PhaseB port pin
#endif

View File

@ -0,0 +1,40 @@
/*! \file fatconf.h \brief FAT16/32 file system driver configuration. */
//*****************************************************************************
//
// File Name : 'fatconf.h'
// Title : FAT16/32 file system driver configuration
// Author : Pascal Stang
// Date : 4/19/2003
// Revised : 4/19/2003
// Version : 0.3
// Target MCU : Atmel AVR Series
// Editor Tabs : 4
//
// NOTE: This code is currently below version 1.0, and therefore is considered
// to be lacking in some functionality or documentation, or may not be fully
// tested. Nonetheless, you can expect most functions to work.
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef FATCONF_H
#define FATCONF_H
// debug on/off
#define DEBUG_FAT
#define SECTOR_BUFFER1_ADDR 0x0600+0x0600
#define SECTOR_BUFFER1_SIZE 0x0200
#define LONGNAME_BUFFER_ADDR 0x0200+0x0600
#define LONGNAME_BUFFER_SIZE 0x0100
#define DIRNAME_BUFFER_ADDR 0x0300+0x0600
#define DIRNAME_BUFFER_SIZE 0x0100
#define FAT_CACHE_ADDR 0x0400+0x0600
#define FAT_CACHE_SIZE 0x0200
#endif

View File

@ -0,0 +1,40 @@
/*! \file global.h \brief AVRlib project global include. */
//*****************************************************************************
//
// File Name : 'global.h'
// Title : AVRlib project global include
// Author : Pascal Stang - Copyright (C) 2001-2002
// Created : 7/12/2001
// Revised : 9/30/2002
// Version : 1.1
// Target MCU : Atmel AVR series
// Editor Tabs : 4
//
// Description : This include file is designed to contain items useful to all
// code files and projects.
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef GLOBAL_H
#define GLOBAL_H
// global AVRLIB defines
#include "avrlibdefs.h"
// global AVRLIB types definitions
#include "avrlibtypes.h"
// project/system dependent defines
// CPU clock speed
//#define F_CPU 16000000 // 16MHz processor
//#define F_CPU 14745000 // 14.745MHz processor
//#define F_CPU 8000000 // 8MHz processor
#define F_CPU 7372800 // 7.37MHz processor
//#define F_CPU 4000000 // 4MHz processor
//#define F_CPU 3686400 // 3.69MHz processor
#define CYCLES_PER_US ((F_CPU+500000)/1000000) // cpu cycles per microsecond
#endif

View File

@ -0,0 +1,28 @@
/*! \file i2cconf.h \brief I2C (TWI) interface configuration. */
//*****************************************************************************
//
// File Name : 'i2cconf.h'
// Title : I2C (TWI) interface configuration
// Author : Pascal Stang - Copyright (C) 2002-2003
// Created : 2002.06.25
// Revised : 2003.03.02
// Version : 0.7
// Target MCU : Atmel AVR series
// Editor Tabs : 4
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef I2CCONF_H
#define I2CCONF_H
// define I2C data buffer sizes
// These buffers are used in interrupt-driven Master sending and receiving,
// and in slave sending and receiving. They must be large enough to store
// the largest I2C packet you expect to send and receive, respectively.
#define I2C_SEND_DATA_BUFFER_SIZE 0x20
#define I2C_RECEIVE_DATA_BUFFER_SIZE 0x20
#endif

View File

@ -0,0 +1,32 @@
/*! \file i2cswconf.h \brief Software-driven I2C interface configuration. */
//*****************************************************************************
//
// File Name : 'i2cswconf.h'
// Title : software-driven I2C interface using port pins
// Author : Pascal Stang - Copyright (C) 2000-2002
// Created : 11/22/2000
// Revised : 5/2/2002
// Version : 1.1
// Target MCU : Atmel AVR series
// Editor Tabs : 4
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef I2CSWCONF_H
#define I2CSWCONF_H
// clock line port
#define SCLPORT PORTD // i2c clock port
#define SCLDDR DDRD // i2c clock port direction
// data line port
#define SDAPORT PORTD // i2c data port
#define SDADDR DDRD // i2c data port direction
#define SDAPIN PIND // i2c data port input
// pin assignments
#define SCL PD0 // i2c clock pin
#define SDA PD1 // i2c data pin
#endif

View File

@ -0,0 +1,85 @@
/*! \file ks0108conf.h \brief Graphic LCD driver configuration. */
//*****************************************************************************
//
// File Name : 'ks0108conf.h'
// Title : Graphic LCD driver for HD61202/KS0108 displays
// Author : Pascal Stang - Copyright (C) 2001-2003
// Date : 10/19/2001
// Revised : 5/1/2003
// Version : 0.5
// Target MCU : Atmel AVR
// Editor Tabs : 4
//
// NOTE: This code is currently below version 1.0, and therefore is considered
// to be lacking in some functionality or documentation, or may not be fully
// tested. Nonetheless, you can expect most functions to work.
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef KS0108CONF_H
#define KS0108CONF_H
// define LCD hardware interface
// -LCD_MEMORY_INTERFACE assumes that the registers of the LCD have been mapped
// into the external memory space of the AVR processor memory bus
// -LCD_PORT_INTERFACE is a direct-connection interface from port pins to LCD
// SELECT (UNCOMMENT) ONLY ONE!
// *** NOTE: memory interface is not yet fully supported, but it might work
//#define GLCD_MEMORY_INTERFACE
#define GLCD_PORT_INTERFACE
// GLCD_PORT_INTERFACE specifics
#ifdef GLCD_PORT_INTERFACE
// make sure these parameters are not already defined elsewhere
#ifndef GLCD_CTRL_PORT
#define GLCD_CTRL_PORT PORTB // PORT for LCD control signals
#define GLCD_CTRL_DDR DDRB // DDR register of LCD_CTRL_PORT
#define GLCD_CTRL_RS PB0 // pin for LCD Register Select
#define GLCD_CTRL_RW PB1 // pin for LCD Read/Write
#define GLCD_CTRL_E PB2 // pin for LCD Enable
#define GLCD_CTRL_CS0 PB3 // pin for LCD Controller 0 Chip Select
#define GLCD_CTRL_CS1 PB4 // pin for LCD Controller 1 Chip Select(*)
#define GLCD_CTRL_CS2 PB6 // pin for LCD Controller 2 Chip Select(*)
#define GLCD_CTRL_CS3 PB7 // pin for LCD Controller 3 Chip Select(*)
#define GLCD_CTRL_RESET PB5 // pin for LCD Reset
// (*) NOTE: additonal controller chip selects are optional and
// will be automatically used per each step in 64 pixels of display size
// Example: Display with 128 hozizontal pixels uses 2 controllers
#endif
#ifndef GLCD_DATA_PORT
#define GLCD_DATA_PORT PORTC // PORT for LCD data signals
#define GLCD_DATA_DDR DDRC // DDR register of LCD_DATA_PORT
#define GLCD_DATA_PIN PINC // PIN register of LCD_DATA_PORT
#endif
#endif
// GLCD_MEMORY_INTERFACE specifics
#ifdef GLCD_MEMORY_INTERFACE
// make sure these parameters are not already defined elsewhere
#ifndef GLCD_CONTROLLER0_CTRL_ADDR
// absolute address of LCD Controller #0 CTRL and DATA registers
#define GLCD_CONTROLLER0_CTRL_ADDR 0x1000
#define GLCD_CONTROLLER0_DATA_ADDR 0x1001
// offset of other controllers with respect to controller0
#define GLCD_CONTROLLER_ADDR_OFFSET 0x0002
#endif
#endif
// LCD geometry defines (change these definitions to adapt code/settings)
#define GLCD_XPIXELS 128 // pixel width of entire display
#define GLCD_YPIXELS 64 // pixel height of entire display
#define GLCD_CONTROLLER_XPIXELS 64 // pixel width of one display controller
// Set text size of display
// These definitions are not currently used and will probably move to glcd.h
#define GLCD_TEXT_LINES 8 // visible lines
#define GLCD_TEXT_LINE_LENGTH 22 // internal line length
#endif

View File

@ -0,0 +1,97 @@
/*! \file lcdconf.h \brief Character LCD driver configuration. */
//*****************************************************************************
//
// File Name : 'lcdconf.h'
// Title : Character LCD driver for HD44780/SED1278 displays
// (usable in mem-mapped, or I/O mode)
// Author : Pascal Stang - Copyright (C) 2000-2002
// Created : 11/22/2000
// Revised : 4/30/2002
// Version : 1.1
// Target MCU : Atmel AVR series
// Editor Tabs : 4
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef LCDCONF_H
#define LCDCONF_H
// Define type of interface used to access the LCD
// LCD_MEMORY_INTERFACE:
// To use this mode you must supply the necessary hardware to connect the
// LCD to the CPU's memory bus. The CONTROL and DATA registers of the LCD
// (HD44780 chip) must appear in the CPU's memory map. This mode is faster
// than the port interface but requires a little extra hardware to make it
// work. It is especially useful when your CPU is already configured to
// use an external memory bus for other purposes (like accessing memory).
//
// LCD_PORT_INTERFACE:
// This mode allows you to connect the control and data lines of the LCD
// directly to the I/O port pins (no interfacing hardware is needed),
// but it generally runs slower than the LCD_MEMORY_INTERFACE.
// Depending on your needs, when using the LCD_PORT_INTERFACE, the LCD may
// be accessed in 8-bit or 4-bit mode. In 8-bit mode, one whole I/O port
// (pins 0-7) is required for the LCD data lines, but transfers are faster.
// In 4-bit mode, only I/O port pins 4-7 are needed for data lines, but LCD
// access is slower. In either mode, three additional port pins are
// required for the LCD interface control lines (RS, R/W, and E).
// Enable one of the following interfaces to your LCD
//#define LCD_MEMORY_INTERFACE
#define LCD_PORT_INTERFACE
// Enter the parameters for your chosen interface'
// if you chose the LCD_PORT_INTERFACE:
#ifdef LCD_PORT_INTERFACE
#ifndef LCD_CTRL_PORT
// port and pins you will use for control lines
#define LCD_CTRL_PORT PORTC
#define LCD_CTRL_DDR DDRC
#define LCD_CTRL_RS 2
#define LCD_CTRL_RW 3
#define LCD_CTRL_E 4
#endif
#ifndef LCD_DATA_POUT
// port you will use for data lines
#define LCD_DATA_POUT PORTA
#define LCD_DATA_PIN PINA
#define LCD_DATA_DDR DDRA
// access mode you will use (default is 8bit unless 4bit is selected)
//#define LCD_DATA_4BIT
#endif
#endif
// if you chose the LCD_MEMORY_INTERFACE:
#ifdef LCD_MEMORY_INTERFACE
#ifndef LCD_CTRL_ADDR
// CPU memory address of the LCD control register
#define LCD_CTRL_ADDR 0x1000
#endif
#ifndef LCD_DATA_ADDR
// CPU memory address of the LCD data register
#define LCD_DATA_ADDR 0x1001
#endif
#endif
// LCD display geometry
// change these definitions to adapt settings
#define LCD_LINES 4 // visible lines
#define LCD_LINE_LENGTH 20 // line length (in characters)
// cursor position to DDRAM mapping
#define LCD_LINE0_DDRAMADDR 0x00
#define LCD_LINE1_DDRAMADDR 0x40
#define LCD_LINE2_DDRAMADDR 0x14
#define LCD_LINE3_DDRAMADDR 0x54
// LCD delay
// This delay affects how quickly accesses are made to the LCD controller.
// If your clock frequency is low, you can reduce the number of NOPs in the
// delay. If your clock frequency is high, you may need to add NOPs.
// The number of NOPs should be between at least 1 and up to 20.
#define LCD_DELAY asm volatile ("nop\n nop\n nop\n nop\n");
#endif

View File

@ -0,0 +1,33 @@
/*! \file mmcconf.h \brief MultiMedia and SD Flash Card Interface Configuration. */
//*****************************************************************************
//
// File Name : 'mmc.h'
// Title : MultiMedia and SD Flash Card Interface Configuration
// Author : Pascal Stang - Copyright (C) 2004
// Created : 2004.09.22
// Revised : 2004.09.22
// Version : 0.1
// Target MCU : Atmel AVR Series
// Editor Tabs : 4
//
// NOTE: This code is currently below version 1.0, and therefore is considered
// to be lacking in some functionality or documentation, or may not be fully
// tested. Nonetheless, you can expect most functions to work.
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef MMCCONF_H
#define MMCCONF_H
// define to enable debugging print statements
//#define MMC_DEBUG
// MMC card chip select pin defines
#define MMC_CS_PORT PORTB
#define MMC_CS_DDR DDRB
#define MMC_CS_PIN 0
#endif

View File

@ -0,0 +1,24 @@
--- AVRlib "conf" files ---
AVRlib contains many function/code libraries which depend upon particular aspects of the
user's hardware. The most basic of these is the processor clock rate. The clock rate defines
dozens of aspects of processor operation from code delays to UART baud rates.
To allow AVRlib to work easily with hardware that may vary from project to project, all
user-configurable parameters of AVRlib are contained in the template configuration files in
this directory. NOTE that these files are only templates and should be copied, as needed,
to an individual project's code directory and edited to suit that project's hardware.
global.h is the only configuration include file that is common to the entire AVRlib code base.
To use AVRlib libraries, you must copy global.h to your project's code directory and modify
the options inside global.h to match your hardware.) Each project should have its own global.h.
Other *conf.h files should be copied to your project's code directory as needed. For example,
if you intend to use the lcd.c library, you will need to copy lcdconf.h and modify it to match
the I/O and LCD configuration of your hardware.
** If you fail to copy the configuration files needed for the AVRlib libraries you use,
the problem will usually exhibit itself as a compile-time error.

View File

@ -0,0 +1,82 @@
/*! \file servoconf.h \brief Interrupt-driven RC Servo configuration. */
//*****************************************************************************
//
// File Name : 'servoconf.h'
// Title : Interrupt-driven RC Servo function library
// Author : Pascal Stang - Copyright (C) 2002
// Created : 07/31/2002
// Revised : 09/30/2002
// Version : 1.0
// Target MCU : Atmel AVR Series
// Editor Tabs : 4
//
// NOTE: you need the latest version (3.2+) of the AVR-GCC compiler to use this
// function library. Download it from http://www.avrfreaks.net/AVRGCC
//
// Description : This code allows you to drive up to 8 RC servos from any
// combination of ports and pins on the AVR processor. Using interrupts,
// this code continuously sends control signals to the servo to maintain
// position even while your code is doing other work.
//
// The servoInit and servoOff effectively turn on and turn off servo
// control. When you run ServoInit, it automatically assigns each
// "channel" of servo control to be output on the SERVO_DEFAULT_PORT.
// One "channel" of servo control can control one servo and must be
// assigned single I/O pin for output.
//
// If you're using all eight channels (SERVO_NUM_CHANNELS = 8), then
// then by default the code will use SERVO_DEFAULT_PORT pins 0-7.
// If you're only using four channels, then pins 0-3 will be used by
// default.
//
// The command servoSetChannelIO(channel, port, pin) allows you to
// reassign the output of any channel to any port and I/O pin you
// choose. For exampe, if you have an RC servo connected to PORTC, pin 6,
// and you wish to use channel 2 to control it, use:
//
// servoSerChannelIO( 2, _SFR_IO_ADDR(PORTC), 6)
//
// (NOTE: you must include the "_SRF_IO_ADDR()" part around your port)
//
// The servoSetPostion and servoGetPosition commands allow you to command
// a given servo to your desired position. The position you request must
// lie between the SERVO_MIN and SERVO_MAX limit you defined.
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef SERVOCONF_H
#define SERVOCONF_H
// set number of servo channels (1 to 8)
// This is the number of servos you would like to drive
// Each "Channel" can control one servo and by default will
// map directly to the port pin of the same number on the
// SERVO_DEFAULT_PORT. You can change this default port/pin
// assignment for a given channel to any port/pin you like.
// See the "servoSetChannelIO" function.
#define SERVO_NUM_CHANNELS 4
// set default SERVO output port
// This is the AVR port which you have connected to your servos
// See top of file for how servo "channels" map to port pins
#define SERVO_DEFAULT_PORT PORTB
// set servo characteristics (min and max raw position)
// You must find these by testing using your brand/type of servos.
// The min/max settings will change proportional to F_CPU, the CPU
// clock frequency.
// The numbers below good for parallax servos at an F_CPU of ~8MHz.
//#define SERVO_MAX 71
//#define SERVO_MIN 17
// The numbers below good for parallax servos at an F_CPU of ~14.745MHz.
#define SERVO_MAX 138
#define SERVO_MIN 34
// set servo scaled range
// This sets the scaled position range of the servo. Allowed scaled
// positions are 0 -> SERVO_POSITION_MAX, and correspond to raw
// positions of SERVO_MIN -> SERVO_MAX.
#define SERVO_POSITION_MAX 255
#endif

View File

@ -0,0 +1,42 @@
/*! \file sramswconf.h \brief Software-driven SRAM memory bus access configuration. */
//*****************************************************************************
//
// File Name : 'sramswconf.h'
// Title : Software-driven SRAM memory bus access functions
// Author : Pascal Stang - Copyright (C) 2002
// Created : 11/11/2002
// Revised : 11/13/2002
// Version : 1.0
// Target MCU : Atmel AVR series
// Editor Tabs : 4
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef SRAMSWCONF_H
#define SRAMSWCONF_H
// defines
// data bus (DATA[0:7]) and low address (ADDR[0:7]) port
#define SRAM_ADL PORTA
#define SRAM_ADL_DDR DDRA
#define SRAM_ADL_IN PINA
// high address port (ADDR[8:15])
#define SRAM_AH PORTC
#define SRAM_AH_DDR DDRC
// page address port (PAGE[0:3])
#define SRAM_PAGE PORTB
#define SRAM_PAGE_DDR DDRB
#define SRAM_PAGE_MASK 0x0F
// control port
#define SRAM_CTRL PORTD
#define SRAM_CTRL_DDR DDRD
// control lines
#define SRAM_ALE PD5
#define SRAM_WR PD6
#define SRAM_RD PD7
#endif

View File

@ -0,0 +1,34 @@
/*! \file sta013conf.h \brief STA013 MP3 player driver configuration. */
//*****************************************************************************
//
// File Name : 'sta013.h'
// Title : STMicroelectronics STA013 MP3 player driver
// Author : Pascal Stang - Copyright (C) 2000-2002
// Created : 10/22/2000
// Revised : 12/04/2000
// Version : 0.3
// Target MCU : ATmega103 (should work for Atmel AVR Series)
// Editor Tabs : 4
//
// NOTE: This code is currently below version 1.0, and therefore is considered
// to be lacking in some functionality or documentation, or may not be fully
// tested. Nonetheless, you can expect most functions to work.
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef STA013CONF_H
#define STA013CONF_H
// STA013 Configuration
// STA013 demand line
#define STA013_DEMAND_PORT PORTE // port to which DEMAND line is connected
#define STA013_DEMAND_PORTIN PINE // input port to which DEMAND line is connected
#define STA013_DEMAND_PIN PE4 // port pin to which DEMAND line is connected
#define STA013_DEMAND_INTR SIG_INTERRUPT4 // interrupt to which DEMAND line is connected
#endif

View File

@ -0,0 +1,28 @@
/*! \file stxetxconf.h \brief STX/ETX Packet Protocol Implementation Configuration. */
//*****************************************************************************
//
// File Name : 'stxetx.h'
// Title : STX/ETX Packet Protocol Implementation Configuration
// Author : Pascal Stang - Copyright (C) 2002-2003
// Created : 10/9/2002
// Revised : 02/10/2003
// Version : 0.1
// Target MCU : any
// Editor Tabs : 4
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef STXETXCONF_H
#define STXETXCONF_H
// STX/ETX Configuration Options
// This determines the size of the Packet Receive Buffer
// where whole verified packets are copied after being received
#define STXETX_MAXRXPACKETSIZE 20 // length of packet buffer
#endif

View File

@ -0,0 +1,68 @@
/*! \file uartsw2conf.h \brief Interrupt-driven Software UART Driver Configuration. */
//*****************************************************************************
//
// File Name : 'uartsw2conf.h'
// Title : Interrupt-driven Software UART Driver Configuration
// Author : Pascal Stang - Copyright (C) 2002-2003
// Created : 7/20/2002
// Revised : 4/27/2004
// Version : 0.6
// Target MCU : Atmel AVR Series (intended for the ATmega16 and ATmega32)
// Editor Tabs : 4
//
// Description :
// This uart library emulates the operation of a UART (serial port) using
// the AVR's hardware timers, I/O pins, and some software.
//
// Specifically, this code uses:
// -Timer 2 Output Capture for transmit timing
// -Timer 0 Output Capture for receive timing
// -External Interrupt 2 for receive triggering
//
// The above resources cannot be used for other purposes while this software
// UART is enabled. The overflow interrupts from Timer0 and Timer2 can still
// be used for other timing, but the prescalers for these timers must not be
// changed.
//
// Serial output from this UART can be routed to any I/O pin. Serial input
// for this UART must come from the External Interrupt 2 (INT2) I/O pin.
// These options should be configured by editing your local copy of
// "uartsw2conf.h".
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef UARTSW2CONF_H
#define UARTSW2CONF_H
// constants/macros/typdefs
#define UARTSW_RX_BUFFER_SIZE 0x20 ///< UART receive buffer size in bytes
#define UARTSW_INVERT ///< define to invert polarity of RX/TX signals
// when non-inverted, the serial line is appropriate for passing though
// an RS232 driver like the MAX232. When inverted, the serial line can
// directly drive/receive RS232 signals to/from a DB9 connector. Be sure
// to use a current-limiting resistor and perhaps a diode-clamp circuit when
// connecting incoming RS232 signals to a microprocessor I/O pin.
// if non-inverted, the serial line idles high (logic 1) between bytes
// if inverted, the serial line idles low (logic 0) between bytes
// UART transmit pin defines
#define UARTSW_TX_PORT PORTB ///< UART Transmit Port
#define UARTSW_TX_DDR DDRB ///< UART Transmit DDR
#define UARTSW_TX_PIN PB3 ///< UART Transmit Pin
// UART receive pin defines
// This pin must correspond to the
// External Interrupt 2 (INT2) pin for your processor
#define UARTSW_RX_PORT PORTB ///< UART Receive Port
#define UARTSW_RX_DDR DDRB ///< UART Receive DDR
#define UARTSW_RX_PORTIN PINB ///< UART Receive Port Input
#define UARTSW_RX_PIN PB2 ///< UART Receive Pin
#endif

View File

@ -0,0 +1,67 @@
/*! \file uartswconf.h \brief Interrupt-driven Software UART Driver Configuration. */
//*****************************************************************************
//
// File Name : 'uartswconf.h'
// Title : Interrupt-driven Software UART Driver Configuration
// Author : Pascal Stang - Copyright (C) 2002-2004
// Created : 7/20/2002
// Revised : 4/27/2004
// Version : 0.1
// Target MCU : Atmel AVR Series (intended for the ATmega16 and ATmega32)
// Editor Tabs : 4
//
// Description :
// This uart library emulates the operation of a UART (serial port) using
// the AVR's hardware timers, I/O pins, and some software.
//
// Specifically, this code uses:
// -Timer 1 Output Compare A for transmit timing
// -Timer 1 Output Compare B for receive timing
// -Timer 1 Input Capture for receive triggering
//
// The above resources cannot be used for other purposes while this software
// UART is enabled. The overflow interrupt from Timer1 can still be used for
// other timing, but the prescaler for Timer1 must not be changed.
//
// Serial output from this UART can be routed to any I/O pin. Serial input
// for this UART must come from the Timer1 Input Capture (IC1) I/O pin.
// These options should be configured by editing your local copy of
// "uartswconf.h".
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#ifndef UARTSWCONF_H
#define UARTSWCONF_H
// constants/macros/typdefs
#define UARTSW_RX_BUFFER_SIZE 0x20 ///< UART receive buffer size in bytes
#define UARTSW_INVERT ///< define to invert polarity of RX/TX signals
// when non-inverted, the serial line is appropriate for passing though
// an RS232 driver like the MAX232. When inverted, the serial line can
// directly drive/receive RS232 signals to/from a DB9 connector. Be sure
// to use a current-limiting resistor and perhaps a diode-clamp circuit when
// connecting incoming RS232 signals to a microprocessor I/O pin.
// if non-inverted, the serial line idles high (logic 1) between bytes
// if inverted, the serial line idles low (logic 0) between bytes
// UART transmit pin defines
#define UARTSW_TX_PORT PORTD ///< UART Transmit Port
#define UARTSW_TX_DDR DDRD ///< UART Transmit DDR
#define UARTSW_TX_PIN PD5 ///< UART Transmit Pin
// UART receive pin defines
// This pin must correspond to the
// Timer1 Input Capture (ICP or IC1) pin for your processor
#define UARTSW_RX_PORT PORTD ///< UART Receive Port
#define UARTSW_RX_DDR DDRD ///< UART Receive DDR
#define UARTSW_RX_PORTIN PIND ///< UART Receive Port Input
#define UARTSW_RX_PIN PD6 ///< UART Receive Pin
#endif