连续签到天数:1天 | 签到总天数:1天 | 签到总奖励:4金币 |
|
楼主 |
发表于 2020-4-2 16:25:09
|
显示全部楼层
谢谢,可以是可以了,但是我发现我用在main.c时候,要先把下面那个portability.h的define那一堆,再main里面又定义一次。才能用你给的函数。想要include这个h文件,又会出错。请教是不是哪里用错了?
- /* Copyright (c) 2016 Qualcomm Technologies International, Ltd. */
- /* Part of 6.3.2 */
- #ifndef PORTABILITY_H_
- #define PORTABILITY_H_
- #include "trap_api/trap_api.h"
- /**
- * Init USB device descriptors
- *
- * Called before the rest of the firmware to configure
- * USB device descriptors. */
- extern void _init(void);
- #define PioDebounce32(mask, count, period) PioDebounce32Bank(0, mask, count, period)
- #define PioGet32() PioGet32Bank(0)
- #define PioSet32(mask, bits) PioSet32Bank(0, mask, bits)
- #define PioGetDir32() PioGetDir32Bank(0)
- #define PioSetDir32(mask, dir) PioSetDir32Bank(0, mask, dir)
- #define PioGetStrongBias32() PioGetStrongBias32Bank(0)
- #define PioSetStrongBias32(mask, bits) PioSetStrongBias32Bank(0, mask, bits)
- #define PioGetMapPins32() PioGetMapPins32Bank(0)
- #define PioSetMapPins32(mask, bits) PioSetMapPins32Bank(0, mask, bits)
- #define PioGetUnusedPins32() PioGetUnusedPins32Bank(0)
- /*@}*/
- #endif /* PORTABILITY_H_ */
复制代码 |
|