RUI3 (RAK Unified Interface 3) - RAK4631

Macros

#define delay   udrv_app_delay_ms
 
#define delayMicroseconds   udrv_app_delay_us
 

Functions

unsigned long millis ()
 
unsigned long micros ()
 
unsigned long systick_micros ()
 

Detailed Description

Macro Definition Documentation

◆ delay

#define delay   udrv_app_delay_ms
Description
Pauses the program for the amount of time (in milliseconds) specified as parameter. (There are 1000 milliseconds in a second.)
Syntax
delay(ms);
Parameters
msthe number of milliseconds to pause
Example
unsigned long myTime;

void setup() {
  Serial.begin(115200);
}
void loop() {
  Serial.print("Time: ");
  myTime = millis();

  Serial.println(myTime); // prints time since program started
  delay(1000);          // wait a second so as not to send massive amounts of data
}
Examples:
BLE_Beacon/src/app.cpp, BLE_Beacon_Custom_Payload/src/app.cpp, BLE_Configuration/src/app.cpp, BLE_Custom_Service/src/app.cpp, BLE_Uart/src/app.cpp, and System_FS/src/app.cpp.

◆ delayMicroseconds

#define delayMicroseconds   udrv_app_delay_us
Description
Pauses the program for the amount of time (in microseconds) specified by the parameter. There are a thousand microseconds in a millisecond and a million microseconds in a second
Syntax
delayMicroseconds(us);
Parameters
usthe number of microseconds to pause
Example
unsigned long time;

void setup() {
  Serial.begin(115200);
}
void loop() {
  Serial.print("Time: ");
  time = micros();

  Serial.println(time); //prints time since program started
  delayMircoseconds(1000);          // wait a second so as not to send massive amounts of data
}

Function Documentation

◆ millis()

unsigned long millis ( )
Description
Returns the number of milliseconds passed since the device began running the current program
Syntax
micros();
Returns
Number of milliseconds passed since the program started(Type: unsigned long)
Example
unsigned long myTime;

void setup() {
  Serial.begin(115200);
}
void loop() {
  Serial.print("Time: ");
  myTime = millis();

  Serial.println(myTime); // prints time since program started
  delay(1000);          // wait a second so as not to send massive amounts of data
}

◆ micros()

unsigned long micros ( )
Description
Returns the number of microseconds since the device began running the current program
Syntax
millis();
Returns
the number of microseconds since the device began running the current program(Type: unsigned long)
Example
unsigned long time;

void setup() {
  Serial.begin(115200);
}
void loop() {
  Serial.print("Time: ");
  time = micros();

  Serial.println(time); //prints time since program started
  delayMircoseconds(1000);          // wait a second so as not to send massive amounts of data
}

◆ systick_micros()

unsigned long systick_micros ( )