Difference between revisions of "Unit QEMUVersatilePB"

From Ultibo.org
Jump to: navigation, search
 
(8 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
   
 
   
 
This includes standard interfaces such as network, filesystem and storage as well as drivers that are specific to the VersatilePB and may or may not be included by anything else.
 
This includes standard interfaces such as network, filesystem and storage as well as drivers that are specific to the VersatilePB and may or may not be included by anything else.
 +
 +
The unit also provides a very simple clock device driver for the 24MHz clock included in the Versatile PB System Control registers. This clock is 32bit only, runs at a fixed rate of 24MHz and cannot be stopped or reset.
  
 
Additional units can be included anywhere within a program and they will be linked during the compile process. This unit simply provides a convenient way to ensure all relevant units have been included and the standard drivers registered.
 
Additional units can be included anywhere within a program and they will be linked during the compile process. This unit simply provides a convenient way to ensure all relevant units have been included and the standard drivers registered.
Line 16: Line 18:
 
----
 
----
  
''None defined''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''QEMUVersatilePB specific constants''' <code> NAME_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>VERSATILEPB_CLOCK_DESCRIPTION = 'VersatilePB 24MHz Clock';</code>
 +
| Description of 24MHz clock device
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
Line 26: Line 39:
 
----
 
----
  
 +
''None defined''
  
'''QEMUVersatilePB specific variables'''
+
=== Function declarations ===
 +
----
  
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
+
 
 +
'''Initialization functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure QEMUVersatilePBInit;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the QEMUVersatilePB unit and parameters</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
| <code>QEMUVPB_REGISTER_UART0:LongBool = True;</code>
+
! Note
| style="width: 40%;"|If True then register the QEMU VersatilePB UART0 device during boot
+
| Called only during system startup
 
|-
 
|-
 
|}
 
|}
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
+
</div></div>
 +
<br />
 +
 
 +
'''QEMUVersatilePB MMCI functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function MMCIGetCardDetect(MMC:PMMCDevice):LongWord; </pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of MMCDeviceGetCardDetect API for QEMUVPB MMCI</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
| <code>QEMUVPB_REGISTER_FRAMEBUFFER:LongBool = True;</code>
+
! Note
| style="width: 40%;"|If True then register the QEMU VersatilePB Framebuffer device during boot
+
| Not intended to be called directly by applications, use MMCDeviceGetCardDetect instead.
 +
Not currently used as the VERSATILEPB_SYS_MCI register is not connected in QEMUVPB
 
|-
 
|-
 
|}
 
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function MMCIGetWriteProtect(MMC:PMMCDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of MMCDeviceGetWriteProtect API for QEMUVPB MMCI</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications, use MMCDeviceGetWriteProtect instead.
 +
Not currently used as the VERSATILEPB_SYS_MCI register is not connected in QEMUVPB
 +
|-
 +
|}
 +
</div></div>
 
<br />
 
<br />
  
=== Function declarations ===
+
'''QEMUVersatilePB clock functions'''
----
+
 
+
 
+
'''Initialization functions'''
+
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">procedure QEMUVersatilePBInit;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function VersatilePBClockRead(Clock:PClockDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the QEMUVersatilePB unit and parameters</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ClockDeviceRead API for the 24MHz Clock</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Called only during system startup
+
| Not intended to be called directly by applications, use ClockDeviceRead instead.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function VersatilePBClockRead64(Clock:PClockDevice):Int64;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ClockDeviceRead64 API for the 24MHz Clock</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications, use ClockDeviceRead64 instead.
 
|-
 
|-
 
|}
 
|}

Latest revision as of 01:04, 25 April 2018

Return to Unit Reference


Description


Ultibo QEMU VersatilePB unit

This unit serves to include all units relevant to the QEMU VersatilePB and to register the drivers that are appropriate to the configuration.

This includes standard interfaces such as network, filesystem and storage as well as drivers that are specific to the VersatilePB and may or may not be included by anything else.

The unit also provides a very simple clock device driver for the 24MHz clock included in the Versatile PB System Control registers. This clock is 32bit only, runs at a fixed rate of 24MHz and cannot be stopped or reset.

Additional units can be included anywhere within a program and they will be linked during the compile process. This unit simply provides a convenient way to ensure all relevant units have been included and the standard drivers registered.

Constants



QEMUVersatilePB specific constants NAME_*
VERSATILEPB_CLOCK_DESCRIPTION = 'VersatilePB 24MHz Clock'; Description of 24MHz clock device


Type definitions


None defined

Public variables


None defined

Function declarations



Initialization functions

procedure QEMUVersatilePBInit;
Description: Initialize the QEMUVersatilePB unit and parameters
Note Called only during system startup


QEMUVersatilePB MMCI functions

function MMCIGetCardDetect(MMC:PMMCDevice):LongWord; 
Description: Implementation of MMCDeviceGetCardDetect API for QEMUVPB MMCI
Note Not intended to be called directly by applications, use MMCDeviceGetCardDetect instead.

Not currently used as the VERSATILEPB_SYS_MCI register is not connected in QEMUVPB


function MMCIGetWriteProtect(MMC:PMMCDevice):LongWord;
Description: Implementation of MMCDeviceGetWriteProtect API for QEMUVPB MMCI
Note Not intended to be called directly by applications, use MMCDeviceGetWriteProtect instead.

Not currently used as the VERSATILEPB_SYS_MCI register is not connected in QEMUVPB


QEMUVersatilePB clock functions

function VersatilePBClockRead(Clock:PClockDevice):LongWord;
Description: Implementation of ClockDeviceRead API for the 24MHz Clock
Note Not intended to be called directly by applications, use ClockDeviceRead instead.


function VersatilePBClockRead64(Clock:PClockDevice):Int64;
Description: Implementation of ClockDeviceRead64 API for the 24MHz Clock
Note Not intended to be called directly by applications, use ClockDeviceRead64 instead.


Return to Unit Reference