File: placement.h

package info (click to toggle)
pcb-rnd 3.1.7b-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,108 kB
  • sloc: ansic: 213,400; yacc: 6,241; sh: 4,698; awk: 3,016; makefile: 2,254; lex: 1,166; python: 519; xml: 261; lisp: 154; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (22 lines) | stat: -rw-r--r-- 728 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "board.h"
#include "data.h"
#include "ht_subc.h"

/* Build a hash of subcircuit-to-prototype. Effectively a local library
   of unique footprint prototypes */

typedef struct {
	htscp_t subcs;   /* value is a normalized subc prototype */
	pcb_board_t *pcb;
	pcb_data_t data; /* temp buffer to place prototype subcs in */
	unsigned fix_ymirr;
} pcb_placement_t;

void pcb_placement_init(pcb_placement_t *ctx, pcb_board_t *pcb);
void pcb_placement_uninit(pcb_placement_t *ctx);

/* Iterate all subcircuits in data and build ctx->subcs hash */
void pcb_placement_build(pcb_placement_t *ctx, pcb_data_t *data);

/* return subc's prototype or NULL */
#define pcb_placement_get(ctx, subc)    htscp_get(&(ctx)->subcs, (subc))