EZR
Dependencies: CRC16 FreescaleIAP FreescaleWatchdog GGSProtocol LM75B PIMA Parameters PersistentCircularQueue SerialNumberV2COM mbed-dev-watchdog_2016_03_04
Fork of smartRamalKW by
main.h@25:2c578b923ea9, 2015-11-04 (annotated)
- Committer:
- tpadovani
- Date:
- Wed Nov 04 21:47:24 2015 +0000
- Revision:
- 25:2c578b923ea9
- Parent:
- 22:b66e36356dd4
Vers?o 0.13 - Envio de "announces" assincronos e sincronismo de relogio a partir da resposta do concentrador.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tpadovani | 0:999112ad27f0 | 1 | #ifndef MAIN_H |
tpadovani | 0:999112ad27f0 | 2 | #define MAIN_H |
tpadovani | 0:999112ad27f0 | 3 | |
tpadovani | 0:999112ad27f0 | 4 | #include "mbed.h" |
tpadovani | 0:999112ad27f0 | 5 | #include "settings.h" |
tpadovani | 22:b66e36356dd4 | 6 | #include "debug.h" |
tpadovani | 0:999112ad27f0 | 7 | #include "version.h" |
tpadovani | 4:2d0c2643c641 | 8 | #include "FreescaleWatchdog.h" |
tpadovani | 3:21598044a47f | 9 | #include "serialNumber.h" |
tpadovani | 3:21598044a47f | 10 | #include "parameters.h" |
tpadovani | 3:21598044a47f | 11 | #include "appParameters.h" |
tpadovani | 3:21598044a47f | 12 | #include "v2hardware.h" |
tpadovani | 3:21598044a47f | 13 | #include "ggs.h" |
tpadovani | 9:e501499af4ef | 14 | #include "sensor.h" |
tpadovani | 10:7a1d1abb5172 | 15 | #include "memoriaMassa.h" |
tpadovani | 13:eed9484a89bc | 16 | #include "alarm.h" |
tpadovani | 19:1f623070b9dd | 17 | #include "boxAlarm.h" |
tpadovani | 19:1f623070b9dd | 18 | #include "pima.h" |
tpadovani | 25:2c578b923ea9 | 19 | #include "announce.h" |
tpadovani | 0:999112ad27f0 | 20 | |
tpadovani | 3:21598044a47f | 21 | ParametersBlock APP_PARAMETERS; |
tpadovani | 0:999112ad27f0 | 22 | |
tpadovani | 19:1f623070b9dd | 23 | unsigned char medidor[MEDIDOR_LENGTH]; // Numero do Medidor com 7 bytes BCD (14 digitos) |
tpadovani | 19:1f623070b9dd | 24 | // Obs: protocolo Piminha usa 5 bytes BCD (completamos com zeros a esquerda os outros 2 bytes) |
tpadovani | 19:1f623070b9dd | 25 | // e ELO usa 14 bytes ASCII (transformamos em 7 bytes BCD) |
tpadovani | 19:1f623070b9dd | 26 | unsigned char totAtiva[ENERGIAS_LENGTH]; // Totalizador de Energia Ativa - 3 bytes BCD = 6 dígitos |
tpadovani | 19:1f623070b9dd | 27 | unsigned char totReativaIndutiva[ENERGIAS_LENGTH]; // Totalizador de Energia Reativa Indutiva - 3 bytes BCD = 6 dígitos |
tpadovani | 19:1f623070b9dd | 28 | unsigned char totReativaCapacitiva[ENERGIAS_LENGTH]; // Totalizador de Energia Reativa Capacitiva - 3 bytes BCD = 6 dígitos |
tpadovani | 19:1f623070b9dd | 29 | |
tpadovani | 1:6ac7168763b6 | 30 | void iniciaWd(); |
tpadovani | 1:6ac7168763b6 | 31 | void feedWd(); |
tpadovani | 1:6ac7168763b6 | 32 | void softReset(); |
tpadovani | 19:1f623070b9dd | 33 | void blinkLeds(); |
tpadovani | 1:6ac7168763b6 | 34 | void printSerialNumber(); |
tpadovani | 9:e501499af4ef | 35 | void printParameters(); |
tpadovani | 9:e501499af4ef | 36 | void detectaCargaSemCorte(); |
tpadovani | 0:999112ad27f0 | 37 | |
tpadovani | 0:999112ad27f0 | 38 | #endif |