Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
129 johboh 1
/*********************************************************************
2
 *
3
 *                  Compiler specifics like clockspeed and portIOs.
4
 *
5
 *********************************************************************
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canFreezer/Include/compiler.h $
7
 * Last changed:    $LastChangedDate: 2007-03-04 15:13:16 +0100 (Sun, 04 Mar 2007) $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 359 $
10
 ********************************************************************/
11
 
12
#ifndef COMPILER_H
13
#define COMPILER_H
14
 
359 johboh 15
#define APP_VERSION 0x0001
16
 
129 johboh 17
#include <p18cxxx.h>
18
#define CLOCK_FREQ      (40000000)      // Hz
19
#define INSTR_FREQ          (CLOCK_FREQ/4)
20
#define CLOCK_FOSC      (40)      // MHz
21
 
22
#define LED0_TRIS       (TRISCbits.TRISC1)
23
#define LED0_IO         (PORTCbits.RC1)
24
 
141 johboh 25
#define DOOR_OPEN 1
26
#define DOOR_CLOSED 0
129 johboh 27
 
141 johboh 28
#define DOOR_FREEZER_TRIS       (TRISAbits.TRISA4)
29
#define DOOR_FREEZER_IO         (PORTAbits.RA4)
30
#define DOOR_REFRIGERATOR_TRIS  (TRISAbits.TRISA5)
31
#define DOOR_REFRIGERATOR_IO    (PORTAbits.RA5)
32
 
33
 
34
#define TEMPERATURE_FREEZER 0b0000
35
#define TEMPERATURE_REFRIGERATOR 0b0001
36
 
129 johboh 37
#endif //compiler.h