📄 vm_8h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>BlueLab: vm.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.8 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>vm.h File Reference</h1>VM access to low-level firmware and hardware. <a href="#_details">More...</a><p><h2>Functions</h2><ul><li>void <a class="el" href="vm_8h.html#a0">VmPutChar</a> (<a class="el" href="csrtypes_8h.html#a4">uint16</a> channel, <a class="el" href="csrtypes_8h.html#a4">uint16</a> c)<dl class="el"><dd class="mdescRight">Output a character on the given channel. <a href="#a0"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a3">uint32</a> <a class="el" href="vm_8h.html#a1">VmGetClock</a> (void)<dl class="el"><dd class="mdescRight">Read the current value of a 32-bit millisecond timer. <a href="#a1"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="vm_8h.html#a2">VmSetPcmClock</a> (<a class="el" href="vm__if_8h.html#a64">vm_pcm_clock_setting</a> frequency)<dl class="el"><dd class="mdescRight">Enables the Vm to set the PCM_CLK frequency when using the 4 mHz internal clock. <a href="#a2"></a><br></dl><li><a class="el" href="vm__if_8h.html#a64">vm_pcm_clock_setting</a> <a class="el" href="vm_8h.html#a3">VmGetPcmClock</a> (void)<dl class="el"><dd class="mdescRight">Enables the Vm to check the current PCM_CLK frequency, when it is being generated from the 4mHz internal clock. <a href="#a3"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="vm_8h.html#a4">VmTransmitPowerSetDefault</a> (<a class="el" href="csrtypes_8h.html#a6">int16</a>)<dl class="el"><dd class="mdescRight">Allows the application to override the default specified by PSKEY_LC_DEFAULT_TX_POWER. <a href="#a4"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="vm_8h.html#a5">VmTransmitPowerSetMaximum</a> (<a class="el" href="csrtypes_8h.html#a6">int16</a>)<dl class="el"><dd class="mdescRight">Allows the application to override the maximum specified by PSKEY_LC_MAX_TX_POWER. <a href="#a5"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a6">int16</a> <a class="el" href="vm_8h.html#a6">VmTransmitPowerGetDefault</a> (void)<dl class="el"><dd class="mdescRight">Returns the current default power setting. <a href="#a6"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a6">int16</a> <a class="el" href="vm_8h.html#a7">VmTransmitPowerGetMaximum</a> (void)<dl class="el"><dd class="mdescRight">Returns the current maximum power setting. <a href="#a7"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="vm_8h.html#a8">VmDeepSleepEnable</a> (<a class="el" href="csrtypes_8h.html#a9">bool</a>)<dl class="el"><dd class="mdescRight">Enables or disables deep sleep. <a href="#a8"></a><br></dl><li>void <a class="el" href="vm_8h.html#a9">VmSendRfcommPrim</a> (void *prim)<dl class="el"><dd class="mdescRight">Sends an RFCOMM Bluestack primative. <a href="#a9"></a><br></dl><li>void <a class="el" href="vm_8h.html#a10">VmSendL2capPrim</a> (void *prim)<dl class="el"><dd class="mdescRight">Sends an L2CAP Bluestack primative. <a href="#a10"></a><br></dl><li>void <a class="el" href="vm_8h.html#a11">VmSendDmPrim</a> (void *prim)<dl class="el"><dd class="mdescRight">Sends a DM Bluestack primative. <a href="#a11"></a><br></dl><li>void <a class="el" href="vm_8h.html#a12">VmSendSdpPrim</a> (void *)<dl class="el"><dd class="mdescRight">Sends an SDP Bluestack primative. <a href="#a12"></a><br></dl><li>void * <a class="el" href="vm_8h.html#a13">VmGetHandleFromPointer</a> (void *pointer)<dl class="el"><dd class="mdescRight">Converts a VM address space pointer to a handle. <a href="#a13"></a><br></dl><li>void * <a class="el" href="vm_8h.html#a14">VmGetPointerFromHandle</a> (void *handle)<dl class="el"><dd class="mdescRight">Converts a handle to a VM address space pointer. <a href="#a14"></a><br></dl><li>void <a class="el" href="vm_8h.html#a15">VmUseExtendedBluestackPrimitives</a> (void)<dl class="el"><dd class="mdescRight">Enable extended Bluestack primitives. <a href="#a15"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="vm_8h.html#a16">VmTransmitEnable</a> (<a class="el" href="csrtypes_8h.html#a9">bool</a> enabled)<dl class="el"><dd class="mdescRight">Request that the radio transmitter be enabled or disabled. <a href="#a16"></a><br></dl><li>void <a class="el" href="vm_8h.html#a17">VmAmuxClockEnable</a> (<a class="el" href="csrtypes_8h.html#a9">bool</a> enabled)<dl class="el"><dd class="mdescRight">Enables the amux clock output on AIO0. <a href="#a17"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="vm_8h.html#a18">VmGetAvailableAllocations</a> (void)<dl class="el"><dd class="mdescRight">Counts the maximum number of additional memory blocks which can be allocated. <a href="#a18"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a6">int16</a> <a class="el" href="vm_8h.html#a19">VmGetTemperature</a> (void)<dl class="el"><dd class="mdescRight">Reads the internal temperature of BlueCore. <a href="#a19"></a><br></dl><li><a class="el" href="vm__if_8h.html#a66">vm_checksum_result</a> <a class="el" href="vm_8h.html#a20">VmChecksum</a> (<a class="el" href="vm__if_8h.html#a65">vm_checksum_region</a> region)<dl class="el"><dd class="mdescRight">Checksum various parts of the BlueCore flash. <a href="#a20"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>VM access to low-level firmware and hardware. <p><hr><h2>Function Documentation</h2><a class="anchor" name="a0" doxytag="vm.h::VmPutChar" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void VmPutChar </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a4">uint16</a> </td> <td class="mdname" nowrap> <em>channel</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a4">uint16</a> </td> <td class="mdname" nowrap> <em>c</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Output a character on the given channel. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>c</em> </td><td>The character to output. </td></tr> <tr><td></td><td valign=top><em>channel</em> </td><td>The channel to output to. </td></tr> </table></dl> </td> </tr></table><a class="anchor" name="a1" doxytag="vm.h::VmGetClock" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a3">uint32</a> VmGetClock </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Read the current value of a 32-bit millisecond timer. <p>Don't poll this; using MessageSendLater is much more efficient. </td> </tr></table><a class="anchor" name="a2" doxytag="vm.h::VmSetPcmClock" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a9">bool</a> VmSetPcmClock </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="vm__if_8h.html#a64">vm_pcm_clock_setting</a> </td> <td class="mdname1" valign="top" nowrap> <em>frequency</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Enables the Vm to set the PCM_CLK frequency when using the 4 mHz internal clock. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>frequency</em> </td><td>The frequency PCM_CLK will output at. Valid values are OFF, 128, 256, 512 kHz.</td></tr> </table></dl>Returns TRUE if change accepted, else FALSE. </td> </tr></table><a class="anchor" name="a3" doxytag="vm.h::VmGetPcmClock" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="vm__if_8h.html#a64">vm_pcm_clock_setting</a> VmGetPcmClock </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Enables the Vm to check the current PCM_CLK frequency, when it is being generated from the 4mHz internal clock. <p> </td> </tr></table><a class="anchor" name="a4" doxytag="vm.h::VmTransmitPowerSetDefault" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a9">bool</a> VmTransmitPowerSetDefault </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a6">int16</a> </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Allows the application to override the default specified by PSKEY_LC_DEFAULT_TX_POWER. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>int16</em> </td><td>The new default power to use in dBm.</td></tr> </table></dl>Returns TRUE on success, else FALSE.<p>The default transmit power is used for paging, inquiry, and their responses, and as the initial power for new acl links. The value passed is rounded down to the next available value when set, so the value returned by a call to VmTransmitPowerGetDefault may be less than that previously passed to VmTransmitPowerSetDefault. </td> </tr></table><a class="anchor" name="a5" doxytag="vm.h::VmTransmitPowerSetMaximum" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a9">bool</a> VmTransmitPowerSetMaximum </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a6">int16</a> </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Allows the application to override the maximum specified by PSKEY_LC_MAX_TX_POWER. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>int16</em> </td><td>The new maximum power to use in dBm.</td></tr> </table></dl>Returns TRUE on success, else FALSE.<p>The maximum transmit power is only referenced when increasing the transmit power, so if the transmit power on a link is already above this level the new value will not take effect until an attempt is made to increase the power.<p>The value passed is rounded down to the next available value when set, so the value returned by a call to VmTransmitPowerGetMaximum may be less than that previously passed to VmTransmitPowerSetMaximum. </td> </tr></table><a class="anchor" name="a6" doxytag="vm.h::VmTransmitPowerGetDefault" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a6">int16</a> VmTransmitPowerGetDefault </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Returns the current default power setting. <p> </td> </tr></table><a class="anchor" name="a7" doxytag="vm.h::VmTransmitPowerGetMaximum" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a6">int16</a> VmTransmitPowerGetMaximum </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Returns the current maximum power setting. <p> </td> </tr></table><a class="anchor" name="a8" doxytag="vm.h::VmDeepSleepEnable" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a9">bool</a> VmDeepSleepEnable </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a9">bool</a> </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Enables or disables deep sleep. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>bool</em> </td><td>FALSE will prevent the chip going into deep sleep. TRUE will permit the chip to go into deep sleep. It can still be blocked from doing so by other firmware components, or by PSKEY_DEEP_SLEEP_STATE).</td></tr> </table></dl>Returns the previous status. </td> </tr></table><a class="anchor" name="a9" doxytag="vm.h::VmSendRfcommPrim" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void VmSendRfcommPrim </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname1" valign="top" nowrap> <em>prim</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Sends an RFCOMM Bluestack primative. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -