FreeCalypso > hg > freecalypso-sw
comparison loadtools/romload.c @ 84:ccc5161848c7
loadtools: support building for GTA0x AP
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Tue, 20 Aug 2013 04:51:15 +0000 |
parents | f1df95eed62c |
children |
comparison
equal
deleted
inserted
replaced
83:ebe258a85813 | 84:ccc5161848c7 |
---|---|
23 extern struct baudrate baud_rate_table[]; | 23 extern struct baudrate baud_rate_table[]; |
24 extern struct baudrate *find_baudrate_by_name(); | 24 extern struct baudrate *find_baudrate_by_name(); |
25 | 25 |
26 struct srecreader iramimage; | 26 struct srecreader iramimage; |
27 struct baudrate *romload_baud_rate = baud_rate_table; /* 1st entry default */ | 27 struct baudrate *romload_baud_rate = baud_rate_table; /* 1st entry default */ |
28 | |
29 /* global var always defined, but does anything only for GTA0x_AP_BUILD */ | |
30 int gta_modem_poweron = 1; | |
28 | 31 |
29 static int beacon_interval = 13; /* in milliseconds */ | 32 static int beacon_interval = 13; /* in milliseconds */ |
30 | 33 |
31 static u_char beacon_cmd[2] = {'<', 'i'}; | 34 static u_char beacon_cmd[2] = {'<', 'i'}; |
32 | 35 |
142 | 145 |
143 static | 146 static |
144 send_beacons() | 147 send_beacons() |
145 { | 148 { |
146 printf("Sending beacons to %s\n", target_ttydev); | 149 printf("Sending beacons to %s\n", target_ttydev); |
150 #ifdef GTA0x_AP_BUILD | |
151 if (gta_modem_poweron) | |
152 fork_gta_modem_poweron(); | |
153 #endif | |
147 do | 154 do |
148 write(target_fd, beacon_cmd, sizeof beacon_cmd); | 155 write(target_fd, beacon_cmd, sizeof beacon_cmd); |
149 while (expect_response(beacon_interval) != 'i'); | 156 while (expect_response(beacon_interval) != 'i'); |
150 return 0; | 157 return 0; |
151 } | 158 } |