![](/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
file_system_manager.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 | 74:81c47fff88a5 | 1 | #ifndef __FILE_SYSTEM_MANAGER_H__ |
klauss | 74:81c47fff88a5 | 2 | #define __FILE_SYSTEM_MANAGER_H__ |
klauss | 74:81c47fff88a5 | 3 | |
klauss | 74:81c47fff88a5 | 4 | #include "QSPIFileSystem.h" |
klauss | 121:ee02790d00b7 | 5 | #include "debug.h" |
klauss | 81:3656f00ab3db | 6 | #include "vz_protocol.h" |
klauss | 121:ee02790d00b7 | 7 | #include "clock.h" |
klauss | 121:ee02790d00b7 | 8 | #include "bootloader.h" |
klauss | 121:ee02790d00b7 | 9 | #include "fw.h" |
klauss | 121:ee02790d00b7 | 10 | |
klauss | 121:ee02790d00b7 | 11 | const uint16_t FILE_BUFFER_SIZE = 1024; |
klauss | 74:81c47fff88a5 | 12 | |
klauss | 74:81c47fff88a5 | 13 | extern QSPIFileSystem qspifs; |
klauss | 74:81c47fff88a5 | 14 | |
klauss | 81:3656f00ab3db | 15 | /** |
klauss | 81:3656f00ab3db | 16 | * @Synopsis Altera o valor default contido no arquivo /qspi/myip.txt |
klauss | 81:3656f00ab3db | 17 | * |
klauss | 81:3656f00ab3db | 18 | * @param new_header_ip Atualiza o valor de /qspi/myip.txt sobrescrevendo-o com o valor de new_header_ip |
klauss | 81:3656f00ab3db | 19 | * |
klauss | 81:3656f00ab3db | 20 | * Exemplo: |
klauss | 81:3656f00ab3db | 21 | * @code |
klauss | 81:3656f00ab3db | 22 | * ... |
klauss | 81:3656f00ab3db | 23 | * set_ip( "192.168.120.2" ); |
klauss | 81:3656f00ab3db | 24 | * ... |
klauss | 81:3656f00ab3db | 25 | * @endcode |
klauss | 81:3656f00ab3db | 26 | */ |
klauss | 119:ee6a53069455 | 27 | void set_ip( const char * new_header_ip ); |
klauss | 81:3656f00ab3db | 28 | |
klauss | 121:ee02790d00b7 | 29 | int get_ip ( char * header_ip, const size_t length ); |
klauss | 121:ee02790d00b7 | 30 | |
klauss | 81:3656f00ab3db | 31 | /** |
klauss | 81:3656f00ab3db | 32 | * @Synopsis Altera o valor default contido no arquivo /qspi/myext.txt |
klauss | 81:3656f00ab3db | 33 | * |
klauss | 81:3656f00ab3db | 34 | * @param new_header_ext Atualiza o valor de /qspi/myext.txt sobrescrevendo-o com o valor de new_header_ext |
klauss | 81:3656f00ab3db | 35 | * |
klauss | 81:3656f00ab3db | 36 | * Exemplo: |
klauss | 81:3656f00ab3db | 37 | * @code |
klauss | 81:3656f00ab3db | 38 | * ... |
klauss | 81:3656f00ab3db | 39 | * set_header_ext( 912 ); |
klauss | 81:3656f00ab3db | 40 | * ... |
klauss | 81:3656f00ab3db | 41 | * @endcode |
klauss | 81:3656f00ab3db | 42 | */ |
klauss | 119:ee6a53069455 | 43 | void set_header_ext( const int new_header_ext ); |
klauss | 81:3656f00ab3db | 44 | |
klauss | 81:3656f00ab3db | 45 | /** |
klauss | 81:3656f00ab3db | 46 | * @Synopsis Altera o valor default contido no arquivo /qspi/mysipport.txt |
klauss | 81:3656f00ab3db | 47 | * |
klauss | 81:3656f00ab3db | 48 | * @param new_header_sip_port Atualiza o valor de /qspi/mysipport.txt sobrescrevendo-o com o valor de new_header_sip_port |
klauss | 81:3656f00ab3db | 49 | * |
klauss | 81:3656f00ab3db | 50 | * Exemplo: |
klauss | 81:3656f00ab3db | 51 | * @code |
klauss | 81:3656f00ab3db | 52 | * ... |
klauss | 81:3656f00ab3db | 53 | * set_header_sip_port( 820 ); |
klauss | 81:3656f00ab3db | 54 | * ... |
klauss | 81:3656f00ab3db | 55 | * @endcode |
klauss | 81:3656f00ab3db | 56 | */ |
klauss | 119:ee6a53069455 | 57 | void set_header_sip_port( const int new_header_sip_port ); |
klauss | 81:3656f00ab3db | 58 | |
klauss | 81:3656f00ab3db | 59 | /** |
klauss | 81:3656f00ab3db | 60 | * @Synopsis Altera o valor default contido no arquivo /qspi/serverip.txt |
klauss | 81:3656f00ab3db | 61 | * |
klauss | 81:3656f00ab3db | 62 | * @param new_server_ip Atualiza o valor de /qspi/serverip.txt sobrescrevendo-o com o valor de new_server_ip |
klauss | 81:3656f00ab3db | 63 | * |
klauss | 81:3656f00ab3db | 64 | * Exemplo: |
klauss | 81:3656f00ab3db | 65 | * @code |
klauss | 81:3656f00ab3db | 66 | * ... |
klauss | 81:3656f00ab3db | 67 | * set_header_sip_port( "192.168.120.231" ); |
klauss | 81:3656f00ab3db | 68 | * ... |
klauss | 81:3656f00ab3db | 69 | * @endcode |
klauss | 81:3656f00ab3db | 70 | */ |
klauss | 119:ee6a53069455 | 71 | void set_server_ip( const char * new_server_ip ); |
klauss | 81:3656f00ab3db | 72 | |
klauss | 81:3656f00ab3db | 73 | /** |
klauss | 81:3656f00ab3db | 74 | * @Synopsis Altera o valor default contido no arquivo /qspi/peerext.txt |
klauss | 81:3656f00ab3db | 75 | * |
klauss | 81:3656f00ab3db | 76 | * @param new_server_ext Atualiza o valor de /qspi/peerext.txt sobrescrevendo-o com o valor de new_server_ext |
klauss | 81:3656f00ab3db | 77 | * |
klauss | 81:3656f00ab3db | 78 | * Exemplo: |
klauss | 81:3656f00ab3db | 79 | * @code |
klauss | 81:3656f00ab3db | 80 | * ... |
klauss | 81:3656f00ab3db | 81 | * set_header_sip_port( 1011 ); |
klauss | 81:3656f00ab3db | 82 | * ... |
klauss | 81:3656f00ab3db | 83 | * @endcode |
klauss | 81:3656f00ab3db | 84 | */ |
klauss | 119:ee6a53069455 | 85 | void set_server_ext( const int new_server_ext ); |
klauss | 81:3656f00ab3db | 86 | |
klauss | 81:3656f00ab3db | 87 | /** |
klauss | 81:3656f00ab3db | 88 | * @Synopsis Altera o valor default contido no arquivo /qspi/serverport.txt |
klauss | 81:3656f00ab3db | 89 | * |
klauss | 81:3656f00ab3db | 90 | * @param new_server_port Atualiza o valor de /qspi/serverport.txt sobrescrevendo-o com o valor de new_server_port |
klauss | 81:3656f00ab3db | 91 | * |
klauss | 81:3656f00ab3db | 92 | * Exemplo: |
klauss | 81:3656f00ab3db | 93 | * @code |
klauss | 81:3656f00ab3db | 94 | * ... |
klauss | 81:3656f00ab3db | 95 | * set_header_sip_port( 1562 ); |
klauss | 81:3656f00ab3db | 96 | * ... |
klauss | 81:3656f00ab3db | 97 | * @endcode |
klauss | 81:3656f00ab3db | 98 | */ |
klauss | 119:ee6a53069455 | 99 | void set_server_port( const int new_server_port ); |
klauss | 81:3656f00ab3db | 100 | |
klauss | 81:3656f00ab3db | 101 | /** |
klauss | 81:3656f00ab3db | 102 | * @Synopsis Altera o valor default contido no arquivo /qspi/udpport.txt |
klauss | 81:3656f00ab3db | 103 | * |
klauss | 81:3656f00ab3db | 104 | * @param new_udp_port_listener Atualiza o valor de /qspi/udpport.txt sobrescrevendo-o com o valor de new_udp_port_listener |
klauss | 81:3656f00ab3db | 105 | * |
klauss | 81:3656f00ab3db | 106 | * Exemplo: |
klauss | 81:3656f00ab3db | 107 | * @code |
klauss | 81:3656f00ab3db | 108 | * ... |
klauss | 81:3656f00ab3db | 109 | * set_udp_port_listener( 11147 ); |
klauss | 81:3656f00ab3db | 110 | * ... |
klauss | 81:3656f00ab3db | 111 | * @endcode |
klauss | 81:3656f00ab3db | 112 | */ |
klauss | 119:ee6a53069455 | 113 | void set_udp_port_listener( const int new_udp_port_listener ); |
klauss | 81:3656f00ab3db | 114 | |
klauss | 81:3656f00ab3db | 115 | /** |
klauss | 81:3656f00ab3db | 116 | * @Synopsis Altera o valor default contido no arquivo /qspi/tcpport.txt |
klauss | 81:3656f00ab3db | 117 | * |
klauss | 81:3656f00ab3db | 118 | * @param new_tcp_port_listener Atualiza o valor de /qspi/tcpport.txt sobrescrevendo-o com o valor de new_tcp_port_listener |
klauss | 81:3656f00ab3db | 119 | * |
klauss | 81:3656f00ab3db | 120 | * Exemplo: |
klauss | 81:3656f00ab3db | 121 | * @code |
klauss | 81:3656f00ab3db | 122 | * ... |
klauss | 81:3656f00ab3db | 123 | * set_tcp_port_listener( 7178 ); |
klauss | 81:3656f00ab3db | 124 | * ... |
klauss | 81:3656f00ab3db | 125 | * @endcode |
klauss | 81:3656f00ab3db | 126 | */ |
klauss | 119:ee6a53069455 | 127 | void set_tcp_port_listener( const int new_tcp_port_listener ); |
klauss | 117:e9facba9db27 | 128 | |
klauss | 117:e9facba9db27 | 129 | /** |
klauss | 81:3656f00ab3db | 130 | * @Synopsis Altera o valor default contido no arquivo /qspi/mymask.txt |
klauss | 81:3656f00ab3db | 131 | * |
klauss | 81:3656f00ab3db | 132 | * @param new_mask Atualiza o valor de /qspi/mymask.txt sobrescrevendo-o com o valor de new_mask |
klauss | 81:3656f00ab3db | 133 | * |
klauss | 81:3656f00ab3db | 134 | * Exemplo: |
klauss | 81:3656f00ab3db | 135 | * @code |
klauss | 81:3656f00ab3db | 136 | * ... |
klauss | 81:3656f00ab3db | 137 | * set_mask( "255.255.0.0" ); |
klauss | 81:3656f00ab3db | 138 | * ... |
klauss | 81:3656f00ab3db | 139 | * @endcode |
klauss | 81:3656f00ab3db | 140 | */ |
klauss | 119:ee6a53069455 | 141 | void set_mask( const char * new_mask ); |
klauss | 81:3656f00ab3db | 142 | |
klauss | 81:3656f00ab3db | 143 | /** |
klauss | 81:3656f00ab3db | 144 | * @Synopsis Altera o valor default contido no arquivo /qspi/mygateway.txt |
klauss | 81:3656f00ab3db | 145 | * |
klauss | 81:3656f00ab3db | 146 | * @param new_gateway Atualiza o valor de /qspi/mygateway.txt sobrescrevendo-o com o valor de new_gateway |
klauss | 81:3656f00ab3db | 147 | * |
klauss | 81:3656f00ab3db | 148 | * Exemplo: |
klauss | 81:3656f00ab3db | 149 | * @code |
klauss | 81:3656f00ab3db | 150 | * ... |
klauss | 81:3656f00ab3db | 151 | * set_gateway( "192.168.118.2" ); |
klauss | 81:3656f00ab3db | 152 | * ... |
klauss | 81:3656f00ab3db | 153 | * @endcode |
klauss | 81:3656f00ab3db | 154 | */ |
klauss | 119:ee6a53069455 | 155 | void set_gateway( const char * new_gateway ); |
klauss | 81:3656f00ab3db | 156 | |
klauss | 119:ee6a53069455 | 157 | void set_max_ext( const int new_max_ext ); |
klauss | 119:ee6a53069455 | 158 | void set_min_ext( const int new_min_ext ); |
klauss | 81:3656f00ab3db | 159 | void cat( const char * fname ); |
klauss | 81:3656f00ab3db | 160 | void files( const char type ); |
klauss | 81:3656f00ab3db | 161 | |
klauss | 99:e80850c51106 | 162 | |
klauss | 119:ee6a53069455 | 163 | void set_fw_ip( const char * new_fw_ip ); |
klauss | 119:ee6a53069455 | 164 | void set_fw_port( const int new_fw_port ); |
klauss | 119:ee6a53069455 | 165 | |
klauss | 119:ee6a53069455 | 166 | void set_shift_port( const int new_shift_port ); |
klauss | 99:e80850c51106 | 167 | |
klauss | 121:ee02790d00b7 | 168 | int init_fsystem ( void ); |
klauss | 121:ee02790d00b7 | 169 | |
klauss | 74:81c47fff88a5 | 170 | #endif |