blob: 58af138e9637622439517cf345efa96ff189fd4e [file] [log] [blame]
Zane Shelleyf4bd5ff2020-11-05 22:26:04 -06001#pragma once
2
Zane Shelleya0299852020-11-13 13:38:04 -06003#include <libpdbg.h>
4
Zane Shelleyf4bd5ff2020-11-05 22:26:04 -06005#include <hei_main.hpp>
6
7namespace util
8{
9
10namespace pdbg
11{
12
Zane Shelleya0299852020-11-13 13:38:04 -060013/** @return The target associated with the given chip. */
14pdbg_target* getTrgt(const libhei::Chip& i_chip);
15
16/** @return A string representing the given target's devtree path. */
17const char* getPath(pdbg_target* i_trgt);
18
19/** @return A string representing the given chip's devtree path. */
Zane Shelleyf4bd5ff2020-11-05 22:26:04 -060020const char* getPath(const libhei::Chip& i_chip);
21
Zane Shelleya0299852020-11-13 13:38:04 -060022/** @return The absolute position of the given target. */
23uint32_t getChipPos(pdbg_target* i_trgt);
24
25/** @return The absolute position of the given chip. */
26uint32_t getChipPos(const libhei::Chip& i_chip);
27
28/** @return The target type of the given target. */
29uint8_t getTrgtType(pdbg_target* i_trgt);
30
31/** @return The target type of the given chip. */
32uint8_t getTrgtType(const libhei::Chip& i_chip);
33
Zane Shelleyf4bd5ff2020-11-05 22:26:04 -060034} // namespace pdbg
35
36} // namespace util