Skip to content

Commit

Permalink
Fix HTML tags
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeu authored and bernhard-thiele committed Jan 13, 2020
1 parent 51b5ef2 commit 1306c2f
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 39 deletions.
6 changes: 3 additions & 3 deletions Modelica_DeviceDrivers/Blocks/Communication.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1149,9 +1149,9 @@ See <a href=\"modelica://Modelica_DeviceDrivers.Blocks.Examples.TestSerialPackag
<h4>Setup of a virtual CAN interface</h4>
<p>Even if a Linux computer doesn&apos;t have a CAN device, it is possible to setup a virtual CAN device that can be used similarly to a physical device. This section discusses the necessary steps to bring up a virtual CAN device (tested with Ubuntu 12.04) which can be used with the <a href=\"Modelica://Modelica_DeviceDrivers.Blocks.Examples.TestSerialPackager_SocketCAN\">SocketCAN example model</a>. Note that this usually requires root rights. Also executing the Modelica example model might require root rights.</p>
<ul>
<li>Load the vcan kernel model:<br/><code>sudo modprobe vcan</code></li>
<li>Create a virtual CAN device with default name (default name will be &quot;vcan0&quot;):<br/><code>sudo ip link add type vcan</code></li>
<li>Bring the device up:<br/><code>sudo ifconfig vcan0 up</code></li>
<li>Load the vcan kernel model:<br><code>sudo modprobe vcan</code></li>
<li>Create a virtual CAN device with default name (default name will be &quot;vcan0&quot;):<br><code>sudo ip link add type vcan</code></li>
<li>Bring the device up:<br><code>sudo ifconfig vcan0 up</code></li>
</ul>
<h4>Setup of a physical CAN interface</h4>
<p>Please have a look in the respective documentation to Socket CAN. A physical CAN interface will require more configuration settings than the virtual interface (e.g., bitrate setting).</p>
Expand Down
15 changes: 8 additions & 7 deletions Modelica_DeviceDrivers/Blocks/HardwareIO.mo
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ package HardwareIO
textString="%name")}),
Documentation(info="<html>
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Wraps the Comedi function<code> comedi_data_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</
<p>Wraps the Comedi function<code> comedi_data_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end DataWrite;

Expand Down Expand Up @@ -101,7 +101,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Wraps the Comedi function<code> comedi_data_read(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end DataRead;

Expand Down Expand Up @@ -156,7 +156,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Uses the Comedi function<code> comedi_from_phys(..)</code> to support providing a physical value (volts or milliamps) as input to the DAC. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref.</code></p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end PhysicalDataWrite;

Expand Down Expand Up @@ -210,7 +210,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Uses the Comedi function<code> comedi_to_phys(..)</code> to convert a raw input obtained from the ADC to a physical value (volts or milliamps) . See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref.</code></p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end PhysicalDataRead;

Expand Down Expand Up @@ -251,7 +251,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Wraps the Comedi function<code> comedi_dio_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice </code>and<code> channel</code>.</p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end DIOWrite;

Expand Down Expand Up @@ -292,7 +292,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Wraps the Comedi function<code> comedi_dio_read(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice </code>and<code> channel</code>.</p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end DIORead;

Expand All @@ -307,6 +307,7 @@ package HardwareIO
annotation (Documentation(info="<html>
<p>
Enumeration that defines the available reference channels used in a DAQ-card
</p>
</html>"));

type Direction = enumeration(
Expand Down
13 changes: 7 additions & 6 deletions Modelica_DeviceDrivers/ClockedBlocks/HardwareIO.mo
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Wraps the Comedi function<code> comedi_data_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end DataWrite;

Expand Down Expand Up @@ -101,7 +101,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Wraps the Comedi function<code> comedi_data_read(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref</code>.</p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end DataRead;

Expand Down Expand Up @@ -163,7 +163,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Uses the Comedi function<code> comedi_from_phys(..)</code> to support providing a physical value (volts or milliamps) as input to the DAC. See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref.</code></p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end PhysicalDataWrite;

Expand Down Expand Up @@ -223,7 +223,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Uses the Comedi function<code> comedi_to_phys(..)</code> to convert a raw input obtained from the ADC to a physical value (volts or milliamps) . See the Comedi documentation for the meanings of the parameters <code>subDevice, channel, range, aref.</code></p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end PhysicalDataRead;

Expand Down Expand Up @@ -268,7 +268,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Wraps the Comedi function<code> comedi_dio_write(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice </code>and<code> channel</code>.</p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end DIOWrite;

Expand Down Expand Up @@ -315,7 +315,7 @@ package HardwareIO
<p>The parameter <code>comedi</code> needs to be set to a valid Comedi device handle, i.e., needs to be set to the record member <code>dh</code> of a <code>ComediConfig</code> record instance.</p>
<p>Wraps the Comedi function<code> comedi_dio_read(..)</code>. See the Comedi documentation for the meanings of the parameters <code>subDevice </code>and<code> channel</code>.</p>
<h4>Note</h4>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges). </p>
<p>Only supported for Linux, since Comedi is only available for linux (<a href=\"http://www.comedi.org/\">http://www.comedi.org/</a>). Requires that Comedilib is installed and that the simulation process has sufficient privileges to access the intended device (usually that means &quot;root&quot; privileges).</p>
</html>"));
end DIORead;

Expand All @@ -330,6 +330,7 @@ package HardwareIO
annotation (Documentation(info="<html>
<p>
Enumeration that defines the available reference channels used in a DAQ-card
</p>
</html>"));

type Direction = enumeration(
Expand Down
6 changes: 3 additions & 3 deletions Modelica_DeviceDrivers/EmbeddedTargets/AVR/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ sudo apt-get install gcc-avr
sudo apt-get install avr-libc
sudo apt-get install avrdude
</pre>
<p>
<h5>Create a MOS script for the Blink example</h5>
<p>
For the translation it is convenient to use the OpenModelica scripting interface and
collect the commands in a MOS file, e.g., named
<code>runMDDAvr.mos</code>:
Expand All @@ -48,8 +48,8 @@ getErrorString();
translateModel(Modelica_DeviceDrivers.EmbeddedTargets.AVR.Examples.Arduino.UNO.Blink, fileNamePrefix=\"Blink\");
getErrorString();
</pre>
<p>
<h5>Translate and flash Blink example</h5>
<p>
Put the <code>runMDDAvr.mos</code> file in a (build) directory and execute following commands on the command line:
</p>
<pre>
Expand All @@ -60,8 +60,8 @@ avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CP
avr-objcopy -O ihex -R .eeprom Blink Blink.hex
avrdude -F -V -c arduino -p ATMEGA328P -P /dev/ttyACM0 -b 115200 -U flash:w:Blink.hex
</pre>
<p>
<h5>Convenience Makefile</h5>
<p>
The steps can also be mechanized in a Makefile, e.g., the Blink example comes
with a Makefile, so one can simply do:
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ model BlinkGPIO_EXTI
Functions.Digital.InitLed p4 = Functions.Digital.InitLed(handle = mcu.hal, led = Modelica_DeviceDrivers.EmbeddedTargets.STM32F4.Types.LED.LED6);
annotation ( Experiment(Interval = 0.01), Documentation(info = "<html>
<h4>BlinkGPIO_EXTI</h4>
<p>BlinkGPIO_EXTI is a model configuring interrupt on falling edge on GPIO Line 0. Since Modelica is not able to generate code for the <a href=modelica://Modelica_DeviceDrivers/Resources/Scripts/OpenModelica/EmbeddedTargets/STM32F4/Examples/STM32F4_Discovery/ext_callback.c>callback function</a>, the user has to edit code here manually. In the callback function all User LEDs (port D pin 12 - 15) are toggled. As a result, the LEDs are toggled when the blue user button is released. Use this model to see if your Modelica tool can export code for STM32F4 MCUs..</p>
<p>BlinkGPIO_EXTI is a model configuring interrupt on falling edge on GPIO Line 0. Since Modelica is not able to generate code for the <a href=\"modelica://Modelica_DeviceDrivers/Resources/Scripts/OpenModelica/EmbeddedTargets/STM32F4/Examples/STM32F4_Discovery/ext_callback.c\">callback function</a>, the user has to edit code here manually. In the callback function all User LEDs (port D pin 12 - 15) are toggled. As a result, the LEDs are toggled when the blue user button is released. Use this model to see if your Modelica tool can export code for STM32F4 MCUs..</p>
<p>STM digital pins 12 - 15 on port D corresponds to digital pin D12 - D15 on the STM32F4-Discovery. If desired, you can connect an external LEDs to this PINs, with a suitable resistor in-between (perhaps 220&#8486;). Connect the other PIN on the LED to ground.</p>
</html>")); /* synchronizeRealtime1.actualInterval is not legal in experiment annotation*/
end BlinkGPIO_EXTI;
Loading

0 comments on commit 1306c2f

Please sign in to comment.