📄 pio_8h.html
字号:
</table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Enable or disable the Bluetooth linear regulator. <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>Enable(TRUE) or Disable(FALSE).</td></tr> </table></dl>Some BlueCore variants have a separate linear regulator to power the bluetooth hardware. This trap allows the application to disable that regulator. </td> </tr></table><a class="anchor" name="a28" doxytag="pio.h::PioFlashLed0" ></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> PioFlashLed0 </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="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#a4">uint16</a> </td> <td class="mdname" nowrap> <em>flash_rate</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>Control the LED0 flashing hardware. <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>Enable(TRUE) or Disable(FALSE) the flashing hardware. </td></tr> <tr><td></td><td valign=top><em>flash_rate</em> </td><td>Set the rate to flash/pulse LED0. Valid values range from 0..0xF.</td></tr> </table></dl>The "flash_rate" parameter sets the flash pulse frequency as a divisor of the PWM frequency set by the "period" parameter passed to PioDimLed0. For BC5-MM, the "flash_rate" maps to a divisor as follows.<p>0 = "period" frequency / 96<p>1 = "period" frequency / 192<p>2 = "period" frequency / 384<p>3 = "period" frequency / 768<p>4 = "period" frequency / 1536<p>...<p>15 = "period" frequency / 3145728<p>An invalid flash rate will result in a FALSE return and no change will take place.<p>As an example:<p>Turn on both LEDs: PioSetLed0(TRUE); PioSetLed1(TRUE);<p>Full duty cycle, low period: PioDimLed0(0x7FF, 0x1); PioDimLed1(0x7FF, 0x1);<p>Flash LED slowly: PioFlashLed0(TRUE, 0x7);<p>Flash LED quickly: PioFlashLed1(TRUE, 0x4);<p>Note: LED flashing hardware is only present on some BlueCore variants. </td> </tr></table><a class="anchor" name="a29" doxytag="pio.h::PioFlashLed1" ></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> PioFlashLed1 </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="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#a4">uint16</a> </td> <td class="mdname" nowrap> <em>flash_rate</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>Control the LED1 flashing hardware. <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>Enable(TRUE) or Disable(FALSE) the flashing hardware. </td></tr> <tr><td></td><td valign=top><em>flash_rate</em> </td><td>Set the rate to flash/pulse LED1.</td></tr> </table></dl>See PioFlashLed0 for more information. </td> </tr></table><a class="anchor" name="a30" doxytag="pio.h::PioGet32" ></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> PioGet32 </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 a 32 bit value containing the contents of both the PIO data input registers. <p> </td> </tr></table><a class="anchor" name="a31" doxytag="pio.h::PioSet32" ></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> PioSet32 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a3">uint32</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#a3">uint32</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>Modifies the contents of both the PIO data output registers. PIO pins must be set to outputs via PioSetDir32 before they can be driven high or low through this trap. <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>Each bit in the mask corresponds to a PIO line. Bits set to 1 in this mask will be modified. Bits set to 0 in this mask will not be modified. </td></tr> <tr><td></td><td valign=top><em>bits.</em> </td><td>Each bit in the "bits" value corresponds to a PIO line. Bits set to 1 in this value will result in that PIO line being driven high. Bits set to 0 in this value will result in that PIO line being driven low.</td></tr> </table></dl>Returns a 32 bit mask. If any bit in this mask is high then that PIO could not be driven to the level specified.<p>Note that the upper 16 PIOs must be mapped in before they can be used. See the PioSetMapPins documentation for information on valid PIO directions and PIO mapping. </td> </tr></table><a class="anchor" name="a32" doxytag="pio.h::PioGetDir32" ></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> PioGetDir32 </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 a 32 bit value containing the contenst of both the PIO data direction registers. <p> </td> </tr></table><a class="anchor" name="a33" doxytag="pio.h::PioSetDir32" ></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> PioSetDir32 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a3">uint32</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#a3">uint32</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>Modifies the contents of both the PIO data direction registers. <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>Each bit in the mask corresponds to a PIO line. Bits set to 1 in this mask will be modified. Bits set to 0 in this mask will not be modified. </td></tr> <tr><td></td><td valign=top><em>bits</em> </td><td>Each bit in the "bits" value corresponds to a PIO line. Bits set to 1 in this value will result in that PIO line being configured as an output. Bits set to 0 in this value will result in that PIO line being configured as an input.</td></tr> </table></dl>Returns a 32 bit mask. If any bit in this mask is high then that PIO could not be set to the direction specified.<p>Note that the upper 16 PIOs must be mapped in before they can be used. See the PioSetMapPins documentation for information on valid PIO directions and PIO mapping. </td> </tr></table><a class="anchor" name="a34" doxytag="pio.h::PioGetStrongBias32" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -