mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-17 11:04:16 +00:00
Replace internal knowledge in jtag3.c by a public API
In certain situations (CRC failure, device locked), that JTAG3 read functions need to return an indication to the caller that it is OK to proceed, and allow erasing the device anyway. Historically, the JTAG3 code passed the respective protocol errors directly (and unexplained) up to the caller, leaving the decision to the caller how to handle the situation. Replace that by a more common return value API. New code should prefer this API instead of any hardcoded return values.
This commit is contained in:
@@ -27,6 +27,16 @@
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint32_t pinmask_t;
|
||||
/*
|
||||
* Values returned by library functions.
|
||||
* Some library functions also return a count, i.e. a positive
|
||||
* number greater than 0.
|
||||
*/
|
||||
#define LIBAVRDUDE_SUCCESS 0
|
||||
#define LIBAVRDUDE_GENERAL_FAILURE (-1)
|
||||
#define LIBAVRDUDE_NOTSUPPORTED (-2) // operation not supported
|
||||
#define LIBAVRDUDE_SOFTFAIL (-3) // returned by avr_signature() if caller
|
||||
// might proceed with chip erase
|
||||
|
||||
/* formerly lists.h */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user