Description
u16_get_listen_duration_ms()
returns the time [ms] that the bootloader waits for bootloader protocol messages on the CAN bus (MCAN0) at start up.
Syntax
u16_get_listen_duration_ms();
Parameters
none
Returns
uint16_t – the listing time in milliseconds.
Example Code
This example shows how to read the ‘listen duration’ value of the bootloader settings.
void setup()
{
Serial.begin();
while (!Serial)
{
yield(); // wait for PC CAN2SER-monitor to open
}
Serial.println("Current bootloader settings:");
Serial.print(" - listen duration: ");
Serial.println( String( BOOTLOADER_SETTING.u16_get_listen_duration_ms() ) + " ms");
}
void loop ()
{
}
Notes and Warnings
This method returns the RAM copy value of the bootloader settings which are copied into the BOOTLOADER_SETTING object during its instantiation at system start (variant.cpp).
See also
u8_store_bootloader_settings()
u8_set_listen_duration_ms()
SAMC21_CAN