![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
clock.h@119:ee6a53069455, 2015-04-30 (annotated)
- Committer:
- klauss
- Date:
- Thu Apr 30 15:42:41 2015 +0000
- Revision:
- 119:ee6a53069455
- Child:
- 120:770f00554b1e
funcionalidade - clock "ogro" - implementada
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
klauss | 119:ee6a53069455 | 1 | #ifndef __CLOCK_H__ |
klauss | 119:ee6a53069455 | 2 | #define __CLOCK_H__ |
klauss | 119:ee6a53069455 | 3 | |
klauss | 119:ee6a53069455 | 4 | #include <stdlib.h> |
klauss | 119:ee6a53069455 | 5 | #include <stdint.h> |
klauss | 119:ee6a53069455 | 6 | #include <string.h> |
klauss | 119:ee6a53069455 | 7 | #include "mbed.h" |
klauss | 119:ee6a53069455 | 8 | #include "EthernetInterface.h" |
klauss | 119:ee6a53069455 | 9 | #include "debug.h" |
klauss | 119:ee6a53069455 | 10 | #include "locale.h" |
klauss | 119:ee6a53069455 | 11 | |
klauss | 119:ee6a53069455 | 12 | extern time_t current_time; |
klauss | 119:ee6a53069455 | 13 | |
klauss | 119:ee6a53069455 | 14 | extern UDPSocket clock_sock; |
klauss | 119:ee6a53069455 | 15 | |
klauss | 119:ee6a53069455 | 16 | extern Endpoint clock_server; |
klauss | 119:ee6a53069455 | 17 | |
klauss | 119:ee6a53069455 | 18 | extern Timer external_time; |
klauss | 119:ee6a53069455 | 19 | |
klauss | 119:ee6a53069455 | 20 | const uint16_t EXTERNAL_TIME_REQUEST_WAIT_SECONDS = 10;//300; |
klauss | 119:ee6a53069455 | 21 | |
klauss | 119:ee6a53069455 | 22 | int request_clock_to_server( void ); |
klauss | 119:ee6a53069455 | 23 | |
klauss | 119:ee6a53069455 | 24 | int check_clock( void ); |
klauss | 119:ee6a53069455 | 25 | |
klauss | 119:ee6a53069455 | 26 | int update_clock( void ); |
klauss | 119:ee6a53069455 | 27 | |
klauss | 119:ee6a53069455 | 28 | int init_clock ( void ); |
klauss | 119:ee6a53069455 | 29 | |
klauss | 119:ee6a53069455 | 30 | int clock_sock_reconnect ( void ); |
klauss | 119:ee6a53069455 | 31 | |
klauss | 119:ee6a53069455 | 32 | void print_clock ( uint8_t * buffer ); |
klauss | 119:ee6a53069455 | 33 | |
klauss | 119:ee6a53069455 | 34 | int show_clock ( void ); |
klauss | 119:ee6a53069455 | 35 | #endif |