Root/
| 1 | /* |
| 2 | * layer.h - PCB layers on a pad |
| 3 | * |
| 4 | * Written 2009-2012 by Werner Almesberger |
| 5 | * Copyright 2009-2012 by Werner Almesberger |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | */ |
| 12 | |
| 13 | #ifndef LAYER_H |
| 14 | #define LAYER_H |
| 15 | |
| 16 | #include <stdint.h> |
| 17 | |
| 18 | #include "overlap.h" |
| 19 | |
| 20 | |
| 21 | typedef uint32_t layer_type; |
| 22 | |
| 23 | |
| 24 | enum kicad_layer { |
| 25 | layer_bottom, /* "copper" */ |
| 26 | layer_l15, |
| 27 | layer_l14, |
| 28 | layer_l13, |
| 29 | layer_l12, |
| 30 | layer_l11, |
| 31 | layer_l10, |
| 32 | layer_l9, |
| 33 | layer_l8, |
| 34 | layer_l7, |
| 35 | layer_l6, |
| 36 | layer_l5, |
| 37 | layer_l4, |
| 38 | layer_l3, |
| 39 | layer_l2, |
| 40 | layer_top, /* "component" */ |
| 41 | layer_glue_bottom, /* adhesive, copper side */ |
| 42 | layer_glue_top, /* adhesive, component side */ |
| 43 | layer_paste_bottom, /* solder paste */ |
| 44 | layer_paste_top, |
| 45 | layer_silk_bottom, /* silk screen */ |
| 46 | layer_silk_top, |
| 47 | layer_mask_bottom, /* solder mask */ |
| 48 | layer_mask_top, |
| 49 | layer_draw, /* general drawing */ |
| 50 | layer_comment, |
| 51 | layer_eco1, |
| 52 | layer_eco2, |
| 53 | layer_edge, /* edge */ |
| 54 | }; |
| 55 | |
| 56 | |
| 57 | enum pad_type { |
| 58 | pt_normal, /* copper and solder mask */ |
| 59 | pt_bare, /* only copper (and finish) */ |
| 60 | pt_trace, /* only copper, without solder mask opening */ |
| 61 | pt_paste, /* only solder paste */ |
| 62 | pt_mask, /* only solder mask */ |
| 63 | pt_n |
| 64 | }; |
| 65 | |
| 66 | |
| 67 | /* |
| 68 | * pad_type_to_layers returns the initial set of layers. This set can then be |
| 69 | * modified by overlaying other pads. For display purposes, we translate back |
| 70 | * to the effective pad type with layers_to_pad_type. |
| 71 | * |
| 72 | * What this basically means is that pt_normal becomes pt_bare if its solder |
| 73 | * paste mask has been removed. |
| 74 | */ |
| 75 | |
| 76 | layer_type pad_type_to_layers(enum pad_type type); |
| 77 | enum pad_type layers_to_pad_type(layer_type layers); |
| 78 | const char *pad_type_name(enum pad_type type); |
| 79 | |
| 80 | layer_type mech_hole_layers(void); |
| 81 | |
| 82 | int refine_layers(enum allow_overlap allow); |
| 83 | |
| 84 | #endif /* !LAYER_H */ |
| 85 |
Branches:
master
