![](/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
wdt_manager.h
- Committer:
- klauss
- Date:
- 2015-09-01
- Revision:
- 132:05cd37f7e007
- Parent:
- 124:c1b6c893e1c3
File content as of revision 132:05cd37f7e007:
#ifndef __WDT_MANAGER_H__ #define __WDT_MANAGER_H__ #include "EthernetInterface.h" #include "mbed.h" #include "wdt.h" extern Watchdog wdt; extern Timer wdt_timer; extern UDPSocket udp_wdt_client; const uint16_t EXTERNAL_WDT_SERVER_PORT = 9395; const uint16_t EXTERNAL_WDT_HEADER_PORT = 6612; const uint8_t MIN_CBX_IN_A_BRANCH = 2; inline int init_wdt () { wdt.Configure ( 30.0 ); wdt_timer.start (); return ( 0 ); } inline int init_external_wdt() { udp_wdt_client.set_blocking( false, 0 ); return ( udp_wdt_client.bind( 6612 ) ); } inline void reconnect_extern_wdt_socket() { udp_wdt_client.close(); udp_wdt_client.bind( 6612 ); udp_wdt_client.set_blocking( false, 0 ); } #endif