diff --git a/boards/arm/cxd56xx/common/src/cxd56_audio.c b/boards/arm/cxd56xx/common/src/cxd56_audio.c index 8c695734350..8d0cbe8555d 100644 --- a/boards/arm/cxd56xx/common/src/cxd56_audio.c +++ b/boards/arm/cxd56xx/common/src/cxd56_audio.c @@ -47,6 +47,7 @@ #include #include +#include #include #include "chip.h" @@ -297,13 +298,13 @@ int board_external_amp_mute_control(bool en) /* Mute ON */ ret = board_power_control(POWER_AUDIO_MUTE, false); - usleep(MUTE_ON_DELAY); + nxsig_usleep(MUTE_ON_DELAY); } else { /* Mute OFF */ - usleep(MUTE_OFF_DELAY); + nxsig_usleep(MUTE_OFF_DELAY); ret = board_power_control(POWER_AUDIO_MUTE, true); } diff --git a/boards/arm/cxd56xx/common/src/cxd56_isx012.c b/boards/arm/cxd56xx/common/src/cxd56_isx012.c index 6faefc08220..9f49870a408 100644 --- a/boards/arm/cxd56xx/common/src/cxd56_isx012.c +++ b/boards/arm/cxd56xx/common/src/cxd56_isx012.c @@ -43,12 +43,14 @@ #include #include +#include +#include +#include + #include "cxd56_gpio.h" #include "cxd56_pinconfig.h" #include "cxd56_i2c.h" -#include -#include #include /**************************************************************************** @@ -111,8 +113,9 @@ int board_isx012_power_on(void) break; } - usleep(POWER_CHECK_TIME); + nxsig_usleep(POWER_CHECK_TIME); } + return ret; } @@ -144,7 +147,7 @@ int board_isx012_power_off(void) break; } - usleep(POWER_CHECK_TIME); + nxsig_usleep(POWER_CHECK_TIME); } return ret; @@ -167,20 +170,20 @@ void board_isx012_set_sleep(int kind) { /* PowerON -> sleep */ - usleep(DEVICE_STARTUP_TIME); + nxsig_usleep(DEVICE_STARTUP_TIME); } else { /* active -> sleep */ - usleep(STANDBY_TIME); + nxsig_usleep(STANDBY_TIME); } } void board_isx012_release_sleep(void) { cxd56_gpio_write(IMAGER_SLEEP, true); - usleep(SLEEP_CANCEL_TIME); + nxsig_usleep(SLEEP_CANCEL_TIME); } int isx012_register(FAR struct i2c_master_s *i2c); diff --git a/boards/arm/cxd56xx/drivers/audio/cxd56_audio_analog.c b/boards/arm/cxd56xx/drivers/audio/cxd56_audio_analog.c index 16e7b9695dd..4a6558ed7a4 100644 --- a/boards/arm/cxd56xx/drivers/audio/cxd56_audio_analog.c +++ b/boards/arm/cxd56xx/drivers/audio/cxd56_audio_analog.c @@ -38,9 +38,13 @@ ****************************************************************************/ #include + +#include + #include #include -#include +#include + #include #include @@ -107,7 +111,7 @@ static void wait_mic_boot_finish(void) if (time < CXD56_AUDIO_MIC_BOOT_WAIT) { - usleep((CXD56_AUDIO_MIC_BOOT_WAIT - time) * 1000); + nxsig_usleep((CXD56_AUDIO_MIC_BOOT_WAIT - time) * 1000); } } } diff --git a/boards/arm/cxd56xx/drivers/audio/cxd56_audio_volume.c b/boards/arm/cxd56xx/drivers/audio/cxd56_audio_volume.c index 9490a70a71b..bcb244ea45e 100644 --- a/boards/arm/cxd56xx/drivers/audio/cxd56_audio_volume.c +++ b/boards/arm/cxd56xx/drivers/audio/cxd56_audio_volume.c @@ -37,9 +37,11 @@ * Included Files ****************************************************************************/ -#include #include +#include +#include + #include "cxd56_audio_config.h" #include "cxd56_audio_ac_reg.h" #include "cxd56_audio_analog.h" @@ -134,7 +136,7 @@ static CXD56_AUDIO_ECODE set_mute(cxd56_audio_volid_t id, if (wait) { - usleep(waittime); + nxsig_usleep(waittime); } g_volparam[id].mute_bit |= type; @@ -200,7 +202,7 @@ static CXD56_AUDIO_ECODE set_unmute(cxd56_audio_volid_t id, if (wait) { - usleep(waittime); + nxsig_usleep(waittime); } } diff --git a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_bt.c b/boards/arm/lc823450/lc823450-xgevk/src/lc823450_bt.c index 6b9438b73d8..4109475b73d 100644 --- a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_bt.c +++ b/boards/arm/lc823450/lc823450-xgevk/src/lc823450_bt.c @@ -39,10 +39,12 @@ #include -#include -#include #include +#include +#include +#include + #include "chip.h" #include "up_arch.h" #include "up_internal.h" @@ -69,9 +71,9 @@ void up_bt_enable(int enable) if (enable) { lc823450_gpio_write(BT_POWER, 0); - usleep(100 * 1000); + nxsig_usleep(100 * 1000); lc823450_gpio_write(BT_POWER, 1); - usleep(100 * 1000); + nxsig_usleep(100 * 1000); } else { diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c b/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c index c1bf7eb3a7e..da2ef2c639b 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c * - * Copyright (C) 2017 Gregory Nutt. All rights reserved. + * Copyright (C) 2017, 2019 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -44,8 +44,9 @@ #include #include -#include #include +#include +#include #include "clicker2-stm32.h" @@ -108,7 +109,7 @@ int board_app_initialize(uintptr_t arg) * file syslog. */ - usleep(CONFIG_CLICKER2_STM32_SYSLOG_FILE_DELAY * 1000); + nxsig_usleep(CONFIG_CLICKER2_STM32_SYSLOG_FILE_DELAY * 1000); ret = syslog_file_channel(CONFIG_CLICKER2_STM32_SYSLOG_FILE_PATH); if (ret < 0) diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c b/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c index 38782ffb379..c043ceb493d 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c +++ b/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c @@ -1,7 +1,7 @@ /**************************************************************************** * boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c * - * Copyright (C) 2018 Gregory Nutt. All rights reserved. + * Copyright (C) 2018, 2019 Gregory Nutt. All rights reserved. * Author: Mateusz Szafoni * * Redistribution and use in source and binary forms, with or without @@ -46,14 +46,13 @@ #include #include - -#include -#include - #include #include #include +#include +#include + #include "up_internal.h" #include "ram_vectors.h" @@ -505,7 +504,7 @@ int highpri_main(int argc, char *argv[]) adc1->ad_ops->ao_ioctl(adc1, IO_TRIGGER_REG, 0); - usleep(100); + nxsig_usleep(100); #endif #ifdef HIGHPRI_HAVE_INJECTED @@ -513,7 +512,7 @@ int highpri_main(int argc, char *argv[]) adc1->ad_ops->ao_ioctl(adc1, IO_TRIGGER_INJ, 0); - usleep(100); + nxsig_usleep(100); #endif /* Lock global data */ diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c b/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c index e080682b5ed..eb8ac8b01ed 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c +++ b/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c @@ -1,7 +1,7 @@ /**************************************************************************** * boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c * - * Copyright (C) 2018 Gregory Nutt. All rights reserved. + * Copyright (C) 2018, 2019 Gregory Nutt. All rights reserved. * Author: Mateusz Szafoni * * Redistribution and use in source and binary forms, with or without @@ -46,14 +46,13 @@ #include #include - -#include -#include - #include #include #include +#include +#include + #include "up_internal.h" #include "ram_vectors.h" @@ -547,7 +546,7 @@ int highpri_main(int argc, char *argv[]) adc1->ad_ops->ao_ioctl(adc1, IO_TRIGGER_REG, 0); - usleep(100); + nxsig_usleep(100); #endif #ifdef HIGHPRI_HAVE_INJECTED @@ -555,7 +554,7 @@ int highpri_main(int argc, char *argv[]) adc1->ad_ops->ao_ioctl(adc1, IO_TRIGGER_INJ, 0); - usleep(100); + nxsig_usleep(100); #endif /* Lock global data */ diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_highpri.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_highpri.c index eb6a1371267..64f2e424714 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_highpri.c +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_highpri.c @@ -1,7 +1,7 @@ /**************************************************************************** * boards/arm/stm32/stm32f429i-disco/src/stm32_highpri.c * - * Copyright (C) 2018 Gregory Nutt. All rights reserved. + * Copyright (C) 2018, 2019 Gregory Nutt. All rights reserved. * Author: Mateusz Szafoni * * Redistribution and use in source and binary forms, with or without @@ -495,7 +495,7 @@ int highpri_main(int argc, char *argv[]) adc1->ad_ops->ao_ioctl(adc1, IO_TRIGGER_REG, 0); - usleep(100); + nxsig_usleep(100); #endif #ifdef HIGHPRI_HAVE_INJECTED @@ -503,7 +503,7 @@ int highpri_main(int argc, char *argv[]) adc1->ad_ops->ao_ioctl(adc1, IO_TRIGGER_INJ, 0); - usleep(100); + nxsig_usleep(100); #endif /* Lock global data */ diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_sx127x.c b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_sx127x.c index 52977415e33..7e104e54201 100644 --- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_sx127x.c +++ b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_sx127x.c @@ -46,8 +46,9 @@ #include #include -#include +#include #include +#include #include "stm32_gpio.h" #include "stm32_exti.h" @@ -126,7 +127,7 @@ static void sx127x_chip_reset(void) /* Wait 1 ms */ - usleep(1000); + nxsig_usleep(1000); /* Configure reset as input */ @@ -134,7 +135,7 @@ static void sx127x_chip_reset(void) /* Wait 10 ms */ - usleep(10000); + nxsig_usleep(10000); } /**************************************************************************** diff --git a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/stm32_sx127x.c b/boards/arm/stm32f0l0g0/nucleo-f091rc/src/stm32_sx127x.c index 558a1205d34..6b08b211457 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/stm32_sx127x.c +++ b/boards/arm/stm32f0l0g0/nucleo-f091rc/src/stm32_sx127x.c @@ -47,8 +47,9 @@ #include #include -#include +#include #include +#include #include "stm32_gpio.h" #include "stm32_exti.h" @@ -125,7 +126,7 @@ static void sx127x_chip_reset(void) /* Wait 1 ms */ - usleep(1000); + nxsig_usleep(1000); /* Configure reset as input */ @@ -133,7 +134,7 @@ static void sx127x_chip_reset(void) /* Wait 10 ms */ - usleep(10000); + nxsig_usleep(10000); } /**************************************************************************** diff --git a/boards/arm/stm32f0l0g0/nucleo-l073rz/src/stm32_sx127x.c b/boards/arm/stm32f0l0g0/nucleo-l073rz/src/stm32_sx127x.c index 389f674fa77..11f0bb6bca8 100644 --- a/boards/arm/stm32f0l0g0/nucleo-l073rz/src/stm32_sx127x.c +++ b/boards/arm/stm32f0l0g0/nucleo-l073rz/src/stm32_sx127x.c @@ -47,8 +47,9 @@ #include #include -#include +#include #include +#include #include "stm32_gpio.h" #include "stm32_exti.h" @@ -125,7 +126,7 @@ static void sx127x_chip_reset(void) /* Wait 1 ms */ - usleep(1000); + nxsig_usleep(1000); /* Configure reset as input */ @@ -133,7 +134,7 @@ static void sx127x_chip_reset(void) /* Wait 10 ms */ - usleep(10000); + nxsig_usleep(10000); } /****************************************************************************