mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 08:07:37 +00:00
Formatted code (#1007)
* Updated style * Updated files * fixed new line * Updated spacing * File fix WIP * Updated to clang 13 * updated comment style * Removed old comment code
This commit is contained in:
@@ -32,70 +32,69 @@
|
||||
namespace jtag {
|
||||
|
||||
class JTAG {
|
||||
public:
|
||||
constexpr JTAG(
|
||||
Target& target
|
||||
) : target(target)
|
||||
{
|
||||
}
|
||||
public:
|
||||
constexpr JTAG(
|
||||
Target& target)
|
||||
: target(target) {
|
||||
}
|
||||
|
||||
void reset() {
|
||||
/* ??? -> Test-Logic-Reset */
|
||||
for(size_t i=0; i<8; i++) {
|
||||
target.clock(1, 0);
|
||||
}
|
||||
}
|
||||
void reset() {
|
||||
/* ??? -> Test-Logic-Reset */
|
||||
for (size_t i = 0; i < 8; i++) {
|
||||
target.clock(1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void run_test_idle() {
|
||||
/* Test-Logic-Reset -> Run-Test/Idle */
|
||||
target.clock(0, 0);
|
||||
}
|
||||
void run_test_idle() {
|
||||
/* Test-Logic-Reset -> Run-Test/Idle */
|
||||
target.clock(0, 0);
|
||||
}
|
||||
|
||||
void runtest_tck(const size_t count) {
|
||||
target.delay(count);
|
||||
}
|
||||
void runtest_tck(const size_t count) {
|
||||
target.delay(count);
|
||||
}
|
||||
|
||||
uint32_t shift_ir(const size_t count, const uint32_t value) {
|
||||
/* Run-Test/Idle -> Select-DR-Scan -> Select-IR-Scan */
|
||||
target.clock(1, 0);
|
||||
target.clock(1, 0);
|
||||
/* Scan -> Capture -> Shift */
|
||||
target.clock(0, 0);
|
||||
target.clock(0, 0);
|
||||
uint32_t shift_ir(const size_t count, const uint32_t value) {
|
||||
/* Run-Test/Idle -> Select-DR-Scan -> Select-IR-Scan */
|
||||
target.clock(1, 0);
|
||||
target.clock(1, 0);
|
||||
/* Scan -> Capture -> Shift */
|
||||
target.clock(0, 0);
|
||||
target.clock(0, 0);
|
||||
|
||||
const auto result = shift(count, value);
|
||||
const auto result = shift(count, value);
|
||||
|
||||
/* Exit1 -> Update */
|
||||
target.clock(1, 0);
|
||||
/* Update -> Run-Test/Idle */
|
||||
target.clock(0, 0);
|
||||
/* Exit1 -> Update */
|
||||
target.clock(1, 0);
|
||||
/* Update -> Run-Test/Idle */
|
||||
target.clock(0, 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
uint32_t shift_dr(const size_t count, const uint32_t value) {
|
||||
/* Run-Test/Idle -> Select-DR-Scan */
|
||||
target.clock(1, 0);
|
||||
/* Scan -> Capture -> Shift */
|
||||
target.clock(0, 0);
|
||||
target.clock(0, 0);
|
||||
uint32_t shift_dr(const size_t count, const uint32_t value) {
|
||||
/* Run-Test/Idle -> Select-DR-Scan */
|
||||
target.clock(1, 0);
|
||||
/* Scan -> Capture -> Shift */
|
||||
target.clock(0, 0);
|
||||
target.clock(0, 0);
|
||||
|
||||
const auto result = shift(count, value);
|
||||
const auto result = shift(count, value);
|
||||
|
||||
/* Exit1 -> Update */
|
||||
target.clock(1, 0);
|
||||
/* Update -> Run-Test/Idle */
|
||||
target.clock(0, 0);
|
||||
/* Exit1 -> Update */
|
||||
target.clock(1, 0);
|
||||
/* Update -> Run-Test/Idle */
|
||||
target.clock(0, 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
Target& target;
|
||||
private:
|
||||
Target& target;
|
||||
|
||||
uint32_t shift(const size_t count, uint32_t value);
|
||||
uint32_t shift(const size_t count, uint32_t value);
|
||||
};
|
||||
|
||||
} /* namespace jtag */
|
||||
|
||||
#endif/*__JTAG_H__*/
|
||||
#endif /*__JTAG_H__*/
|
||||
|
Reference in New Issue
Block a user