#include "pic24_all.h"
Go to the source code of this file.
Functions | |
uint16 | msToU16Ticks (uint16 u16_ms, uint16 u16_pre) |
uint16 | usToU16Ticks (uint16 u16_us, uint16 u16_pre) |
uint32 | usToU32Ticks (uint32 u32_us, uint16 u16_pre) |
uint16 | getTimerPrescaleBits (uint8 u8_TCKPS) |
uint32 | ticksToMs (uint32 u32_ticks, uint16 u16_tmrPre) |
uint32 | ticksToUs (uint32 u32_ticks, uint16 u16_tmrPre) |
uint32 | ticksToNs (uint32 u32_ticks, uint16 u16_tmrPre) |
uint32 | computeDeltaTicksLong (uint16 u16_start, uint16 u16_end, uint16 u16_tmrPR, uint16 u16_oflows) |
uint16 | computeDeltaTicks (uint16 u16_start, uint16 u16_end, uint16 u16_tmrPR) |
Definition in file pic24_timer.c.
Computes delta ticks between two Timer register captures Assumes the delta time does not exceeds the timer period
u16_start | start tick | |
u16_end | end tick | |
u16_tmrPR | Timer period register |
Definition at line 214 of file pic24_timer.c.
uint32 computeDeltaTicksLong | ( | uint16 | u16_start, | |
uint16 | u16_end, | |||
uint16 | u16_tmrPR, | |||
uint16 | u16_oflows | |||
) |
Computes delta ticks between two Timer register captures Assumes long time interval and thus has a parameter for tracking timer overflows
u16_start | start tick | |
u16_end | end tick | |
u16_tmrPR | Timer period register | |
u16_oflows | number of timer overflows |
Definition at line 193 of file pic24_timer.c.
Given the TCKPS bitfield, return the timer prescale encoded by these bits. Use getTimerPrescale as a convenient way to extract the TCKPS bitfield from a TxCONbits SFT then call this function.
u8_TCKPS | TCKPS bitfield from the timer in question |
Definition at line 130 of file pic24_timer.c.
Converts milliseconds to 16-bit timer ticks.
u16_ms | Time, in milliseconds, to convert to ticks | |
u16_pre | Prescale set for this timer. Note that getTimerPrescale can easily determine this. |
Definition at line 75 of file pic24_timer.c.
Converts timer ticks to milliseconds
u32_ticks | Timer ticks | |
u16_tmrPre | Timer prescale value |
Definition at line 141 of file pic24_timer.c.
Converts timer ticks to nanoseconds
u32_ticks | Timer ticks | |
u16_tmrPre | Timer prescale value |
Definition at line 174 of file pic24_timer.c.
Converts timer ticks to microseconds
u32_ticks | Timer ticks | |
u16_tmrPre | Timer prescale value |
Definition at line 158 of file pic24_timer.c.
Converts microseconds to 16-bit timer ticks.
u16_us | Time, in microseconds, to convert to ticks | |
u16_pre | Prescale set for this timer. Note that getTimerPrescale can easily determine this. |
Definition at line 93 of file pic24_timer.c.
Converts microseconds to 32-bit timer ticks.
u32_us | Time, in microseconds, to convert to ticks | |
u16_pre | Prescale set for this timer. Note that getTimerPrescale can easily determine this. |
Definition at line 112 of file pic24_timer.c.