|
|
◆ main()
Contains the main function - the initialization of all ports, functions and the main loop:
-
Resetting of all pins of all ports (to input pins with pull-up resistors).
-
Initialization of ADC pin (for battery control).
-
Initialization of RFM12 pins (for communication with main unit).
-
Initialization of LCD pins (if LCD_DEBUG is set to 1).
-
Initialization of RFM12.
-
Initialization of LCD (if LCD_DEBUG is set to 1).
-
Initialization of Timer and the respective Interrupt.
-
Initialization of internal data structures.
-
Main Loop:
-
Check battery voltage value if time elapsed for the battery check
-
Check sensor status if time elapsed for the sensor check, send alarm message in case of open contacts
-
Send status message to main unit if time elapsed for status messages
-
Set controller sleep mode (wait for the next timer interrupt to wake up again)
- Date
- Created 30.10.2018
- Modified 30.10.2018
- See also
- rfm12_io.h
-
lcd.h
-
port_definitions.h
- Author
- Michael Skutek, micha.nosp@m.el@s.nosp@m.kutek.nosp@m..de
Definition at line 122 of file main.c.
|