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

📄 moto_flash_a.h

📁 摩托罗拉MMC2107在ucosII的移植代码
💻 H
📖 第 1 页 / 共 5 页
字号:
   MOTO_FLASH_A_ControlDebugMode_f( (MOTO_FLASH_A_Ptr),                \
                                         (DebugMode)                   \
                                       )                               \
)/* End of MOTO_FLASH_A_ControlDebugMode Macro */ 

/**********************************************************************/
/* Function:    MOTO_FLASH_A_ControlEmulationMode                     */
/*                                                                    */
/* Purpose:     Call MOTO_FLASH_A_ControlEmulationMode_f with optional*/
/*              parameter checking.                                   */
/*                                                                    */
/* Input:                                                             */
/*      MOTO_FLASH_A_Ptr     : FLASH register block base address      */
/*      EmulationMode  : Specifies whether emulation mode is on/off   */ 
/*                                                                    */
/* Output:                                                            */
/*    MOTO_FLASH_A_ERR_NONE         : For successful completion       */
/*    MOTO_FLASH_A_ERR_INVALID_MODE : EmulationMode input is invalid  */
/**********************************************************************/
#define MOTO_FLASH_A_ControlEmulationMode(MOTO_FLASH_A_Ptr,            \
                                        EmulationMode )                \
(                                                                      \
   (MOTO_FLASH_A_PARAM_CHECKING) ?                                     \
   (                                                                   \
      ((MOTO_FLASH_A_Ptr) == NULL) ? MOTO_FLASH_A_ERR_INVALID_HANDLE : \
      (((EmulationMode) != MOTO_FLASH_A_ENABLE) &&                     \
       ((EmulationMode) != MOTO_FLASH_A_DISABLE)) ?                    \
                       MOTO_FLASH_A_ERR_INVALID_MODE :                 \
      MOTO_FLASH_A_ControlEmulationMode_f( (MOTO_FLASH_A_Ptr),         \
                                         (EmulationMode)               \
                                       )                               \
   )                                                                   \
   :                                                                   \
   MOTO_FLASH_A_ControlEmulationMode_f( (MOTO_FLASH_A_Ptr),            \
                                         (EmulationMode)               \
                                       )                               \
)/* End of MOTO_FLASH_A_ControlEmulationMode Macro */ 

/**********************************************************************/
/* Function:    MOTO_FLASH_A_ControlLowPowerMode                      */
/*                                                                    */
/* Purpose:     Call MOTO_FLASH_A_ControlLowPowerMode_f with optional */
/*              parameter checking.                                   */
/*                                                                    */
/* Input:                                                             */
/*      MOTO_FLASH_A_Ptr     : FLASH register block base address      */
/*      LowPowerMode  : Specifies whether low power mode is enabled   */ 
/*                                                                    */
/* Output:                                                            */
/*    MOTO_FLASH_A_ERR_NONE         : For successful completion       */
/*    MOTO_FLASH_A_ERR_INVALID_MODE : LowPowerMode input is invalid   */
/**********************************************************************/
#define MOTO_FLASH_A_ControlLowPowerMode(MOTO_FLASH_A_Ptr,             \
                                        LowPowerMode )                 \
