Use wait_ms instead of wait(n)

Small space savings, the casting from int to float will bloat
the code a bit. Using wait(1.0f) for example would avoid it,
but seems a bit silly to use floats for anything unless
really needed (in embedded products).
pull/8302/head
Janne Kiiskila 2018-10-02 17:43:14 +03:00
parent a6651b868b
commit de77695b08
2 changed files with 3 additions and 3 deletions

View File

@ -167,7 +167,7 @@ uint32_t OTA_ReadImage(uint32_t base, uint32_t offset, uint32_t len, uint8_t *da
void OTA_ResetTarget(void) void OTA_ResetTarget(void)
{ {
__RTK_CTRL_WRITE32(0x14, 0x00000021); __RTK_CTRL_WRITE32(0x14, 0x00000021);
wait(1); wait_ms(1000);
NVIC_SystemReset(); NVIC_SystemReset();

View File

@ -1,5 +1,5 @@
/* ODIN-W2 implementation of WiFiInterface /* ODIN-W2 implementation of WiFiInterface
* Copyright (c) 2016 u-blox Malmö AB * Copyright (c) 2016 u-blox Malmö AB
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -937,7 +937,7 @@ void OdinWiFiInterface::handle_user_scan(user_scan_s *user_scan)
cbRTSL_Status status = cbSTATUS_ERROR; cbRTSL_Status status = cbSTATUS_ERROR;
for(int i = 0; (i < 10) && (status != cbSTATUS_OK); i++) { for(int i = 0; (i < 10) && (status != cbSTATUS_OK); i++) {
if(i > 0) { if(i > 0) {
wait(0.5); wait_ms(500);
} }
cbMAIN_driverLock(); cbMAIN_driverLock();