📄 pio_8h.html
字号:
<tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a4">uint16</a> PioGetStrongBias </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>Reads the current setting of the bias register. <p> </td> </tr></table><a class="anchor" name="a6" doxytag="pio.h::PioSetStrongBias" ></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 PioSetStrongBias </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>mask</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>bits</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>Sets the bias register. <p>All BlueCore variants (above BC01) include weak internal pull-ups or pull-downs on pins which are being used as inputs. If the value set in the output register (for a pin which is being used as an input) is 1, then the internal pull-up is enabled, otherwise the pin is pulled-down.<p>On later BlueCore variants (not BC01, BC02-external), the pull-up or pull-down can be made stronger by writing a 1 into the corresponding bit in the bias register by calling this function.<p>So to set pin 4 and 5 as inputs, 4 pulled up weakly, 5 pulled down strongly<p><div class="fragment"><pre> <a class="code" href="pio_8h.html#a4">PioSetDir</a>((1<<4)|(1<<5), 0); <a class="code" href="pio_8h.html#a2">PioSet</a>((1<<4)|(1<<5), (1<<4)); <a class="code" href="pio_8h.html#a6">PioSetStrongBias</a>((1<<4)|(1<<5), (1<<5));</pre></div><p>Note that this function and PioGetStrongBias are not present in firmware for BlueCore2-external, and so applications which call them will not run on BlueCore2-external. </td> </tr></table><a class="anchor" name="a7" doxytag="pio.h::PioSetAuxDac" ></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#a4">uint16</a> PioSetAuxDac </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>enabled</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a8">uint8</a> </td> <td class="mdname" nowrap> <em>level</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>Enables or disables to auxiliary DAC on BC2, setting the output level to the requested value. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>enabled</em> </td><td>TRUE or FALSE. </td></tr> <tr><td></td><td valign=top><em>level</em> </td><td>The output level to use.</td></tr> </table></dl>Returns a non-zero value if the request succeeded. Returns zero if it could not be honoured because the DAC is in use by other parts of the firmware.<p>Note that the auxiliary DAC level drops to 0V when BlueCore enters deep sleep for power-saving. </td> </tr></table><a class="anchor" name="a8" doxytag="pio.h::PioSetRts" ></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> PioSetRts </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="mdname1" valign="top" nowrap> <em>bool</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>Controls the settings of the RTS line. <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>Set (TRUE) or Clear (FALSE).</td></tr> </table></dl>Returns a non-zero value on success, and zero if the operation could not be performed.<p>When the host transport is set to none or USB, so that the UART is not being used, the application has full control of the RTS line.<p>When the user transport is in use, this function can be used to assert flow control when the firmware would not automatically do so. However, the firmware may also force RTS low to assert incoming flow control even if PioSetRts(1) has been called. </td> </tr></table><a class="anchor" name="a9" doxytag="pio.h::PioGetCts" ></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> PioGetCts </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>Lets the Vm check the status of the Clear To Send uart pin Returns non zero if host transport is set to none and CTS input signal within the uart is set to active, else returns zero. <p> </td> </tr></table><a class="anchor" name="a10" doxytag="pio.h::PioGetKalimba" ></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#a4">uint16</a> PioGetKalimba </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>Find out which pins are under kalimba control. <p> </td> </tr></table><a class="anchor" name="a11" doxytag="pio.h::PioSetKalimba" ></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> PioSetKalimba </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>mask</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>value</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>Modify which pins are under kalimba control; returns non-zero if could all be given. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>mask</em> </td><td>The bit mask to use. </td></tr> <tr><td></td><td valign=top><em>value</em> </td><td>The pins to set. </td></tr> </table></dl> </td> </tr></table><a class="anchor" name="a12" doxytag="pio.h::PioGetVregEn" ></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> PioGetVregEn </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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -