Declare useful CMDBIT/part functions of developer_opts.c in libavrdude.h

This commit is contained in:
Stefan Rueger 2022-07-26 23:55:42 +01:00
parent 78754b8ccc
commit 62dcc2e6e8
3 changed files with 11 additions and 9 deletions

View File

@ -160,7 +160,7 @@ char *opcode2str(OPCODE *op, int opnum, int detailed) {
// return 0 if op code would encode (essentially) the same SPI command
int opcodecmp(OPCODE *op1, OPCODE *op2, int opnum) {
static int opcodecmp(OPCODE *op1, OPCODE *op2, int opnum) {
char *opstr1, *opstr2, *p;
int cmp;

View File

@ -19,14 +19,6 @@
#ifndef developer_opts_h
#define developer_opts_h
char cmdbitchar(CMDBIT cb);
char *cmdbitstr(CMDBIT cb);
const char *opcodename(int opnum);
char *opcode2str(OPCODE *op, int opnum, int detailed);
int opcodecmp(OPCODE *op1, OPCODE *op2, int opnum);
int intlog2(unsigned int n);
int avr_set_addr_mem(AVRMEM *mem, int opnum, unsigned char *cmd, unsigned long addr);
int part_match(const char *pattern, const char *string);
void dev_output_part_defs(char *partdesc);
#endif

View File

@ -320,14 +320,22 @@ typedef struct avrmem_alias {
extern "C" {
#endif
int intlog2(unsigned int n);
/* Functions for OPCODE structures */
OPCODE * avr_new_opcode(void);
void avr_free_opcode(OPCODE * op);
int avr_set_bits(OPCODE * op, unsigned char * cmd);
int avr_set_addr(OPCODE * op, unsigned char * cmd, unsigned long addr);
int avr_set_addr_mem(AVRMEM *mem, int opnum, unsigned char *cmd, unsigned long addr);
int avr_set_input(OPCODE * op, unsigned char * cmd, unsigned char data);
int avr_get_output(OPCODE * op, unsigned char * res, unsigned char * data);
int avr_get_output_index(OPCODE * op);
char cmdbitchar(CMDBIT cb);
char *cmdbitstr(CMDBIT cb);
const char *opcodename(int opnum);
char *opcode2str(OPCODE *op, int opnum, int detailed);
/* Functions for AVRMEM structures */
AVRMEM * avr_new_memtype(void);
@ -359,6 +367,8 @@ typedef void (*walk_avrparts_cb)(const char *name, const char *desc,
void walk_avrparts(LISTID avrparts, walk_avrparts_cb cb, void *cookie);
void sort_avrparts(LISTID avrparts);
int part_match(const char *pattern, const char *string);
int compare_memory_masked(AVRMEM * m, uint8_t buf1, uint8_t buf2);
#ifdef __cplusplus