Čeština / English
Login

SVN Repository / Prohlížení

Aktuální adresář: FITkit / trunk / mcu / libfitkit /

arch_specific.h

   1  /*******************************************************************************
   2     arch_specific.h: Specificke definice pro architekturu a prekladac
   3     Copyright (C) 2009 Brno University of Technology,
   4                        Faculty of Information Technology
   5  
   6     LICENSE TERMS
   7  
   8     Redistribution and use in source and binary forms, with or without
   9     modification, are permitted provided that the following conditions
  10     are met:
  11     1. Redistributions of source code must retain the above copyright
  12        notice, this list of conditions and the following disclaimer.
  13     2. Redistributions in binary form must reproduce the above copyright
  14        notice, this list of conditions and the following disclaimer in
  15        the documentation and/or other materials provided with the
  16        distribution.
  17     3. All advertising materials mentioning features or use of this software
  18        or firmware must display the following acknowledgement:
  19  
  20          This product includes software developed by the University of
  21          Technology, Faculty of Information Technology, Brno and its
  22          contributors.
  23  
  24     4. Neither the name of the Company nor the names of its contributors
  25        may be used to endorse or promote products derived from this
  26        software without specific prior written permission.
  27  
  28     This software or firmware is provided ``as is'', and any express or implied
  29     warranties, including, but not limited to, the implied warranties of
  30     merchantability and fitness for a particular purpose are disclaimed.
  31     In no event shall the company or contributors be liable for any
  32     direct, indirect, incidental, special, exemplary, or consequential
  33     damages (including, but not limited to, procurement of substitute
  34     goods or services; loss of use, data, or profits; or business
  35     interruption) however caused and on any theory of liability, whether
  36     in contract, strict liability, or tort (including negligence or
  37     otherwise) arising in any way out of the use of this software, even
  38     if advised of the possibility of such damage.
  39  
  40     $Id$
  41  *******************************************************************************/
  42  
  43  #ifndef _ARCH_SPECIFIC_H_
  44  #define _ARCH_SPECIFIC_H_
  45  
  46  #if FITKIT_VERSION == 1
  47    #include <msp430x16x.h>
  48    #define MSP_16X
  49    #define LCD_ROWS_1
  50  #elif FITKIT_VERSION == 2
  51    #include <msp430x261x.h>
  52    #define MSP_261X
  53    #define LCD_ROWS_2
  54  #else
  55      #error "Unknown FITKIT_VERSION"
  56  #endif
  57  
  58  /* nastaveni komunikacni rychlosti */
  59  /*                               Fitkit 1.x, Fitkit 2.x
  60   * SMCLK = 7.3728 MHz
  61   *
  62   * U0BR0 = 0x08; U0BR1 = 0x00; // SMCLK / 8    = 921600
  63   * U0BR0 = 0x10; U0BR1 = 0x00; // SMCLK / 16   = 460800
  64   * U0BR0 = 0x20; U0BR1 = 0x00; // SMCLK / 32   = 230400
  65   * U0BR0 = 0x40; U0BR1 = 0x00; // SMCLK / 64   = 115200
  66   * U0BR0 = 0x80; U0BR1 = 0x00; // SMCLK / 128  = 57600
  67   * U0BR0 = 0xC0; U0BR1 = 0x00; // SMCLK / 192  = 38400
  68   * U0BR0 = 0x80; U0BR1 = 0x01; // SMCLK / 384  = 19200
  69   * U0BR0 = 0x00; U0BR1 = 0x03; // SMCLK / 768  = 9600
  70   * U0BR0 = 0x00; U0BR1 = 0x06; // SMCLK / 1536 = 4800
  71   * U0BR0 = 0x00; U0BR1 = 0x0C; // SMCLK / 3072 = 2400
  72   * U0BR0 = 0x00; U0BR1 = 0x18; // SMCLK / 6144 = 1200
  73   */
  74  
  75  //#if defined MSP_16X
  76    #define UART_BR0 0x10
  77    #define UART_BR1 0x00
  78  /*#elif defined MSP_261X
  79    #define UART_BR0 0x20
  80    #define UART_BR1 0x00
  81  #else
  82    #error "Unknown CPU type"
  83  #endif
  84  */
  85  
  86  #include <signal.h>
  87  #include <isr_compat.h>
  88  
  89  #endif /* _ARCH_SPECIFIC_H_ */
  90  
Zobrazeno: 731751x Naposledy: 29.11.2022 05:51:36