PAN1080 Peripheral API
Functions
Acc Interface

Acc Interface. More...

Functions

__STATIC_INLINE void ACC_SetDivCalcCycle (ACC_T *acc, uint32_t cnt)
 This function set acc divider calculate cycle cnt. More...
 
__STATIC_INLINE void ACC_EnableDivider (ACC_T *acc, FunctionalState NewState)
 This function used to enable divider. More...
 
__STATIC_INLINE void ACC_SetMultCalcCycle (ACC_T *acc, uint32_t cnt)
 This function set calculate cycle cnt. More...
 
__STATIC_INLINE void ACC_EnableMultiplier (ACC_T *acc, FunctionalState NewState)
 This function used to enable multiplying unit. More...
 
__STATIC_INLINE void ACC_EnableInt (ACC_T *acc, FunctionalState NewState)
 This function used to enable acc interrupt. More...
 
__STATIC_INLINE bool ACC_StatusFlag (ACC_T *acc, uint32_t flag)
 This function used to check acc interrupt status. More...
 
__STATIC_INLINE void ACC_ClearStatus (ACC_T *acc, uint32_t flag)
 This function used to clear acc interrupt status. More...
 
void ACC_StartMultCalc (ACC_T *acc, const uint32_t *left, const uint32_t *right, uint8_t num_words, uint8_t cycle)
 This function is used to start multiplier. More...
 
void ACC_GetMultResult (ACC_T *acc, uint8_t num_words, uint32_t *result)
 This function is used to get multiplier result. More...
 
uint32_t ACC_DivisionCalculate (ACC_T *acc, uint32_t divisor, uint32_t dividend, uint8_t cycle)
 This function is used to start divider. More...
 

Detailed Description

Acc Interface.

Function Documentation

◆ ACC_ClearStatus()

__STATIC_INLINE void ACC_ClearStatus ( ACC_T *  acc,
uint32_t  flag 
)

This function used to clear acc interrupt status.

Parameters
accwhere acc is a ACC peripheral base address
flaginterrupt status flag or polling status flag ACC_INT_STATUS_FLAG_Msk
ACC_INT_INT_FLAG_Msk
Returns
None

◆ ACC_DivisionCalculate()

uint32_t ACC_DivisionCalculate ( ACC_T *  acc,
uint32_t  divisor,
uint32_t  dividend,
uint8_t  cycle 
)

This function is used to start divider.

Parameters
accwhere acc is a ACC peripheral base address
divisordivisor value
dividenddividend value
cycleThe multiplier reserves the computation period
Returns
data result

◆ ACC_EnableDivider()

__STATIC_INLINE void ACC_EnableDivider ( ACC_T *  acc,
FunctionalState  NewState 
)

This function used to enable divider.

Parameters
accwhere acc is a ACC peripheral base address
NewStatenew state of acc divider
Returns
None

◆ ACC_EnableInt()

__STATIC_INLINE void ACC_EnableInt ( ACC_T *  acc,
FunctionalState  NewState 
)

This function used to enable acc interrupt.

Parameters
accwhere acc is a ACC peripheral base address
NewStatenew state of acc interrupt
Returns
None

◆ ACC_EnableMultiplier()

__STATIC_INLINE void ACC_EnableMultiplier ( ACC_T *  acc,
FunctionalState  NewState 
)

This function used to enable multiplying unit.

Parameters
accwhere acc is a ACC peripheral base address
NewStatenew state of acc multiplier
Returns
None

◆ ACC_GetMultResult()

void ACC_GetMultResult ( ACC_T *  acc,
uint8_t  num_words,
uint32_t *  result 
)

This function is used to get multiplier result.

Parameters
accwhere acc is a ACC peripheral base address
num_wordsThe multiplier calculates the number of polls
resultdata result array
Returns
None

◆ ACC_SetDivCalcCycle()

__STATIC_INLINE void ACC_SetDivCalcCycle ( ACC_T *  acc,
uint32_t  cnt 
)

This function set acc divider calculate cycle cnt.

Parameters
accwhere acc is a ACC peripheral base address
cntcycle cnt value
Returns
None

◆ ACC_SetMultCalcCycle()

__STATIC_INLINE void ACC_SetMultCalcCycle ( ACC_T *  acc,
uint32_t  cnt 
)

This function set calculate cycle cnt.

Parameters
accwhere acc is a ACC peripheral base address
cntcycle cnt value
Returns
None

◆ ACC_StartMultCalc()

void ACC_StartMultCalc ( ACC_T *  acc,
const uint32_t *  left,
const uint32_t *  right,
uint8_t  num_words,
uint8_t  cycle 
)

This function is used to start multiplier.

Parameters
accwhere acc is a ACC peripheral base address
leftdata with calculations
rightdata with calculations
num_wordsThe multiplier calculates the number of polls
cycleThe multiplier reserves the computation period
Returns
None

◆ ACC_StatusFlag()

__STATIC_INLINE bool ACC_StatusFlag ( ACC_T *  acc,
uint32_t  flag 
)

This function used to check acc interrupt status.

Parameters
accwhere acc is a ACC peripheral base address
flaginterrupt status flag or polling status flag ACC_INT_STATUS_FLAG_Msk
ACC_INT_INT_FLAG_Msk
Returns
True or false