PAN1080 Peripheral API
|
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... | |
Acc Interface.
__STATIC_INLINE void ACC_ClearStatus | ( | ACC_T * | acc, |
uint32_t | flag | ||
) |
This function used to clear acc interrupt status.
acc | where acc is a ACC peripheral base address |
flag | interrupt status flag or polling status flag ACC_INT_STATUS_FLAG_Msk ACC_INT_INT_FLAG_Msk |
uint32_t ACC_DivisionCalculate | ( | ACC_T * | acc, |
uint32_t | divisor, | ||
uint32_t | dividend, | ||
uint8_t | cycle | ||
) |
This function is used to start divider.
acc | where acc is a ACC peripheral base address |
divisor | divisor value |
dividend | dividend value |
cycle | The multiplier reserves the computation period |
__STATIC_INLINE void ACC_EnableDivider | ( | ACC_T * | acc, |
FunctionalState | NewState | ||
) |
This function used to enable divider.
acc | where acc is a ACC peripheral base address |
NewState | new state of acc divider |
__STATIC_INLINE void ACC_EnableInt | ( | ACC_T * | acc, |
FunctionalState | NewState | ||
) |
This function used to enable acc interrupt.
acc | where acc is a ACC peripheral base address |
NewState | new state of acc interrupt |
__STATIC_INLINE void ACC_EnableMultiplier | ( | ACC_T * | acc, |
FunctionalState | NewState | ||
) |
This function used to enable multiplying unit.
acc | where acc is a ACC peripheral base address |
NewState | new state of acc multiplier |
void ACC_GetMultResult | ( | ACC_T * | acc, |
uint8_t | num_words, | ||
uint32_t * | result | ||
) |
This function is used to get multiplier result.
acc | where acc is a ACC peripheral base address |
num_words | The multiplier calculates the number of polls |
result | data result array |
__STATIC_INLINE void ACC_SetDivCalcCycle | ( | ACC_T * | acc, |
uint32_t | cnt | ||
) |
This function set acc divider calculate cycle cnt.
acc | where acc is a ACC peripheral base address |
cnt | cycle cnt value |
__STATIC_INLINE void ACC_SetMultCalcCycle | ( | ACC_T * | acc, |
uint32_t | cnt | ||
) |
This function set calculate cycle cnt.
acc | where acc is a ACC peripheral base address |
cnt | cycle cnt value |
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.
acc | where acc is a ACC peripheral base address |
left | data with calculations |
right | data with calculations |
num_words | The multiplier calculates the number of polls |
cycle | The multiplier reserves the computation period |
__STATIC_INLINE bool ACC_StatusFlag | ( | ACC_T * | acc, |
uint32_t | flag | ||
) |
This function used to check acc interrupt status.
acc | where acc is a ACC peripheral base address |
flag | interrupt status flag or polling status flag ACC_INT_STATUS_FLAG_Msk ACC_INT_INT_FLAG_Msk |