![]() |
Prusa Slicer 2.6.0
|
#include "ac_cfg.h"#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <time.h>#include <sys/time.h>#include "avrdude.h"#include "libavrdude.h"#include "tpi.h"
Include dependency graph for avr.c:Go to the source code of this file.
Macros | |
| #define | DEBUG 0 |
Functions | |
| int | avr_tpi_poll_nvmbsy (PROGRAMMER *pgm) |
| int | avr_tpi_chip_erase (PROGRAMMER *pgm, AVRPART *p) |
| int | avr_tpi_program_enable (PROGRAMMER *pgm, AVRPART *p, unsigned char guard_time) |
| static int | avr_tpi_setup_rw (PROGRAMMER *pgm, AVRMEM *mem, unsigned long addr, unsigned char nvmcmd) |
| int | avr_read_byte_default (PROGRAMMER *pgm, AVRPART *p, AVRMEM *mem, unsigned long addr, unsigned char *value) |
| int | avr_mem_hiaddr (AVRMEM *mem) |
| int | avr_read (PROGRAMMER *pgm, AVRPART *p, char *memtype, AVRPART *v) |
| int | avr_write_page (PROGRAMMER *pgm, AVRPART *p, AVRMEM *mem, unsigned long addr) |
| int | avr_write_byte_default (PROGRAMMER *pgm, AVRPART *p, AVRMEM *mem, unsigned long addr, unsigned char data) |
| int | avr_write_byte (PROGRAMMER *pgm, AVRPART *p, AVRMEM *mem, unsigned long addr, unsigned char data) |
| int | avr_write (PROGRAMMER *pgm, AVRPART *p, char *memtype, int size, int auto_erase) |
| int | avr_signature (PROGRAMMER *pgm, AVRPART *p) |
| int | avr_verify (AVRPART *p, AVRPART *v, char *memtype, int size) |
| int | avr_get_cycle_count (PROGRAMMER *pgm, AVRPART *p, int *cycles) |
| int | avr_put_cycle_count (PROGRAMMER *pgm, AVRPART *p, int cycles) |
| int | avr_chip_erase (PROGRAMMER *pgm, AVRPART *p) |
| void | report_progress (int completed, int total, char *hdr) |
Variables | |
| FP_UpdateProgress | update_progress |
| #define DEBUG 0 |
| int avr_chip_erase | ( | PROGRAMMER * | pgm, |
| AVRPART * | p | ||
| ) |
References programmer_t::chip_erase, and pgm.
Referenced by avrdude_main().
Here is the caller graph for this function:| int avr_get_cycle_count | ( | PROGRAMMER * | pgm, |
| AVRPART * | p, | ||
| int * | cycles | ||
| ) |
References avr_locate_mem(), avrdude_message(), MSG_INFO, pgm, progname, and programmer_t::read_byte.
Here is the call graph for this function:| int avr_mem_hiaddr | ( | AVRMEM * | mem | ) |
References avrmem::buf, and avrmem::size.
Referenced by avr_read(), and fileio().
Here is the caller graph for this function:| int avr_put_cycle_count | ( | PROGRAMMER * | pgm, |
| AVRPART * | p, | ||
| int | cycles | ||
| ) |
References avr_locate_mem(), avr_write_byte(), avrdude_message(), MSG_INFO, pgm, and progname.
Here is the call graph for this function:| int avr_read | ( | PROGRAMMER * | pgm, |
| AVRPART * | p, | ||
| char * | memtype, | ||
| AVRPART * | v | ||
| ) |
References avr_locate_mem(), avr_mem_hiaddr(), avr_tpi_poll_nvmbsy(), avr_tpi_setup_rw(), avrdude_message(), AVRPART_HAS_TPI, avrmem::buf, cmd, programmer_t::cmd_tpi, avrpart::desc, avrmem::desc, avrpart::flags, MSG_DEBUG, MSG_INFO, avrmem::page_size, programmer_t::paged_load, pgm, progname, programmer_t::read_byte, programmer_t::read_sig_bytes, report_progress(), RETURN_IF_CANCEL, avrmem::size, strcasecmp, TAG_ALLOCATED, avrmem::tags, TPI_CMD_SLD_PI, and TPI_NVMCMD_NO_OPERATION.
Referenced by avr_signature(), and do_op().
Here is the call graph for this function:
Here is the caller graph for this function:| int avr_read_byte_default | ( | PROGRAMMER * | pgm, |
| AVRPART * | p, | ||
| AVRMEM * | mem, | ||
| unsigned long | addr, | ||
| unsigned char * | value | ||
| ) |
References avr_get_output(), AVR_OP_LOAD_EXT_ADDR, AVR_OP_READ, AVR_OP_READ_HI, AVR_OP_READ_LO, avr_set_addr(), avr_set_bits(), avr_tpi_poll_nvmbsy(), avr_tpi_setup_rw(), avrdude_message(), AVRPART_HAS_TPI, programmer_t::cmd, cmd, programmer_t::cmd_tpi, avrmem::desc, programmer_t::err_led, avrpart::flags, MSG_INFO, OFF, ON, avrmem::op, pgm, programmer_t::pgm_led, progname, TPI_CMD_SLD, TPI_NVMCMD_NO_OPERATION, and programmer_t::type.
Referenced by avr910_read_byte(), buspirate_bb_initpgm(), buspirate_initpgm(), serbb_initpgm(), and stk500_initpgm().
Here is the call graph for this function:
Here is the caller graph for this function:| int avr_signature | ( | PROGRAMMER * | pgm, |
| AVRPART * | p | ||
| ) |
References avr_read(), avrdude_message(), avrpart::desc, MSG_INFO, pgm, progname, and report_progress().
Referenced by avrdude_main(), and cmd_sig().
Here is the call graph for this function:
Here is the caller graph for this function:| int avr_tpi_chip_erase | ( | PROGRAMMER * | pgm, |
| AVRPART * | p | ||
| ) |
References __func__, avr_locate_mem(), avr_tpi_poll_nvmbsy(), avrdude_message(), AVRPART_HAS_TPI, cmd, programmer_t::cmd_tpi, avrpart::desc, avrpart::flags, MSG_INFO, OFF, avrmem::offset, ON, pgm, programmer_t::pgm_led, TPI_CMD_SOUT, TPI_CMD_SST, TPI_CMD_SSTPR, TPI_IOREG_NVMCMD, TPI_NVMCMD_CHIP_ERASE, and TPI_SIO_ADDR.
Here is the call graph for this function:| int avr_tpi_poll_nvmbsy | ( | PROGRAMMER * | pgm | ) |
References cmd, programmer_t::cmd_tpi, pgm, TPI_CMD_SIN, TPI_IOREG_NVMCSR, TPI_IOREG_NVMCSR_NVMBSY, TPI_SIO_ADDR, and void().
Referenced by avr_read(), avr_read_byte_default(), avr_tpi_chip_erase(), avr_write(), avr_write_byte_default(), and bitbang_chip_erase().
Here is the call graph for this function:
Here is the caller graph for this function:| int avr_tpi_program_enable | ( | PROGRAMMER * | pgm, |
| AVRPART * | p, | ||
| unsigned char | guard_time | ||
| ) |
References __func__, avrdude_message(), AVRPART_HAS_TPI, cmd, programmer_t::cmd_tpi, avrpart::flags, MSG_INFO, pgm, TPI_CMD_SLDCS, TPI_CMD_SSTCS, TPI_IDENT_CODE, TPI_REG_TPIIR, TPI_REG_TPIPCR, TPI_REG_TPISR, TPI_REG_TPISR_NVMEN, and tpi_skey_cmd.
Here is the call graph for this function:
|
static |
References cmd, programmer_t::cmd_tpi, avrmem::offset, pgm, TPI_CMD_SOUT, TPI_CMD_SSTPR, TPI_IOREG_NVMCMD, and TPI_SIO_ADDR.
Referenced by avr_read(), avr_read_byte_default(), avr_write(), and avr_write_byte_default().
Here is the caller graph for this function:References avr_locate_mem(), avrdude_message(), avrpart::desc, MSG_INFO, progbuf, progname, RETURN_IF_CANCEL, and TAG_ALLOCATED.
Referenced by do_op().
Here is the call graph for this function:
Here is the caller graph for this function:| int avr_write | ( | PROGRAMMER * | pgm, |
| AVRPART * | p, | ||
| char * | memtype, | ||
| int | size, | ||
| int | auto_erase | ||
| ) |
References avr_locate_mem(), avr_tpi_poll_nvmbsy(), avr_tpi_setup_rw(), avr_write_byte(), avr_write_page(), avrdude_message(), AVRPART_HAS_TPI, avrmem::buf, cmd, programmer_t::cmd_tpi, avrpart::desc, programmer_t::err_led, avrpart::flags, MSG_DEBUG, MSG_INFO, OFF, ON, programmer_t::page_erase, avrmem::page_size, avrmem::paged, programmer_t::paged_write, pgm, progbuf, progname, report_progress(), RETURN_IF_CANCEL, avrmem::size, TAG_ALLOCATED, avrmem::tags, TPI_CMD_SST_PI, TPI_NVMCMD_WORD_WRITE, and programmer_t::write_setup.
Referenced by do_op().
Here is the call graph for this function:
Here is the caller graph for this function:| int avr_write_byte | ( | PROGRAMMER * | pgm, |
| AVRPART * | p, | ||
| AVRMEM * | mem, | ||
| unsigned long | addr, | ||
| unsigned char | data | ||
| ) |
References avrmem::desc, pgm, safemode_memfuses(), and programmer_t::write_byte.
Referenced by avr_put_cycle_count(), avr_write(), cmd_write(), and safemode_writefuse().
Here is the call graph for this function:
Here is the caller graph for this function:| int avr_write_byte_default | ( | PROGRAMMER * | pgm, |
| AVRPART * | p, | ||
| AVRMEM * | mem, | ||
| unsigned long | addr, | ||
| unsigned char | data | ||
| ) |
References AVR_OP_LOADPAGE_HI, AVR_OP_LOADPAGE_LO, AVR_OP_WRITE, AVR_OP_WRITE_HI, AVR_OP_WRITE_LO, avr_set_addr(), avr_set_bits(), avr_set_input(), avr_tpi_poll_nvmbsy(), avr_tpi_setup_rw(), avrdude_message(), AVRPART_HAS_TPI, AVRPART_IS_AT90S1200, programmer_t::cmd, cmd, programmer_t::cmd_tpi, avrpart::desc, avrmem::desc, programmer_t::err_led, avrpart::flags, gettimeofday(), programmer_t::initialize, avrmem::max_write_delay, MSG_INFO, OFF, avrmem::offset, ON, avrmem::op, avrmem::paged, pgm, programmer_t::pgm_led, programmer_t::pinno, programmer_t::powerdown, PPI_AVR_VCC, progname, avrmem::pwroff_after_write, programmer_t::read_byte, avrmem::readback, TPI_CMD_SST, TPI_CMD_SST_PI, TPI_NVMCMD_SECTION_ERASE, TPI_NVMCMD_WORD_WRITE, programmer_t::type, and usleep().
Referenced by avr910_write_byte(), buspirate_bb_initpgm(), buspirate_initpgm(), serbb_initpgm(), and stk500_initpgm().
Here is the call graph for this function:
Here is the caller graph for this function:| int avr_write_page | ( | PROGRAMMER * | pgm, |
| AVRPART * | p, | ||
| AVRMEM * | mem, | ||
| unsigned long | addr | ||
| ) |
References AVR_OP_LOAD_EXT_ADDR, AVR_OP_LOADPAGE_LO, AVR_OP_READ_LO, AVR_OP_WRITEPAGE, avr_set_addr(), avr_set_bits(), avrdude_message(), programmer_t::cmd, cmd, avrmem::desc, programmer_t::err_led, avrmem::max_write_delay, MSG_INFO, OFF, ON, avrmem::op, pgm, programmer_t::pgm_led, progname, programmer_t::type, and usleep().
Referenced by avr_write(), and buspirate_paged_write().
Here is the call graph for this function:
Here is the caller graph for this function:| void report_progress | ( | int | completed, |
| int | total, | ||
| char * | hdr | ||
| ) |
References gettimeofday(), and update_progress.
Referenced by avr_read(), avr_signature(), avr_write(), and do_op().
Here is the call graph for this function:
Here is the caller graph for this function:| FP_UpdateProgress update_progress |
Referenced by avrdude_main(), and report_progress().