// ----------------------------------------------------------------------------------------
//
//  demos/can_mcp2515/project_defs.h
//    
//  Bob Cook Development, Robotics Library
//  http://www.bobcookdev.com/rl/
//    
//  Copyright (C) 2007 Bob Cook
//
//      This program is free software; you can redistribute it and/or modify it
//      under the terms of the GNU General Public License as published by the
//      Free Software Foundation; either version 2 of the License, or (at your
//      option) any later version.
//    
//      This program is distributed in the hope that it will be useful, but 
//      WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
//      or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License 
//      for more details.
//    
//      You should have received a copy of the GNU General Public License along
//      with this program; if not, write to the Free Software Foundation, Inc., 
//      51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
//
//  This file provides the project-specific library customization defintions.
//
// ----------------------------------------------------------------------------------------


#if !defined( PROJECT_DEFS_H )
#define PROJECT_DEFS_H


// ----------------------------------------------------------------------------------------
//  packages/avr/device/spinwait
//

#define PRJ_CPU_FREQ    8000000L


// ----------------------------------------------------------------------------------------
//  packages/avr/can/mcp2515
//

#define PRJ_MCP2515_ENABLE
#define PRJ_MCP2515_SELECT_DDR      DDRB
#define PRJ_MCP2515_SELECT_PORT     PORTB
#define PRJ_MCP2515_SELECT_PIN      PB2

#define PRJ_MCP2515_CANBUS_125_KHZ

#define PRJ_MCP2515_FREQUENCY_4_MHZ

#define PRJ_MCP2515_USE_INTERRUPT_RXTX
#define PRJ_MCP2515_RECV_QUEUE_LENGTH   8


// ----------------------------------------------------------------------------------------
//  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_4


// ----------------------------------------------------------------------------------------
//  packages/avr/device/uart
//

//#define PRJ_UART0_USE_POLLED_MODE

#define PRJ_UART0_USE_INTERRUPT_MODE
#define PRJ_UART0_BUFFER_SIZE   32


// ----------------------------------------------------------------------------------------
//  packages/avr/redir/redir
//

#define PRJ_REDIR_VIA_UART0
#define PRJ_REDIR_UART_BAUDRATE         38400
#define PRJ_REDIR_OUTPUT_DO_AUTO_CRLF


#endif // #if !defined( PROJECT_DEFS_H )
// ----------------------------------------------------------------------------------------
//  end of project_defs.h
// ----------------------------------------------------------------------------------------

