Mar 22, 2018
10:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 22, 2018
10:46 PM
1 Solution
Mar 28, 2018
05:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 28, 2018
05:34 AM
Create a new callback function named say, Timercb()
CyU3PTimer Timer; // define this handle
void TimerCb()
{
// Here you get the callback after Time_in_millisecond
}
void TimerInit(void)
{
CyU3PReturnStatus_t apiRetStatus = CY_U3P_SUCCESS;
apiRetStatus = CyU3PTimerCreate(&Timer, TimerCb, 0, Time_in_millisecond, Time_in_millisecond, 1);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (2, "TimerCreate failed, Error Code = %d\r\n", apiRetStatus);
}
}
Note: For further understanding you can refer to CyU3PTimerCreate() API in API Guide
Regards
Abhinav
4 Replies