mirror of
https://github.com/ole00/afterburner.git
synced 2024-06-15 15:29:29 +00:00
Compare commits
3 Commits
cf34c1dfee
...
998b1329c8
Author | SHA1 | Date | |
---|---|---|---|
|
998b1329c8 | ||
|
a3e6f11b0f | ||
|
7c0a32cba3 |
|
@ -45,6 +45,7 @@ Arduino usage:
|
|||
|
||||
#define XSVF_DEBUG 0
|
||||
#define XSVF_CALC_CSUM 1
|
||||
#define XSVF_IGNORE_NOMATCH 0
|
||||
|
||||
#define XCOMPLETE 0
|
||||
#define XTDOMASK 1
|
||||
|
@ -372,7 +373,7 @@ static uint32_t xsvf_player_get_next_long(void) {
|
|||
return i;
|
||||
}
|
||||
|
||||
static uint32_t xsvf_player_get_next_bytes(uint8_t* data, uint32_t count) {
|
||||
static void xsvf_player_get_next_bytes(uint8_t* data, uint32_t count) {
|
||||
while(count--) {
|
||||
*data++ = xsvf_player_next_byte();
|
||||
}
|
||||
|
@ -583,12 +584,14 @@ static uint8_t xsvf_jtag_is_tdo_as_expected(uint8_t use_mask)
|
|||
expected &= mask;
|
||||
actual &= mask;
|
||||
}
|
||||
#if XSVF_IGNORE_NOMATCH != 1
|
||||
if (expected != actual) {
|
||||
#if XSVF_DEBUG
|
||||
Serial.println(F("D...NO MATCH!"));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if XSVF_DEBUG
|
||||
|
@ -976,6 +979,12 @@ static void jtag_play_xsvf(jtag_port_t* port)
|
|||
if (xsvf->xcomplete) {
|
||||
Serial.println(F("Q-0,OK"));
|
||||
}
|
||||
//the 3 pins must be low or else the vref might be triggered next time
|
||||
digitalWrite(port->tms, 0);
|
||||
digitalWrite(port->tdi, 0);
|
||||
digitalWrite(port->tck, 0);
|
||||
delay(100);
|
||||
|
||||
// put the jtag port pins into High-Z (vref already is input)
|
||||
pinMode(port->tms, INPUT);
|
||||
pinMode(port->tdi, INPUT);
|
||||
|
|
Loading…
Reference in New Issue
Block a user