PCB-FPW developer documentation based on version: 0.0.11

Functions

con_hdr.h File Reference

Header file for functions for CON-HDR footprints (Header Connector). More...

Go to the source code of this file.

Functions

int con_hdr_create_packages_list ()
 Create a list of CON-HDR packages with pre-defined values.
int con_hdr_drc ()
 Do some Design Rule Checking for the CON_HDR package type.
int con_hdr_get_default_footprint_values ()
 Look up default values for CON-HDR footprints.
int con_hdr_set_gui_constraints ()
 Set GUI constraints for the CON-HDR package type.
int con_hdr_write_footprint ()
 Write a CON-HDR pin through hole footprint.
void con_hdr_init ()

Detailed Description

Header file for functions for CON-HDR footprints (Header Connector).

Author:
Copyright 2007, 2008, 2009, 2010, 2011 by Bert Timmerman <bert.timmerman@xs4all.nl>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Definition in file con_hdr.h.


Function Documentation

int con_hdr_create_packages_list (  ) 

Create a list of CON-HDR packages with pre-defined values.

The data in this list can be used in a combo box to select a pre-defined package.

Returns:
EXIT_SUCCESS when a packages list was created, EXIT_FAILURE when errors were encountered.

Definition at line 40 of file con_hdr.c.

int con_hdr_drc (  ) 

Do some Design Rule Checking for the CON_HDR package type.

  • check for total number of pins is even.
  • check for number of rows is more than 1.
  • check for number of columns is 2.
  • check for allowed pad shapes.
  • check for zero sized packages.
  • check for a zero sized courtyard.
  • check for minimum clearance between copper (X-direction).
  • check for minimum clearance between copper (Y-direction).
  • If no fiducials exist.
  • check for clearance of the package length with regard to the courtyard dimensions.
  • check for clearance of the package width with regard to the courtyard dimensions.
  • check for any silk lines or texts touching bare copper.
  • check for soldermask clearance (solder mask overlapping copper at the solder fillet area or worse).
  • check for a reasonable silk line width.
Returns:
EXIT_SUCCESS when no DRC violations were encountered, EXIT_FAILURE when DRC violations were found.

Todo:
Check for any silk lines or texts touching bare copper.
Todo:
Check for soldermask clearance (solder mask overlapping copper at the solder fillet area or worse).
Todo:
Create attributes here.

Definition at line 75 of file con_hdr.c.

References courtyard_clearance_with_package, courtyard_length, courtyard_width, fiducial, footprint_name, footprint_type, MIL, MIL_100, MM, NO_UNITS, number_of_columns, number_of_pins, number_of_rows, package_body_height, package_body_length, package_body_width, pad_clearance, pad_diameter, pad_length, pad_shapes_type, pad_width, pitch_x, pitch_y, silkscreen_line_width, silkscreen_package_outline, units_type, and verbose.

Referenced by write_footprint().

int con_hdr_get_default_footprint_values (  ) 

Look up default values for CON-HDR footprints.

Footprint values can be looked up by placing a question mark "?" in front of the footprint name.
If the footprint name is recognised the values will be loaded and the entries involved in the GUI will be updated accordingly.
Currently the following footprints are supported:

  • ,
Returns:
EXIT_SUCCESS when default values for a footprint were found, EXIT_FAILURE when the footprint name was not found.

Definition at line 406 of file con_hdr.c.

References count_x, count_y, courtyard, courtyard_length, courtyard_line_width, courtyard_width, fiducial, fiducial_pad_diameter, fiducial_pad_solder_mask_clearance, footprint_name, footprint_units, number_of_columns, number_of_pins, number_of_rows, package_body_height, package_body_length, package_body_width, package_is_radial, pad_clearance, pad_diameter, pad_length, pad_shape, pad_shapes_type, pad_solder_mask_clearance, pad_width, pin_drill_diameter, pitch_x, pitch_y, silkscreen_length, silkscreen_line_width, silkscreen_package_outline, silkscreen_width, thermal, thermal_length, and thermal_width.

Referenced by on_footprint_name_entry_changed().

int con_hdr_set_gui_constraints (  ) 

Set GUI constraints for the CON-HDR package type.

This function is only to be compiled for GUI targets.

Returns:
EXIT_SUCCESS when the function is completed.

Definition at line 468 of file con_hdr.c.

References gui_constraints_disable_heel_and_toe_goals_tab_widgets(), gui_constraints_disable_thermal_tab_widgets(), and widget.

Referenced by on_footprint_type_entry_changed().

Here is the call graph for this function:

int con_hdr_write_footprint (  ) 

Write a CON-HDR pin through hole footprint.

The pin/pad numbering scheme of the CON-HDR package is:
for 2 rows
2 4 6 8
1 3 5 7
or for 3 rows
3 6 9 12
2 5 8 11
1 4 7 10
You get the idea for 4 or more rows.

Returns:
EXIT_FAILURE when errors were encountered, EXIT_SUCCESS when OK.

Definition at line 528 of file con_hdr.c.

References attributes_in_footprint, count_x, courtyard, courtyard_clearance_with_package, courtyard_length, courtyard_line_width, courtyard_width, footprint_filename, footprint_type, fp, license_in_footprint, multiplier, number_of_columns, number_of_rows, package_body_length, package_body_width, pad_clearance, pad_diameter, pad_length, pad_shape, pad_solder_mask_clearance, pad_width, pin1_square, pin_drill_diameter, pitch_x, pitch_y, silkscreen_indicate_1, silkscreen_line_width, silkscreen_package_outline, verbose, write_attributes(), write_element_arc(), write_element_header(), write_license(), write_pad(), write_pin(), and write_rectangle().

Referenced by write_footprint().

Here is the call graph for this function: