nova verzija tcp+udp->serial com

Committer:
bosko001
Date:
Sun Apr 19 22:13:45 2020 +0000
Revision:
8:c0f54b381346
Parent:
7:7ea932eb31f6
Child:
13:03617f6ed112
zavrseno sa dataFlashom i sa HTML-om

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bosko001 3:1196befeace0 1 #include "dataFlash.h"
bosko001 3:1196befeace0 2
bosko001 3:1196befeace0 3 #include "flashDataBlock.h"
bosko001 3:1196befeace0 4 #include "EthernetSetup.h"
bosko001 3:1196befeace0 5 #include "clubbing.h"
bosko001 3:1196befeace0 6 #include "dataFlash.h"
bosko001 3:1196befeace0 7
bosko001 5:c9a908749d4c 8 #include "doHTML.h"
bosko001 5:c9a908749d4c 9
bosko001 5:c9a908749d4c 10
bosko001 5:c9a908749d4c 11
bosko001 5:c9a908749d4c 12
bosko001 5:c9a908749d4c 13 struct S_FlashData s_ramData, *gps_rd = &s_ramData; //RAM podaci
bosko001 5:c9a908749d4c 14
bosko001 5:c9a908749d4c 15
bosko001 5:c9a908749d4c 16 /*********** upis/citanje na ram */
bosko001 5:c9a908749d4c 17 void progDataIntoFlash( struct S_FlashData *ps_fd )
bosko001 5:c9a908749d4c 18 {
bosko001 5:c9a908749d4c 19 write_niz_in_flash( 0, (char *)ps_fd, sizeof(S_FlashData) );
bosko001 5:c9a908749d4c 20 }
bosko001 5:c9a908749d4c 21
bosko001 5:c9a908749d4c 22 void readDataFromFlash( struct S_FlashData *ps_fd )
bosko001 5:c9a908749d4c 23 {
bosko001 5:c9a908749d4c 24 read_fdb( 0, (char*)ps_fd, sizeof(struct S_FlashData) );
bosko001 5:c9a908749d4c 25 }
bosko001 5:c9a908749d4c 26
bosko001 5:c9a908749d4c 27
bosko001 5:c9a908749d4c 28 /* upis citanje u RAM na koji pokazuje globalni pointer gps_rd */
bosko001 5:c9a908749d4c 29 void fillDataIntoFlash( void )
bosko001 5:c9a908749d4c 30 {
bosko001 5:c9a908749d4c 31 progDataIntoFlash( gps_rd );
bosko001 5:c9a908749d4c 32 // write_niz_in_flash( 0, (char *)gps_rd, sizeof(S_FlashData) );
bosko001 5:c9a908749d4c 33 }
bosko001 5:c9a908749d4c 34 void refreshDataFromFlash( void )
bosko001 5:c9a908749d4c 35 {
bosko001 5:c9a908749d4c 36 readDataFromFlash( gps_rd );
bosko001 5:c9a908749d4c 37 // read_fdb( 0, (char*)gps_rd, sizeof(struct S_FlashData) );
bosko001 5:c9a908749d4c 38 }
bosko001 5:c9a908749d4c 39
bosko001 5:c9a908749d4c 40
bosko001 5:c9a908749d4c 41 void init_FlashData( void )
bosko001 5:c9a908749d4c 42 {
bosko001 5:c9a908749d4c 43 init_fdb( );
bosko001 5:c9a908749d4c 44 readDataFromFlash( gps_rd );
bosko001 5:c9a908749d4c 45
bosko001 5:c9a908749d4c 46 }
bosko001 5:c9a908749d4c 47
bosko001 5:c9a908749d4c 48
bosko001 5:c9a908749d4c 49 void deinit_FlashData( void )
bosko001 5:c9a908749d4c 50 {
bosko001 5:c9a908749d4c 51 deinit_fdb( );
bosko001 5:c9a908749d4c 52 }
bosko001 5:c9a908749d4c 53
bosko001 5:c9a908749d4c 54 void showFlashData( void )
bosko001 5:c9a908749d4c 55 {
bosko001 7:7ea932eb31f6 56 refreshDataFromFlash( );
bosko001 7:7ea932eb31f6 57 P_str( "FLASH IP ", gps_rd->myIP );
bosko001 8:c0f54b381346 58 P_str( "FLASH MASK ", gps_rd->myMASK );
bosko001 8:c0f54b381346 59 P_str( "FLASH GATE ", gps_rd->myGATE );
bosko001 5:c9a908749d4c 60
bosko001 7:7ea932eb31f6 61 P_str( "FLASH UDP PORT ", gps_rd->myUdpPort );
bosko001 7:7ea932eb31f6 62 P_str( "FLASH TCP PORT ", gps_rd->myTcpPort );
bosko001 5:c9a908749d4c 63
bosko001 7:7ea932eb31f6 64 P_str( "FLASH UDP IP[0] ", gps_rd->UdpIP[0] );
bosko001 7:7ea932eb31f6 65 P_str( "FLASH UDP IP[1] ", gps_rd->UdpIP[1] );
bosko001 7:7ea932eb31f6 66 P_str( "FLASH UDP IP[2] ", gps_rd->UdpIP[2] );
bosko001 7:7ea932eb31f6 67 P_str( "FLASH UDP IP[3] ", gps_rd->UdpIP[3] );
bosko001 7:7ea932eb31f6 68 P_str( "FLASH UDP IP[4] ", gps_rd->UdpIP[4] );
bosko001 7:7ea932eb31f6 69
bosko001 7:7ea932eb31f6 70 P_str( "FLASH UDP PORT[0] ", gps_rd->UdpPort[0] );
bosko001 7:7ea932eb31f6 71 P_str( "FLASH UDP PORT[1] ", gps_rd->UdpPort[1] );
bosko001 7:7ea932eb31f6 72 P_str( "FLASH UDP PORT[2] ", gps_rd->UdpPort[2] );
bosko001 7:7ea932eb31f6 73 P_str( "FLASH UDP PORT[3] ", gps_rd->UdpPort[3] );
bosko001 7:7ea932eb31f6 74
bosko001 7:7ea932eb31f6 75 P_str( "FLASH TCP IP[0] ", gps_rd->TcpIP[0] );
bosko001 7:7ea932eb31f6 76 P_str( "FLASH TCP IP[1] ", gps_rd->TcpIP[1] );
bosko001 7:7ea932eb31f6 77 P_str( "FLASH TCP IP[2] ", gps_rd->TcpIP[2] );
bosko001 7:7ea932eb31f6 78 P_str( "FLASH TCP IP[3] ", gps_rd->TcpIP[3] );
bosko001 7:7ea932eb31f6 79 P_str( "FLASH TCP IP[4] ", gps_rd->TcpIP[4] );
bosko001 7:7ea932eb31f6 80
bosko001 7:7ea932eb31f6 81 P_str( "FLASH TCP PORT[0] ", gps_rd->TcpPort[0] );
bosko001 7:7ea932eb31f6 82 P_str( "FLASH TCP PORT[1] ", gps_rd->TcpPort[1] );
bosko001 7:7ea932eb31f6 83 P_str( "FLASH TCP PORT[2] ", gps_rd->TcpPort[2] );
bosko001 7:7ea932eb31f6 84 P_str( "FLASH TCP PORT[3] ", gps_rd->TcpPort[3] );
bosko001 5:c9a908749d4c 85
bosko001 7:7ea932eb31f6 86 P_str( "FLASH SERIAL BAUD ", gps_rd->baud_rate );
bosko001 7:7ea932eb31f6 87 P_str( "FLASH SERIAL BAUD ", gps_rd->parity );
bosko001 7:7ea932eb31f6 88 P_str( "FLASH SERIAL BAUD ", gps_rd->data_bits );
bosko001 7:7ea932eb31f6 89 P_str( "FLASH SERIAL BAUD ", gps_rd->stop_bits );
bosko001 5:c9a908749d4c 90 }
bosko001 5:c9a908749d4c 91
bosko001 5:c9a908749d4c 92
bosko001 7:7ea932eb31f6 93 //
bosko001 7:7ea932eb31f6 94 //struct S_FlashData
bosko001 7:7ea932eb31f6 95 //{
bosko001 7:7ea932eb31f6 96 // char myIP[16];
bosko001 7:7ea932eb31f6 97 // char myMask[16];
bosko001 7:7ea932eb31f6 98 // char myGate[16];
bosko001 7:7ea932eb31f6 99 // char myUdpPort[6];
bosko001 7:7ea932eb31f6 100 // char myTcpPort[6];
bosko001 7:7ea932eb31f6 101 // char UdpIP[5][16];
bosko001 7:7ea932eb31f6 102 // char UdpPort[4][6];
bosko001 7:7ea932eb31f6 103 // char TcpPort[4][6];
bosko001 7:7ea932eb31f6 104 // char baud_rate[7], parity[6], data_bits[2], stop_bits[4];
bosko001 7:7ea932eb31f6 105 //};
bosko001 7:7ea932eb31f6 106
bosko001 7:7ea932eb31f6 107
bosko001 7:7ea932eb31f6 108
bosko001 8:c0f54b381346 109 //#define COPY_IP_TO_FLASH( dest, source ) if( test_ip( pch->source ) ) strncpy( gps_rd->dest, pch->source, 16 )
bosko001 8:c0f54b381346 110
bosko001 8:c0f54b381346 111 #define COPY_IP_HTML_TO_FLASH( param ) if( test_ip( pch->get_##param() ) ) strncpy( gps_rd->param, pch->get_##param(), 16 )
bosko001 8:c0f54b381346 112 #define COPY_IP_HTML_TO_FLASH_idx( param, idx ) \
bosko001 8:c0f54b381346 113 if( test_ip( pch->get_##param(idx+1) ) ) strncpy( gps_rd->param[idx], pch->get_##param(idx+1), 16 ); \
bosko001 8:c0f54b381346 114 else strncpy( gps_rd->param[idx], " ", 16 );
bosko001 8:c0f54b381346 115
bosko001 8:c0f54b381346 116
bosko001 8:c0f54b381346 117 //#define COPY_PORT_TO_FLASH( dest, source ) if( test_num( pch->source)) strncpy( gps_rd->dest, pch->source, 6 );
bosko001 8:c0f54b381346 118 #define COPY_PORT_HTML_TO_FLASH( param ) if( test_num( pch->get_##param())) strncpy( gps_rd->param, pch->get_##param( ), 6 );
bosko001 8:c0f54b381346 119 #define COPY_PORT_HTML_TO_FLASH_idx( param, idx ) \
bosko001 8:c0f54b381346 120 if( test_num( pch->get_##param(idx+1))) strncpy( gps_rd->param[idx], pch->get_##param( idx+1 ), 6 ); \
bosko001 8:c0f54b381346 121 else strncpy( gps_rd->param[idx], " ", 6 );
bosko001 7:7ea932eb31f6 122
bosko001 5:c9a908749d4c 123
bosko001 5:c9a908749d4c 124 void putHTMLintoFLASH( C_HTMLparse *pch )
bosko001 5:c9a908749d4c 125 {
bosko001 5:c9a908749d4c 126
bosko001 8:c0f54b381346 127 // COPY_IP_TO_FLASH( myIP, get_myIP() );
bosko001 8:c0f54b381346 128 COPY_IP_HTML_TO_FLASH( myIP );
bosko001 8:c0f54b381346 129 COPY_IP_HTML_TO_FLASH( myMASK );
bosko001 8:c0f54b381346 130 COPY_IP_HTML_TO_FLASH( myGATE );
bosko001 8:c0f54b381346 131
bosko001 8:c0f54b381346 132 // COPY_IP_TO_FLASH( myMASK, get_myMASK() );
bosko001 8:c0f54b381346 133 // COPY_IP_TO_FLASH( myGATE, get_myGATE() );
bosko001 5:c9a908749d4c 134
bosko001 8:c0f54b381346 135 COPY_PORT_HTML_TO_FLASH( myUdpPort );
bosko001 8:c0f54b381346 136 COPY_PORT_HTML_TO_FLASH( myTcpPort );
bosko001 8:c0f54b381346 137 // COPY_PORT_TO_FLASH( myUdpPort, get_myUdpPort() );
bosko001 8:c0f54b381346 138 // COPY_PORT_TO_FLASH( myTcpPort, get_myTcpPort() );
bosko001 8:c0f54b381346 139
bosko001 8:c0f54b381346 140 COPY_IP_HTML_TO_FLASH_idx( UdpIP, 0 );
bosko001 8:c0f54b381346 141 COPY_IP_HTML_TO_FLASH_idx( UdpIP, 1 );
bosko001 8:c0f54b381346 142 COPY_IP_HTML_TO_FLASH_idx( UdpIP, 2 );
bosko001 8:c0f54b381346 143 COPY_IP_HTML_TO_FLASH_idx( UdpIP, 3 );
bosko001 8:c0f54b381346 144 COPY_IP_HTML_TO_FLASH_idx( UdpIP, 4 );
bosko001 8:c0f54b381346 145 // COPY_IP_TO_FLASH( UdpIP[0], get_UdpIP(1) );
bosko001 8:c0f54b381346 146 // COPY_IP_TO_FLASH( UdpIP[1], get_UdpIP(2) );
bosko001 8:c0f54b381346 147 // COPY_IP_TO_FLASH( UdpIP[2], get_UdpIP(3) );
bosko001 8:c0f54b381346 148 // COPY_IP_TO_FLASH( UdpIP[3], get_UdpIP(4) );
bosko001 8:c0f54b381346 149 // COPY_IP_TO_FLASH( UdpIP[4], get_UdpIP(5) );
bosko001 7:7ea932eb31f6 150
bosko001 8:c0f54b381346 151 COPY_PORT_HTML_TO_FLASH_idx( UdpPort, 0 );
bosko001 8:c0f54b381346 152 COPY_PORT_HTML_TO_FLASH_idx( UdpPort, 1 );
bosko001 8:c0f54b381346 153 COPY_PORT_HTML_TO_FLASH_idx( UdpPort, 2 );
bosko001 8:c0f54b381346 154 COPY_PORT_HTML_TO_FLASH_idx( UdpPort, 3 );
bosko001 8:c0f54b381346 155 // COPY_PORT_TO_FLASH( UdpPort[0], get_UdpPort(1) );
bosko001 8:c0f54b381346 156 // COPY_PORT_TO_FLASH( UdpPort[1], get_UdpPort(2) );
bosko001 8:c0f54b381346 157 // COPY_PORT_TO_FLASH( UdpPort[2], get_UdpPort(3) );
bosko001 8:c0f54b381346 158 // COPY_PORT_TO_FLASH( UdpPort[3], get_UdpPort(4) );
bosko001 5:c9a908749d4c 159
bosko001 8:c0f54b381346 160 COPY_IP_HTML_TO_FLASH_idx( TcpIP, 0 );
bosko001 8:c0f54b381346 161 COPY_IP_HTML_TO_FLASH_idx( TcpIP, 1 );
bosko001 8:c0f54b381346 162 COPY_IP_HTML_TO_FLASH_idx( TcpIP, 2 );
bosko001 8:c0f54b381346 163 COPY_IP_HTML_TO_FLASH_idx( TcpIP, 3 );
bosko001 8:c0f54b381346 164 COPY_IP_HTML_TO_FLASH_idx( TcpIP, 4 );
bosko001 8:c0f54b381346 165 // COPY_IP_TO_FLASH( TcpIP[0], get_TcpIP(1) );
bosko001 8:c0f54b381346 166 // COPY_IP_TO_FLASH( TcpIP[1], get_TcpIP(2) );
bosko001 8:c0f54b381346 167 // COPY_IP_TO_FLASH( TcpIP[2], get_TcpIP(3) );
bosko001 8:c0f54b381346 168 // COPY_IP_TO_FLASH( TcpIP[3], get_TcpIP(4) );
bosko001 8:c0f54b381346 169 // COPY_IP_TO_FLASH( TcpIP[4], get_TcpIP(5) );
bosko001 8:c0f54b381346 170
bosko001 8:c0f54b381346 171 COPY_PORT_HTML_TO_FLASH_idx( TcpPort, 0 );
bosko001 8:c0f54b381346 172 COPY_PORT_HTML_TO_FLASH_idx( TcpPort, 1 );
bosko001 8:c0f54b381346 173 COPY_PORT_HTML_TO_FLASH_idx( TcpPort, 2 );
bosko001 8:c0f54b381346 174 COPY_PORT_HTML_TO_FLASH_idx( TcpPort, 3 );
bosko001 8:c0f54b381346 175 // COPY_PORT_TO_FLASH( TcpPort[0], get_TcpPort(1) );
bosko001 8:c0f54b381346 176 // COPY_PORT_TO_FLASH( TcpPort[1], get_TcpPort(2) );
bosko001 8:c0f54b381346 177 // COPY_PORT_TO_FLASH( TcpPort[2], get_TcpPort(3) );
bosko001 8:c0f54b381346 178 // COPY_PORT_TO_FLASH( TcpPort[3], get_TcpPort(4) );
bosko001 5:c9a908749d4c 179
bosko001 7:7ea932eb31f6 180 strncpy( gps_rd->baud_rate, pch->get_selected_option( "baud_rate" ), 7 );
bosko001 7:7ea932eb31f6 181 strncpy( gps_rd->parity, pch->get_selected_option( "parity" ), 6 );
bosko001 7:7ea932eb31f6 182 strncpy( gps_rd->data_bits, pch->get_selected_option( "data_bits" ), 2 );
bosko001 7:7ea932eb31f6 183 strncpy( gps_rd->stop_bits, pch->get_selected_option( "stop_bits" ), 4 );
bosko001 7:7ea932eb31f6 184
bosko001 5:c9a908749d4c 185 fillDataIntoFlash( );
bosko001 5:c9a908749d4c 186 }
bosko001 5:c9a908749d4c 187
bosko001 8:c0f54b381346 188
bosko001 8:c0f54b381346 189 //#define COPY_IP_FLASH_TO_HTML( dest, source ) if( test_ip( gps_rd->source ) ) pch->dest( gps_rd->source );
bosko001 8:c0f54b381346 190 #define COPY_IP_FLASH_TO_HTML( param ) if( test_ip( gps_rd->param ) ) pch->set_##param( gps_rd->param );
bosko001 8:c0f54b381346 191 #define COPY_IP_FLASH_TO_HTML_idx( param, idx ) if( test_ip( gps_rd->param[idx] ) ) pch->set_##param( idx+1, gps_rd->param[idx] );
bosko001 8:c0f54b381346 192
bosko001 8:c0f54b381346 193 #define COPY_PORT_FLASH_TO_HTML( param ) if( test_num( gps_rd->param )) pch->set_##param(gps_rd->param);
bosko001 8:c0f54b381346 194 #define COPY_PORT_FLASH_TO_HTML_idx( param, idx ) if( test_num( gps_rd->param[idx] )) pch->set_##param(idx+1, gps_rd->param[idx]);
bosko001 5:c9a908749d4c 195
bosko001 5:c9a908749d4c 196 void putFLASHintoHTML( C_HTMLparse *pch )
bosko001 5:c9a908749d4c 197 {
bosko001 5:c9a908749d4c 198
bosko001 5:c9a908749d4c 199 refreshDataFromFlash( );
bosko001 5:c9a908749d4c 200
bosko001 8:c0f54b381346 201 COPY_IP_FLASH_TO_HTML( myIP );
bosko001 8:c0f54b381346 202 COPY_IP_FLASH_TO_HTML( myIP );
bosko001 8:c0f54b381346 203 COPY_IP_FLASH_TO_HTML( myMASK );
bosko001 8:c0f54b381346 204 COPY_IP_FLASH_TO_HTML( myGATE );
bosko001 8:c0f54b381346 205 // if( test_ip( gps_rd->myIP ) ) pch->set_myIP( gps_rd->myIP );
bosko001 8:c0f54b381346 206 // if( test_ip( gps_rd->myMASK ) ) pch->set_myMASK( gps_rd->myMASK );
bosko001 8:c0f54b381346 207 // if( test_ip( gps_rd->myGATE ) ) pch->set_myGATE( gps_rd->myGATE );
bosko001 5:c9a908749d4c 208
bosko001 8:c0f54b381346 209 COPY_PORT_FLASH_TO_HTML( myUdpPort );
bosko001 8:c0f54b381346 210 COPY_PORT_FLASH_TO_HTML( myTcpPort );
bosko001 8:c0f54b381346 211 // if( test_num( gps_rd->myUdpPort )) pch->set_myUdpPort(gps_rd->myUdpPort);
bosko001 8:c0f54b381346 212 // if( test_num( gps_rd->myTcpPort )) pch->set_myTcpPort(gps_rd->myTcpPort);
bosko001 5:c9a908749d4c 213
bosko001 8:c0f54b381346 214 COPY_IP_FLASH_TO_HTML_idx( UdpIP, 0 );
bosko001 8:c0f54b381346 215 COPY_IP_FLASH_TO_HTML_idx( UdpIP, 1 );
bosko001 8:c0f54b381346 216 COPY_IP_FLASH_TO_HTML_idx( UdpIP, 2 );
bosko001 8:c0f54b381346 217 COPY_IP_FLASH_TO_HTML_idx( UdpIP, 3 );
bosko001 8:c0f54b381346 218 COPY_IP_FLASH_TO_HTML_idx( UdpIP, 4 );
bosko001 8:c0f54b381346 219 // if( test_ip( gps_rd->UdpIP[0] ) ) pch->set_UdpIP(1,gps_rd->UdpIP[0]);
bosko001 8:c0f54b381346 220 // if( test_ip( gps_rd->UdpIP[1] ) ) pch->set_UdpIP(2,gps_rd->UdpIP[1]);
bosko001 8:c0f54b381346 221 // if( test_ip( gps_rd->UdpIP[2] ) ) pch->set_UdpIP(3,gps_rd->UdpIP[2]);
bosko001 8:c0f54b381346 222 // if( test_ip( gps_rd->UdpIP[3] ) ) pch->set_UdpIP(4,gps_rd->UdpIP[3]);
bosko001 8:c0f54b381346 223 // if( test_ip( gps_rd->UdpIP[4] ) ) pch->set_UdpIP(5,gps_rd->UdpIP[4]);
bosko001 5:c9a908749d4c 224
bosko001 8:c0f54b381346 225 COPY_PORT_FLASH_TO_HTML_idx( UdpPort, 0 );
bosko001 8:c0f54b381346 226 COPY_PORT_FLASH_TO_HTML_idx( UdpPort, 1 );
bosko001 8:c0f54b381346 227 COPY_PORT_FLASH_TO_HTML_idx( UdpPort, 2 );
bosko001 8:c0f54b381346 228 COPY_PORT_FLASH_TO_HTML_idx( UdpPort, 3 );
bosko001 8:c0f54b381346 229 // if( test_num( gps_rd->UdpPort[0] )) pch->set_UdpPort( 1, gps_rd->UdpPort[0] );
bosko001 8:c0f54b381346 230 // if( test_num( gps_rd->UdpPort[1] )) pch->set_UdpPort( 2, gps_rd->UdpPort[1] );
bosko001 8:c0f54b381346 231 // if( test_num( gps_rd->UdpPort[2] )) pch->set_UdpPort( 3, gps_rd->UdpPort[2] );
bosko001 8:c0f54b381346 232 // if( test_num( gps_rd->UdpPort[3] )) pch->set_UdpPort( 4, gps_rd->UdpPort[3] );
bosko001 7:7ea932eb31f6 233
bosko001 8:c0f54b381346 234 COPY_IP_FLASH_TO_HTML_idx( TcpIP, 0 );
bosko001 8:c0f54b381346 235 COPY_IP_FLASH_TO_HTML_idx( TcpIP, 1 );
bosko001 8:c0f54b381346 236 COPY_IP_FLASH_TO_HTML_idx( TcpIP, 2 );
bosko001 8:c0f54b381346 237 COPY_IP_FLASH_TO_HTML_idx( TcpIP, 3 );
bosko001 8:c0f54b381346 238 COPY_IP_FLASH_TO_HTML_idx( TcpIP, 4 );
bosko001 8:c0f54b381346 239 // if( test_ip( gps_rd->TcpIP[0] ) ) pch->set_TcpIP(1, gps_rd->TcpIP[0]);
bosko001 8:c0f54b381346 240 // if( test_ip( gps_rd->TcpIP[1] ) ) pch->set_TcpIP(2, gps_rd->TcpIP[1]);
bosko001 8:c0f54b381346 241 // if( test_ip( gps_rd->TcpIP[2] ) ) pch->set_TcpIP(3, gps_rd->TcpIP[2]);
bosko001 8:c0f54b381346 242 // if( test_ip( gps_rd->TcpIP[3] ) ) pch->set_TcpIP(4, gps_rd->TcpIP[3]);
bosko001 8:c0f54b381346 243 // if( test_ip( gps_rd->TcpIP[4] ) ) pch->set_TcpIP(5, gps_rd->TcpIP[4]);
bosko001 7:7ea932eb31f6 244
bosko001 8:c0f54b381346 245 COPY_PORT_FLASH_TO_HTML_idx( TcpPort, 0 );
bosko001 8:c0f54b381346 246 COPY_PORT_FLASH_TO_HTML_idx( TcpPort, 1 );
bosko001 8:c0f54b381346 247 COPY_PORT_FLASH_TO_HTML_idx( TcpPort, 2 );
bosko001 8:c0f54b381346 248 COPY_PORT_FLASH_TO_HTML_idx( TcpPort, 3 );
bosko001 8:c0f54b381346 249 // if( test_num( gps_rd->TcpPort[0] )) pch->set_TcpPort( 1, gps_rd->TcpPort[0] );
bosko001 8:c0f54b381346 250 // if( test_num( gps_rd->TcpPort[1] )) pch->set_TcpPort( 2, gps_rd->TcpPort[1] );
bosko001 8:c0f54b381346 251 // if( test_num( gps_rd->TcpPort[2] )) pch->set_TcpPort( 3, gps_rd->TcpPort[2] );
bosko001 8:c0f54b381346 252 // if( test_num( gps_rd->TcpPort[3] )) pch->set_TcpPort( 4, gps_rd->TcpPort[3] );
bosko001 7:7ea932eb31f6 253
bosko001 7:7ea932eb31f6 254
bosko001 7:7ea932eb31f6 255 pch->set_selected_option( "baud_rate", gps_rd->baud_rate );
bosko001 7:7ea932eb31f6 256 pch->set_selected_option( "parity", gps_rd->parity );
bosko001 7:7ea932eb31f6 257 pch->set_selected_option( "data_bits", gps_rd->data_bits );
bosko001 7:7ea932eb31f6 258 pch->set_selected_option( "stop_bits", gps_rd->stop_bits );
bosko001 5:c9a908749d4c 259
bosko001 5:c9a908749d4c 260 }
bosko001 5:c9a908749d4c 261
bosko001 5:c9a908749d4c 262