aboutsummaryrefslogtreecommitdiff
path: root/ATmega48/MEGA48/Include/atmega48.h
blob: d6b75b4d9145eeb0eacfc26870461e08d88bd389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// Programmer      
//
// Date init       14.12.2004
//
// Reviser         $Author:: Dktochpe                                        $
//
// Revision date   $Date:: 2-09-05 14:37                                     $
//
// Filename        $Workfile:: atmega48.h                                    $
//
// Version         $Revision:: 7                                             $
//
// Archive         $Archive:: /LMS2006/Sys01/Ioctrl/Firmware/Mega48/Include/ $
//
// Platform        C
//


#ifndef   ATMEGA88_H
#define   ATMEGA88_H

#include  "iom48.h"
#include  "inavr.h" 


#define   ATMEGAX8


#define   HARDWAREReset                 {\
                                          void (*Reset)(void);\
                                          Reset = (void*)0x0000;\
                                          Reset();\
                                        }

#define   HARDWAREInit                  {\
                                          SMCR    =  0x00;\
                                          CLKPR   =  0x80;\
                                          CLKPR   =  0x00;\
                                          __enable_interrupt();\
                                        }
                              

#define   HARDWAREExit                  {\
                                          ADCSRA  =  0x00;\
                                          SMCR    =  0x05;\
                                          __sleep();\
                                          HARDWAREReset;\
                                        } 

#define   OSIntEnable()                 {\
                                          __enable_interrupt();\
                                        }

#define   OSIntDisable()                {\
                                          __disable_interrupt();\
                                        }

#define   OSWatchdogWrite   

void      mSchedInit(void);
UBYTE     mSchedCtrl(void);
void      mSchedExit(void);


#endif