有没有人来解释一下问题?
本帖最后由 Liu33861 于 2020-5-21 12:12 编辑有人能解释下图里面圈圈中的四项到底有什么区别和使用的场景是什么呢?现在总是模棱两可的去配置,IO配置完没有相应的高或者低我就会把这里勾上,但是有点不明白。
invert就不解释了,就是字面意思,比如默认做按键是高电平有效,这里勾选后可以低电平有效。
第二个问题可以参考这个。慢慢理解下。
/**
*\brief Maps PIOs as software or hardware controlled.
* Before using a PIO as a software controlled digital IO a call to this
* function is required. Not mapping the PIO may cause other functions in the
* PIO trap API to return errors and not produce the required behaviour.
* To put a PIO under HW control the app needs to call this function first and
* then PioSetFunction to select the HW functionality needed.
* Please note that there is no default state, all PIOs should be considered
* unmapped and unusable until they are configured by a call to this function.
*\param bank PIO bank number.
*\param mask 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.
*\param bits Each bit corresponds to a PIO line. A bit set to 1 will cause a PIO to be
*behave as a software controlled pin. A bit set to 0 will result in the pio
*being marked as controlled by a hardware peripheral.
*\return A 32 bit mask. If any bit in this mask is high then that PIO could not be
*mapped or unmapped; note that no action will have been taken on any PIOs.
*
* \note This trap may NOT be called from a high-priority task handler
*
*
* \ingroup trapset_core
*/
uint32 PioSetMapPins32Bank(uint16 bank, uint32 mask, uint32 bits);
页:
[1]