summaryrefslogtreecommitdiffstats
path: root/src/host/osmocon
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2011-05-15 14:23:02 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2011-05-15 14:39:30 +0200
commitd3ba2f6037dcf051a9235bca2b0145b3917300d9 (patch)
tree97f9163304a026ab7690b4cd45c0cefde4efafde /src/host/osmocon
parent6f9af5945e855dab4810641dc72eff6a24c30a77 (diff)
src: use namespace prefix osmo_timer*
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
Diffstat (limited to 'src/host/osmocon')
-rw-r--r--src/host/osmocon/osmocon.c18
-rw-r--r--src/host/osmocon/osmoload.c8
2 files changed, 13 insertions, 13 deletions
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index 2c42799c..c8ea38a1 100644
--- a/src/host/osmocon/osmocon.c
+++ b/src/host/osmocon/osmocon.c
@@ -164,7 +164,7 @@ struct dnload {
static struct dnload dnload;
-static struct timer_list tick_timer;
+static struct osmo_timer_list tick_timer;
/* Compal ramloader specific */
static const uint8_t phone_prompt1[] = { 0x1b, 0xf6, 0x02, 0x00, 0x41, 0x01, 0x40 };
@@ -290,7 +290,7 @@ static void beacon_timer_cb(void *p)
if (!(rc == sizeof(romload_ident_cmd)))
printf("Error sending identification beacon\n");
- bsc_schedule_timer(p, 0, dnload.beacon_interval);
+ osmo_timer_schedule(p, 0, dnload.beacon_interval);
}
}
@@ -305,7 +305,7 @@ static void mtk_timer_cb(void *p)
if (!(rc == 1))
printf("Error sending identification beacon\n");
- bsc_schedule_timer(p, 0, dnload.beacon_interval);
+ osmo_timer_schedule(p, 0, dnload.beacon_interval);
}
}
@@ -889,7 +889,7 @@ static int handle_read(void)
serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
tick_timer.cb = &beacon_timer_cb;
tick_timer.data = &tick_timer;
- bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+ osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
}
} else if (!memcmp(buffer, phone_nack, sizeof(phone_nack))) {
printf("Received DOWNLOAD NACK from phone, something went"
@@ -1004,7 +1004,7 @@ static int handle_read_romload(void)
"something went wrong, aborting\n");
serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
dnload.romload_state = WAITING_IDENTIFICATION;
- bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+ osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
}
break;
case WAITING_CHECKSUM_ACK:
@@ -1026,7 +1026,7 @@ static int handle_read_romload(void)
"match ours, aborting\n", ~buffer[2]);
serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
dnload.romload_state = WAITING_IDENTIFICATION;
- bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+ osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
bufptr -= 1;
}
break;
@@ -1043,7 +1043,7 @@ static int handle_read_romload(void)
printf("Received branch nack, aborting\n");
serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
dnload.romload_state = WAITING_IDENTIFICATION;
- bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+ osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
}
break;
default:
@@ -1536,14 +1536,14 @@ int main(int argc, char **argv)
serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
tick_timer.cb = &beacon_timer_cb;
tick_timer.data = &tick_timer;
- bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+ osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
}
else if (dnload.mode == MODE_MTK) {
tmp_load_address = MTK_ADDRESS;
serial_set_baudrate(MTK_INIT_BAUDRATE);
tick_timer.cb = &mtk_timer_cb;
tick_timer.data = &tick_timer;
- bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+ osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
}
dnload.load_address[0] = (tmp_load_address >> 24) & 0xff;
diff --git a/src/host/osmocon/osmoload.c b/src/host/osmocon/osmoload.c
index 6663a1e1..6a31dc10 100644
--- a/src/host/osmocon/osmoload.c
+++ b/src/host/osmocon/osmoload.c
@@ -84,7 +84,7 @@ static struct {
uint8_t command;
/* general timeout */
- struct timer_list timeout;
+ struct osmo_timer_list timeout;
/* binary i/o for firmware images */
FILE *binfile;
@@ -661,7 +661,7 @@ loader_do_memload() {
return;
}
- bsc_schedule_timer(&osmoload.timeout, 0, 500000);
+ osmo_timer_schedule(&osmoload.timeout, 0, 500000);
uint8_t reqbytes = (rembytes < MEM_MSG_MAX) ? rembytes : MEM_MSG_MAX;
@@ -701,7 +701,7 @@ loader_do_fprogram() {
return;
}
- bsc_schedule_timer(&osmoload.timeout, 0, 10000000);
+ osmo_timer_schedule(&osmoload.timeout, 0, 10000000);
uint8_t reqbytes = (rembytes < MEM_MSG_MAX) ? rembytes : MEM_MSG_MAX;
@@ -1143,7 +1143,7 @@ loader_command(char *name, int cmdc, char **cmdv) {
if(osmoload.state == STATE_QUERY_PENDING) {
osmoload.timeout.cb = &query_timeout;
- bsc_schedule_timer(&osmoload.timeout, 0, 5000000);
+ osmo_timer_schedule(&osmoload.timeout, 0, 5000000);
}
if(osmoload.state == STATE_LOAD_IN_PROGRESS) {
osmoload.timeout.cb = &memop_timeout;