Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
pgm_type.c File Reference
#include "ac_cfg.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "avrdude.h"
#include "libavrdude.h"
#include "arduino.h"
#include "avr910.h"
#include "buspirate.h"
#include "butterfly.h"
#include "linuxgpio.h"
#include "pickit2.h"
#include "ppi.h"
#include "serbb.h"
#include "stk500.h"
#include "stk500generic.h"
#include "stk500v2.h"
#include "wiring.h"
+ Include dependency graph for pgm_type.c:

Go to the source code of this file.

Functions

const PROGRAMMER_TYPElocate_programmer_type (const char *id)
 
void walk_programmer_types (walk_programmer_types_cb cb, void *cookie)
 

Variables

const PROGRAMMER_TYPE programmers_types []
 

Function Documentation

◆ locate_programmer_type()

const PROGRAMMER_TYPE * locate_programmer_type ( const char *  id)
100{
101 const PROGRAMMER_TYPE * p = NULL;
102 int i;
103 int found;
104
105 found = 0;
106
107 for (i = 0; i < sizeof(programmers_types)/sizeof(programmers_types[0]) && !found; i++) {
108 p = &(programmers_types[i]);
109 if (strcasecmp(id, p->id) == 0)
110 found = 1;
111 }
112
113 if (found)
114 return p;
115
116 return NULL;
117}
const PROGRAMMER_TYPE programmers_types[]
Definition pgm_type.c:55
Definition libavrdude.h:897
const char *const id
Definition libavrdude.h:898
#define strcasecmp
Definition unistd.h:52

References programmer_type_t::id, programmers_types, and strcasecmp.

Referenced by yyparse().

+ Here is the caller graph for this function:

◆ walk_programmer_types()

void walk_programmer_types ( walk_programmer_types_cb  cb,
void cookie 
)
143{
144 const PROGRAMMER_TYPE * p;
145 int i;
146
147 for (i = 0; i < sizeof(programmers_types)/sizeof(programmers_types[0]); i++) {
148 p = &(programmers_types[i]);
149 cb(p->id, p->desc, cookie);
150 }
151}
const char *const desc
Definition libavrdude.h:900

References programmer_type_t::desc, programmer_type_t::id, and programmers_types.

Referenced by list_programmer_types().

+ Here is the caller graph for this function:

Variable Documentation

◆ programmers_types

const PROGRAMMER_TYPE programmers_types[]