static void par_display(PROGRAMMER * pgm, const char * p) { char vccpins[64]; char buffpins[64]; if (pgm->pinno[PPI_AVR_VCC]) { snprintf(vccpins, sizeof(vccpins), "%s", pins_to_str(pgm->pinno[PPI_AVR_VCC])); } else { strcpy(vccpins, " (not used)"); } if (pgm->pinno[PPI_AVR_BUFF]) { snprintf(buffpins, sizeof(buffpins), "%s", pins_to_str(pgm->pinno[PPI_AVR_BUFF])); } else { strcpy(buffpins, " (not used)"); } fprintf(stderr, "%s VCC = %s\n" "%s BUFF = %s\n" "%s RESET = %d\n" "%s SCK = %d\n" "%s MOSI = %d\n" "%s MISO = %d\n" "%s ERR LED = %d\n" "%s RDY LED = %d\n" "%s PGM LED = %d\n" "%s VFY LED = %d\n", p, vccpins, p, buffpins, p, pgm->pinno[PIN_AVR_RESET], p, pgm->pinno[PIN_AVR_SCK], p, pgm->pinno[PIN_AVR_MOSI], p, pgm->pinno[PIN_AVR_MISO], p, pgm->pinno[PIN_LED_ERR], p, pgm->pinno[PIN_LED_RDY], p, pgm->pinno[PIN_LED_PGM], p, pgm->pinno[PIN_LED_VFY]); }
void pgm_display_generic_mask(PROGRAMMER * pgm, const char * p, unsigned int show) { if(show & (1<<PPI_AVR_VCC)) fprintf(stderr, "%s VCC = %s\n", p, pins_to_str(pgm->pinno[PPI_AVR_VCC])); if(show & (1<<PPI_AVR_BUFF)) fprintf(stderr, "%s BUFF = %s\n", p, pins_to_str(pgm->pinno[PPI_AVR_BUFF])); if(show & (1<<PIN_AVR_RESET)) fprintf(stderr, "%s RESET = %s\n", p, pin_to_str(pgm->pinno[PIN_AVR_RESET])); if(show & (1<<PIN_AVR_SCK)) fprintf(stderr, "%s SCK = %s\n", p, pin_to_str(pgm->pinno[PIN_AVR_SCK])); if(show & (1<<PIN_AVR_MOSI)) fprintf(stderr, "%s MOSI = %s\n", p, pin_to_str(pgm->pinno[PIN_AVR_MOSI])); if(show & (1<<PIN_AVR_MISO)) fprintf(stderr, "%s MISO = %s\n", p, pin_to_str(pgm->pinno[PIN_AVR_MISO])); if(show & (1<<PIN_LED_ERR)) fprintf(stderr, "%s ERR LED = %s\n", p, pin_to_str(pgm->pinno[PIN_LED_ERR])); if(show & (1<<PIN_LED_RDY)) fprintf(stderr, "%s RDY LED = %s\n", p, pin_to_str(pgm->pinno[PIN_LED_RDY])); if(show & (1<<PIN_LED_PGM)) fprintf(stderr, "%s PGM LED = %s\n", p, pin_to_str(pgm->pinno[PIN_LED_PGM])); if(show & (1<<PIN_LED_VFY)) fprintf(stderr, "%s VFY LED = %s\n", p, pin_to_str(pgm->pinno[PIN_LED_VFY])); }