Search in sources :

Example 1 with PcrInitialiser

use of net.sourceforge.usbdm.deviceEditor.information.PcrInitialiser in project usbdm-eclipse-plugins by podonoghue.

the class WriteFamilyCpp method writePinMappingFunction.

private void writePinMappingFunction(DocumentUtilities writer) throws Exception {
    PcrInitialiser pcrInitialiser = new PcrInitialiser();
    for (String pinName : fDeviceInfo.getPins().keySet()) {
        Pin pin = fDeviceInfo.getPins().get(pinName);
        pcrInitialiser.addPin(pin);
    }
    writer.write("/**\n" + " * Used to configure pin-mapping before 1st use of peripherals\n" + " */\n" + "void " + DO_PIN_MAPPING_FUNCTION + "() {\n");
    writer.write(pcrInitialiser.getInitPortClocksStatement(""));
    writer.write(pcrInitialiser.getPcrInitStatements(""));
    writer.write("}\n");
}
Also used : PcrInitialiser(net.sourceforge.usbdm.deviceEditor.information.PcrInitialiser) Pin(net.sourceforge.usbdm.deviceEditor.information.Pin)

Aggregations

PcrInitialiser (net.sourceforge.usbdm.deviceEditor.information.PcrInitialiser)1 Pin (net.sourceforge.usbdm.deviceEditor.information.Pin)1