(                                                                      \
   (MOTO_FLASH_A_PARAM_CHECKING) ?                                     \
   (                                                                   \
      ((MOTO_FLASH_A_Ptr) == NULL) ? MOTO_FLASH_A_ERR_INVALID_HANDLE : \
      (((LowPowerMode) != MOTO_FLASH_A_ENABLE) &&                      \
       ((LowPowerMode) != MOTO_FLASH_A_DISABLE)) ?                     \
                       MOTO_FLASH_A_ERR_INVALID_MODE :                 \
      MOTO_FLASH_A_ControlLowPowerMode_f( (MOTO_FLASH_A_Ptr),          \
                                         (LowPowerMode)                \
                                       )                               \
   )                                                                   \
   :                                                                   \
   MOTO_FLASH_A_ControlLowPowerMode_f( (MOTO_FLASH_A_Ptr),             \
                                         (LowPowerMode)                \
                                       )                               \
)/* End of MOTO_FLASH_A_ControlLowPowerMode Macro */ 
/**********************************************************************/
/* Function:    MOTO_FLASH_A_ControlPulseMode                         */
/*                                                                    */
/* Purpose:     Call MOTO_FLASH_A_ControlPulseMode_f with optional    */
/*              parameter checking.                                   */
/*                                                                    */
/* Input:                                                             */
/*      MOTO_FLASH_A_Ptr     : FLASH register block base address      */
/*      ModeControl  : Specifies whether pulse is enabled or disabled */ 
/*                                                                    */
/* Output:                                                            */
/*    MOTO_FLASH_A_ERR_NONE         : For successful completion       */
/*    MOTO_FLASH_A_ERR_INVALID_MODE : PulseMode input is invalid      */
/**********************************************************************/
#define MOTO_FLASH_A_ControlPulse(MOTO_FLASH_A_Ptr,                    \
                                        ModeControl  )                 \
(                                                                      \
   (MOTO_FLASH_A_PARAM_CHECKING) ?                                     \
   (                                                                   \
      ((MOTO_FLASH_A_Ptr) == NULL) ? MOTO_FLASH_A_ERR_INVALID_HANDLE : \
      (((ModeControl) != MOTO_FLASH_A_ENABLE) &&                       \
       ((ModeControl) != MOTO_FLASH_A_DISABLE)) ?                      \
                       MOTO_FLASH_A_ERR_INVALID_MODE :                 \
      MOTO_FLASH_A_ControlPulse_f( (MOTO_FLASH_A_Ptr),                 \
                                         (ModeControl)                 \
                                       )                               \
   )                                                                   \
   :                                                                   \
   MOTO_FLASH_A_ControlPulse_f( (MOTO_FLASH_A_Ptr),                    \
                                         (ModeControl)                 \
                                       )                               \
)/* End of MOTO_FLASH_A_ControlPulse Macro */ 
/**********************************************************************/
/* Function:    MOTO_FLASH_A_ControlShadowAccess                      */
/*                                                                    */
/* Purpose:     Call MOTO_FLASH_A_ControlShadowAccess_f with optional */
/*              parameter checking.                                   */
/*                                                                    */
/* Input:                                                             */
/*      MOTO_FLASH_A_Ptr     : FLASH register block base address      */
/*      AccessControl    : Determines shadow access mode of operation */ 
/*                                                                    */
/* Output:                                                            */
/*    MOTO_FLASH_A_ERR_NONE         : For successful completion       */
/*    MOTO_FLASH_A_ERR_INVALID_MODE : PulseMode input is invalid      */
/**********************************************************************/
#define MOTO_FLASH_A_ControlShadowAccess(MOTO_FLASH_A_Ptr,             \
                                      AccessControl  )                 \
(                                                                      \
   (MOTO_FLASH_A_PARAM_CHECKING) ?                                     \
   (                                                                   \
      ((MOTO_FLASH_A_Ptr) == NULL) ? MOTO_FLASH_A_ERR_INVALID_HANDLE : \
      (((AccessControl) != MOTO_FLASH_A_ENABLE) &&                     \
       ((AccessControl) != MOTO_FLASH_A_DISABLE)) ?                    \
                       MOTO_FLASH_A_ERR_INVALID_MODE :                 \
      MOTO_FLASH_A_ControlShadowAccess_f( (MOTO_FLASH_A_Ptr),          \
                                         (AccessControl)               \
                                       )                               \
   )                                                                   \
   :                                                                   \
   MOTO_FLASH_A_ControlShadowAccess_f( (MOTO_FLASH_A_Ptr),             \
                                         (AccessControl)               \
                                       )                               \
)/* End of MOTO_FLASH_A_ControlShadowAccess Macro */ 
/**********************************************************************/
/* Function:    MOTO_FLASH_A_ControlSequence                          */
/*                                                                    */
/* Purpose:     Call MOTO_FLASH_A_ControlSequence_f with optional     */
/*              parameter checking.                                   */
/*                                                                    */
/* Input:                                                             */
/*      MOTO_FLASH_A_Ptr     : FLASH register block base address      */
/*      ModeControl  : Determines start or end program sequence mode  */ 
/*                                                                    */
/* Output:                                                            */
/*    MOTO_FLASH_A_ERR_NONE         : For successful completion       */
/*    MOTO_FLASH_A_ERR_INVALID_MODE : ModeControl input is invalid    */
/**********************************************************************/
#define MOTO_FLASH_A_ControlSequence(MOTO_FLASH_A_Ptr,                 \
                                        ModeControl  )                 \
