⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ui_common.h

📁 Luminary Micro BLDC motor control software
💻 H
字号:
//*****************************************************************************
//
// ui_common.h - Common definitions for the motor control API.
//
// Copyright (c) 2007-2008 Luminary Micro, Inc.  All rights reserved.
// 
// Software License Agreement
// 
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
// 
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws.  All rights are reserved.  You may not combine
// this software with "viral" open-source software in order to form a larger
// program.  Any use in violation of the foregoing restrictions may subject
// the user to criminal sanctions under applicable laws, as well as to civil
// liability for the breach of the terms and conditions of this license.
// 
// THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
// 
// This is part of revision 716 of the BLDC motor application.
//
//*****************************************************************************

#ifndef __UI_COMMON_H__
#define __UI_COMMON_H__

//*****************************************************************************
//
//! \addtogroup ui_common_api
//! @{
//
//*****************************************************************************

//*****************************************************************************
//
//! This structure contains a set of variables that describes the properties
//! of a parameter.
//
//*****************************************************************************
typedef struct
{
    //
    //! The ID of this parameter.
    //
    unsigned char ucID;

    //
    //! The size of this parameter in bytes.
    //
    unsigned char ucSize;

    //
    //! The minimum value for this parameter.  If the size of the parameter is
    //! greater than four bytes, then this minimum does not apply.
    //
    unsigned long ulMin;

    //
    //! The maximum value for this parameter.  If the size of the parameter is
    //! greater than four bytes, then this maximum does not apply.
    //
    unsigned long ulMax;

    //
    //! The increment between valid values for this parameter.  If the size of
    //! the parameter is greater than four bytes, then this increment does not
    //! apply.
    //
    unsigned long ulStep;

    //
    //! A pointer to the value of this parameter.
    //
    unsigned char *pucValue;

    //
    //! A pointer to a function that is called when the parameter value is
    //! updated.  If no function needs to be called, then this can be NULL.
    //
    void (*pfnUpdate)(void);
}
tUIParameter;

//*****************************************************************************
//
//! This structure contains a set of variables that describes the properties
//! of a real-time data item.
//
//*****************************************************************************
typedef struct
{
    //
    //! The ID of this real-time data item.
    //
    unsigned char ucID;

    //
    //! The size of this real-time data item in bytes.
    //
    unsigned char ucSize;

    //
    //! A pointer to the value of this real-time data item.
    //
    unsigned char *pucValue;
}
tUIRealTimeData;

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

//*****************************************************************************
//
// The type of this target.  This value must be supplied by the application.
//
//*****************************************************************************
extern const unsigned long g_ulUITargetType;

//*****************************************************************************
//
// An array of the parameters supported by this target.  This array must be
// supplied by the application.
//
//*****************************************************************************
extern const tUIParameter g_sUIParameters[];

//*****************************************************************************
//
// The number of parameters supported by this target.  This value must be
// supplied by the application.
//
//*****************************************************************************
extern const unsigned long g_ulUINumParameters;

//*****************************************************************************
//
// An array of the real-time data items supported by this target.  This array
// must be supplied by the application.
//
//*****************************************************************************
extern const tUIRealTimeData g_sUIRealTimeData[];

//*****************************************************************************
//
// The number of real-time data items supported by this target.  This value
// must be supplied by the application.
//
//*****************************************************************************
extern const unsigned long g_ulUINumRealTimeData;

//*****************************************************************************
//
// Starts the motor drive.
//
// This function is called when the motor drive should be started.  This
// function must be supplied by the application.
//
// \return None.
//
//*****************************************************************************
extern void UIRun(void);

//*****************************************************************************
//
// Stops the motor drive.
//
// This function is called when the motor drive should be stopped.  This
// function must be supplied by the application.
//
// \return None.
//
//*****************************************************************************
extern void UIStop(void);

//*****************************************************************************
//
// Emergency stops the motor drive.
//
// This function is called when the motor drive should be emergency stopped.
// This function must be supplied by the application.
//
// \return None.
//
//*****************************************************************************
extern void UIEmergencyStop(void);

//*****************************************************************************
//
// Loads parameters from flash.
//
// This function is called when the parameter set should be loaded from flash.
// This function must be supplied by the application.
//
// \return None.
//
//*****************************************************************************
extern void UIParamLoad(void);

//*****************************************************************************
//
// Saves parameters to flash.
//
// This function is called when the parameter set should be saved to flash.
// This function must be supplied by the application.
//
// \return None.
//
//*****************************************************************************
extern void UIParamSave(void);

//*****************************************************************************
//
// Starts a firmware upgrade.
//
// This function is called when the firmware should be upgraded.  This function
// must be supplied by the application and can not return.
//
// \return None.
//
//*****************************************************************************
extern void UIUpgrade(void);

#endif // __UI_COMMON_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -