coccinelle: standardize k_sleep calls with integer timeouts

Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2019-10-06 14:02:31 -05:00 committed by Anas Nashif
commit 6e5db350b2
130 changed files with 229 additions and 229 deletions

View file

@ -42,7 +42,7 @@ struct ili9340_data {
static void ili9340_exit_sleep(struct ili9340_data *data)
{
ili9340_transmit(data, ILI9340_CMD_EXIT_SLEEP, NULL, 0);
k_sleep(120);
k_sleep(K_MSEC(120));
}
static int ili9340_init(struct device *dev)
@ -96,11 +96,11 @@ static int ili9340_init(struct device *dev)
#ifdef DT_INST_0_ILITEK_ILI9340_RESET_GPIOS_CONTROLLER
LOG_DBG("Resetting display driver");
gpio_pin_write(data->reset_gpio, DT_INST_0_ILITEK_ILI9340_RESET_GPIOS_PIN, 1);
k_sleep(1);
k_sleep(K_MSEC(1));
gpio_pin_write(data->reset_gpio, DT_INST_0_ILITEK_ILI9340_RESET_GPIOS_PIN, 0);
k_sleep(1);
k_sleep(K_MSEC(1));
gpio_pin_write(data->reset_gpio, DT_INST_0_ILITEK_ILI9340_RESET_GPIOS_PIN, 1);
k_sleep(5);
k_sleep(K_MSEC(5));
#endif
LOG_DBG("Initializing LCD");

View file

@ -22,7 +22,7 @@ void ili9340_lcd_init(struct ili9340_data *p_ili9340)
cmd = ILI9340_CMD_SOFTWARE_RESET;
ili9340_transmit(p_ili9340, cmd, NULL, 0);
k_sleep(5);
k_sleep(K_MSEC(5));
cmd = ILI9341_CMD_POWER_CTRL_B;
data[0] = 0x00U;
@ -166,7 +166,7 @@ void ili9340_lcd_init(struct ili9340_data *p_ili9340)
cmd = ILI9340_CMD_EXIT_SLEEP;
ili9340_transmit(p_ili9340, cmd, NULL, 0);
k_sleep(120);
k_sleep(K_MSEC(120));
/* Display Off */
cmd = ILI9340_CMD_DISPLAY_OFF;

View file

@ -81,7 +81,7 @@ void st7789v_transmit(struct st7789v_data *data, u8_t cmd,
static void st7789v_exit_sleep(struct st7789v_data *data)
{
st7789v_transmit(data, ST7789V_CMD_SLEEP_OUT, NULL, 0);
k_sleep(120);
k_sleep(K_MSEC(120));
}
static void st7789v_reset_display(struct st7789v_data *data)
@ -89,14 +89,14 @@ static void st7789v_reset_display(struct st7789v_data *data)
LOG_DBG("Resetting display");
#ifdef DT_INST_0_SITRONIX_ST7789V_RESET_GPIOS_CONTROLLER
gpio_pin_write(data->reset_gpio, ST7789V_RESET_PIN, 1);
k_sleep(1);
k_sleep(K_MSEC(1));
gpio_pin_write(data->reset_gpio, ST7789V_RESET_PIN, 0);
k_sleep(6);
k_sleep(K_MSEC(6));
gpio_pin_write(data->reset_gpio, ST7789V_RESET_PIN, 1);
k_sleep(20);
k_sleep(K_MSEC(20));
#else
st7789v_transmit(p_st7789v, ST7789V_CMD_SW_RESET, NULL, 0);
k_sleep(5);
k_sleep(K_MSEC(5));
#endif
}