(                                                                      \
   (MOTO_FLASH_A_PARAM_CHECKING) ?                                     \
   (                                                                   \
      ((MOTO_FLASH_A_Ptr) == NULL) ? MOTO_FLASH_A_ERR_INVALID_HANDLE : \
      (((ModeControl) != MOTO_FLASH_A_START) &&                        \
       ((ModeControl) != MOTO_FLASH_A_END)) ?                          \
                       MOTO_FLASH_A_ERR_INVALID_MODE :                 \
      MOTO_FLASH_A_ControlSequence_f( (MOTO_FLASH_A_Ptr),              \
                                         (ModeControl)                 \
                                       )                               \
   )                                                                   \
   :                                                                   \
   MOTO_FLASH_A_ControlSequence_f( (MOTO_FLASH_A_Ptr),                 \
                                         (ModeControl)                 \
                                       )                               \
)/* End of MOTO_FLASH_A_ControlPulseMode Macro */ 
/**********************************************************************/
/* Macro:       MOTO_FLASH_A_Init                                     */
/*                                                                    */
/* Purpose:     Call MOTO_FLASH_A_Init_f function with optional       */
/*              parameter checking.                                   */
/*                                                                    */
/* Input:                                                             */
/*   MOTO_FLASH_APtr      : flash register block base address         */
/*   CycleType            : Specifies program, erase, or read         */
/*   BlocksToWrite        : Specs blocks selected for program/erase   */
/*   ShadowAccess         : Allows/disallows shadow block access      */
/*   SystemClock          : Value of System clock in HZ               */
/*   PulseWidth           : Value of proram/erase pulse width in uS   */
/*   BlocksToProtect      : Specifies blocks to protect               */
/*   ReadWriteProtection  : Specifies read-only or read-write access  */
/*   PrivilegeProtection  : Specifies user or supervisor access       */
/*   TextDataProtection   : Specifies text-only or text-data access   */ 
/* Output:                                                            */
/*   MOTO_FLASH_A_ERR_NONE               : For successful completion  */
/*   MOTO_FLASH_A_ERR_INVALID_HANDLE     : Device address is zero     */
/*   MOTO_FLASH_A_ERR_INVALID_CYCLE_TYPE : CycleType input invalid    */
/*   MOTO_FLASH_A_ERR_INVALID_BLOCK_CONFIG : Block input invalid      */
/*   MOTO_FLASH_A_ERR_INVALID_MODE : Control mode specified is invalid*/
/*   MOTO_FLASH_A_ERR_INVALID_SYSTEM_CLOCK : SystemClock input invalid*/
/*   MOTO_FLASH_A_ERR_INVALID_PULSE_WIDTH : PulseWidth input invalid  */
/*   MOTO_FLASH_A_ERR_INVALID_PROTECTION : Protection input invalid   */
/*   MOTO_FLASH_A_ERR_HIGH_VOLTAGE_OPERATION_DISABLED : No VPP supply */
/**********************************************************************/
#define MOTO_FLASH_A_Init(MOTO_FLASH_A_Ptr,                            \
                                     CycleType,                        \
                                     BlocksToWrite,                    \
                                     ShadowAccess,                     \
                                     SystemClock,                      \
                                     PulseWidth,                       \
                                     BlocksToProtect,                  \
                                     ReadWriteProtection,              \
                                     PrivilegeProtection,              \
                                     TextDataProtection)               \

⌨️ 快捷键说明

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