LoginSignup
0
0

More than 5 years have passed since last update.

Zybo > TTC > Prescaler > XTtcPs_SetPrescaler() > 0から16の値

Last updated at Posted at 2016-06-04

http://qiita.com/7of9/items/ace300523ac2521237b7
で気になったPrescalerについて。

    XTtcPs_SetPrescaler(&ttcInst, tmrSetup->Prescaler);

にてtmrSetupでセットしたPrescaler値が使われている。

XTtcPs_SetPrescaler()は以下で実装とコメントが見つかった。

/*****************************************************************************/
/**
*
* This function sets the prescaler enable bit and if needed sets the prescaler
* bits in the control register.
*
* @param    InstancePtr is a pointer to the XTtcPs instance.
* @param    PrescalerValue is a number from 0-16 that sets the prescaler
*       to use.
*       If the parameter is 0 - 15, use a prescaler on the clock of
*       2^(PrescalerValue+1), or 2-65536.
*       If the parameter is XTTCPS_CLK_CNTRL_PS_DISABLE, do not use a
*       prescaler.
*
* @return   None
*
* @note     None
*
****************************************************************************/
void XTtcPs_SetPrescaler(XTtcPs *InstancePtr, u8 PrescalerValue)
{
  • 0から16の値が使える
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0