astra/f1c100s
This code defines and renders a four-layer, top-mounted F1C100S module with detailed pin assignments, schematic annotations, and layout profiles, facilitating design, validation, and routing of the hardware including support for decoupling capacitors, crystal oscillators, and external connectors.
- Version
- 0.11.0
- License
- unset
- Stars
- 0
src/profiles.ts
export const LAYOUT_PROFILES = [
"native",
"lcd_top_storage_right",
"lcd_right_storage_bottom",
"lcd_top_storage_bottom",
"lcd_right_storage_left",
] as const;
export type LayoutProfile = (typeof LAYOUT_PROFILES)[number];
export type Side = "top" | "right" | "bottom" | "left";
export const PROFILE_LAYOUTS: Record<
LayoutProfile,
{ rotation: number; lcd?: Side; storage?: Side }
> = {
native: { rotation: -90 },
lcd_top_storage_right: { rotation: 180, lcd: "top", storage: "right" },
lcd_right_storage_bottom: { rotation: 90, lcd: "right", storage: "bottom" },
lcd_top_storage_bottom: { rotation: 180, lcd: "top", storage: "bottom" },
lcd_right_storage_left: { rotation: 90, lcd: "right", storage: "left" },
};
export function assertLayoutProfile(
value: string,
): asserts value is LayoutProfile {
if (!(LAYOUT_PROFILES as readonly string[]).includes(value))
throw new Error(
`Unsupported F1C100S layoutProfile '${value}'. Expected ${LAYOUT_PROFILES.join(", ")}`,
);
}
export const MODULE_SIZE = 28;
export const TERMINAL_EDGE = 13.2;
export const EXIT_DIAMETER = 0.45;
export const EXIT_DRILL = 0.2;
export const RULES = {
traceWidth: 0.12,
clearance: 0.1,
viaDiameter: 0.45,
viaDrill: 0.2,
layers: 4,
} as const;