use of net.sourceforge.usbdm.peripheralDatabase.VectorTable in project usbdm-eclipse-plugins by podonoghue.
the class DeviceInfo method generateVectorTable.
/**
* Creates vector table information and add to variable map
*
* @param variableMap
* @param devicePeripherals
* @param monitor
*
* @throws Exception
*/
private void generateVectorTable(Map<String, String> variableMap, DevicePeripherals devicePeripherals, IProgressMonitor monitor) throws Exception {
// Get description of all peripherals for this device
SubMonitor progress = SubMonitor.convert(monitor, getPeripherals().size() * 100);
progress.subTask("Modifying vector table");
// Update vector table
VectorTable vectorTable = devicePeripherals.getVectorTable();
for (String peripheralName : getPeripherals().keySet()) {
getPeripherals().get(peripheralName).modifyVectorTable(vectorTable);
progress.worked(100);
}
// Add information to variable map
variableMap.put(UsbdmConstants.C_VECTOR_TABLE_INCLUDES_KEY, vectorTable.getCIncludeFiles());
variableMap.put(UsbdmConstants.C_VECTOR_TABLE_KEY, vectorTable.getCVectorTableEntries());
}
use of net.sourceforge.usbdm.peripheralDatabase.VectorTable in project usbdm-eclipse-plugins by podonoghue.
the class TestVectorTable method testVectorTable.
static void testVectorTable(String device) throws Exception {
// Get description of all peripherals for device
DevicePeripheralsFactory factory = new DevicePeripheralsFactory();
DevicePeripherals devicePeripherals = factory.getDevicePeripherals(device);
if (devicePeripherals == null) {
// Return empty model
System.err.println("Failed");
return;
}
VectorTable vt = devicePeripherals.getVectorTable();
String cVectorTable = vt.getCVectorTableEntries();
System.err.print(cVectorTable);
}
Aggregations