view main/demos/avr/adafruit-lcd-1480/project_defs.h @ 220:74381e5dd204 main

Demo for the Adafruit LCD product number 1480.
author Bob Cook <bob@bobcookdev.com>
date Mon, 07 Jul 2014 18:42:15 -0700
parents
children
line wrap: on
line source

// ----------------------------------------------------------------------------------------
//
//  Copyright (C) 2014 Bob Cook
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//  
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//  
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//
// ----------------------------------------------------------------------------------------

#if !defined( PROJECT_DEFS_H )
#define PROJECT_DEFS_H

// ----------------------------------------------------------------------------------------
//  packages/avr/common

#define PRJ_CPU_FREQ    16000000L

// ----------------------------------------------------------------------------------------
//  packages/common/font

#define PRJ_FONT_8X12_ENABLE

// ----------------------------------------------------------------------------------------
//  packages/avr/common/util

#define PRJ_PRINTDEC_ENABLE_OUTPUT_TO_BUFFER
#define PRJ_PRINTHEX_ENABLE_OUTPUT_TO_BUFFER
#define PRJ_PRINTBITS_ENABLE_OUTPUT_TO_BUFFER

// ----------------------------------------------------------------------------------------
//  packages/avr/device/spi

#define PRJ_SPI_ENABLE_MASTER
#define PRJ_SPI_BUS_MODE_0
#define PRJ_SPI_DATA_DIRECTION_MSB
#define PRJ_SPI_CLOCK_FACTOR_DIV_2

// ----------------------------------------------------------------------------------------
//  packages/avr/lcd/ili9340

#define PRJ_ILI9340_ENABLE

#define PRJ_ILI9340_SELECT_PORT  PORTD
#define PRJ_ILI9340_SELECT_PIN   PD5
#define PRJ_ILI9340_SELECT_DDR   DDRD

#define PRJ_ILI9340_COMMAND_PORT  PORTB
#define PRJ_ILI9340_COMMAND_PIN   PB2
#define PRJ_ILI9340_COMMAND_DDR   DDRB

#define PRJ_ILI9340_USE_HW_RESET
#define PRJ_ILI9340_RESET_PORT   PORTD
#define PRJ_ILI9340_RESET_PIN    PD7
#define PRJ_ILI9340_RESET_DDR    DDRD

#define PRJ_ILI9340_DISPLAY_ORIENTATION_180
#define PRJ_ILI9340_INC_WRITE_CHAR
#define PRJ_ILI9340_INC_WRITE_CSTRINGS
#define PRJ_ILI9340_INC_WRITE_PGM_CSTRINGS
#define PRJ_ILI9340_INC_DRAWING

#endif // #if !defined( PROJECT_DEFS_H )
// ----------------------------------------------------------------------------------------