测量一段函数的运行时间

来源:互联网 发布:网络电视怎么连接手机 编辑:程序博客网 时间:2024/05/17 07:41

http://blog.csdn.net/sinat_23338865/article/details/52039513
1.
就是用GPIO高低电平时间,在被测量的一条语句前将一个管脚的GPIO拉低,测量完毕后,将该GPIO拉高,用示波器测量该GPIO的电平转换时间。
http://blog.sina.com.cn/s/blog_a57f68b90102wro4.html

typedef struct stu{    uint16_t GPIO_Pin;    GPIOSpeed_Typedef GPIO_Speed;    GPIOMode_Typedef GPIO_Mode; }GPIO_InitTypedf;

void XMC_GPIO_SetMode(XMC_GPIO_PORT_t *const port, const uint_8 pin, const XMC_GPIO_Mode_t mode);
__STATIC_INLINE void XMC_GPIO_SetOutputHigh(XMC_GPIO_PORT_t *const port, const uint8_t pin);
XMC_GPIO_SetOutputLow(XMC_GPIO_PORT_t *const port, const uint8_t pin);