Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fsl_mmdvsq_hal.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
#include "fsl_device_registers.h"

Enumerations

enum  mmdvsq_execution_status_t {
  kMmdvsqIdleSquareRoot = 0x01,
  kMmdvsqIdleDivide = 0x02,
  kMmdvsqBusySquareRoot = 0x05,
  kMmdvsqBusyDivide = 0x06
}
 MMDVSQ execution status.
 
enum  mmdvsq_divide_operation_select_t {
  kMmdvsqSignedDivideGetQuotient,
  kMmdvsqUnsignedDivideGetQuotient,
  kMmdvsqSignedDivideGetRemainder,
  kMmdvsqUnsignedDivideGetRemainder
}
 MMDVSQ divide operation select.
 
enum  mmdvsq_divide_fast_start_select_t {
  kMmdvsqDivideFastStart,
  kMmdvsqDivideNormalStart
}
 MMDVSQ divide fast start select.
 
enum  mmdvsq_divide_by_zero_select_t {
  kMmdvsqDivideByZeroDis,
  kMmdvsqDivideByZeroEn
}
 MMDVSQ divide by zero setting.
 
enum  mmdvsq_divide_by_zero_status_t {
  kMmdvsqNonZeroDivisor,
  kMmdvsqZeroDivisor
}
 MMDVSQ divide by zero status.
 
enum  mmdvsq_unsined_divide_select_t {
  kMmdvsqSignedDivide,
  kMmdvsqUnsignedDivide
}
 MMDVSQ unsigned or signed divide calculation select.
 
enum  mmdvsq_remainder_calculation_select_t {
  kMmdvsqDivideReturnQuotient,
  kMmdvsqDivideReturnRemainder
}
 MMDVSQ remainder or quotient result select.
 
enum  mmdvsq_error_code_t {
  kMmdvsqErrNotReady = 0x01,
  kMmdvsqErrDivideTimeOut = 0x02,
  kMmdvsqErrSqrtTimeOut = 0x03,
  kMmdvsqErrDivideByZero = 0x04
}
 MCG mode transition API error code definitions.
 

Functions

MMDVSQ operations access API
uint32_t MMDVSQ_HAL_DivUR (MMDVSQ_Type *base, uint32_t dividend, uint32_t divisor)
 perform the current MMDVSQ unsigned divide operation and get remainder More...
 
uint32_t MMDVSQ_HAL_DivUQ (MMDVSQ_Type *base, uint32_t dividend, uint32_t divisor)
 perform the current MMDVSQ unsigned divide operation and get quotient More...
 
uint32_t MMDVSQ_HAL_DivSR (MMDVSQ_Type *base, uint32_t dividend, uint32_t divisor)
 perform the current MMDVSQ signed divide operation and get remainder More...
 
uint32_t MMDVSQ_HAL_DivSQ (MMDVSQ_Type *base, uint32_t dividend, uint32_t divisor)
 perform the current MMDVSQ signed divide operation and get quotient More...
 
uint16_t MMDVSQ_HAL_Sqrt (MMDVSQ_Type *base, uint32_t radicand)
 set the current MMDVSQ square root operation More...
 
MMDVSQ control register access API
static mmdvsq_execution_status_t MMDVSQ_HAL_GetExecutionStatus (MMDVSQ_Type *base)
 Get the current MMDVSQ execution status. More...
 
static bool MMDVSQ_HAL_GetBusyStatus (MMDVSQ_Type *base)
 Get the current MMDVSQ BUSY status. More...
 
static void MMDVSQ_HAL_SetDivideFastStart (MMDVSQ_Type *base, bool enable)
 set the current MMDVSQ divide fast start More...
 
static bool MMDVSQ_HAL_GetDivideFastStart (MMDVSQ_Type *base)
 get the current MMDVSQ divide fast start setting More...
 
static void MMDVSQ_HAL_SetDivdeByZero (MMDVSQ_Type *base, bool enable)
 set the current MMDVSQ divide by zero detection More...
 
static bool MMDVSQ_HAL_GetDivdeByZeroSetting (MMDVSQ_Type *base)
 get the current MMDVSQ divide by zero setting More...
 
static bool MMDVSQ_HAL_GetDivdeByZeroStatus (MMDVSQ_Type *base)
 get the current MMDVSQ divide by zero status More...
 
static void MMDVSQ_HAL_SetRemainderCalculation (MMDVSQ_Type *base, bool enable)
 set the current MMDVSQ divide remainder calculation More...
 
static bool MMDVSQ_HAL_GetRemainderCalculation (MMDVSQ_Type *base)
 get the current MMDVSQ divide remainder calculation More...
 
static void MMDVSQ_HAL_SetUnsignedCalculation (MMDVSQ_Type *base, bool enable)
 set the current MMDVSQ unsigned divide calculation More...
 
static bool MMDVSQ_HAL_GetUnsignedCalculation (MMDVSQ_Type *base)
 get the current MMDVSQ unsigned divide calculation More...
 
static uint32_t MMDVSQ_HAL_GetResult (MMDVSQ_Type *base)
 get the current MMDVSQ operation result More...
 
static void MMDVSQ_HAL_SetDividend (MMDVSQ_Type *base, uint32_t dividend)
 set the current MMDVSQ dividend value More...
 
static uint32_t MMDVSQ_HAL_GetDividend (MMDVSQ_Type *base)
 get the current MMDVSQ dividend value More...
 
static void MMDVSQ_HAL_SetDivisor (MMDVSQ_Type *base, uint32_t divisor)
 set the current MMDVSQ divisor value More...
 
static uint32_t MMDVSQ_HAL_GetDivisor (MMDVSQ_Type *base)
 get the current MMDVSQ divisor value More...
 
static void MMDVSQ_HAL_SetRadicand (MMDVSQ_Type *base, uint32_t radicand)
 set the current MMDVSQ radicand value More...