MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

Modules | Data Structures | Typedefs | Functions
CLARKE

## Modules
| Module overview

## Data Structures
struct | _CLARKE_Obj_
| Defines the CLARKE object. More...

## Typedefs
typedef struct _CLARKE_Obj_ | CLARKE_Obj
| Defines the CLARKE object. More...
typedef struct _CLARKE_Obj_ * | CLARKE_Handle
| Defines the CLARKE handle. More...
typedef struct _CLARKE_Obj_ | CLARKE_Obj
| Defines the CLARKE object. More...
typedef struct _CLARKE_Obj_ * | CLARKE_Handle
| Defines the CLARKE handle. More...

## Functions
static uint_least8_t | CLARKE_getNumSensors (CLARKE_Handle handle)
| Gets the number of sensors. More...
CLARKE_Handle | CLARKE_init (void *pMemory, const size_t numBytes)
| Initializes the Clarke transform module. More...
static void | CLARKE_run (CLARKE_Handle handle, const MATH_vec3 *pInVec, MATH_vec2 *pOutVec)
| Runs the Clarke transform module for three inputs. More...
static void | CLARKE_run_twoInput (CLARKE_Handle handle, const MATH_vec2 *pInVec, MATH_vec2 *pOutVec)
| Runs the Clarke transform module for two inputs. More...
static void | CLARKE_setNumSensors (CLARKE_Handle handle, const uint_least8_t numSensors)
| Sets the number of sensors. More...
static void | CLARKE_setScaleFactors (CLARKE_Handle handle, const _iq alpha_sf, const _iq beta_sf)
| Sets the scale factors. More...
static void | CLARKE_setScaleFactors (CLARKE_Handle handle, const float_t alpha_sf, const float_t beta_sf)
| Sets the scale factors. More...

## Detailed Description

## Data Structure Documentation

struct _CLARKE_Obj_

Defines the CLARKE object.

Definition at line 75 of file 32b/clarke.h.

Data Fields
float_t | alpha_sf | the scale factor for the alpha component
_iq | alpha_sf | the scale factor for the alpha component
float_t | beta_sf | the scale factor for the beta component
_iq | beta_sf | the scale factor for the beta component
uint_least8_t | numSensors | the number of sensors

## Typedef Documentation

typedef struct _CLARKE_Obj_* CLARKE_Handle

Defines the CLARKE handle.

Definition at line 86 of file float/clarke.h.

typedef struct _CLARKE_Obj_* CLARKE_Handle

Defines the CLARKE handle.

Definition at line 87 of file 32b/clarke.h.

typedef struct _CLARKE_Obj_ CLARKE_Obj

Defines the CLARKE object.

typedef struct _CLARKE_Obj_ CLARKE_Obj

Defines the CLARKE object.

## Function Documentation

static uint_least8_t CLARKE_getNumSensors | ( | CLARKE_Handle | handle | ) |
| inline static

Gets the number of sensors.

Parameters

  [in] | handle | The Clarke transform handle

Returns
  The number of sensors

Definition at line 100 of file 32b/clarke.h.

References _CLARKE_Obj_::numSensors.

CLARKE_Handle CLARKE_init | ( | void * | pMemory,
|  | const size_t | numBytes
| ) |  |

Initializes the Clarke transform module.

Parameters

  [in] | pMemory | A pointer to the memory for the Clarke object
  [in] | numBytes | The number of bytes allocated for the Clarke object, bytes

Returns
  The Clarke (CLARKE) object handle

Definition at line 55 of file 32b/clarke.c.

static void CLARKE_run | ( | CLARKE_Handle | handle,
|  | const MATH_vec3 * | pInVec,
|  | MATH_vec2 * | pOutVec
| ) |  |
| inline static

Runs the Clarke transform module for three inputs.

Parameters

  [in] | handle | The Clarke transform handle
  [in] | pInVec | The pointer to the input vector
  [in] | pOutVec | The pointer to the output vector

Definition at line 119 of file 32b/clarke.h.

References _IQmpy, _CLARKE_Obj_::alpha_sf, _CLARKE_Obj_::beta_sf, lshft_1, _CLARKE_Obj_::numSensors, _MATH_vec2_::value, and _MATH_vec3_::value.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

static void CLARKE_run_twoInput | ( | CLARKE_Handle | handle,
|  | const MATH_vec2 * | pInVec,
|  | MATH_vec2 * | pOutVec
| ) |  |
| inline static

Runs the Clarke transform module for two inputs.

Parameters

  [in] | handle | The Clarke transform handle
  [in] | pInVec | The pointer to the input vector
  [in] | pOutVec | The pointer to the output vector

Definition at line 148 of file 32b/clarke.h.

References _IQmpy, _IQmpy2, _CLARKE_Obj_::beta_sf, and _MATH_vec2_::value.

static void CLARKE_setNumSensors | ( | CLARKE_Handle | handle,
|  | const uint_least8_t | numSensors
| ) |  |
| inline static

Sets the number of sensors.

Parameters

  [in] | handle | The Clarke transform handle
  [in] | numSensors | The number of sensors

Definition at line 166 of file 32b/clarke.h.

References _CLARKE_Obj_::numSensors.

Referenced by CTRL_setupClarke_I(), and CTRL_setupClarke_V().

static void CLARKE_setScaleFactors | ( | CLARKE_Handle | handle,
|  | const _iq | alpha_sf,
|  | const _iq | beta_sf
| ) |  |
| inline static

Sets the scale factors.

Parameters

  [in] | handle | The Clarke transform handle
  [in] | alpha_sf | The scale factor for the alpha voltage
  [in] | beta_sf | The scale factor for the beta voltage

Definition at line 180 of file 32b/clarke.h.

References _CLARKE_Obj_::alpha_sf, and _CLARKE_Obj_::beta_sf.

Referenced by CTRL_setupClarke_I(), and CTRL_setupClarke_V().

static void CLARKE_setScaleFactors | ( | CLARKE_Handle | handle,
|  | const float_t | alpha_sf,
|  | const float_t | beta_sf
| ) |  |
| inline static

Sets the scale factors.

Parameters

  [in] | handle | The Clarke transform handle
  [in] | alpha_sf | The scale factor for the alpha voltage
  [in] | beta_sf | The scale factor for the beta voltage

Definition at line 186 of file float/clarke.h.

References _CLARKE_Obj_::alpha_sf, and _CLARKE_Obj_::beta_sf.