* apps/include/industry/foc/foc_common.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*
****************************************************************************/
#ifndef __APPS_INCLUDE_INDUSTRY_FOC_FOC_COMMON_H
#define __APPS_INCLUDE_INDUSTRY_FOC_FOC_COMMON_H
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
* Pre-processor Definitions
****************************************************************************/
* Public Types
****************************************************************************/
enum foc_handler_mode_e
{
FOC_HANDLER_MODE_INIT = 0,
FOC_HANDLER_MODE_IDLE,
FOC_HANDLER_MODE_VOLTAGE,
FOC_HANDLER_MODE_CURRENT
};
enum foc_number_type_e
{
FOC_NUMBER_TYPE_INVALID = 0,
#ifdef CONFIG_INDUSTRY_FOC_FLOAT
FOC_NUMBER_TYPE_FLOAT = 1,
#endif
#ifdef CONFIG_INDUSTRY_FOC_FIXED16
FOC_NUMBER_TYPE_FIXED16 = 2,
#endif
};
enum foc_ramp_mode_e
{
RAMP_MODE_INVALID = 0,
RAMP_MODE_SOFTSTART = 1,
RAMP_MODE_SOFTSTOP = 2,
RAMP_MODE_NORMAL = 3,
};
enum foc_angle_type_e
{
FOC_ANGLE_TYPE_INVALID = 0,
FOC_ANGLE_TYPE_ELE = 1,
FOC_ANGLE_TYPE_MECH = 2,
};
enum foc_openloop_stage_e
{
FOC_OPENLOOP_ENABLED = 1,
FOC_OPENLOOP_TRANSITION = 2,
FOC_OPENLOOP_DISABLED = 3,
};
* Public Function Prototypes
****************************************************************************/
#endif