updated wait_ms(ms) to thread_sleep_for(ms) for Mbed OS 6

Files at this revision

API Documentation at this revision

Comitter:
aa6164
Date:
Wed Jun 09 12:45:23 2021 +0000
Parent:
3:3cdfcc4f7c9d
Commit message:
Updated wait_ms() to thread_sleep_for() for Mbed OS 6+

Changed in this revision

Drivers/BSP/STM32469I-Discovery/stm32469i_discovery.c Show annotated file Show diff for this revision Revisions of this file
Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_lcd.c Show annotated file Show diff for this revision Revisions of this file
Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sdram.c Show annotated file Show diff for this revision Revisions of this file
diff -r 3cdfcc4f7c9d -r 27609b3a44ed Drivers/BSP/STM32469I-Discovery/stm32469i_discovery.c
--- a/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery.c	Wed Feb 28 13:17:15 2018 +0100
+++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery.c	Wed Jun 09 12:45:23 2021 +0000
@@ -783,7 +783,8 @@
 void AUDIO_IO_Delay(uint32_t Delay)
 {
   //HAL_Delay(Delay);
-  wait_ms(Delay);
+  //wait_ms(Delay);
+  thread_sleep_for(Delay);
 }
 
 /******************************** LINK I2C EEPROM *****************************/
@@ -903,7 +904,8 @@
 void TS_IO_Delay(uint32_t Delay)
 {
   //HAL_Delay(Delay);
-  wait_ms(Delay);
+  //wait_ms(Delay);
+  thread_sleep_for(Delay);
 }
 
 /**************************** LINK OTM8009A (Display driver) ******************/
@@ -914,7 +916,8 @@
 void OTM8009A_IO_Delay(uint32_t Delay)
 {
   //HAL_Delay(Delay);
-  wait_ms(Delay);
+  //wait_ms(Delay);
+  thread_sleep_for(Delay);
 }
 
 /**
diff -r 3cdfcc4f7c9d -r 27609b3a44ed Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_lcd.c
--- a/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_lcd.c	Wed Feb 28 13:17:15 2018 +0100
+++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_lcd.c	Wed Jun 09 12:45:23 2021 +0000
@@ -418,14 +418,16 @@
     HAL_GPIO_WritePin(GPIOH, GPIO_PIN_7, GPIO_PIN_RESET);
 
     //HAL_Delay(20); /* wait 20 ms */
-    wait_ms(20);
+    //wait_ms(20);
+    thread_sleep_for(10);
   
     /* Desactivate XRES */
     HAL_GPIO_WritePin(GPIOH, GPIO_PIN_7, GPIO_PIN_SET);
     
     /* Wait for 10ms after releasing XRES before sending commands */
     //HAL_Delay(10);
-    wait_ms(10);    
+    //wait_ms(10);    
+    thread_sleep_for(10);
 #else
   
 #endif /* USE_STM32469I_DISCO_REVA == 0 */
diff -r 3cdfcc4f7c9d -r 27609b3a44ed Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sdram.c
--- a/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sdram.c	Wed Feb 28 13:17:15 2018 +0100
+++ b/Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_sdram.c	Wed Jun 09 12:45:23 2021 +0000
@@ -236,7 +236,8 @@
   /* Step 2: Insert 100 us minimum delay */
   /* Inserted delay is equal to 1 ms due to systick time base unit (ms) */
   //HAL_Delay(1);
-  wait_ms(1);
+  //wait_ms(1);
+  thread_sleep_for(1);
 
   /* Step 3: Configure a PALL (precharge all) command */
   Command.CommandMode            = FMC_SDRAM_CMD_PALL;