mirror of https://github.com/rusefi/openblt.git
Refs #459. Added easy integration support for the master/slave gateway add-on module.
git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@627 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
parent
0c03b1f9d1
commit
6345a5433d
|
@ -54,6 +54,10 @@ void BootInit(void)
|
||||||
#if (BOOT_COM_ENABLE > 0)
|
#if (BOOT_COM_ENABLE > 0)
|
||||||
/* initialize the communication module */
|
/* initialize the communication module */
|
||||||
ComInit();
|
ComInit();
|
||||||
|
#endif
|
||||||
|
#if (ADDON_GATEWAY_MOD_ENABLE > 0)
|
||||||
|
/* initialize the gateway module */
|
||||||
|
GatewayInit();
|
||||||
#endif
|
#endif
|
||||||
/* initialize the backdoor entry */
|
/* initialize the backdoor entry */
|
||||||
BackDoorInit();
|
BackDoorInit();
|
||||||
|
@ -78,6 +82,10 @@ void BootTask(void)
|
||||||
#if (BOOT_COM_ENABLE > 0)
|
#if (BOOT_COM_ENABLE > 0)
|
||||||
/* process possibly pending communication data */
|
/* process possibly pending communication data */
|
||||||
ComTask();
|
ComTask();
|
||||||
|
#endif
|
||||||
|
#if (ADDON_GATEWAY_MOD_ENABLE > 0)
|
||||||
|
/* run the gateway */
|
||||||
|
GatewayTask();
|
||||||
#endif
|
#endif
|
||||||
/* control the backdoor */
|
/* control the backdoor */
|
||||||
BackDoorCheck();
|
BackDoorCheck();
|
||||||
|
|
|
@ -63,6 +63,9 @@
|
||||||
#include "backdoor.h" /* backdoor entry module */
|
#include "backdoor.h" /* backdoor entry module */
|
||||||
#include "file.h" /* file system module */
|
#include "file.h" /* file system module */
|
||||||
#include "com.h" /* communication interface */
|
#include "com.h" /* communication interface */
|
||||||
|
#if (ADDON_GATEWAY_MOD_ENABLE > 0)
|
||||||
|
#include "gateway.h" /* gateway add-on module */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
|
|
|
@ -286,7 +286,24 @@ blt_int16u ComGetActiveInterfaceMaxTxLen(void)
|
||||||
****************************************************************************************/
|
****************************************************************************************/
|
||||||
blt_bool ComIsConnected(void)
|
blt_bool ComIsConnected(void)
|
||||||
{
|
{
|
||||||
return XcpIsConnected();
|
blt_bool result = BLT_FALSE;
|
||||||
|
|
||||||
|
/* Is there an active XCP connection? This indicates that the communication interface
|
||||||
|
* is in the connection state.
|
||||||
|
*/
|
||||||
|
if (XcpIsConnected())
|
||||||
|
{
|
||||||
|
result = BLT_TRUE;
|
||||||
|
}
|
||||||
|
#if (ADDON_GATEWAY_MOD_ENABLE > 0)
|
||||||
|
/* Is the gateway active? This indicates an XCP connection with a slave. */
|
||||||
|
if (GatewayIsActive())
|
||||||
|
{
|
||||||
|
result = BLT_TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
/* give the result back to the caller. */
|
||||||
|
return result;
|
||||||
} /*** end of ComIsConnected ***/
|
} /*** end of ComIsConnected ***/
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue