blob: efeee51388c73a8d53ce479b9c48ab2c027aee65 [file] [log] [blame]
Zane Shelleye90b85d2021-12-17 17:24:49 -06001//------------------------------------------------------------------------------
2// IMPORTANT:
3// This file will ONLY be built in CI test and should be used for any functions
4// that require addition support to simulate in CI test. Any functions that will
5// work out-of-the-box in CI test with use of the fake device tree should be put
6// in `pdbg.cpp`.
7//------------------------------------------------------------------------------
8
9#include <assert.h>
10
11#include <util/pdbg.hpp>
12#include <util/trace.hpp>
13
14//------------------------------------------------------------------------------
15
16// Using this to fake the value returned from the simulation-only version of
17// util::pdbg::queryLpcTimeout().
18bool g_lpcTimeout = false;
19
20namespace util
21{
22namespace pdbg
23{
24
25// This is the simulated version of this function.
26bool queryLpcTimeout(pdbg_target* target)
27{
28 // Must be a processor target.
29 assert(TYPE_PROC == getTrgtType(target));
30
31 // Instead of the SBE chip-op, use the faked value.
32 return g_lpcTimeout;
33}
34
35} // namespace pdbg
36} // namespace util