NXP / fsl_phy_mcr20a

Fork of fsl_phy_mcr20a by Freescale

Embed: (wiki syntax)

« Back to documentation index

PhyTime.c File Reference

PhyTime.c File Reference

Go to the source code of this file.

Functions

static void PhyTime_OverflowCB (uint32_t param)
 Timer Overflow callback.
static phyTimeEvent_t * PhyTime_GetNextEvent (void)
 Search for the next event to be scheduled.
void PhyTimeSetEventTrigger (uint32_t startTime)
 Sets the start time of a sequence.
void PhyTimeDisableEventTrigger (void)
 Disable the time trigger for a sequence.
void PhyTimeSetEventTimeout (uint32_t *pEndTime)
 Sets the timeout value for a sequence.
uint32_t PhyTimeGetEventTimeout (void)
 Return the timeout value for the current sequence.
void PhyTimeDisableEventTimeout (void)
 Disables the sequence timeout.
void PhyTimeReadClock (uint32_t *pRetClk)
 Reads the absolute clock from the radio.
void PhyTimeInitEventTimer (uint32_t *pAbsTime)
 Initialize the Event Timer.
void PhyTimeSetWaitTimeout (uint32_t *pWaitTimeout)
 Set TMR1 timeout value.
void PhyTimeDisableWaitTimeout (void)
 Disable the TMR1 timeout.
void PhyTimeSetWakeUpTime (uint32_t *pWakeUpTime)
 Set TMR4 timeout value.
bool_t PhyTimeIsWakeUpTimeExpired (void)
 Check if TMR4 IRQ occured, and aknowledge it.
void PhyTime_ISR (void)
 PHY Timer Interrupt Service Routine.
phyTimeStatus_t PhyTime_TimerInit (void(*cb)(void))
 Initialize the PHY Timer module.
phyTimeTimestamp_t PhyTime_GetTimestamp (void)
 Returns a 64bit timestamp value to be used by the MAC Layer.
phyTimeTimerId_t PhyTime_ScheduleEvent (phyTimeEvent_t *pEvent)
 Schedules an event.
phyTimeStatus_t PhyTime_CancelEvent (phyTimeTimerId_t timerId)
 Cancel an event.
phyTimeStatus_t PhyTime_CancelEventsWithParam (uint32_t param)
 Cancel all event with the specified paameter.
void PhyTime_RunCallback (void)
 Run the callback for the recently expired event.
void PhyTime_Maintenance (void)
 Expire events too close to be scheduled. Program the next event.

Detailed Description

Copyright (c) 2015, Freescale Semiconductor, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

o Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

o Neither the name of Freescale Semiconductor, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file PhyTime.c.


Function Documentation

phyTimeStatus_t PhyTime_CancelEvent ( phyTimeTimerId_t  timerId )

Cancel an event.

*********************************************************************************

Parameters:
[in]timerIdthe Id of the timer
Returns:
phyTimeStatus_t

Definition at line 546 of file PhyTime.c.

phyTimeStatus_t PhyTime_CancelEventsWithParam ( uint32_t  param )

Cancel all event with the specified paameter.

*********************************************************************************

Parameters:
[in]paramevent parameter
Returns:
phyTimeStatus_t

Definition at line 571 of file PhyTime.c.

static phyTimeEvent_t * PhyTime_GetNextEvent ( void   ) [static]

Search for the next event to be scheduled.

*********************************************************************************

Returns:
phyTimeEvent_t pointer to the next event to be scheduled

Definition at line 679 of file PhyTime.c.

phyTimeTimestamp_t PhyTime_GetTimestamp ( void   )

Returns a 64bit timestamp value to be used by the MAC Layer.

*********************************************************************************

Returns:
phyTimeTimestamp_t PHY timestamp

Definition at line 483 of file PhyTime.c.

void PhyTime_ISR ( void   )

PHY Timer Interrupt Service Routine.

*********************************************************************************

Definition at line 435 of file PhyTime.c.

void PhyTime_Maintenance ( void   )

Expire events too close to be scheduled. Program the next event.

*********************************************************************************

Definition at line 621 of file PhyTime.c.

static void PhyTime_OverflowCB ( uint32_t  param ) [static]

Timer Overflow callback.

*********************************************************************************

Parameters:
[in]param

Definition at line 664 of file PhyTime.c.

void PhyTime_RunCallback ( void   )

Run the callback for the recently expired event.

*********************************************************************************

Definition at line 596 of file PhyTime.c.

phyTimeTimerId_t PhyTime_ScheduleEvent ( phyTimeEvent_t *  pEvent )

Schedules an event.

*********************************************************************************

Parameters:
[in]pEventevent to be scheduled
Returns:
phyTimeTimerId_t the id of the alocated timer

Definition at line 503 of file PhyTime.c.

phyTimeStatus_t PhyTime_TimerInit ( void(*)(void)  cb )

Initialize the PHY Timer module.

*********************************************************************************

Returns:
phyTimeStatus_t

Definition at line 459 of file PhyTime.c.

void PhyTimeDisableEventTimeout ( void   )

Disables the sequence timeout.

*********************************************************************************

Definition at line 218 of file PhyTime.c.

void PhyTimeDisableEventTrigger ( void   )

Disable the time trigger for a sequence.

*********************************************************************************

Remarks:
The sequence will start asap

Definition at line 130 of file PhyTime.c.

void PhyTimeDisableWaitTimeout ( void   )

Disable the TMR1 timeout.

*********************************************************************************

Definition at line 339 of file PhyTime.c.

uint32_t PhyTimeGetEventTimeout ( void   )

Return the timeout value for the current sequence.

*********************************************************************************

Returns:
uint32_t the timeout value

Definition at line 208 of file PhyTime.c.

void PhyTimeInitEventTimer ( uint32_t *  pAbsTime )

Initialize the Event Timer.

*********************************************************************************

Parameters:
[in]pAbsTimepointer to the location where the new time is stored

Definition at line 276 of file PhyTime.c.

bool_t PhyTimeIsWakeUpTimeExpired ( void   )

Check if TMR4 IRQ occured, and aknowledge it.

*********************************************************************************

Returns:
TRUE if TMR4 IRQ occured

Definition at line 399 of file PhyTime.c.

void PhyTimeReadClock ( uint32_t *  pRetClk )

Reads the absolute clock from the radio.

*********************************************************************************

Parameters:
[out]pRetClkpointer to a location where the current clock will be stored

Definition at line 249 of file PhyTime.c.

void PhyTimeSetEventTimeout ( uint32_t *  pEndTime )

Sets the timeout value for a sequence.

*********************************************************************************

Parameters:
[in]pEndTimethe absolute time when a sequence should terminate
Remarks:
If the sequence does not finish until the timeout, it will be aborted

Definition at line 164 of file PhyTime.c.

void PhyTimeSetEventTrigger ( uint32_t  startTime )

Sets the start time of a sequence.

*********************************************************************************

Parameters:
[in]startTimethe start time for a sequence

Definition at line 92 of file PhyTime.c.

void PhyTimeSetWaitTimeout ( uint32_t *  pWaitTimeout )

Set TMR1 timeout value.

*********************************************************************************

Parameters:
[in]pWaitTimeoutthe timeout value

Definition at line 307 of file PhyTime.c.

void PhyTimeSetWakeUpTime ( uint32_t *  pWakeUpTime )

Set TMR4 timeout value.

*********************************************************************************

Parameters:
[in]pWakeUpTimeabsolute time

Definition at line 366 of file PhyTime.c.