-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
95 lines (86 loc) · 2.76 KB
/
main.c
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <avr/io.h>
#include "HAL.h"
//#include <util/delay.h>
//#include <avr/pgmspace.h>
//#include <avr/interrupt.h>
//#include <stdio.h>
//#include <avr/wdt.h>
#include "macros.h" // ìîè ìàêðîñû è áèòîâûå ïîëÿ
#include "lcd/nokia1100_lcd_lib.h" // Ïîäêëþ÷àåì äðàéâåð LCD-êîíòðîëëåðà NOKIA1100
#include "menu/menu.h" // ìèêðîìåíþ
//#include "menu/MicroMenu.h"
//#include "menu/MenuConfig.h"
#include "kbd/kbd.h" // ìîè êíîïêè
#include "onewire/delay.h" // OW interface
#include "onewire/onewire.h"
#include "onewire/ds18x20.h"
#include "sheduler/dispatch.h" //as
#include "usart/usart.h"
#include "burner/burner.h"
//#define TASCII(numb) (numb+48)
//#define OW_BIT_OUT
// TODO: ðàçîáðàòüñÿ ñ èíèöèàëèçàöèåé è ïåðåêëþ÷åíèåì ïëàòôîðìû
//#define StartFrom 0xF0 //äëÿ 1 ìñ 1ÊÃö //íà áîëüøîé ÷àñòîòå âèñèò â óáð ðåãèñòðå
//TODO:
//+êíîïêè
//+äèñïëåé
//!+ìåíþ
//+äèñïåò÷åð
//!+äàò÷èê òåìïåðàòóðû
//-äàò÷èê óðîâíÿ
//!+þñàðò äëÿ îòëàäêè
//-àëãîðèòì ðàáîòû ãîðåëêè è íàñîñà òðóáû
//-ðåæèìû
//-çâóêîâîå îïîâåùåíèå
//-eeprom
//-âñå ñâÿçàòü
//-îòëàäèòü
/// êó÷à ïðîáëåìì èç çà îòëàäêè íà äðóãîì ÌÊ onewire ïàøåò
/// êíîïêè ïàøóò , äèñïëåé ïàøåò
/// ïîðà äåëàòü ïå÷àòêó , íî íå çàáûòü ïðî äèñïëåé íà ñåìèñåãìåíòíèêàõ è ñäâèãîâûõ ðåãèñòðîâ
/// ðàçâåñòè íàäî ïîä îáà âàðèàíòà , 595 è 164
/// ââîäèòü ðåæèìû ðàáîòû è ðàáîòó ñ ååïðîì, âñå îñòàëüíîå äîäåëûâàòü íà æåëåçå
/// íå çàáûòü êîíå÷íî ïðî âíåøíþþ ëîãèêó è ïèðîäàò÷èê èëè ôîòî ðåçèñòîð
//==============================================================================
extern void USART0_write(unsigned char data);
extern void USART_init();
extern void InitScheduler (void);
extern void MenuInit();
extern void InitControl();
extern void usartDebug();
extern void timerDelayInit();
extern void nlcd_Init();
//extern void InitBurner();
int main(void)
{
timerDelayInit();
USART_init();
usartDebug();
InitScheduler();
InitControl();
nlcd_Init();
MenuInit();
InitBurner();
/*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
// nlcd_PrintF(PSTR("HELLO"));
AddTask(KeyScan,50);
AddTask(SwitchMenu,100);
sei();
while(1) {
DispatchTask();
}
return 0;
}