![]() |
Prusa Slicer 2.6.0
|
#include <string.h>#include <stdio.h>#include <stdlib.h>#include "avrdude.h"#include "libavrdude.h"
Include dependency graph for pindefs.c:Go to the source code of this file.
Functions | |
| void | pin_set_value (struct pindef_t *const pindef, const int pin, const bool inverse) |
| void | pin_clear_all (struct pindef_t *const pindef) |
| static int | pin_fill_old_pinno (const struct pindef_t *const pindef, unsigned int *const pinno) |
| static int | pin_fill_old_pinlist (const struct pindef_t *const pindef, unsigned int *const pinno) |
| int | pgm_fill_old_pins (struct programmer_t *const pgm) |
| const char * | pinmask_to_str (const pinmask_t *const pinmask) |
| int | pins_check (const struct programmer_t *const pgm, const struct pin_checklist_t *const checklist, const int size, const bool output) |
| const char * | pins_to_str (const struct pindef_t *const pindef) |
| const char * | avr_pin_name (int pinname) |
| const char * avr_pin_name | ( | int | pinname | ) |
Returns the name of the pin as string.
| pinname | the pinname which we want as string. |
References PIN_AVR_MISO, PIN_AVR_MOSI, PIN_AVR_RESET, PIN_AVR_SCK, PIN_LED_ERR, PIN_LED_PGM, PIN_LED_RDY, PIN_LED_VFY, PPI_AVR_BUFF, and PPI_AVR_VCC.
Referenced by avr_display(), and pins_check().
Here is the caller graph for this function:| int pgm_fill_old_pins | ( | struct programmer_t *const | pgm | ) |
Convert for given programmer new pin definitions to old pin definitions.
| [in,out] | pgm | programmer whose pins shall be converted. |
References pgm, programmer_t::pin, PIN_AVR_MISO, PIN_AVR_MOSI, PIN_AVR_RESET, PIN_AVR_SCK, pin_fill_old_pinlist(), pin_fill_old_pinno(), PIN_LED_ERR, PIN_LED_PGM, PIN_LED_RDY, PIN_LED_VFY, programmer_t::pinno, PPI_AVR_BUFF, and PPI_AVR_VCC.
Referenced by buspirate_bb_initpgm(), and serbb_initpgm().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Convert new pin definition to old pinlist, does not support mixed inverted/non-inverted pin
| [in] | pindef | new pin definition structure |
| [out] | pinno | old pin definition integer |
References avrdude_message(), pindef_t::inverse, pindef_t::mask, MSG_INFO, PIN_FIELD_SIZE, PIN_INVERSE, and PIN_MASK.
Referenced by pgm_fill_old_pins().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Convert new pin definition to old pin number
| [in] | pindef | new pin definition structure |
| [out] | pinno | old pin definition integer |
References avrdude_message(), pindef_t::inverse, pindef_t::mask, MSG_INFO, PIN_FIELD_ELEMENT_SIZE, PIN_INVERSE, and PIN_MAX.
Referenced by pgm_fill_old_pins().
Here is the call graph for this function:
Here is the caller graph for this function:Adds a pin in the pin definition as normal or inverse pin.
| [out] | pindef | pin definition to update |
| [in] | pin | number of pin [0..PIN_MAX] |
| [in] | inverse | inverse (true) or normal (false) pin |
References inverse(), pindef_t::inverse, pindef_t::mask, and PIN_FIELD_ELEMENT_SIZE.
Referenced by assign_pin(), and assign_pin_list().
Here is the call graph for this function:
Here is the caller graph for this function:This function returns a string representation of pins in the mask eg. 1,3,5-7,9,12 Another execution of this function will overwrite the previous result in the static buffer. Consecutive pin number are representated as start-end.
| [in] | pinmask | the pin mask for which we want the string representation |
References PIN_FIELD_ELEMENT_SIZE, PIN_MAX, and PIN_MIN.
Referenced by pins_check().
Here is the caller graph for this function:| int pins_check | ( | const struct programmer_t *const | pgm, |
| const struct pin_checklist_t *const | checklist, | ||
| const int | size, | ||
| const bool | output | ||
| ) |
This function checks all pin of pgm against the constraints given in the checklist. It checks if
In case of any error it report the wrong function and the pin numbers. For verbose >= 2 it also reports the possible correct values. For verbose >=3 it shows also which pins were ok.
| [in] | pgm | the programmer to check |
| [in] | checklist | the constraint for the pins |
| [in] | size | the number of entries in checklist |
References avr_pin_name(), avrdude_message(), inverse(), pindef_t::inverse, pin_checklist_t::mandatory, pindef_t::mask, MSG_DEBUG, MSG_INFO, MSG_NOTICE2, N_PINS, pgm, programmer_t::pin, PIN_FIELD_SIZE, pinmask_to_str(), progname, segment(), and pin_checklist_t::valid_pins.
Here is the call graph for this function:This function returns a string representation of defined pins eg. ~1,2,~4,~5,7 Another execution of this function will overwrite the previous result in the static buffer.
| [in] | pindef | the pin definition for which we want the string representation |
References pindef_t::inverse, pindef_t::mask, PIN_FIELD_ELEMENT_SIZE, PIN_MAX, and PIN_MIN.
Referenced by pgm_display_generic_mask().
Here is the caller graph for this function: