mirror of https://github.com/ARMmbed/mbed-os.git
parent
cbb15ad9ac
commit
3d128e861b
|
|
@ -127,6 +127,7 @@ void fpga_pwm_period_fill_test(PinName pin, uint32_t period_ms, uint32_t fill_pr
|
|||
break;
|
||||
}
|
||||
|
||||
// wait_us is safe to call as this test disable the IRQs on execution.
|
||||
wait_us(PERIOD_US(period_ms));
|
||||
|
||||
tester.io_metrics_start();
|
||||
|
|
|
|||
|
|
@ -859,7 +859,7 @@ uint32_t smsc9220_get_tx_data_fifo_size(
|
|||
|
||||
enum smsc9220_error_t smsc9220_init(
|
||||
const struct smsc9220_eth_dev_t* dev,
|
||||
void(* wait_ms_function)(int))
|
||||
void(* wait_ms_function)(uint32_t))
|
||||
{
|
||||
uint32_t phyreset = 0;
|
||||
enum smsc9220_error_t error = SMSC9220_ERROR_NONE;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ struct smsc9220_eth_dev_cfg_t {
|
|||
struct smsc9220_eth_dev_data_t {
|
||||
uint32_t state; /*!< Indicates if the SMSC9220 driver
|
||||
is initialized and enabled */
|
||||
void (*wait_ms) (int);/*!< function pointer to system's millisec delay
|
||||
void (*wait_ms) (uint32_t);/*!< function pointer to system's millisec delay
|
||||
function, will be used for delays */
|
||||
uint32_t ongoing_packet_length;/*!< size in bytes of the packet
|
||||
is being sent */
|
||||
|
|
@ -195,7 +195,7 @@ enum smsc9220_fifo_level_irq_pos_t{
|
|||
* \return error code /ref smsc9220_error_t
|
||||
*/
|
||||
enum smsc9220_error_t smsc9220_init(const struct smsc9220_eth_dev_t* dev,
|
||||
void(* wait_ms_function)(int));
|
||||
void(* wait_ms_function)(uint32_t));
|
||||
|
||||
/**
|
||||
* \brief Reads the MAC register.
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#if DEVICE_TRNG
|
||||
#include "drivers/I2C.h"
|
||||
#include "platform/mbed_wait_api.h"
|
||||
#include "rtos/ThisThread.h"
|
||||
|
||||
#define ESP32_I2C_ADDR (0x28<<1)
|
||||
#define RETRY_CNT_MAX (20)
|
||||
|
|
@ -47,7 +48,9 @@ extern "C" void trng_init_esp32(void)
|
|||
GPIOPM3 &= ~0x4000; /* Output mode */
|
||||
|
||||
GPIOP3 |= 0x4000; /* Outputs hi level */
|
||||
ThisThread::sleep_for(5);
|
||||
|
||||
rtos::ThisThread::sleep_for(5);
|
||||
|
||||
GPIOP5 |= 0x0008; /* Outputs hi level */
|
||||
}
|
||||
}
|
||||
|
|
@ -84,7 +87,7 @@ extern "C" int trng_get_bytes_esp32(uint8_t *output, size_t length, size_t *outp
|
|||
}
|
||||
if (ret != 0) {
|
||||
retry_cnt++;
|
||||
ThisThread::sleep_for(100);
|
||||
rtos::ThisThread::sleep_for(100);
|
||||
}
|
||||
}
|
||||
if (retry_cnt >= RETRY_CNT_MAX) {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ nsapi_error_t ONBOARD_TELIT_HE910::soft_power_on()
|
|||
/* keep the power line low for 200 milisecond */
|
||||
press_power_button(200);
|
||||
/* give modem a little time to respond */
|
||||
ThisThread::sleep_for(100);
|
||||
rtos::ThisThread::sleep_for(100);
|
||||
// From Telit_xE910 Global form factor App note: It is mandatory to avoid sending data to the serial ports during the first 200ms of the module start-up.
|
||||
rtos::ThisThread::sleep_for(200);
|
||||
return NSAPI_ERROR_OK;
|
||||
|
|
@ -64,7 +64,7 @@ nsapi_error_t ONBOARD_TELIT_HE910::soft_power_off()
|
|||
* If 3G_ON_OFF pin is kept low for more than a second, a controlled disconnect and shutdown takes
|
||||
* place, Due to the network disconnect, shut-off can take up to 30 seconds. However, we wait for 10
|
||||
* seconds only */
|
||||
ThisThread::sleep_for(10 * 1000);
|
||||
rtos::ThisThread::sleep_for(10 * 1000);
|
||||
return NSAPI_ERROR_OK;
|
||||
}
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ void ONBOARD_TELIT_HE910::press_power_button(int time_ms)
|
|||
|
||||
gpio_init_out_ex(&gpio, MDMPWRON, 1);
|
||||
gpio_write(&gpio, 0);
|
||||
ThisThread::sleep_for(time_ms);
|
||||
rtos::ThisThread::sleep_for(time_ms);
|
||||
gpio_write(&gpio, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue