![](/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
bootloader.h@121:ee02790d00b7, 2015-05-08 (annotated)
- Committer:
- klauss
- Date:
- Fri May 08 04:15:23 2015 +0000
- Revision:
- 121:ee02790d00b7
- Parent:
- 119:ee6a53069455
- Child:
- 122:480c44b0e205
compiling
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
klauss | 117:e9facba9db27 | 1 | #ifndef __BOOTLOADER_H__ |
klauss | 117:e9facba9db27 | 2 | #define __BOOTLOADER_H__ |
klauss | 117:e9facba9db27 | 3 | |
klauss | 121:ee02790d00b7 | 4 | #include <stdint.h> |
klauss | 117:e9facba9db27 | 5 | #include "EthernetInterface.h" |
klauss | 117:e9facba9db27 | 6 | #include "call_box.h" |
klauss | 121:ee02790d00b7 | 7 | #include "EthernetInterface.h" |
klauss | 117:e9facba9db27 | 8 | |
klauss | 121:ee02790d00b7 | 9 | const uint16_t BL_PORT = 3000; |
klauss | 121:ee02790d00b7 | 10 | const uint16_t BL_SIZE = 260; |
klauss | 121:ee02790d00b7 | 11 | const uint16_t UDP_BL_SIZE = 262; |
klauss | 117:e9facba9db27 | 12 | |
klauss | 117:e9facba9db27 | 13 | extern Timer udp_bl_timer; |
klauss | 117:e9facba9db27 | 14 | extern Endpoint udp_bl_server; |
klauss | 117:e9facba9db27 | 15 | extern UDPSocket udp_bl_client; |
klauss | 117:e9facba9db27 | 16 | extern char bl_recv_buffer[ UDP_BL_SIZE ],bl_send_buffer[ UDP_BL_SIZE ],bl_cbx_buffer[ BL_SIZE + 1 ]; |
klauss | 117:e9facba9db27 | 17 | extern uint16_t bl_peer,bl_port; |
klauss | 117:e9facba9db27 | 18 | extern uint8_t bl_start_flag,bl_ts,next_pkg_ts0; |
klauss | 117:e9facba9db27 | 19 | extern Call_Box * bl_cb; |
klauss | 117:e9facba9db27 | 20 | extern uint8_t *bl_write_buffer; |
klauss | 117:e9facba9db27 | 21 | |
klauss | 119:ee6a53069455 | 22 | inline int init_bl() { |
klauss | 119:ee6a53069455 | 23 | udp_bl_client.set_blocking( false, 0 ); |
klauss | 119:ee6a53069455 | 24 | udp_bl_client.bind( BL_PORT ); |
klauss | 119:ee6a53069455 | 25 | return ( 0 ); |
klauss | 117:e9facba9db27 | 26 | } |
klauss | 117:e9facba9db27 | 27 | |
klauss | 117:e9facba9db27 | 28 | #endif |