patch.h File Reference

offer the interface for the patch function based on the FPB of the cortex arm-m4; More...

Go to the source code of this file.

Macros

#define PATCH_ENABLE_FLAG(BIT)   (1<<BIT)
 
#define MANDATORY_PATCH   (PATCH_ENABLE_FLAG(BIT_LLC_REM_ENCRYPT_PROC_CONTINUE))
 
#define OPTIMIZING_PATCH   0
 

Enumerations

enum  {
  AMS_PLAYER_ATTR_ID_NAME,
  AMS_PLAYER_ATTR_ID_PLAYBACK_INFO,
  AMS_PLAYER_ATTR_ID_VOLUME,
  IAS_ALERT_NONE,
  IAS_ALERT_MILD,
  IAS_ALERT_HIGH,
  BLE_GATT_COMMON_EVT_MTU_EXCHANGE = BLE_GATT_COMMON_EVT_BASE,
  BLE_GATT_COMMON_EVT_PRF_REGISTER,
  BLE_GATT_COMMON_EVT_MAX,
  ISO_GPIO_MASK_0 = 0x1,
  ISO_GPIO_MASK_1 = 0x2,
  ISO_GPIO_MASK_2 = 0x4,
  ISO_GPIO_MASK_3 = 0x8,
  ISO_GPIO_MASK_4 = 0x10,
  ISO_GPIO_MASK_5 = 0x20,
  ISO_GPIO_MASK_6 = 0x40,
  ISO_GPIO_MASK_7 = 0x80,
  TRC_PWR_WFE_MODE = 0,
  TRC_PWR_DSLEEP_MODE,
  TRC_PWR_ACTIVE_MODE,
  TRC_PWR_BLE_RET_DSLEEP,
  TRC_PWR_APP_TIMER_REFUSE,
  TRC_PWR_APP_TIMER_PASS,
  TRC_PWR_BLE_TIMER_REFUSE,
  TRC_PWR_BLE_TIMER_PASS,
  TRC_PWR_RTC_TIMER_REFUSE,
  TRC_PWR_RTC_TIMER_PASS,
  TRC_PWR_RTC1_TIMER_REFUSE,
  TRC_PWR_RTC1_TIMER_PASS,
  TRC_PWR_WDT_TIMER_REFUSE,
  TRC_PWR_WDT_TIMER_PASS,
  BIT_LLC_REM_ENCRYPT_PROC_CONTINUE
}
 

Functions

void set_patch_flag (uint32_t patch_flag)
 The enable of the patch featurn based on the FPB of the Cortex ARM-m4. More...
 
void fpb_register_patch_function (int patch_index, uint32_t func_addr)
 Register the path function to the hardware patch. More...
 

Detailed Description

offer the interface for the patch function based on the FPB of the cortex arm-m4;

Copyright(C) 2016-2018, Shenzhen Goodix Technology Co., Ltd All Rights Reserved

Definition in file patch.h.

Macro Definition Documentation

◆ MANDATORY_PATCH

#define MANDATORY_PATCH   (PATCH_ENABLE_FLAG(BIT_LLC_REM_ENCRYPT_PROC_CONTINUE))

Definition at line 33 of file patch.h.

◆ OPTIMIZING_PATCH

#define OPTIMIZING_PATCH   0

Definition at line 35 of file patch.h.

◆ PATCH_ENABLE_FLAG

#define PATCH_ENABLE_FLAG (   BIT)    (1<<BIT)

Definition at line 30 of file patch.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
AMS_PLAYER_ATTR_ID_NAME 

Player attribute index of name.

AMS_PLAYER_ATTR_ID_PLAYBACK_INFO 

Player attribute index of playback information.

AMS_PLAYER_ATTR_ID_VOLUME 

Player attribute index of volume.

IAS_ALERT_NONE 

No alert.

IAS_ALERT_MILD 

Mild alert.

IAS_ALERT_HIGH 

High alert.

BLE_GATT_COMMON_EVT_MTU_EXCHANGE 

MTU Exchange event.

BLE_GATT_COMMON_EVT_PRF_REGISTER 

Service Register event.

BLE_GATT_COMMON_EVT_MAX 
ISO_GPIO_MASK_0 
ISO_GPIO_MASK_1 
ISO_GPIO_MASK_2 
ISO_GPIO_MASK_3 
ISO_GPIO_MASK_4 
ISO_GPIO_MASK_5 
ISO_GPIO_MASK_6 
ISO_GPIO_MASK_7 
TRC_PWR_WFE_MODE 

WFE mode.

TRC_PWR_DSLEEP_MODE 

Deep sleep mode.

TRC_PWR_ACTIVE_MODE 

Active mode.

TRC_PWR_BLE_RET_DSLEEP 

BLE return deep sleep.

TRC_PWR_APP_TIMER_REFUSE 

App timer refuse.

TRC_PWR_APP_TIMER_PASS 

App timer pass.

TRC_PWR_BLE_TIMER_REFUSE 

BLE timer refuse.

TRC_PWR_BLE_TIMER_PASS 

BLE timer pass.

TRC_PWR_RTC_TIMER_REFUSE 

RTC timer refuse.

TRC_PWR_RTC_TIMER_PASS 

RTC timer pass.

TRC_PWR_RTC1_TIMER_REFUSE 

RTC timer refuse.

TRC_PWR_RTC1_TIMER_PASS 

RTC timer pass.

TRC_PWR_WDT_TIMER_REFUSE 

AON WDT timer refuse.

TRC_PWR_WDT_TIMER_PASS 

AON WDT timer pass.

BIT_LLC_REM_ENCRYPT_PROC_CONTINUE 

Definition at line 21 of file patch.h.

Function Documentation

◆ fpb_register_patch_function()

void fpb_register_patch_function ( int  patch_index,
uint32_t  func_addr 
)

Register the path function to the hardware patch.

Parameters
patch_indexthe patch index.
func_addrthe address of the patch function.
Return values
None

◆ set_patch_flag()

void set_patch_flag ( uint32_t  patch_flag)

The enable of the patch featurn based on the FPB of the Cortex ARM-m4.

Parameters
patch_flagthe flag used to control the function to be selected as the patch function,one bit for one function. This parameter can be a combiantion of the following values:
  • (1<<BIT_LLD_LLCP_OPCODE_IS_INVALID , )
  • (1<<BIT_LLD_TEST_ISR, ) please used the MACRO PATCH_ENABLE_FLAG(BIT) just like the MANDATORY_PATCH; and the different MACRO maybe defined for the different application;
Return values
None