马上注册,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册 
×
本帖最后由 偶是小星哥 于 2021-9-22 18:57 编辑
1. mapping需要使用的PIO
PioSetMapPins32Bank
2. 设置PIO为输出
PioSetDir32Bank
3. 设置PIO高低电平
PioSet32Bank
1. set PIO as output high: (if PIO is 19, just replace the PIO down below by 19)
- PioSetMapPins32Bank(PIO >>5 , (1UL << (PIO & 31)), (1UL << (PIO & 31)));
- PioSetDir32Bank(PIO >>5, (1UL << (PIO & 31)), (1UL << (PIO & 31)));
- PioSet32Bank(PIO >>5, (1UL << (PIO & 31)), 1UL << (PIO & 31)));
复制代码
2. set PIO as output low: (if PIO is 19, just replace the PIO down below by 19)
- PioSetMapPins32Bank(PIO >>5 , (1UL << (PIO & 31)), (1UL << (PIO & 31)));
- PioSetDir32Bank(PIO >>5, (1UL << (PIO & 31)), (1UL << (PIO & 31)));
- PioSet32Bank(PIO >>5, (1UL << (PIO & 31)), 0);
复制代码
|