We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b25eaf5 + 965404c commit 9875c29Copy full SHA for 9875c29
targets/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/C027_api.c
@@ -16,6 +16,7 @@
16
#include "gpio_api.h"
17
#include "mbed_wait_api.h"
18
#include "C027_api.h"
19
+#include "us_ticker_api.h"
20
21
static gpio_t mdmEn, mdmLvlOe, mdmILvlOe, mdmUsbDet;
22
static gpio_t gpsEn;
@@ -36,7 +37,10 @@ void c027_init(void) {
36
37
// led should be off
38
gpio_init_out_ex(&led, LED, 0);
39
- wait_ms(50); // when USB cable is inserted the interface chip issues
40
+ // Can't use wait_ms() as RTOS isn't initialised yet
41
+ // so this is the correct way to wait for 50 ms
42
+ uint32_t start = us_ticker_read();
43
+ while ((us_ticker_read() - start) < 50000);
44
}
45
46
void c027_mdm_powerOn(int usb) {
0 commit comments