21
Advanced LAN Bypass User Manual
Chapter 3
L
IBLBPCU
-ADVANCED
LAN BYPASS
LIBRARY
#define lbp_is_wdt_ext_edge(x) ((x & 0x80) ==
0x00) //External WDT is enabled in Edge mode#define
lbp_is_wdt_ext_level(x) ((x & 0x80) == 0x80) //External
WDT is enabled in Level mode
#define lbp_is_wdt_ext_slave(x) ((x & 0x06) ==
0x04) //External WDT is enabled in Slave mode
#define lbp_is_wdt_toggle_en(x) ((x & 0x08) ==
0x08) //Toggle pin WDT is enabled as On Demand mode
#define lbp_is_wdt_toggle_armed(x) ((x & 0x10) ==
0x10) //Toggle pin WDT is armed
#define lbp_is_wdt_toggle_rearm_en(x) ((x & 0x20) ==
0x20) //Toggle pin WDT is auto-rearmed
#define lbp_is_wdt_toggle_en_default(x) ((x & 0x40) ==
0x40) //Toggle ping WDT is permanentlly enabled and automati-
cally armed by default (e.g. upon firmware starts up)
/* Macros for Reset Monitoring State. */
#define lbp_is_rmt_running(x) ((x & 0x01) == 0x01)
#define RM_ignore(x) ((x & 0x01)==0x00)
#define SRM_NA(x) ((x & 0x06)==0x00)
#define SRM_by_BIOS(x) ((x & 0x06)==0x02)
#define SRM_by_LBPCU(x) ((x & 0x06)==0x04)
#define SRM_by_timeout(x) ((x & 0x06)==0x06)
/* Macros for MCU FW upgrade mode */
/* Those macros are used to check firmware upgrade status and the
returned value to each macro is either TRUE or FALSE */
#define lbp_is_in_ap(x) ((x & 0x10) ==
0x10) //FW is running in application model, not in upgrade mode
#define lbp_is_in_bootloader(x) ((x & 0x20) ==
0x20) //FW is running in upgrade mode
#define lbp_is_bl_idle(x) ((x & 0x2f) ==
0x20) //FW upgrade process is started
#define lbp_is_bl_write_complete(x) ((x & 0x2f) ==
0x21) //FW upgrade is on going
#define lbp_is_bl_flash_error(x) ((x & 0x2f) ==
0x22) //FW upgrade fails
#define lbp_is_bl_wrong_data_format(x) ((x & 0x2f) ==
0x23) //Fail to receive upgrade image file
/* Mode for External watchdog. */
#define EXT_WDT_DISABLE_MODE 0x00
#define EXT_WDT_SLAVE_MODE 0x01 /* Trigger wdt expired ACTION
when wdt_RST is low. */
#define EXT_WDT_MASTER_EDGE_MODE 0x02 /* Drive wdt_RST to low when
Watchdog expires. */
#define EXT_WDT_MASTER_LEVEL_MODE 0x12
/* Mode for Toggle pin wdt. */
#define TOGGLE_ENABLE_PIN1 <<0 //bit 0: Enable (1) or dis-
able (0) toggle pin
#define TOGGLE_ARM_PIN1 <<1 //bit 1: Arm (1) or disarm
(0) toggle pin
#define TOGGLE_AUTO_REARM1 <<2 //bit 2: Automatically rearm
(1) or don't
rearm (0) when watchdog counter expires
Summary of Contents for LAN Bypass
Page 1: ...User Manual Advantech Advanced LAN Bypass...
Page 4: ...Advanced LAN Bypass User Manual iv...
Page 10: ...Advanced LAN Bypass User Manual x...
Page 11: ...Chapter 1 1 ADVANCED LAN BYPASS...
Page 14: ...Advanced LAN Bypass User Manual 4...
Page 15: ...Chapter 2 2 OVERVIEW...
Page 26: ...Advanced LAN Bypass User Manual 16...
Page 27: ...Chapter 3 3 LIBLBPCU ADVANCED LAN BYPASS LIBRARY...
Page 51: ...Chapter 4 4 LBPCU...
Page 79: ...Appendix A A OS limitation...
Page 81: ...71 Advanced LAN Bypass User Manual Appendix A OS limitation...