# 1 "..\\..\\src\\app\\P6A\\p6a_demo.c"







 
# 1 "..\\..\\src\\app\\P6A\\p6a_demo.h"








 









void google_p6a_demo(void);

# 10 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\sdk\\include\\M0\\ArmCM0.h"
 





 
















 









 

typedef enum IRQn
{
     
    NonMaskableInt_IRQn           = -14,      
    HardFault_IRQn                = -13,      
    SVCall_IRQn                   =  -5,      
    PendSV_IRQn                   =  -2,      
    SysTick_IRQn                  =  -1,      

     
    VIDC_IRQn                     =   0,
    LCDC_IRQn                     =   1,
    MIPI_RX_IRQn                  =   2,
    MIPI_TX_IRQn                  =   3,
    MEMC_IRQn                     =   4,
    VPRE_IRQn                     =   5,
    FLSCTRL_IRQn                  =   6,
    DMA_IRQn                      =   7,
    TIMER0_IRQn                   =   8,
    TIMER1_IRQn                   =   9,
    TIMER2_IRQn                   =   10,
    TIMER3_IRQn                   =   11,
    WDG_IRQn                      =   12,
    UART_IRQn                     =   13,
    I2C0_IRQn                     =   14,
    I2C1_IRQn                     =   15,
    SPIS_IRQn                     =   16,
    SPIM_IRQn                     =   17,
    VPRE1_IRQn                    =   18,
    I2C2_IRQn                     =   19,
    OTP_IRQn                      =   20,
    SWIRE_IRQn                    =   21,
    PVD_IRQn                      =   22,
    AP_NRESET_IRQn                =   23,
    EXTI_INT0_IRQn                =   24,
    EXTI_INT1_IRQn                =   25,
    EXTI_INT2_IRQn                =   26,
    EXTI_INT3_IRQn                =   27,
    EXTI_INT4_IRQn                =   28,
    EXTI_INT5_IRQn                =   29,
    EXTI_INT6_IRQn                =   30,
    EXTI_INT7_IRQn                =   31
                                       
} IRQn_Type;


 
 
 

 

#pragma push
#pragma anon_unions
# 107 "..\\..\\src\\sdk\\include\\M0\\ArmCM0.h"

 












# 1 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\core_cm0.h"
 




 
















 










# 1 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdint.h"
 
 





 









     
# 27 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdint.h"
     











# 46 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdint.h"





 

     

     
typedef   signed          char int8_t;
typedef   signed short     int int16_t;
typedef   signed           int int32_t;
typedef   signed       __int64 int64_t;

     
typedef unsigned          char uint8_t;
typedef unsigned short     int uint16_t;
typedef unsigned           int uint32_t;
typedef unsigned       __int64 uint64_t;

     

     
     
typedef   signed          char int_least8_t;
typedef   signed short     int int_least16_t;
typedef   signed           int int_least32_t;
typedef   signed       __int64 int_least64_t;

     
typedef unsigned          char uint_least8_t;
typedef unsigned short     int uint_least16_t;
typedef unsigned           int uint_least32_t;
typedef unsigned       __int64 uint_least64_t;

     

     
typedef   signed           int int_fast8_t;
typedef   signed           int int_fast16_t;
typedef   signed           int int_fast32_t;
typedef   signed       __int64 int_fast64_t;

     
typedef unsigned           int uint_fast8_t;
typedef unsigned           int uint_fast16_t;
typedef unsigned           int uint_fast32_t;
typedef unsigned       __int64 uint_fast64_t;

     




typedef   signed           int intptr_t;
typedef unsigned           int uintptr_t;


     
typedef   signed     long long intmax_t;
typedef unsigned     long long uintmax_t;




     

     





     





     





     

     





     





     





     

     





     





     





     

     






     






     






     

     


     


     


     

     
# 216 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdint.h"

     



     






     
    
 



# 241 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdint.h"

     







     










     











# 305 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdint.h"






 
# 35 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\core_cm0.h"

















 




 



 

# 1 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_version.h"
 




 
















 










 
# 64 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\core_cm0.h"
 
 









 







# 114 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\core_cm0.h"

# 1 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_compiler.h"
 




 
















 




# 29 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_compiler.h"



 
# 1 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_armcc.h"
 




 
















 









 













   
   

 




 
# 107 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_armcc.h"

 



 





 
 






 
 





 
static __inline uint32_t __get_CONTROL(void)
{
  register uint32_t __regControl         __asm("control");
  return(__regControl);
}






 
static __inline void __set_CONTROL(uint32_t control)
{
  register uint32_t __regControl         __asm("control");
  __regControl = control;
}






 
static __inline uint32_t __get_IPSR(void)
{
  register uint32_t __regIPSR          __asm("ipsr");
  return(__regIPSR);
}






 
static __inline uint32_t __get_APSR(void)
{
  register uint32_t __regAPSR          __asm("apsr");
  return(__regAPSR);
}






 
static __inline uint32_t __get_xPSR(void)
{
  register uint32_t __regXPSR          __asm("xpsr");
  return(__regXPSR);
}






 
static __inline uint32_t __get_PSP(void)
{
  register uint32_t __regProcessStackPointer  __asm("psp");
  return(__regProcessStackPointer);
}






 
static __inline void __set_PSP(uint32_t topOfProcStack)
{
  register uint32_t __regProcessStackPointer  __asm("psp");
  __regProcessStackPointer = topOfProcStack;
}






 
static __inline uint32_t __get_MSP(void)
{
  register uint32_t __regMainStackPointer     __asm("msp");
  return(__regMainStackPointer);
}






 
static __inline void __set_MSP(uint32_t topOfMainStack)
{
  register uint32_t __regMainStackPointer     __asm("msp");
  __regMainStackPointer = topOfMainStack;
}






 
static __inline uint32_t __get_PRIMASK(void)
{
  register uint32_t __regPriMask         __asm("primask");
  return(__regPriMask);
}






 
static __inline void __set_PRIMASK(uint32_t priMask)
{
  register uint32_t __regPriMask         __asm("primask");
  __regPriMask = (priMask);
}


# 342 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_armcc.h"






 
static __inline uint32_t __get_FPSCR(void)
{





   return(0U);

}






 
static __inline void __set_FPSCR(uint32_t fpscr)
{





  (void)fpscr;

}


 


 



 




 






 







 






 








 










 










 






                  





 








 

__attribute__((section(".rev16_text"))) static __inline __asm uint32_t __REV16(uint32_t value)
{
  rev16 r0, r0
  bx lr
}








 

__attribute__((section(".revsh_text"))) static __inline __asm int16_t __REVSH(int16_t value)
{
  revsh r0, r0
  bx lr
}









 









 








 




__attribute__((always_inline)) static __inline uint32_t __RBIT(uint32_t value)
{
  uint32_t result;
  uint32_t s = (4U   * 8U) - 1U;  

  result = value;                       
  for (value >>= 1U; value != 0U; value >>= 1U)
  {
    result <<= 1U;
    result |= value & 1U;
    s--;
  }
  result <<= s;                         
  return result;
}








 



# 732 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_armcc.h"







 
__attribute__((always_inline)) static __inline int32_t __SSAT(int32_t val, uint32_t sat)
{
  if ((sat >= 1U) && (sat <= 32U))
  {
    const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U);
    const int32_t min = -1 - max ;
    if (val > max)
    {
      return max;
    }
    else if (val < min)
    {
      return min;
    }
  }
  return val;
}







 
__attribute__((always_inline)) static __inline uint32_t __USAT(int32_t val, uint32_t sat)
{
  if (sat <= 31U)
  {
    const uint32_t max = ((1U << sat) - 1U);
    if (val > (int32_t)max)
    {
      return max;
    }
    else if (val < 0)
    {
      return 0U;
    }
  }
  return (uint32_t)val;
}




   


 



 

# 866 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_armcc.h"
 


# 35 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_compiler.h"




 
# 268 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_compiler.h"




# 116 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\core_cm0.h"

















 
# 150 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\core_cm0.h"

 






 
# 166 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\core_cm0.h"

 




 










 



 






 



 
typedef union
{
  struct
  {
    uint32_t _reserved0:28;               
    uint32_t V:1;                         
    uint32_t C:1;                         
    uint32_t Z:1;                         
    uint32_t N:1;                         
  } b;                                    
  uint32_t w;                             
} APSR_Type;

 















 
typedef union
{
  struct
  {
    uint32_t ISR:9;                       
    uint32_t _reserved0:23;               
  } b;                                    
  uint32_t w;                             
} IPSR_Type;

 






 
typedef union
{
  struct
  {
    uint32_t ISR:9;                       
    uint32_t _reserved0:15;               
    uint32_t T:1;                         
    uint32_t _reserved1:3;                
    uint32_t V:1;                         
    uint32_t C:1;                         
    uint32_t Z:1;                         
    uint32_t N:1;                         
  } b;                                    
  uint32_t w;                             
} xPSR_Type;

 





















 
typedef union
{
  struct
  {
    uint32_t _reserved0:1;                
    uint32_t SPSEL:1;                     
    uint32_t _reserved1:30;               
  } b;                                    
  uint32_t w;                             
} CONTROL_Type;

 



 







 



 
typedef struct
{
  volatile uint32_t ISER[1U];                
        uint32_t RESERVED0[31U];
  volatile uint32_t ICER[1U];                
        uint32_t RESERVED1[31U];
  volatile uint32_t ISPR[1U];                
        uint32_t RESERVED2[31U];
  volatile uint32_t ICPR[1U];                
        uint32_t RESERVED3[31U];
        uint32_t RESERVED4[64U];
  volatile uint32_t IP[8U];                  
}  NVIC_Type;

 







 



 
typedef struct
{
  volatile const  uint32_t CPUID;                   
  volatile uint32_t ICSR;                    
        uint32_t RESERVED0;
  volatile uint32_t AIRCR;                   
  volatile uint32_t SCR;                     
  volatile uint32_t CCR;                     
        uint32_t RESERVED1;
  volatile uint32_t SHP[2U];                 
  volatile uint32_t SHCSR;                   
} SCB_Type;

 















 



























 















 









 






 



 







 



 
typedef struct
{
  volatile uint32_t CTRL;                    
  volatile uint32_t LOAD;                    
  volatile uint32_t VAL;                     
  volatile const  uint32_t CALIB;                   
} SysTick_Type;

 












 



 



 









 








 
 







 






 







 


 







 

 










 









 


 



 





 

# 583 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\core_cm0.h"
 





# 598 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\core_cm0.h"




 





 
 












 
static __inline void __NVIC_EnableIRQ(IRQn_Type IRQn)
{
  if ((int32_t)(IRQn) >= 0)
  {
    ((NVIC_Type *) ((0xE000E000UL) + 0x0100UL) )->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
  }
}









 
static __inline uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn)
{
  if ((int32_t)(IRQn) >= 0)
  {
    return((uint32_t)(((((NVIC_Type *) ((0xE000E000UL) + 0x0100UL) )->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
  }
  else
  {
    return(0U);
  }
}







 
static __inline void __NVIC_DisableIRQ(IRQn_Type IRQn)
{
  if ((int32_t)(IRQn) >= 0)
  {
    ((NVIC_Type *) ((0xE000E000UL) + 0x0100UL) )->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
    do { __schedule_barrier(); __dsb(0xF); __schedule_barrier(); } while (0U);
    do { __schedule_barrier(); __isb(0xF); __schedule_barrier(); } while (0U);
  }
}









 
static __inline uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn)
{
  if ((int32_t)(IRQn) >= 0)
  {
    return((uint32_t)(((((NVIC_Type *) ((0xE000E000UL) + 0x0100UL) )->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
  }
  else
  {
    return(0U);
  }
}







 
static __inline void __NVIC_SetPendingIRQ(IRQn_Type IRQn)
{
  if ((int32_t)(IRQn) >= 0)
  {
    ((NVIC_Type *) ((0xE000E000UL) + 0x0100UL) )->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
  }
}







 
static __inline void __NVIC_ClearPendingIRQ(IRQn_Type IRQn)
{
  if ((int32_t)(IRQn) >= 0)
  {
    ((NVIC_Type *) ((0xE000E000UL) + 0x0100UL) )->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
  }
}










 
static __inline void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
{
  if ((int32_t)(IRQn) >= 0)
  {
    ((NVIC_Type *) ((0xE000E000UL) + 0x0100UL) )->IP[( (((uint32_t)(int32_t)(IRQn)) >> 2UL) )]  = ((uint32_t)(((NVIC_Type *) ((0xE000E000UL) + 0x0100UL) )->IP[( (((uint32_t)(int32_t)(IRQn)) >> 2UL) )]  & ~(0xFFUL << ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL))) |
       (((priority << (8U - 2U)) & (uint32_t)0xFFUL) << ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL)));
  }
  else
  {
    ((SCB_Type *) ((0xE000E000UL) + 0x0D00UL) )->SHP[( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) )] = ((uint32_t)(((SCB_Type *) ((0xE000E000UL) + 0x0D00UL) )->SHP[( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) )] & ~(0xFFUL << ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL))) |
       (((priority << (8U - 2U)) & (uint32_t)0xFFUL) << ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL)));
  }
}










 
static __inline uint32_t __NVIC_GetPriority(IRQn_Type IRQn)
{

  if ((int32_t)(IRQn) >= 0)
  {
    return((uint32_t)(((((NVIC_Type *) ((0xE000E000UL) + 0x0100UL) )->IP[ ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) )] >> ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) ) & (uint32_t)0xFFUL) >> (8U - 2U)));
  }
  else
  {
    return((uint32_t)(((((SCB_Type *) ((0xE000E000UL) + 0x0D00UL) )->SHP[( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) )] >> ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) ) & (uint32_t)0xFFUL) >> (8U - 2U)));
  }
}












 
static __inline uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
{
  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL);    
  uint32_t PreemptPriorityBits;
  uint32_t SubPriorityBits;

  PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(2U)) ? (uint32_t)(2U) : (uint32_t)(7UL - PriorityGroupTmp);
  SubPriorityBits     = ((PriorityGroupTmp + (uint32_t)(2U)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(2U));

  return (
           ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
           ((SubPriority     & (uint32_t)((1UL << (SubPriorityBits    )) - 1UL)))
         );
}












 
static __inline void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority)
{
  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL);    
  uint32_t PreemptPriorityBits;
  uint32_t SubPriorityBits;

  PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(2U)) ? (uint32_t)(2U) : (uint32_t)(7UL - PriorityGroupTmp);
  SubPriorityBits     = ((PriorityGroupTmp + (uint32_t)(2U)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(2U));

  *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL);
  *pSubPriority     = (Priority                   ) & (uint32_t)((1UL << (SubPriorityBits    )) - 1UL);
}











 
static __inline void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
{
  uint32_t vectors = 0x0U;
  (* (int *) (vectors + ((int32_t)IRQn + 16) * 4)) = vector;
}









 
static __inline uint32_t __NVIC_GetVector(IRQn_Type IRQn)
{
  uint32_t vectors = 0x0U;
  return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + 16) * 4));
}





 
__declspec(noreturn) static __inline void __NVIC_SystemReset(void)
{
  do { __schedule_barrier(); __dsb(0xF); __schedule_barrier(); } while (0U);                                                          
 
  ((SCB_Type *) ((0xE000E000UL) + 0x0D00UL) )->AIRCR  = ((0x5FAUL << 16U) |
                 (1UL << 2U));
  do { __schedule_barrier(); __dsb(0xF); __schedule_barrier(); } while (0U);                                                           

  for(;;)                                                            
  {
    __nop();
  }
}

 


 





 








 
static __inline uint32_t SCB_GetFPUType(void)
{
    return 0U;            
}


 



 





 













 
static __inline uint32_t SysTick_Config(uint32_t ticks)
{
  if ((ticks - 1UL) > (0xFFFFFFUL ))
  {
    return (1UL);                                                    
  }

  ((SysTick_Type *) ((0xE000E000UL) + 0x0010UL) )->LOAD  = (uint32_t)(ticks - 1UL);                          
  __NVIC_SetPriority (SysTick_IRQn, (1UL << 2U) - 1UL);  
  ((SysTick_Type *) ((0xE000E000UL) + 0x0010UL) )->VAL   = 0UL;                                              
  ((SysTick_Type *) ((0xE000E000UL) + 0x0010UL) )->CTRL  = (1UL << 2U) |
                   (1UL << 1U)   |
                   (1UL );                          
  return (0UL);                                                      
}



 










# 122 "..\\..\\src\\sdk\\include\\M0\\ArmCM0.h"
# 1 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\Device\\ARM\\ARMCM0\\Include\\system_ARMCM0.h"
 





 
















 








extern uint32_t SystemCoreClock;      






 
extern void SystemInit (void);






 
extern void SystemCoreClockUpdate (void);





# 123 "..\\..\\src\\sdk\\include\\M0\\ArmCM0.h"

 

#pragma pop
# 142 "..\\..\\src\\sdk\\include\\M0\\ArmCM0.h"


 
# 167 "..\\..\\src\\sdk\\include\\M0\\ArmCM0.h"

 
# 179 "..\\..\\src\\sdk\\include\\M0\\ArmCM0.h"





# 11 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\common\\tau_device_datatype.h"








 







 

# 20 "..\\..\\src\\common\\tau_device_datatype.h"
# 1 "..\\..\\src\\common\\tau_common.h"








 






 
# 18 "..\\..\\src\\common\\tau_common.h"
# 1 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"




 





 












 






   









 






# 61 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"

# 75 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"







   




 















 
# 112 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"











 





extern __attribute__((__pcs__("aapcs"))) unsigned __ARM_dcmp4(double  , double  );
extern __attribute__((__pcs__("aapcs"))) unsigned __ARM_fcmp4(float  , float  );
    




 

extern __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_fpclassifyf(float  );
extern __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_fpclassify(double  );
     
     

static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_isfinitef(float __x)
{
    return (((*(unsigned *)&(__x)) >> 23) & 0xff) != 0xff;
}
static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_isfinite(double __x)
{
    return (((*(1 + (unsigned *)&(__x))) >> 20) & 0x7ff) != 0x7ff;
}
     
     

static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_isinff(float __x)
{
    return ((*(unsigned *)&(__x)) << 1) == 0xff000000;
}
static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_isinf(double __x)
{
    return (((*(1 + (unsigned *)&(__x))) << 1) == 0xffe00000) && ((*(unsigned *)&(__x)) == 0);
}
     
     

static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_islessgreaterf(float __x, float __y)
{
    unsigned __f = __ARM_fcmp4(__x, __y) >> 28;
    return (__f == 8) || (__f == 2);  
}
static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_islessgreater(double __x, double __y)
{
    unsigned __f = __ARM_dcmp4(__x, __y) >> 28;
    return (__f == 8) || (__f == 2);  
}
    


 

static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_isnanf(float __x)
{
    return (0x7f800000 - ((*(unsigned *)&(__x)) & 0x7fffffff)) >> 31;
}
static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_isnan(double __x)
{
    unsigned __xf = (*(1 + (unsigned *)&(__x))) | (((*(unsigned *)&(__x)) == 0) ? 0 : 1);
    return (0x7ff00000 - (__xf & 0x7fffffff)) >> 31;
}
     
     

static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_isnormalf(float __x)
{
    unsigned __xe = ((*(unsigned *)&(__x)) >> 23) & 0xff;
    return (__xe != 0xff) && (__xe != 0);
}
static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_isnormal(double __x)
{
    unsigned __xe = ((*(1 + (unsigned *)&(__x))) >> 20) & 0x7ff;
    return (__xe != 0x7ff) && (__xe != 0);
}
     
     

static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_signbitf(float __x)
{
    return (*(unsigned *)&(__x)) >> 31;
}
static __inline __declspec(__nothrow) __attribute__((__pcs__("aapcs"))) int __ARM_signbit(double __x)
{
    return (*(1 + (unsigned *)&(__x))) >> 31;
}
     
     








# 230 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"







   
  typedef float float_t;
  typedef double double_t;
# 251 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"



extern const int math_errhandling;
# 261 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"

extern __declspec(__nothrow) double acos(double  );
    
    
    
extern __declspec(__nothrow) double asin(double  );
    
    
    
    

extern __declspec(__nothrow) __attribute__((const)) double atan(double  );
    
    

extern __declspec(__nothrow) double atan2(double  , double  );
    
    
    
    

extern __declspec(__nothrow) double cos(double  );
    
    
    
    
extern __declspec(__nothrow) double sin(double  );
    
    
    
    

extern void __use_accurate_range_reduction(void);
    
    

extern __declspec(__nothrow) double tan(double  );
    
    
    
    

extern __declspec(__nothrow) double cosh(double  );
    
    
    
    
extern __declspec(__nothrow) double sinh(double  );
    
    
    
    
    

extern __declspec(__nothrow) __attribute__((const)) double tanh(double  );
    
    

extern __declspec(__nothrow) double exp(double  );
    
    
    
    
    

extern __declspec(__nothrow) double frexp(double  , int *  ) __attribute__((__nonnull__(2)));
    
    
    
    
    
    

extern __declspec(__nothrow) double ldexp(double  , int  );
    
    
    
    
extern __declspec(__nothrow) double log(double  );
    
    
    
    
    
extern __declspec(__nothrow) double log10(double  );
    
    
    
extern __declspec(__nothrow) double modf(double  , double *  ) __attribute__((__nonnull__(2)));
    
    
    
    

extern __declspec(__nothrow) double pow(double  , double  );
    
    
    
    
    
    
extern __declspec(__nothrow) double sqrt(double  );
    
    
    




    static __inline double _sqrt(double __x) { return sqrt(__x); }




    static __inline float _sqrtf(float __x) { return (float)sqrt(__x); }

    



 

extern __declspec(__nothrow) __attribute__((const)) double ceil(double  );
    
    
extern __declspec(__nothrow) __attribute__((const)) double fabs(double  );
    
    

extern __declspec(__nothrow) __attribute__((const)) double floor(double  );
    
    

extern __declspec(__nothrow) double fmod(double  , double  );
    
    
    
    
    

    









 



extern __declspec(__nothrow) double acosh(double  );
    

 
extern __declspec(__nothrow) double asinh(double  );
    

 
extern __declspec(__nothrow) double atanh(double  );
    

 
extern __declspec(__nothrow) double cbrt(double  );
    

 
static __inline __declspec(__nothrow) __attribute__((const)) double copysign(double __x, double __y)
    

 
{
    (*(1 + (unsigned *)&(__x))) = ((*(1 + (unsigned *)&(__x))) & 0x7fffffff) | ((*(1 + (unsigned *)&(__y))) & 0x80000000);
    return __x;
}
static __inline __declspec(__nothrow) __attribute__((const)) float copysignf(float __x, float __y)
    

 
{
    (*(unsigned *)&(__x)) = ((*(unsigned *)&(__x)) & 0x7fffffff) | ((*(unsigned *)&(__y)) & 0x80000000);
    return __x;
}
extern __declspec(__nothrow) double erf(double  );
    

 
extern __declspec(__nothrow) double erfc(double  );
    

 
extern __declspec(__nothrow) double expm1(double  );
    

 



    

 






# 479 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"


extern __declspec(__nothrow) double hypot(double  , double  );
    




 
extern __declspec(__nothrow) int ilogb(double  );
    

 
extern __declspec(__nothrow) int ilogbf(float  );
    

 
extern __declspec(__nothrow) int ilogbl(long double  );
    

 







    

 





    



 





    



 





    

 





    



 





    



 





    



 





    

 





    

 





    


 

extern __declspec(__nothrow) double lgamma (double  );
    


 
extern __declspec(__nothrow) double log1p(double  );
    

 
extern __declspec(__nothrow) double logb(double  );
    

 
extern __declspec(__nothrow) float logbf(float  );
    

 
extern __declspec(__nothrow) long double logbl(long double  );
    

 
extern __declspec(__nothrow) double nextafter(double  , double  );
    


 
extern __declspec(__nothrow) float nextafterf(float  , float  );
    


 
extern __declspec(__nothrow) long double nextafterl(long double  , long double  );
    


 
extern __declspec(__nothrow) double nexttoward(double  , long double  );
    


 
extern __declspec(__nothrow) float nexttowardf(float  , long double  );
    


 
extern __declspec(__nothrow) long double nexttowardl(long double  , long double  );
    


 
extern __declspec(__nothrow) double remainder(double  , double  );
    

 
extern __declspec(__nothrow) __attribute__((const)) double rint(double  );
    

 
extern __declspec(__nothrow) double scalbln(double  , long int  );
    

 
extern __declspec(__nothrow) float scalblnf(float  , long int  );
    

 
extern __declspec(__nothrow) long double scalblnl(long double  , long int  );
    

 
extern __declspec(__nothrow) double scalbn(double  , int  );
    

 
extern __declspec(__nothrow) float scalbnf(float  , int  );
    

 
extern __declspec(__nothrow) long double scalbnl(long double  , int  );
    

 




    

 



 
extern __declspec(__nothrow) __attribute__((const)) float _fabsf(float);  
static __inline __declspec(__nothrow) __attribute__((const)) float fabsf(float __f) { return _fabsf(__f); }
extern __declspec(__nothrow) float sinf(float  );
extern __declspec(__nothrow) float cosf(float  );
extern __declspec(__nothrow) float tanf(float  );
extern __declspec(__nothrow) float acosf(float  );
extern __declspec(__nothrow) float asinf(float  );
extern __declspec(__nothrow) float atanf(float  );
extern __declspec(__nothrow) float atan2f(float  , float  );
extern __declspec(__nothrow) float sinhf(float  );
extern __declspec(__nothrow) float coshf(float  );
extern __declspec(__nothrow) float tanhf(float  );
extern __declspec(__nothrow) float expf(float  );
extern __declspec(__nothrow) float logf(float  );
extern __declspec(__nothrow) float log10f(float  );
extern __declspec(__nothrow) float powf(float  , float  );
extern __declspec(__nothrow) float sqrtf(float  );
extern __declspec(__nothrow) float ldexpf(float  , int  );
extern __declspec(__nothrow) float frexpf(float  , int *  ) __attribute__((__nonnull__(2)));
extern __declspec(__nothrow) __attribute__((const)) float ceilf(float  );
extern __declspec(__nothrow) __attribute__((const)) float floorf(float  );
extern __declspec(__nothrow) float fmodf(float  , float  );
extern __declspec(__nothrow) float modff(float  , float *  ) __attribute__((__nonnull__(2)));

 
 













 
__declspec(__nothrow) long double acosl(long double );
__declspec(__nothrow) long double asinl(long double );
__declspec(__nothrow) long double atanl(long double );
__declspec(__nothrow) long double atan2l(long double , long double );
__declspec(__nothrow) long double ceill(long double );
__declspec(__nothrow) long double cosl(long double );
__declspec(__nothrow) long double coshl(long double );
__declspec(__nothrow) long double expl(long double );
__declspec(__nothrow) long double fabsl(long double );
__declspec(__nothrow) long double floorl(long double );
__declspec(__nothrow) long double fmodl(long double , long double );
__declspec(__nothrow) long double frexpl(long double , int* ) __attribute__((__nonnull__(2)));
__declspec(__nothrow) long double ldexpl(long double , int );
__declspec(__nothrow) long double logl(long double );
__declspec(__nothrow) long double log10l(long double );
__declspec(__nothrow) long double modfl(long double  , long double *  ) __attribute__((__nonnull__(2)));
__declspec(__nothrow) long double powl(long double , long double );
__declspec(__nothrow) long double sinl(long double );
__declspec(__nothrow) long double sinhl(long double );
__declspec(__nothrow) long double sqrtl(long double );
__declspec(__nothrow) long double tanl(long double );
__declspec(__nothrow) long double tanhl(long double );





 
extern __declspec(__nothrow) float acoshf(float  );
__declspec(__nothrow) long double acoshl(long double );
extern __declspec(__nothrow) float asinhf(float  );
__declspec(__nothrow) long double asinhl(long double );
extern __declspec(__nothrow) float atanhf(float  );
__declspec(__nothrow) long double atanhl(long double );
__declspec(__nothrow) long double copysignl(long double , long double );
extern __declspec(__nothrow) float cbrtf(float  );
__declspec(__nothrow) long double cbrtl(long double );
extern __declspec(__nothrow) float erff(float  );
__declspec(__nothrow) long double erfl(long double );
extern __declspec(__nothrow) float erfcf(float  );
__declspec(__nothrow) long double erfcl(long double );
extern __declspec(__nothrow) float expm1f(float  );
__declspec(__nothrow) long double expm1l(long double );
extern __declspec(__nothrow) float log1pf(float  );
__declspec(__nothrow) long double log1pl(long double );
extern __declspec(__nothrow) float hypotf(float  , float  );
__declspec(__nothrow) long double hypotl(long double , long double );
extern __declspec(__nothrow) float lgammaf(float  );
__declspec(__nothrow) long double lgammal(long double );
extern __declspec(__nothrow) float remainderf(float  , float  );
__declspec(__nothrow) long double remainderl(long double , long double );
extern __declspec(__nothrow) float rintf(float  );
__declspec(__nothrow) long double rintl(long double );






 
extern __declspec(__nothrow) double exp2(double  );  
extern __declspec(__nothrow) float exp2f(float  );
__declspec(__nothrow) long double exp2l(long double );
extern __declspec(__nothrow) double fdim(double  , double  );
extern __declspec(__nothrow) float fdimf(float  , float  );
__declspec(__nothrow) long double fdiml(long double , long double );
# 803 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"
extern __declspec(__nothrow) double fma(double  , double  , double  );
extern __declspec(__nothrow) float fmaf(float  , float  , float  );

static __inline __declspec(__nothrow) long double fmal(long double __x, long double __y, long double __z)     { return (long double)fma((double)__x, (double)__y, (double)__z); }


extern __declspec(__nothrow) __attribute__((const)) double fmax(double  , double  );
extern __declspec(__nothrow) __attribute__((const)) float fmaxf(float  , float  );
__declspec(__nothrow) long double fmaxl(long double , long double );
extern __declspec(__nothrow) __attribute__((const)) double fmin(double  , double  );
extern __declspec(__nothrow) __attribute__((const)) float fminf(float  , float  );
__declspec(__nothrow) long double fminl(long double , long double );
extern __declspec(__nothrow) double log2(double  );  
extern __declspec(__nothrow) float log2f(float  );
__declspec(__nothrow) long double log2l(long double );
extern __declspec(__nothrow) long lrint(double  );
extern __declspec(__nothrow) long lrintf(float  );

static __inline __declspec(__nothrow) long lrintl(long double __x)     { return lrint((double)__x); }


extern __declspec(__nothrow) long long llrint(double  );
extern __declspec(__nothrow) long long llrintf(float  );

static __inline __declspec(__nothrow) long long llrintl(long double __x)     { return llrint((double)__x); }


extern __declspec(__nothrow) long lround(double  );
extern __declspec(__nothrow) long lroundf(float  );

static __inline __declspec(__nothrow) long lroundl(long double __x)     { return lround((double)__x); }


extern __declspec(__nothrow) long long llround(double  );
extern __declspec(__nothrow) long long llroundf(float  );

static __inline __declspec(__nothrow) long long llroundl(long double __x)     { return llround((double)__x); }


extern __declspec(__nothrow) __attribute__((const)) double nan(const char * );
extern __declspec(__nothrow) __attribute__((const)) float nanf(const char * );

static __inline __declspec(__nothrow) __attribute__((const)) long double nanl(const char *__t)     { return (long double)nan(__t); }
# 856 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"
extern __declspec(__nothrow) __attribute__((const)) double nearbyint(double  );
extern __declspec(__nothrow) __attribute__((const)) float nearbyintf(float  );
__declspec(__nothrow) long double nearbyintl(long double );
extern  double remquo(double  , double  , int * );
extern  float remquof(float  , float  , int * );

static __inline long double remquol(long double __x, long double __y, int *__q)     { return (long double)remquo((double)__x, (double)__y, __q); }


extern __declspec(__nothrow) __attribute__((const)) double round(double  );
extern __declspec(__nothrow) __attribute__((const)) float roundf(float  );
__declspec(__nothrow) long double roundl(long double );
extern __declspec(__nothrow) double tgamma(double  );  
extern __declspec(__nothrow) float tgammaf(float  );
__declspec(__nothrow) long double tgammal(long double );
extern __declspec(__nothrow) __attribute__((const)) double trunc(double  );
extern __declspec(__nothrow) __attribute__((const)) float truncf(float  );
__declspec(__nothrow) long double truncl(long double );






# 896 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"

# 1087 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"











# 1317 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\math.h"





 
# 19 "..\\..\\src\\common\\tau_common.h"



 



 

















 














 

 




 

# 75 "..\\..\\src\\common\\tau_common.h"

























 


 


















 















 









 











 











 


 















 


 


 




 



 





 
 
typedef uint32_t status_t;

 
typedef void (*fcb_type)(void *data);

typedef void (*uart_trans_cb)(status_t status, void *user_data);

typedef void (*flash_trans_cb)(status_t status, void *user_data);
# 21 "..\\..\\src\\common\\tau_device_datatype.h"



 



 
 




 
 
enum _status_groups
{
    STATUS_GROUP_GENERIC    = 0,
    STATUS_GROUP_I2C        = 1,
    STATUS_GROUP_UART       = 2,
    STATUS_GROUP_SPI        = 3,
    STATUS_GROUP_TIMER      = 4,
};

 
enum _generic_status
{
    STATUS_SUCCESS                     = ((((STATUS_GROUP_GENERIC)*100) + (0))),
    STATUS_FAIL                        = ((((STATUS_GROUP_GENERIC)*100) + (1))),
    STATUS_READ_ONLY                   = ((((STATUS_GROUP_GENERIC)*100) + (2))),
    STATUS_OUT_OF_RANGE                = ((((STATUS_GROUP_GENERIC)*100) + (3))),
    STATUS_INVALID_ARGUMENT            = ((((STATUS_GROUP_GENERIC)*100) + (4))),
    STATUS_TIME_OUT                    = ((((STATUS_GROUP_GENERIC)*100) + (5))),
    STATUS_NO_TRANSFER_IN_PROGRESS     = ((((STATUS_GROUP_GENERIC)*100) + (6))),
};




 
typedef enum
{
    STATUS_UART_TX_BUSY              = ((((STATUS_GROUP_UART)*100) + (0))),   
    STATUS_UART_RX_BUSY              = ((((STATUS_GROUP_UART)*100) + (1))),   
    STATUS_UART_TX_IDLE              = ((((STATUS_GROUP_UART)*100) + (2))),   
    STATUS_UART_RX_IDLE              = ((((STATUS_GROUP_UART)*100) + (3))),   
    STATUS_UART_TX_ERR               = ((((STATUS_GROUP_UART)*100) + (7))),   
    STATUS_UART_RX_ERR               = ((((STATUS_GROUP_UART)*100) + (9))),   
    STATUS_UART_RX_RING_BUFF_OVERRUN = ((((STATUS_GROUP_UART)*100) + (8))),   
    STATUS_UART_NOISE_ERR            = ((((STATUS_GROUP_UART)*100) + (10))),  
    STATUS_UART_FRAMING_ERR          = ((((STATUS_GROUP_UART)*100) + (11))),  
    STATUS_UART_PARITY_ERR           = ((((STATUS_GROUP_UART)*100) + (12))),  
    STATUS_UART_BAUDRATE_NOT_SPT     = ((((STATUS_GROUP_UART)*100) + (13))),  
} uart_status_e;



 
typedef enum
{
    STATUS_TIMER_IDLE            = ((((STATUS_GROUP_TIMER)*100) + (0))),     
    STATUS_TIMER_RUNNING         = ((((STATUS_GROUP_TIMER)*100) + (1))),     
    STATUS_TIMER_TIMEOUT         = ((((STATUS_GROUP_TIMER)*100) + (2))),     
} timer_status_e;



 
typedef enum
{
    DETECT_HIGH_LVL = 0,
    DETECT_LOW_LVL,
    DETECT_RISING_EDGE,
    DETECT_FALLING_EDGE,
    DETECT_DOUBLE_EDGE
} sys_cfg_trigger_e;



 
typedef enum
{
    TIMER_NUM0 = 0,
    TIMER_NUM1,
    TIMER_NUM2,
    TIMER_NUM3,
    TIMER_NUM_MAX
} timer_num_e;



 
typedef enum
{
    GPIO_INT_EXTI_INT0 = 0,
    GPIO_INT_EXTI_INT1,
    GPIO_INT_EXTI_INT2,
    GPIO_INT_EXTI_INT3,
    GPIO_INT_EXTI_INT4,
    GPIO_INT_EXTI_INT5,
    GPIO_INT_EXTI_INT6,
    GPIO_INT_EXTI_INT7,
    GPIO_INT_MAX
} gpio_int_e;

 
typedef enum _pwm_int_type
{
    PWM_INT_HIGH_OVERFLOW = 0,
    PWM_INT_LOW_OVERFLOW,
    PWM_INT_TOTAL_OVERFLOW,
    PWM_INT_HIGH_DONE,
    PWM_INT_LOW_DONE,
    PWM_INT_TOTAL_DONE,
    PWM_INT_MAX
} pwm_int_type_e;



 
typedef enum
{
    I2C_SELECT_0 = 0,    
    I2C_SELECT_1,        
} i2c_select_e;




 
typedef enum _i2c_rate
{
    I2C_RATE_STANDARD = 1, 
    I2C_RATE_FAST,         
    I2C_RATE_HIGH,         
} i2c_rate_e;




 
typedef enum
{
    I2C_INDEX_0,
    I2C_INDEX_1,
    I2C_INDEX_2,
    I2C_INDEX_MAX
} i2c_index_e;




 
typedef enum
{
    AHB_DMA_CH0,
    AHB_DMA_CH1,
    AHB_DMA_CH2,
    AHB_DMA_CH3,
    AHB_DMA_CH4,
    AHB_DMA_CH5,
    AHB_DMA_CH6,
    AHB_DMA_CH7,
    AHB_DMA_CH_NUM
} dma_channel_type_e;

 

typedef enum
{
    DISABLE = 0,
    ENABLE = !DISABLE
} function_state_e;



 
typedef enum
{
    CRC_REV_NO_TRANSPOSE = 0,                
    CRC_REV_ONLY_BITS_TRANSPOSE,             
    CRC_REV_BOTH_TRANSPOSE,                  
    CRC_REV_ONLY_BYTES_TRANSPOSE,            
} crc_reversal_type_e;



 
typedef enum
{
    CRC_FXOR_DISABLE = 0,                    
    CRC_FXOR_ENABLE,                         
} crc_fxor_function_e;



 
typedef enum
{
    CRC_16_BIT_PROTOCOL = 0,                
    CRC_32_BIT_PROTOCOL,                    
} crc_protocol_type_e;



 



# 12 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\common\\tau_log.h"








 






 
# 18 "..\\..\\src\\common\\tau_log.h"
# 1 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\string.h"
 
 
 
 




 








 












# 38 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\string.h"


  



    typedef unsigned int size_t;    
# 54 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\string.h"




extern __declspec(__nothrow) void *memcpy(void * __restrict  ,
                    const void * __restrict  , size_t  ) __attribute__((__nonnull__(1,2)));
   




 
extern __declspec(__nothrow) void *memmove(void *  ,
                    const void *  , size_t  ) __attribute__((__nonnull__(1,2)));
   







 
extern __declspec(__nothrow) char *strcpy(char * __restrict  , const char * __restrict  ) __attribute__((__nonnull__(1,2)));
   




 
extern __declspec(__nothrow) char *strncpy(char * __restrict  , const char * __restrict  , size_t  ) __attribute__((__nonnull__(1,2)));
   





 

extern __declspec(__nothrow) char *strcat(char * __restrict  , const char * __restrict  ) __attribute__((__nonnull__(1,2)));
   




 
extern __declspec(__nothrow) char *strncat(char * __restrict  , const char * __restrict  , size_t  ) __attribute__((__nonnull__(1,2)));
   






 






 

extern __declspec(__nothrow) int memcmp(const void *  , const void *  , size_t  ) __attribute__((__nonnull__(1,2)));
   





 
extern __declspec(__nothrow) int strcmp(const char *  , const char *  ) __attribute__((__nonnull__(1,2)));
   




 
extern __declspec(__nothrow) int strncmp(const char *  , const char *  , size_t  ) __attribute__((__nonnull__(1,2)));
   






 
extern __declspec(__nothrow) int strcasecmp(const char *  , const char *  ) __attribute__((__nonnull__(1,2)));
   





 
extern __declspec(__nothrow) int strncasecmp(const char *  , const char *  , size_t  ) __attribute__((__nonnull__(1,2)));
   






 
extern __declspec(__nothrow) int strcoll(const char *  , const char *  ) __attribute__((__nonnull__(1,2)));
   







 

extern __declspec(__nothrow) size_t strxfrm(char * __restrict  , const char * __restrict  , size_t  ) __attribute__((__nonnull__(2)));
   













 


# 193 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\string.h"
extern __declspec(__nothrow) void *memchr(const void *  , int  , size_t  ) __attribute__((__nonnull__(1)));

   





 

# 209 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\string.h"
extern __declspec(__nothrow) char *strchr(const char *  , int  ) __attribute__((__nonnull__(1)));

   




 

extern __declspec(__nothrow) size_t strcspn(const char *  , const char *  ) __attribute__((__nonnull__(1,2)));
   




 

# 232 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\string.h"
extern __declspec(__nothrow) char *strpbrk(const char *  , const char *  ) __attribute__((__nonnull__(1,2)));

   




 

# 247 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\string.h"
extern __declspec(__nothrow) char *strrchr(const char *  , int  ) __attribute__((__nonnull__(1)));

   





 

extern __declspec(__nothrow) size_t strspn(const char *  , const char *  ) __attribute__((__nonnull__(1,2)));
   



 

# 270 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\string.h"
extern __declspec(__nothrow) char *strstr(const char *  , const char *  ) __attribute__((__nonnull__(1,2)));

   





 

extern __declspec(__nothrow) char *strtok(char * __restrict  , const char * __restrict  ) __attribute__((__nonnull__(2)));
extern __declspec(__nothrow) char *_strtok_r(char *  , const char *  , char **  ) __attribute__((__nonnull__(2,3)));

extern __declspec(__nothrow) char *strtok_r(char *  , const char *  , char **  ) __attribute__((__nonnull__(2,3)));

   

































 

extern __declspec(__nothrow) void *memset(void *  , int  , size_t  ) __attribute__((__nonnull__(1)));
   



 
extern __declspec(__nothrow) char *strerror(int  );
   





 
extern __declspec(__nothrow) size_t strlen(const char *  ) __attribute__((__nonnull__(1)));
   



 

extern __declspec(__nothrow) size_t strlcpy(char *  , const char *  , size_t  ) __attribute__((__nonnull__(1,2)));
   
















 

extern __declspec(__nothrow) size_t strlcat(char *  , const char *  , size_t  ) __attribute__((__nonnull__(1,2)));
   






















 

extern __declspec(__nothrow) void _membitcpybl(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitcpybb(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitcpyhl(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitcpyhb(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitcpywl(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitcpywb(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitmovebl(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitmovebb(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitmovehl(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitmovehb(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitmovewl(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) void _membitmovewb(void *  , const void *  , int  , int  , size_t  ) __attribute__((__nonnull__(1,2)));
    














































 







# 502 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\string.h"



 

# 19 "..\\..\\src\\common\\tau_log.h"
# 1 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdarg.h"
 
 
 





 










# 27 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdarg.h"








 

 
 
# 57 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdarg.h"
    typedef struct __va_list { void *__ap; } va_list;

   






 


   










 


   















 




   

 


   




 



   





 








      
     typedef  va_list __gnuc_va_list;






# 147 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdarg.h"

 

# 20 "..\\..\\src\\common\\tau_log.h"
# 21 "..\\..\\src\\common\\tau_log.h"


 

# 31 "..\\..\\src\\common\\tau_log.h"



 

















 



 
typedef enum
{
    kLOG_LEVEL_DBG = 0,
    kLOG_LEVEL_INF,
    kLOG_LEVEL_ERR,
    kLOG_LEVEL_NONE       
} log_level_e;




 
typedef enum
{
    LOG_PORT_UART0,      
    LOG_PORT_UART1,      
    LOG_PORT_SWD,        
    LOG_PORT_UNKNOWN
} log_port_e;



 



 





 
void tau_log_init(uint32_t baud_rate, log_port_e log_port);






 
void tau_log_printf(log_level_e log_lv, const char *fmt, ...);

# 13 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\common\\tau_operations.h"








 






 

 




 


 


 




 



 




 




 




 




 




 





 





 






 





 




 





 




 





 





 





 




 



 

 











 












 












 












 












 












 













 



 

# 14 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 15 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\common\\tau_delay.h"














 
# 19 "..\\..\\src\\common\\tau_delay.h"





 
void delayMs(uint32_t ms);





 
void delayUs(uint32_t us);

# 16 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\sdk\\include\\hal_dsi_rx_ctrl.h"








 





 
# 1 "..\\..\\src\\common\\tau_dsi_datatype.h"








 






 
# 18 "..\\..\\src\\common\\tau_dsi_datatype.h"



 




 


 
typedef enum
{
    DSI_ACK_DT_ERROR                 = 0x02,
    DSI_ACK_DT_EOTP                  = 0x08,
    DSI_ACK_DT_GEN_SHORT_RESPONSE_1B = 0x11,
    DSI_ACK_DT_GEN_SHORT_RESPONSE_2B = 0x12,
    DSI_ACK_DT_GEN_LONG_RESPONSE     = 0x1A,
    DSI_ACK_DT_DCS_LONG_RESPONSE     = 0x1C,
    DSI_ACK_DT_DCS_SHORT_RESPONSE_1B = 0x21,
    DSI_ACK_DT_DCS_SHORT_RESPONSE_2B = 0x22,
    DSI_ACK_DT_MAX
} dsi_ack_data_type_e;



 
typedef enum
{
    DSI_RECV_DT_PPS                   = 0x0A,   
    DSI_RECV_DT_GEN_WRITE_1B          = 0x13,   
    DSI_RECV_DT_GEN_WRITE_2B          = 0x23,   
    DSI_RECV_DT_GEN_READ_0B           = 0x04,   
    DSI_RECV_DT_GEN_READ_1B           = 0x14,   
    DSI_RECV_DT_GEN_READ_2B           = 0x24,   
    DSI_RECV_DT_DCS_WRITE_0B          = 0x05,   
    DSI_RECV_DT_DCS_WRITE_1B          = 0x15,   
    DSI_RECV_DT_DCS_READ_0B           = 0x06,   
    DSI_RECV_DT_GEN_WRITE_LONG        = 0x29,   
    DSI_RECV_DT_DCS_WRITE_LONG        = 0x39,   
    DSI_RECV_DT_MAX
} dsi_data_type_e;

typedef enum
{
    DCS_ENTER_IDLE_MODE       = 0x39,
    DCS_ENTER_INVERT_MODE     = 0x21,
    DCS_ENTER_NORMAL_MODE     = 0x13,
    DCS_ENTER_PARTIAL_MODE    = 0x12,
    DCS_ENTER_SLEEP_MODE      = 0x10,
    DCS_EXIT_IDLE_MODE        = 0x38,
    DCS_EXIT_INVERT_MODE      = 0x20,
    DCS_EXIT_SLEEP_MODE       = 0x11,
    DCS_GET_3D_CONTROL        = 0x3F,
    DCS_GET_ADDRESS_MODE      = 0x0B,
    DCS_GET_BLUE_CHANNEL      = 0x08,
    DCS_GET_COMPRESSION_MODE  = 0x03,
    DCS_GET_DIAGNOSTIC_RESULT = 0x0F,
    DCS_GET_DISPLAY_MODE      = 0x0D,
    DCS_GET_GREEN_CHANNEL     = 0x07,
    DCS_GET_PIXEL_FORMAT      = 0x0C,
    DCS_GET_POWER_MODE        = 0x0A,
    DCS_GET_RED_CHANNEL       = 0x06,
    DCS_GET_SCANLINE          = 0x45,
    DCS_GET_SIGNAL_MODE       = 0x0E,
    DCS_NOP                   = 0x00,
    DCS_READ_DDB_CONTINUE     = 0xA8,
    DCS_READ_DDB_START        = 0xA1,
    DCS_READ_MEMORY_CONTINUE  = 0x3E,
    DCS_READ_MEMORY_START     = 0x2E,
    DCS_SET_3D_CONTROL        = 0x3D,
    DCS_SET_ADDRESS_MODE      = 0x36,
    DCS_SET_COLUMN_ADDRESS    = 0x2A,
    DCS_SET_DISPLAY_OFF       = 0x28,
    DCS_SET_DISPLAY_ON        = 0x29,
    DCS_SET_GAMMA_CURVE       = 0x26,
    DCS_SET_PAGE_ADDRESS      = 0x2B,
    DCS_SET_PARTIAL_COLUMNS   = 0x31,
    DCS_SET_PARTIAL_ROWS      = 0x30,
    DCS_SET_PIXEL_FORMAT      = 0x3A,
    DCS_SET_SCROLL_AREA       = 0x33,
    DCS_SET_SCROLL_START      = 0x37,
    DCS_SET_TEAR_OFF          = 0x34,
    DCS_SET_TEAR_ON           = 0x35,
    DCS_SET_TEAR_SCANLINE     = 0x44,
    DCS_SET_VSYNC_TIMING      = 0x40,
    DCS_SOFT_RESET            = 0x01,
    DCS_WRITE_LUT             = 0x2D,
    DCS_WRITE_MEMORY_CONTINUE = 0x3C,
    DCS_WRITE_MEMORY_START    = 0x2C
} dsi_dcs_cmd_type_e;



 
typedef enum
{
    DSI_DATA_VIDEO_MODE = 0,
    DSI_DATA_CMD_MODE   = 1,
    DSI_DATA_MODE_MAX
} dsi_video_data_mode_e;



 
typedef enum
{
    DSI_VC_0 = 0,
    DSI_VC_1 = 1,
    DSI_VC_2 = 2,
    DSI_VC_3 = 3,
    DSI_VC_MAX
} dsi_virtual_channel_e;



 
typedef enum
{
    DSI_FRAME_RATE_60HZ  = 0,
    DSI_FRAME_RATE_90HZ  = 1,
    DSI_FRAME_RATE_120HZ = 2,
    DSI_FRAME_RATE_144HZ = 3,
    DSI_FRAME_RATE_160HZ = 4,
    DSI_FRAME_RATE_MAX
} dsi_video_frame_rate_e;



 
typedef enum
{
    DSI_RGB565               = 1,
    DSI_RGB666               = 2,     
    DSI_RGB666_LOOSELY       = 3,     
    DSI_RGB888               = 4,     
    DSI_RGB10_10_10          = 5,
    DSI_RGB12_12_12          = 6,
    DSI_YCbCr422_16          = 7,
    DSI_PENTILE_16           = DSI_YCbCr422_16,
    DSI_YCbCr422_20_LOOSELY  = 8,
    DSI_YCbCr422_24          = 9,
    DSI_YCbCr420_12          = 10,
    DSI_DSC_STREAM           = 11,
    DSI_COLOR_CODE_MAX
} dsi_color_code_e;



 
typedef enum
{
    DPI_ENDIAN_RGB = 0,
    DPI_ENDIAN_BGR
} dsi_endianness_e;



 
typedef enum
{
    DSI_LANE_1 = 1,
    DSI_LANE_2 = 2,
    DSI_LANE_3 = 3,
    DSI_LANE_4 = 4,
    DSI_LANE_NUME_MAX
} dsi_lane_nume_e;



 
typedef enum
{
    DSI_NONBURST_PULSE = 0,
    DSI_NONBURST_EVENT = 1,
    DSI_BURST_MODE     = 2,
    DSI_VIDEO_MODE_MAX
} dsi_video_mode_type_e;



 
typedef enum
{
    DSI_CMD_TX_HS = 0,
    DSI_CMD_TX_LP = 1
} dsi_tx_cmd_tx_type_e;



 
typedef enum
{
    VIDOE_ROT_ANGLE_0    = 0,  
    VIDOE_ROT_ANGLE_90   = 1,  
    VIDOE_ROT_ANGLE_180  = 2,  
    VIDOE_ROT_ANGLE_270  = 3,  
    VIDOE_ROT_ANGLE_MAX
} video_rotate_angle_e;








 
typedef enum
{
    RX_LANE_SWAP_0123  = 0x0,
    RX_LANE_SWAP_3210  = 0x1,
    RX_LANE_SWAP_2103  = 0x2,
    RX_LANE_SWAP_DEFAULT_ORDER = 0x2,    
    RX_LANE_SWAP_3012  = 0x3,
    RX_LANE_SWAP_MAX
} dsi_rx_lane_swap_e;






 
typedef enum
{
    RX_LANE_0_PN_SWAP = 0x1,
    RX_LANE_1_PN_SWAP = 0x2,
    RX_LANE_2_PN_SWAP = 0x4,
    RX_LANE_3_PN_SWAP = 0x8,
    RX_LANE_CLK_PN_SWAP = 0x10
} dsi_rx_lane_pn_swap_e;



 
typedef enum
{
    ERR_HANDLE_NONE  = 0,
    ERR_HANDLE_L1  = 1,
    ERR_HANDLE_L2  = 2,
    ERR_HANDLE_L3  = 3,
    ERR_HANDLE_MAX
} hal_err_handle_level_e;



 
typedef enum
{
    FC_AUTO_MODE        = 0,          
    FC_V2V_NORMAL_MODE  = 1,          
    FC_V2C_NORMAL_MODE  = 2,          
    FC_C2V_NORMAL_MODE  = 3,          
    FC_C2C_NORMAL_MODE  = 4,          
    FC_PRO_MOTION_MODE  = 6,          
    FC_PRO_MOTION_MODE_2  = 5,          
    FC_PRO_MOTION_WITH_PU_MODE = 7,   
    FC_V2V_AUTO_SYCN_MODE = 8,        
    FC_V2V_DIRECT_MODE   = 9,         
    FC_MODE_MAX
} flow_control_mode_e;



 
typedef struct
{
    uint16_t top;
    uint16_t bottom;
    uint16_t left;
    uint16_t right;
    _Bool     enable;
} pic_edge_info_t;



 
typedef struct
{
    uint32_t src_w;                      
    uint32_t src_h;                      
    uint32_t dst_w;                      
    uint32_t dst_h;                      
    dsi_video_frame_rate_e src_frate;    
    dsi_video_data_mode_e  src_mode;     
    dsi_video_data_mode_e  dst_mode;     
    uint16_t pn_swap;                    
} dsi_base_trans_info_t;



 
typedef struct
{
    _Bool     mirror_en;                        
    _Bool     pu_optimize;                      
    video_rotate_angle_e   rot_angle;          
    flow_control_mode_e    flow_control_mode;  
    pic_edge_info_t        crop_info;          
    pic_edge_info_t        blank_info;         
    _Bool                   bw_optimize;        
    uint8_t                pq_type;            
} dsi_base_extra_info_t;



 
typedef struct
{
    uint32_t coef_c00;
    uint32_t coef_c01;
    uint32_t coef_c02;
    uint32_t coef_c10;
    uint32_t coef_c11;
    uint32_t coef_c12;
    uint32_t coef_c20;
    uint32_t coef_c21;
    uint32_t coef_c22;
} ccm_coef_t;



 
typedef enum
{
    HIGHT_PERFORMAN_NONE  = 0,
    HIGHT_PERFORMAN_L1  = 1,
    HIGHT_PERFORMAN_L2  = 2,
    HIGHT_PERFORMAN_MAX
} hight_performan_mode_e;



 
typedef struct
{
    uint16_t edgemedslope;
    uint16_t desatslope;
} dsi_tx_fc_t;



 
typedef struct
{
    _Bool     y_enh_method;
    uint8_t  enhance_str;
    uint16_t enhance_slope;
    uint16_t boundscale_low;
    uint16_t boundscale_high;
} dsi_tx_edge_enh_t;



 
typedef struct
{
    uint8_t  edge_thr;
    _Bool     use_large_kernel;
} dsi_tx_edge_dect_t;



 
typedef struct
{
    int8_t   brightness;  
    uint16_t contrast;    
    uint16_t saturation;  
} dsi_tx_bcs_t;



 
typedef struct
{
    uint32_t    st_line;     
    uint32_t    st_col;      
    uint32_t    end_line;    
    uint32_t    end_col;     
    uint8_t     value_r;     
    uint8_t     value_g;     
    uint8_t     value_b;     
} dsi_tx_par_dis_t;

# 17 "..\\..\\src\\sdk\\include\\hal_dsi_rx_ctrl.h"
# 18 "..\\..\\src\\sdk\\include\\hal_dsi_rx_ctrl.h"
# 19 "..\\..\\src\\sdk\\include\\hal_dsi_rx_ctrl.h"



 




 
typedef struct hal_dcs_execute_entry_t hal_dcs_execute_entry_t;

typedef struct hal_dcs_packet_t hal_dcs_packet_t;

typedef struct hal_dsi_rx_ctrl_handle_t hal_dsi_rx_ctrl_handle_t;

 
typedef _Bool (*hal_dsi_rx_ctrl_dcs_execute)(hal_dsi_rx_ctrl_handle_t *rx_handle, hal_dcs_packet_t *dcs_packet);

 
typedef _Bool (*hal_dsi_rx_ctrl_read_entry)(uint8_t data_type, uint8_t dcs_cmd, uint8_t param);

 
typedef _Bool (*hal_dsi_rx_ctrl_pps_entry)(uint8_t *pps, uint8_t size, uint32_t pic_width, uint32_t pic_height);



 
typedef enum hal_rx_event_e
{
    HAL_RX_FS_EVENT     = 0x1,     
    HAL_RX_LINE_EVENT   = 0x2,     
    HAL_RX_END_EVENT    = 0x4,     
} hal_rx_event_e;





 
typedef enum
{
    RX_FLT_OPT_0    = 0,
    RX_FLT_OPT_1    = 1,
    RX_FLT_OPT_2    = 2,
    RX_FLT_OPT_3    = 3,
    RX_FLT_OPT_4    = 4,
    RX_FLT_OPT_5    = 5,
    RX_FLT_OPT_6    = 6,
    RX_FLT_OPT_7    = 7,
    RX_FLT_OPT_8    = 8,
    RX_FLT_OPT_9    = 9,
    RX_FLT_OPT_10   = 10,
    RX_FLT_LINEAR   = 11,
    RX_FLT_MAX
} hal_dsi_rx_pq_filter_e;

 
typedef void (*hal_dsi_rx_ctrl_event_entry)(hal_rx_event_e event, void *data);



 
typedef struct hal_dsi_rx_ctrl_handle_t
{
    dsi_base_trans_info_t            base_info;                  
    dsi_base_extra_info_t            extra_info;                 
    dsi_color_code_e                 rx_color_mode;              
    dsi_lane_nume_e                  rx_lanes;                   
    dsi_video_mode_type_e            rx_nonburst_models;         
    _Bool                             compress_en;                
    uint32_t                         rx_hsclk_rate;              
    uint8_t                          rx_dsc_pps[128];   
    const hal_dcs_execute_entry_t    *cus_dcs_entry_table;       
    hal_dsi_rx_ctrl_read_entry       rx_dcs_read_entry;          
    hal_dsi_rx_ctrl_pps_entry        pps_update_entry;           
    _Bool                             used;                       
    hal_err_handle_level_e           err_handler_level;          
    uint8_t                          rx_strength;                
    hight_performan_mode_e           hight_performan_mode;       
    dsi_rx_lane_swap_e               rx_lane_swap;               
    hal_dsi_rx_pq_filter_e           rx_pq_index;                
} hal_dsi_rx_ctrl_handle_t;



 
typedef struct hal_dcs_execute_entry_t
{
    uint32_t dcs_command;                       
    hal_dsi_rx_ctrl_dcs_execute execute_func;   
    _Bool immediately_func;                      
} hal_dcs_execute_entry_t;



 
typedef struct hal_dcs_packet_t
{
    uint32_t data_type;                         
    uint32_t dcs_command;                       
    uint32_t param_length;                      
    uint8_t *packet_param;                      
    uint16_t crc_data;                          
    const hal_dcs_execute_entry_t *dcs_execute_entry;   
} hal_dcs_packet_t;



 
typedef struct
{
    uint32_t                  ipi_pg_hsa;
    uint32_t                  ipi_pg_hbp;
    uint32_t                  ipi_pg_hfp;
    uint32_t                  ipi_pg_vsa;
    uint32_t                  ipi_pg_vbp;
    uint32_t                  ipi_pg_vfp;
    uint32_t                  frame_rate;
} hal_dsi_rx_ipi_pg_t;




 
typedef enum
{
    HAL_RX_DCS_FILTER_0 = 0x0,
    HAL_RX_DCS_FILTER_1 = 0x1,
    HAL_RX_DCS_FILTER_2 = 0x2,
    HAL_RX_DCS_FILTER_3 = 0x3,
    HAL_RX_DCS_FILTER_4 = 0x4,
    HAL_RX_DCS_FILTER_5 = 0x5,
    HAL_RX_DCS_FILTER_6 = 0x6,
    HAL_RX_DCS_FILTER_7 = 0x7,
    HAL_RX_DCS_FILTER_8 = 0x8,
    HAL_RX_DCS_FILTER_9 = 0x9,
    HAL_RX_DCS_FILTER_A = 0xA,
    HAL_RX_DCS_FILTER_B = 0xB,
    HAL_RX_DCS_FILTER_MAX
} hal_rx_dcs_filter_sel_e;




 
typedef enum
{
    HAL_RX_QRESP_CODE0 = 0,
    HAL_RX_QRESP_CODE1 = 1,
    HAL_RX_QRESP_CODE2 = 2,
    HAL_RX_QRESP_CODE3 = 3,
    HAL_RX_QRESP_CODE4 = 4,
    HAL_RX_QRESP_CODE5 = 5,
    HAL_RX_QRESP_CODE6 = 6,
    HAL_RX_QRESP_CODE7 = 7,
    HAL_RX_QRESP_MAX
} hal_rx_dcs_qresp_e;



 
typedef enum
{
    PENTILE_SRC_FORMAT_RGB           = 0x0,
    PENTILE_SRC_FORMAT_BGR           = 0x1,
    PENTILE_SRC_FORMAT_RGBG_BGRG     = 0x8,
    PENTILE_SRC_FORMAT_GBGR_GRGB     = 0x9,
    PENTILE_SRC_FORMAT_BGRG_RGBG     = 0xA,
    PENTILE_SRC_FORMAT_GRGB_GBGR     = 0xB,
    PENTILE_SRC_FORMAT_RGBG_RGBG     = 0xC,
    PENTILE_SRC_FORMAT_GBGR_GBGR     = 0xD,
    PENTILE_SRC_FORMAT_BGRG_BGRG     = 0xE,
    PENTILE_SRC_FORMAT_GRGB_GRGB     = 0xF,
    PENTILE_SRC_FORMAT_MAX
} pentile_src_format_e;



 
typedef enum
{
    RX_CLK_100M   = 0,
    RX_CLK_150M   = 1,
    RX_CLK_200M   = 2,
    RX_CLK_300M   = 3,
    RX_CLK_40M   = 4,
    RX_CLK_80M   = 5,
    RX_CLK_MAX
} hal_rx_clk_e;



 
typedef enum
{
    PQ_TYPE_DEFAULT     = 0x0,
    PQ_TYPE_LIMIT       = 0x1,
    PQ_TYPE_MAX
} pq_type_e;



 
typedef enum
{
    LINE_WEIGHT_FINE = 0,
    LINE_WEIGHT_MEDIUM = 1,
    LINE_WEIGHT_BOLD = 2,
    LINE_WEIGHT_MAX
} line_weight_e;



 



 





 
hal_dsi_rx_ctrl_handle_t *hal_dsi_rx_ctrl_create_handle(void);





 
_Bool hal_dsi_rx_ctrl_release_handle(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);







 
_Bool hal_dsi_rx_ctrl_pre_init_pps(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint8_t pps[], uint32_t pps_size);





 
_Bool hal_dsi_rx_ctrl_init(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);





 
_Bool hal_dsi_rx_ctrl_deinit(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);





 
_Bool hal_dsi_rx_ctrl_start(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);





 
_Bool hal_dsi_rx_ctrl_restart(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);





 
_Bool hal_dsi_rx_ctrl_stop(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);





 
_Bool hal_dsi_rx_ctrl_set_rx_clk(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, hal_rx_clk_e rxbr_clk);









 
_Bool hal_dsi_rx_ctrl_send_ack_cmd(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, dsi_ack_data_type_e data_type, dsi_virtual_channel_e vc, uint8_t cmd_count, ...);











 
_Bool hal_dsi_rx_ctrl_ack_short_cmd(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint8_t data_size, uint8_t data[]);












 
_Bool hal_dsi_rx_ctrl_ack_long_cmd(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint32_t data_size, uint8_t data[]);





 
_Bool hal_dsi_rx_ctrl_dcs_async_handler(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);








 
_Bool hal_dsi_rx_ctrl_set_hw_cmd_filter(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle,
                                       hal_rx_dcs_filter_sel_e filter_number,
                                       uint32_t cmd_start, uint32_t cmd_end);








 
_Bool hal_dsi_rx_ctrl_enable_test_pattern(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint8_t pg_orient, _Bool enable, int frame_rate);






 
uint32_t hal_dsi_rx_ctrl_get_max_ret_size(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);





 
_Bool hal_dsi_rx_ctrl_get_compressen_en(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);





 
_Bool hal_dsi_rx_ctrl_toggle_resolution(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);






 
_Bool hal_dsi_rx_ctrl_set_cus_esc_clk(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint32_t esc_clk);






 
_Bool hal_dsi_rx_ctrl_set_auto_hw_filter(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, _Bool enable);





 
_Bool hal_dsi_rx_ctrl_toggle_input_frame_rate(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, dsi_video_frame_rate_e frame_rate);







 
void hal_dsi_rx_ctrl_register_write_cmd_entry(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, hal_dsi_rx_ctrl_dcs_execute execute_func);












 
_Bool hal_dsi_rx_ctrl_set_auto_ack(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, hal_rx_dcs_qresp_e qresp_number,  dsi_ack_data_type_e data_type, uint32_t cmd_code, uint8_t cmd_count, ...);









 
void hal_dsi_rx_ctrl_draw_mode_init(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, _Bool draw_en, _Bool pxl_init_en, dsi_color_code_e color_mode, uint32_t init_value);










 
void hal_dsi_rx_ctrl_set_pixel_data(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, int x, int y, uint8_t red_data, uint8_t green_data, uint8_t blue_data);








 
void hal_dsi_rx_ctrl_force_video_crtl(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, _Bool enable, dsi_color_code_e frc_vid_code);









 
void hal_dsi_rx_ctrl_register_callback(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, hal_dsi_rx_ctrl_event_entry event_cb, uint32_t event_mask, _Bool enable, void *user_data);






 
void hal_dsi_rx_ctrl_set_check_crc(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, _Bool enable);





 
void hal_dsi_rx_ctrl_set_log_level(log_level_e rx_drv_level);










 
void hal_dsi_rx_ctrl_draw_line(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2,  uint8_t red_data, uint8_t green_data, uint8_t blue_data, line_weight_e line_weight);






 
void hal_dsi_rx_ctrl_set_cap_pixel_pos(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x0, uint16_t y0);




 
uint32_t hal_dsi_rx_ctrl_get_cap_pixel_color(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);

# 17 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\sdk\\include\\hal_dsi_tx_ctrl.h"








 





 
# 17 "..\\..\\src\\sdk\\include\\hal_dsi_tx_ctrl.h"
# 18 "..\\..\\src\\sdk\\include\\hal_dsi_tx_ctrl.h"
# 1 "..\\..\\src\\sdk\\include\\hal_gpio.h"








 





 
# 17 "..\\..\\src\\sdk\\include\\hal_gpio.h"
# 18 "..\\..\\src\\sdk\\include\\hal_gpio.h"



 


 
typedef enum
{
     
    IO_PAD_GPIO0 = 0,
    IO_PAD_GPIO1,
    IO_PAD_GPIO2,
    IO_PAD_GPIO3,
    IO_PAD_GPIO4,
    IO_PAD_GPIO5,
    IO_PAD_GPIO6,
    IO_PAD_GPIO7,
    IO_PAD_GPIO8,
    IO_PAD_GPIO9,
    IO_PAD_GPIO10,
    IO_PAD_GPIO11,
    IO_PAD_GPIO12,
    IO_PAD_GPIO13,
    IO_PAD_GPIO14,
    IO_PAD_GPIO15,
    IO_PAD_GPIO16,
    IO_PAD_GPIO17,
    IO_PAD_GPIO18,
    IO_PAD_GPIO19,
    IO_PAD_GPIO20,
    IO_PAD_GPIO21,
    IO_PAD_GPIO22,
    IO_PAD_GPIO23,
    IO_PAD_GPIO24,
    IO_PAD_GPIO25,

     
    IO_PAD_AP_SPIS_MISO = IO_PAD_GPIO0,
    IO_PAD_AP_SPIS_MOSI = IO_PAD_GPIO1,
    IO_PAD_AP_INT       = IO_PAD_GPIO2,
    IO_PAD_AP_TE        = IO_PAD_GPIO3,
    IO_PAD_AP_SWIRE     = IO_PAD_GPIO4,
    IO_PAD_TD_SPIM_MISO = IO_PAD_GPIO5,
    IO_PAD_TD_SPIM_MOSI = IO_PAD_GPIO6,
    IO_PAD_TD_RSTN      = IO_PAD_GPIO7,
    IO_PAD_AP_PWMEN     = IO_PAD_GPIO8,
    IO_PAD_AP_SPIS_CLK  = IO_PAD_GPIO9,
    IO_PAD_AP_SPIS_CSN  = IO_PAD_GPIO10,
    IO_PAD_TD_FC_CLK    = IO_PAD_GPIO11,
    IO_PAD_TD_FC_CSN    = IO_PAD_GPIO12,
    IO_PAD_TD_FC_IO0    = IO_PAD_GPIO13,
    IO_PAD_TD_FC_IO1    = IO_PAD_GPIO14,
    IO_PAD_SWD_CLK      = IO_PAD_GPIO15,
    IO_PAD_SWD_DIO      = IO_PAD_GPIO16,
    IO_PAD_AP_RSTN      = IO_PAD_GPIO17,
    IO_PAD_UART0_TX     = IO_PAD_GPIO18,
    IO_PAD_TD_SPIM_CLK  = IO_PAD_GPIO19,
    IO_PAD_TD_SPIM_CSN  = IO_PAD_GPIO20,
    IO_PAD_AP_TPRSTN    = IO_PAD_GPIO21,
    IO_PAD_TD_INT       = IO_PAD_GPIO22,
    IO_PAD_TD_TP_RESX   = IO_PAD_GPIO23,
    IO_PAD_UART1_TX     = IO_PAD_GPIO24,
    IO_PAD_UART0_RX     = IO_PAD_GPIO25,

    IO_PAD_MAX,


     
    IO_PIN_1            = IO_PAD_SWD_CLK,
    IO_PIN_2            = IO_PAD_UART0_TX,
    IO_PIN_3            = IO_PAD_SWD_DIO,
    IO_PIN_4            = IO_PAD_TD_SPIM_MOSI,
    IO_PIN_5            = IO_PAD_TD_SPIM_CLK,
    IO_PIN_6            = IO_PAD_TD_SPIM_CSN,
    IO_PIN_7            = IO_PAD_TD_SPIM_MISO,
    IO_PIN_8            = IO_PAD_TD_RSTN,
    IO_PIN_9            = IO_PAD_TD_FC_CSN,
    IO_PIN_10           = IO_PAD_TD_FC_CLK,
    IO_PIN_11           = IO_PAD_TD_FC_IO0,
    IO_PIN_12           = IO_PAD_TD_FC_IO1,
    IO_PIN_13           = IO_PAD_TD_TP_RESX,
    IO_PIN_14           = IO_PAD_UART1_TX,
    IO_PIN_15           = IO_PAD_AP_SWIRE,
    IO_PIN_16           = IO_PAD_AP_INT,
    IO_PIN_17           = IO_PAD_AP_PWMEN,
    IO_PIN_18           = IO_PAD_AP_TPRSTN,

    IO_PIN_29           = IO_PAD_AP_TE,
    IO_PIN_30           = IO_PAD_AP_SPIS_MISO,
    IO_PIN_31           = IO_PAD_AP_SPIS_CSN,
    IO_PIN_32           = IO_PAD_AP_SPIS_CLK,
    IO_PIN_33           = IO_PAD_AP_SPIS_MOSI,
    IO_PIN_34           = IO_PAD_AP_RSTN,
    IO_PIN_35           = IO_PAD_TD_INT,
    IO_PIN_36           = IO_PAD_UART0_RX,

} io_pad_e;













































































































 




 
typedef enum
{
    PIN1_MODE_SWDCLK        = 0,
    PIN1_MODE_GPIO15        = 2,
} pin1_mode_e;




 
typedef enum
{
    PIN2_MODE_UART0_TX     = 0,
    PIN2_MODE_PWMO         = 1,
    PIN2_MODE_GPIO18       = 2,
    PIN2_MODE_PWMI         = 3,
    PIN2_MODE_TEAR1        = 4,
} pin2_mode_e;



 
typedef enum
{
    PIN3_MODE_SWDIO        = 0,
    PIN3_MODE_GPIO16       = 2,
} pin3_mode_e;




 
typedef enum
{
    PIN4_MODE_SPIM_MOSI    = 0,
    PIN4_MODE_I2C02_SDA    = 1,
    PIN4_MODE_GPIO6        = 2,
    PIN4_MODE_UART0_TX     = 3,
} pin4_mode_e;



 
typedef enum
{
    PIN5_MODE_SPIM_SCLK    = 0,
    PIN5_MODE_I2C1_SCL     = 1,
    PIN5_MODE_GPIO19       = 2,
} pin5_mode_e;



 
typedef enum
{
    PIN6_MODE_SPIM_CSN     = 0,
    PIN6_MODE_I2C1_SDA     = 1,
    PIN6_MODE_GPIO20       = 2,
} pin6_mode_e;



 
typedef enum
{
    PIN7_MODE_SPIM_MISO    = 0,
    PIN7_MODE_I2C02_SCL    = 1,
    PIN7_MODE_GPIO5        = 2,
} pin7_mode_e;



 
typedef enum
{
    PIN8_MODE_GPIO7        = 2,
    PIN8_MODE_I2C02_SDA    = 3,
} pin8_mode_e;



 
typedef enum
{
    PIN9_MODE_TSPIS_CSN    = 0,
    PIN9_MODE_GPIO12       = 2,
} pin9_mode_e;



 
typedef enum
{
    PIN10_MODE_TSPIS_CLK    = 0,
    PIN10_MODE_GPIO11       = 2,
} pin10_mode_e;




 
typedef enum
{
    PIN11_MODE_TSPIS_IO0    = 0,
    PIN11_MODE_GPIO13       = 2,
    PIN11_MODE_I2C02_SDA    = 3,
} pin11_mode_e;



 
typedef enum
{
    PIN12_MODE_TSPIS_IO1    = 0,
    PIN12_MODE_GPIO14       = 2,
    PIN12_MODE_I2C02_SCL    = 3,
} pin12_mode_e;



 
typedef enum
{
    PIN13_MODE_GPIO23       = 2,
    PIN13_MODE_PWMO         = 3,
    PIN13_MODE_UART1_RX     = 4,
} pin13_mode_e;



 
typedef enum
{
    PIN14_MODE_GPIO24       = 2,
    PIN14_MODE_UART0_RX     = 3,
    PIN14_MODE_UART1_TX     = 4,
} pin14_mode_e;





 
typedef enum
{
    PIN15_MODE_SWIRE        = 0,
    PIN15_MODE_PWMO         = 1,
    PIN15_MODE_GPIO4        = 2,
} pin15_mode_e;



 
typedef enum
{
    PIN16_MODE_GPIO2        = 2,
} pin16_mode_e;



 
typedef enum
{
    PIN17_MODE_UART0_RX    = 1,
    PIN17_MODE_GPIO8       = 2,
    PIN17_MODE_PWMO        = 3,
} pin17_mode_e;



 
typedef enum
{
    PIN18_MODE_UART0_RX    = 0,
    PIN18_MODE_GPIO21      = 2,
    PIN18_MODE_I2C02_SCL   = 3,
} pin18_mode_e;






 
typedef enum
{
    PIN29_MODE_JTAG_TRSTN   = 0,
    PIN29_MODE_TEAR         = 1,
    PIN29_MODE_GPIO3        = 2,
} pin29_mode_e;




 
typedef enum
{
    PIN30_MODE_JTAG_TDO     = 0,
    PIN30_MODE_SPIS_MISO    = 1,
    PIN30_MODE_GPIO0        = 2,
    PIN30_MODE_UART0_RX     = 3,
    PIN30_MODE_I2C1_SCL     = 6,
} pin30_mode_e;



 
typedef enum
{
    PIN31_MODE_JTAG_TMS    = 0,
    PIN31_MODE_SPIS_CSN    = 1,
    PIN31_MODE_GPIO10      = 2,
    PIN31_MODE_I2C02_SDA   = 3,
} pin31_mode_e;



 
typedef enum
{
    PIN32_MODE_JTAG_TCK    = 0,
    PIN32_MODE_SPIS_SCLK   = 1,
    PIN32_MODE_GPIO9       = 2,
    PIN32_MODE_I2C02_SCL   = 3,
} pin32_mode_e;



 
typedef enum
{
    PIN33_MODE_JTAG_TDI     = 0,
    PIN33_MODE_SPIS_MOSI    = 1,
    PIN33_MODE_GPIO1        = 2,
    PIN33_MODE_UART0_TX     = 3,
    PIN33_MODE_I2C1_SDA_0   = 6,
} pin33_mode_e;



 
typedef enum
{
    PIN34_MODE_GPIO17       = 2,
} pin34_mode_e;




 
typedef enum
{
    PIN35_MODE_GPIO22       = 2,
} pin35_mode_e;




 
typedef enum
{
    PIN36_MODE_UART0_RX    = 0,
    PIN36_MODE_PWMO        = 1,
    PIN36_MODE_GPIO25       = 2,
} pin36_mode_e;






 
typedef enum
{
    IO_MODE_INTER_FC_CLK = 0,
    IO_MODE_TSPIS_CLK_EN = 2,
} pad_sfc_clk_mode_e;



 
typedef enum
{
    IO_MODE_INTER_FC_CSN = 0,
    IO_MODE_TSPIS_CSN_EN = 2,
} pad_sfc_csn_mode_e;



 
typedef enum
{
    IO_MODE_INTER_FC_IO0 = 0,
    IO_MODE_TSPIS_IO0_EN = 2,
} pad_sfc_io0_mode_e;



 
typedef enum
{
    IO_MODE_INTER_FC_IO1 = 0,
    IO_MODE_TSPIS_IO1_EN = 2,
} pad_sfc_io1_mode_e;



 
typedef enum
{
    IO_SLEW_RATE_SLOW = 0,
    IO_SLEW_RATE_FAST = 1,
} pad_slew_rate_e;



 


 
typedef enum
{
    IO_IOE_INPUT = 0,
    IO_IOE_OUTPUT,
    IO_IOE_NONE
} gpio_ioe_e;



 
typedef enum
{
    IO_LVL_LOW = 0,
    IO_LVL_HIGH,
    IO_LVL_NONE
} gpio_level_e;



 


 
typedef struct
{
    io_pad_e          pad;
    uint8_t           mode;
    gpio_ioe_e        ioe;
    gpio_level_e      lvl;
} io_pad_attr_t;



 



 





 
void hal_gpio_init_eint(io_pad_e pad, sys_cfg_trigger_e trig);







 
void hal_gpio_reg_eint_cb(io_pad_e pad, fcb_type cb_func);






 
void hal_gpio_ctrl_eint(io_pad_e pad, _Bool state);





 
gpio_int_e hal_gpio_get_int_type(io_pad_e pad);






 
void hal_gpio_init_output(io_pad_e pad, gpio_level_e lvl);






 
void hal_gpio_set_output_data(io_pad_e pad, gpio_level_e lvl);





 
void hal_gpio_init_input(io_pad_e pad);





 
gpio_level_e hal_gpio_get_input_data(io_pad_e pad);






 
void hal_gpio_set_mode(io_pad_e pad, uint8_t mode);





 
void hal_gpio_set_high_impedance(io_pad_e pad);







 
void hal_gpio_get_pull_state(io_pad_e pad, _Bool *up_enable, _Bool *down_enable);







 
void hal_gpio_set_pull_state(io_pad_e pad, _Bool up_enable, _Bool down_enable);






 
void hal_gpio_set_schmitt_trigger(io_pad_e pad, _Bool st_enable);






 
void hal_gpio_set_driving_strength(io_pad_e pad, uint8_t strength);






 
void hal_gpio_set_slew_rate(io_pad_e pad, pad_slew_rate_e rate);







 
void hal_gpio_set_ap_reset_int(_Bool enable, fcb_type cb_func, sys_cfg_trigger_e trig);






 
void hal_gpio_config_pad(io_pad_attr_t *attrs, uint8_t size);

# 19 "..\\..\\src\\sdk\\include\\hal_dsi_tx_ctrl.h"



 



 


 
typedef struct
{
    uint16_t     st_col;            
    uint16_t     width;             
    uint8_t      remap_en;          
    uint8_t      blank_en;          
} blank_disp_t;



 
typedef uint8_t (remap_rule_t)[24];



 
typedef struct
{
    _Bool             pentile_enable;                     
    _Bool             pentile_reverse_en;                 
    _Bool             pentile_24b;                        
    uint32_t         rgb_hact;                           
    remap_rule_t     *remapl_rule;                       
    remap_rule_t     *remapr_rule;                       
    blank_disp_t     blank_info0;                        
    blank_disp_t     blank_info1;                        
} dsi_tx_pent_info_t;





 
typedef enum
{
    ALWAYS_HS = 0,                     
    ONLY_DATA_LANE_AUTO_LP = 1,        
    CLK_DATA_LANE_AUTO_LP = 2,         
} dsi_tx_lane_lp_e;




 
typedef enum
{
    TX_FLT_OPT    = 0,
    TX_FLT_LINEAR = 1,
    TX_FLT_MAX
} hal_dsi_tx_pq_filter_e;



 
typedef struct
{
    dsi_base_trans_info_t     base_info;                  
    uint32_t                  dpi_vsa;                    
    uint32_t                  dpi_vbp;                    
    uint32_t                  dpi_vfp;                    
    uint32_t                  dpi_hsa;                    
    uint32_t                  dpi_hbp;                    
    uint32_t                  dpi_hfp;                    
    float                     tx_frame_rate;              
    uint8_t                   lane_num;                   
    _Bool                      used;                       
    _Bool                      lp_exit_lpdt;               
    dsi_tx_lane_lp_e          tx_lane_lp;                 
    dsi_virtual_channel_e     channel_id;                 
    dsi_video_mode_type_e     vid_mode;                   
    dsi_tx_cmd_tx_type_e      cmd_tx_type;                
    dsi_tx_pent_info_t        pentile_info;               
    hal_dsi_tx_pq_filter_e    tx_pq_index;                
} hal_dsi_tx_ctrl_handle_t;



 
typedef enum
{
    TE_60HZ_MODE   = 0,
    TE_USER_MODE   = 1,  
    TE_STOP_MODE   = 1,
    TE_90HZ_MODE   = 2,
    TE_120HZ_MODE  = 3,
    TE_144HZ_MODE  = 4,
    TE_160HZ_MODE  = 5,
    TE_MODE_MAX
} te_mode_e;



 
typedef enum
{
    TX_VPG_V_COLOR     = 0,
    TX_VPG_H_COLOR     = 1,
    TX_VPG_V_BER       = 2,
    TX_VPG_FLICKER     = 3,
    TX_VPG_MAX
} dsi_tx_vpg_style_e;





 
_Bool hal_dsi_tx_ctrl_init(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle);





 
_Bool hal_dsi_tx_ctrl_deinit(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle);





 
hal_dsi_tx_ctrl_handle_t *hal_dsi_tx_ctrl_create_handle(void);





 
_Bool hal_dsi_tx_ctrl_release_handle(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle);





 
_Bool hal_dsi_tx_ctrl_start(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle);





 
_Bool hal_dsi_tx_ctrl_stop(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle);









 
void hal_dsi_tx_ctrl_read_cmd(uint8_t data_type, uint8_t vc, uint8_t cmd, uint8_t size, uint8_t *data);









 
_Bool hal_dsi_tx_ctrl_vporch_bta_opera(uint8_t data_type, uint8_t cmd, uint8_t size, uint8_t *data);








 
_Bool hal_dsi_tx_ctrl_write_cmd(uint8_t data_type, uint8_t vc, uint8_t cmd_count, ...);








 
_Bool hal_dsi_tx_ctrl_write_array_cmd(uint8_t data_type, uint8_t vc, uint8_t size, const uint8_t *data);






 
void hal_dsi_tx_ctrl_cmd_mode(_Bool enable);





 
void hal_dsi_tx_ctrl_set_escape_clock_div(uint32_t esc_clk);






 
void hal_dsi_tx_ctrl_set_endianness(dsi_endianness_e endianness);





 
void hal_dsi_tx_ctrl_set_ccm(ccm_coef_t *ccm);






 
void hal_dsi_tx_ctrl_set_edge_dect(dsi_tx_edge_dect_t *edge_dect_para, _Bool edge_dect_en);






 
void hal_dsi_tx_ctrl_set_edge_enhance(dsi_tx_edge_enh_t *edge_enh_para, _Bool edge_enh_en);






 
void hal_dsi_tx_ctrl_set_fc(dsi_tx_fc_t *fc_para, _Bool fc_en);






 
void hal_dsi_tx_ctrl_set_bcs(dsi_tx_bcs_t *bcs_para, _Bool bcs_en);







 
void hal_dsi_tx_ctrl_set_overwrite_rgb(uint8_t R, uint8_t G, uint8_t B);





 
void hal_dsi_tx_ctrl_overwrite_enable(_Bool enable);






 
void hal_dsi_tx_ctrl_partial_disp_enable(_Bool enable, dsi_tx_par_dis_t *par_disp_cfg);








 
void hal_dsi_tx_ctrl_set_vpg(_Bool vpg_en, dsi_tx_vpg_style_e style, _Bool vpg_hline_adj);






 
void hal_dsi_tx_ctrl_set_tear_mode(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle, te_mode_e te);





 
void hal_dsi_tx_ctrl_gen_a_tear_signal(void);





 
_Bool hal_dsi_tx_ctrl_gen_a_frame(void);






 
_Bool hal_dsi_tx_ctrl_set_cus_sync_line(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle, uint32_t line_num);





 
uint32_t hal_dsi_tx_ctrl_get_disp_line(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle);

# 18 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\sdk\\include\\hal_swire.h"








 





 
# 17 "..\\..\\src\\sdk\\include\\hal_swire.h"
# 18 "..\\..\\src\\sdk\\include\\hal_swire.h"



 



 



 



 




 
void hal_swire_init(void);





 
void hal_swire_deinit(void);








 
void hal_swire_set_waveform(uint32_t start_time, uint32_t stop_time,
                            uint32_t high_time, uint32_t low_time);






 
void hal_swire_set_pulse(uint32_t pulse);





 
void hal_swire_enable(_Bool state);







 
void hal_swire_set_timer(timer_num_e index, uint32_t ms, _Bool repeat);





 
void hal_swire_register_callback(fcb_type cb_func);

# 19 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\sdk\\include\\hal_timer.h"








 





 
# 17 "..\\..\\src\\sdk\\include\\hal_timer.h"
# 18 "..\\..\\src\\sdk\\include\\hal_timer.h"



 



 



 



 




 
void hal_timer_init(timer_num_e index);





 
void hal_timer_deinit(timer_num_e index);









 
void hal_timer_start(timer_num_e index, uint32_t ms, fcb_type cb_func, void *data);









 
void hal_timer_start_ex(timer_num_e index, uint32_t us, fcb_type cb_func, void *data);





 
void hal_timer_stop(timer_num_e index);






 
void hal_timer_set_repeat(timer_num_e index, _Bool repeat);





 
timer_status_e hal_timer_get_status(timer_num_e index);

# 20 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\sdk\\include\\hal_system.h"








 




 
# 16 "..\\..\\src\\sdk\\include\\hal_system.h"
# 17 "..\\..\\src\\sdk\\include\\hal_system.h"
# 18 "..\\..\\src\\sdk\\include\\hal_system.h"



 



 


 
typedef enum
{
    HAL_SYSCLK_80M  = 80000000,
    HAL_SYSCLK_100M = 100000000,
    HAL_SYSCLK_150M = 150000000
} hal_system_clk_e;



 



 





 
void hal_system_init(hal_system_clk_e sysclk);





 
void hal_system_idle_mode(_Bool disable_systick);





 
void hal_system_register_systick_cb(fcb_type cb_func);





 
_Bool hal_system_enable_systick(uint8_t ms);





 
_Bool hal_system_disable_systick(void);





 
uint32_t hal_system_get_tick(void);





 
void hal_system_reset_chip(void);





 
uint32_t hal_system_get_debug_state(void);





 
void hal_system_clear_debug_state(void);





 
_Bool hal_system_updata_sysclk(hal_system_clk_e sysclk);

# 21 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 22 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\app\\test_cfg_global.h"







 





 



 
 
# 31 "..\\..\\src\\app\\test_cfg_global.h"
 



# 37 "..\\..\\src\\app\\test_cfg_global.h"



# 23 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\sdk\\include\\hal_pwr.h"








 





 
# 17 "..\\..\\src\\sdk\\include\\hal_pwr.h"
# 18 "..\\..\\src\\sdk\\include\\hal_pwr.h"
# 19 "..\\..\\src\\sdk\\include\\hal_pwr.h"



 



 


 
typedef enum
{
    PWR_SEL_IOV18           = 0,            
    PWR_SEL_TP18            = 1,            
    PWR_SEL_VCC             = 2,            
    PWR_SEL_VDD13CP         = 3,            
} pwr_main_power_sel_e;



 
typedef enum
{
    PWR_SLEEP_IN_NON               = 0,            
    PWR_SLEEP_IN_TP18              = 1,            
    PWR_SLEEP_IN_VCC               = 2,            
    PWR_SLEEP_IN_VCC_TP18          = 3,            
    PWR_SLEEP_IN_IOV18             = 4,            
    PWR_SLEEP_IN_IOV18_TP18        = 5,            
    PWR_SLEEP_IN_IOV18_VCC         = 6,            
    PWR_SLEEP_IN_IOV18_VCC_TP18    = 7,            
} pwr_sleep_power_sel_e;



 
typedef enum
{
    WUP_RISING_EDGE  = 2,   
    WUP_FALLING_EDGE = 3    
} pwr_wakeup_trigger_e;



 
typedef enum
{
    RF_POWER_ON             = 0,   
    RF_CORE_RST             = 1,   
    RF_WDT_RST              = 2,   
    RF_CHIP_RST             = 3,   
    RF_APRSTN_WAKEUP        = 4,   
    RF_TDINT_WAKEUP         = 5    
} pwr_reset_flag_e;




 
typedef enum
{
    PWR_NORMAL_SLEEP_MODE  = 0,  
    PWR_STOP_SLEEP_MODE    = 1,  
    PWR_DEEP_SLEEP_MODE    = 2   
} pwr_sleep_mode_e;

 
typedef enum _pwr_hv_ldo_e
{
    HV_LDO_0            = 0,     
    HV_LDO_1            = 1,     
    HV_LDO_2            = 2,     
    HV_LDO_3            = 3,     
    HV_LDO_4            = 4,     
    HV_LDO_5            = 5,     
    HV_LDO_6            = 6,     
    HV_LDO_7            = 7,     
    HV_LDO_8            = 8,     
    HV_LDO_9            = 9,     
    HV_LDO_10            = 10,     
    HV_LDO_11            = 11,     
    HV_LDO_12            = 12,     
    HV_LDO_13            = 13,     
    HV_LDO_14            = 14,     
    HV_LDO_15            = 15,     
} pwr_hv_ldo_e;

 
typedef enum _pwr_ldo_13s_e
{
    LDO_13S_0            = 0,     
    LDO_13S_1            = 1,     
    LDO_13S_2            = 2,     
    LDO_13S_3            = 3,     
    LDO_13S_4            = 4,     
    LDO_13S_5            = 5,     
    LDO_13S_6            = 6,     
    LDO_13S_7            = 7,     
} pwr_ldo_13s_e;

 
typedef enum _pwr_ldo_18s_e
{
    LDO_18S_0            = 0,     
    LDO_18S_1            = 1,     
    LDO_18S_2            = 2,     
    LDO_18S_3            = 3,     
    LDO_18S_4            = 4,     
    LDO_18S_5            = 5,     
    LDO_18S_6            = 6,     
    LDO_18S_7            = 7,     
} pwr_ldo_18s_e;

 
typedef enum
{
    PVD_IOVCC          = 3,
    PVD_VCI            = 15,
} pwr_pvd_index_e;



 



 





 
void hal_pwr_set_main_power(pwr_main_power_sel_e power_sel);






 
_Bool hal_pwr_get_vcc_power_ready(void);





 
void hal_pwr_set_vcc_enable(_Bool enable);







 
void hal_pwr_set_sleep_mode_power(pwr_sleep_power_sel_e power_sel);







 
_Bool hal_pwr_enter_normal_sleep_mode(void);







 
io_pad_e hal_pwr_enter_stop_sleep_mode(void);






 
_Bool hal_pwr_set_stop_sleep_wakeup_pin(io_pad_e pad, pwr_wakeup_trigger_e trig);







 
void hal_pwr_enter_deep_sleep_mode(pwr_wakeup_trigger_e ap_rstn_trig, pwr_wakeup_trigger_e td_int_trig);





 
_Bool hal_pwr_exit_sleep_mode(void);





 
pwr_reset_flag_e hal_pwr_get_reset_flag(void);





 
void hal_pwr_elvcc_ldo_en(_Bool enable);






















 
void hal_pwr_elvcc_vol_set(pwr_hv_ldo_e voltage);





 
void hal_pwr_ldo18s_en(_Bool enable);














 
void hal_pwr_ldo18s_set(pwr_ldo_18s_e voltage);





 
void hal_pwr_ldo13s_en(_Bool enable);














 
void hal_pwr_ldo13s_set(pwr_ldo_13s_e voltage);







 
void hal_pwr_set_pvd(pwr_pvd_index_e index, _Bool enable);







 
void hal_pwr_sw_tp18_en(_Bool enable);



# 24 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "..\\..\\src\\sdk\\include\\hal_pwm.h"








 





 
# 17 "..\\..\\src\\sdk\\include\\hal_pwm.h"
# 18 "..\\..\\src\\sdk\\include\\hal_pwm.h"



 



 



 



 










 
_Bool hal_pwm_init(uint32_t frequency, uint32_t duty_step);





 
void hal_pwm_enable(_Bool enable);





 
void hal_pwm_set_duty(uint32_t duty_ratio);





 
_Bool hal_pwm_set_elvcc_output(_Bool enable);





 
void hal_pwm_set_elvcc_capacity(uint8_t capacity);





 
_Bool hal_pwm_deinit(void);

# 25 "..\\..\\src\\app\\P6A\\p6a_demo.c"
# 1 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdio.h"
 
 
 





 






 







 




  
 








# 47 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdio.h"


  



    typedef unsigned int size_t;    









 
 

 



    typedef struct __va_list __va_list;






   




 




typedef struct __fpos_t_struct {
    unsigned __int64 __pos;
    



 
    struct {
        unsigned int __state1, __state2;
    } __mbstate;
} fpos_t;
   


 


   

 

typedef struct __FILE FILE;
   






 

# 136 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdio.h"


extern FILE __stdin, __stdout, __stderr;
extern FILE *__aeabi_stdin, *__aeabi_stdout, *__aeabi_stderr;

# 166 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdio.h"
    

    

    





     



   


 


   


 

   



 

   


 




   


 





    


 






extern __declspec(__nothrow) int remove(const char *  ) __attribute__((__nonnull__(1)));
   





 
extern __declspec(__nothrow) int rename(const char *  , const char *  ) __attribute__((__nonnull__(1,2)));
   








 
extern __declspec(__nothrow) FILE *tmpfile(void);
   




 
extern __declspec(__nothrow) char *tmpnam(char *  );
   











 

extern __declspec(__nothrow) int fclose(FILE *  ) __attribute__((__nonnull__(1)));
   







 
extern __declspec(__nothrow) int fflush(FILE *  );
   







 
extern __declspec(__nothrow) FILE *fopen(const char * __restrict  ,
                           const char * __restrict  ) __attribute__((__nonnull__(1,2)));
   








































 
extern __declspec(__nothrow) FILE *freopen(const char * __restrict  ,
                    const char * __restrict  ,
                    FILE * __restrict  ) __attribute__((__nonnull__(2,3)));
   








 
extern __declspec(__nothrow) void setbuf(FILE * __restrict  ,
                    char * __restrict  ) __attribute__((__nonnull__(1)));
   




 
extern __declspec(__nothrow) int setvbuf(FILE * __restrict  ,
                   char * __restrict  ,
                   int  , size_t  ) __attribute__((__nonnull__(1)));
   















 
#pragma __printf_args
extern __declspec(__nothrow) int fprintf(FILE * __restrict  ,
                    const char * __restrict  , ...) __attribute__((__nonnull__(1,2)));
   


















 
#pragma __printf_args
extern __declspec(__nothrow) int _fprintf(FILE * __restrict  ,
                     const char * __restrict  , ...) __attribute__((__nonnull__(1,2)));
   



 
#pragma __printf_args
extern __declspec(__nothrow) int printf(const char * __restrict  , ...) __attribute__((__nonnull__(1)));
   




 
#pragma __printf_args
extern __declspec(__nothrow) int _printf(const char * __restrict  , ...) __attribute__((__nonnull__(1)));
   



 
#pragma __printf_args
extern __declspec(__nothrow) int sprintf(char * __restrict  , const char * __restrict  , ...) __attribute__((__nonnull__(1,2)));
   






 
#pragma __printf_args
extern __declspec(__nothrow) int _sprintf(char * __restrict  , const char * __restrict  , ...) __attribute__((__nonnull__(1,2)));
   



 

#pragma __printf_args
extern __declspec(__nothrow) int __ARM_snprintf(char * __restrict  , size_t  ,
                     const char * __restrict  , ...) __attribute__((__nonnull__(3)));


#pragma __printf_args
extern __declspec(__nothrow) int snprintf(char * __restrict  , size_t  ,
                     const char * __restrict  , ...) __attribute__((__nonnull__(3)));
   















 

#pragma __printf_args
extern __declspec(__nothrow) int _snprintf(char * __restrict  , size_t  ,
                      const char * __restrict  , ...) __attribute__((__nonnull__(3)));
   



 
#pragma __scanf_args
extern __declspec(__nothrow) int fscanf(FILE * __restrict  ,
                    const char * __restrict  , ...) __attribute__((__nonnull__(1,2)));
   






























 
#pragma __scanf_args
extern __declspec(__nothrow) int _fscanf(FILE * __restrict  ,
                     const char * __restrict  , ...) __attribute__((__nonnull__(1,2)));
   



 
#pragma __scanf_args
extern __declspec(__nothrow) int scanf(const char * __restrict  , ...) __attribute__((__nonnull__(1)));
   






 
#pragma __scanf_args
extern __declspec(__nothrow) int _scanf(const char * __restrict  , ...) __attribute__((__nonnull__(1)));
   



 
#pragma __scanf_args
extern __declspec(__nothrow) int sscanf(const char * __restrict  ,
                    const char * __restrict  , ...) __attribute__((__nonnull__(1,2)));
   








 
#pragma __scanf_args
extern __declspec(__nothrow) int _sscanf(const char * __restrict  ,
                     const char * __restrict  , ...) __attribute__((__nonnull__(1,2)));
   



 

 
extern __declspec(__nothrow) int vfscanf(FILE * __restrict  , const char * __restrict  , __va_list) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) int vscanf(const char * __restrict  , __va_list) __attribute__((__nonnull__(1)));
extern __declspec(__nothrow) int vsscanf(const char * __restrict  , const char * __restrict  , __va_list) __attribute__((__nonnull__(1,2)));

extern __declspec(__nothrow) int _vfscanf(FILE * __restrict  , const char * __restrict  , __va_list) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) int _vscanf(const char * __restrict  , __va_list) __attribute__((__nonnull__(1)));
extern __declspec(__nothrow) int _vsscanf(const char * __restrict  , const char * __restrict  , __va_list) __attribute__((__nonnull__(1,2)));
extern __declspec(__nothrow) int __ARM_vsscanf(const char * __restrict  , const char * __restrict  , __va_list) __attribute__((__nonnull__(1,2)));

extern __declspec(__nothrow) int vprintf(const char * __restrict  , __va_list  ) __attribute__((__nonnull__(1)));
   





 
extern __declspec(__nothrow) int _vprintf(const char * __restrict  , __va_list  ) __attribute__((__nonnull__(1)));
   



 
extern __declspec(__nothrow) int vfprintf(FILE * __restrict  ,
                    const char * __restrict  , __va_list  ) __attribute__((__nonnull__(1,2)));
   






 
extern __declspec(__nothrow) int vsprintf(char * __restrict  ,
                     const char * __restrict  , __va_list  ) __attribute__((__nonnull__(1,2)));
   






 
extern __declspec(__nothrow) int __ARM_vsnprintf(char * __restrict  , size_t  ,
                     const char * __restrict  , __va_list  ) __attribute__((__nonnull__(3)));

extern __declspec(__nothrow) int vsnprintf(char * __restrict  , size_t  ,
                     const char * __restrict  , __va_list  ) __attribute__((__nonnull__(3)));
   







 

extern __declspec(__nothrow) int _vsprintf(char * __restrict  ,
                      const char * __restrict  , __va_list  ) __attribute__((__nonnull__(1,2)));
   



 
extern __declspec(__nothrow) int _vfprintf(FILE * __restrict  ,
                     const char * __restrict  , __va_list  ) __attribute__((__nonnull__(1,2)));
   



 
extern __declspec(__nothrow) int _vsnprintf(char * __restrict  , size_t  ,
                      const char * __restrict  , __va_list  ) __attribute__((__nonnull__(3)));
   



 

#pragma __printf_args
extern __declspec(__nothrow) int asprintf(char **  , const char * __restrict  , ...) __attribute__((__nonnull__(2)));
extern __declspec(__nothrow) int vasprintf(char **  , const char * __restrict  , __va_list  ) __attribute__((__nonnull__(2)));

#pragma __printf_args
extern __declspec(__nothrow) int __ARM_asprintf(char **  , const char * __restrict  , ...) __attribute__((__nonnull__(2)));
extern __declspec(__nothrow) int __ARM_vasprintf(char **  , const char * __restrict  , __va_list  ) __attribute__((__nonnull__(2)));
   








 

extern __declspec(__nothrow) int fgetc(FILE *  ) __attribute__((__nonnull__(1)));
   







 
extern __declspec(__nothrow) char *fgets(char * __restrict  , int  ,
                    FILE * __restrict  ) __attribute__((__nonnull__(1,3)));
   










 
extern __declspec(__nothrow) int fputc(int  , FILE *  ) __attribute__((__nonnull__(2)));
   







 
extern __declspec(__nothrow) int fputs(const char * __restrict  , FILE * __restrict  ) __attribute__((__nonnull__(1,2)));
   




 
extern __declspec(__nothrow) int getc(FILE *  ) __attribute__((__nonnull__(1)));
   







 




    extern __declspec(__nothrow) int (getchar)(void);

   





 
extern __declspec(__nothrow) char *gets(char *  ) __attribute__((__nonnull__(1)));
   









 
extern __declspec(__nothrow) int putc(int  , FILE *  ) __attribute__((__nonnull__(2)));
   





 




    extern __declspec(__nothrow) int (putchar)(int  );

   



 
extern __declspec(__nothrow) int puts(const char *  ) __attribute__((__nonnull__(1)));
   





 
extern __declspec(__nothrow) int ungetc(int  , FILE *  ) __attribute__((__nonnull__(2)));
   






















 

extern __declspec(__nothrow) size_t fread(void * __restrict  ,
                    size_t  , size_t  , FILE * __restrict  ) __attribute__((__nonnull__(1,4)));
   











 

extern __declspec(__nothrow) size_t __fread_bytes_avail(void * __restrict  ,
                    size_t  , FILE * __restrict  ) __attribute__((__nonnull__(1,3)));
   











 

extern __declspec(__nothrow) size_t fwrite(const void * __restrict  ,
                    size_t  , size_t  , FILE * __restrict  ) __attribute__((__nonnull__(1,4)));
   







 

extern __declspec(__nothrow) int fgetpos(FILE * __restrict  , fpos_t * __restrict  ) __attribute__((__nonnull__(1,2)));
   








 
extern __declspec(__nothrow) int fseek(FILE *  , long int  , int  ) __attribute__((__nonnull__(1)));
   














 
extern __declspec(__nothrow) int fsetpos(FILE * __restrict  , const fpos_t * __restrict  ) __attribute__((__nonnull__(1,2)));
   










 
extern __declspec(__nothrow) long int ftell(FILE *  ) __attribute__((__nonnull__(1)));
   











 
extern __declspec(__nothrow) void rewind(FILE *  ) __attribute__((__nonnull__(1)));
   





 

extern __declspec(__nothrow) void clearerr(FILE *  ) __attribute__((__nonnull__(1)));
   




 

extern __declspec(__nothrow) int feof(FILE *  ) __attribute__((__nonnull__(1)));
   


 
extern __declspec(__nothrow) int ferror(FILE *  ) __attribute__((__nonnull__(1)));
   


 
extern __declspec(__nothrow) void perror(const char *  );
   









 

extern __declspec(__nothrow) int _fisatty(FILE *   ) __attribute__((__nonnull__(1)));
    
 

extern __declspec(__nothrow) void __use_no_semihosting_swi(void);
extern __declspec(__nothrow) void __use_no_semihosting(void);
    





 











# 1021 "C:\\Keil_v5\\ARM\\ARMCC\\Bin\\..\\include\\stdio.h"



 

# 26 "..\\..\\src\\app\\P6A\\p6a_demo.c"








 
# 46 "..\\..\\src\\app\\P6A\\p6a_demo.c"
 

 

 

 
# 59 "..\\..\\src\\app\\P6A\\p6a_demo.c"
 

 

 


 

 

 

 

 

 

 

 

 

 


 


 

 

 





 

 

 

 

 

 

 

 


 





 
static hal_dsi_rx_ctrl_handle_t *g_rx_ctrl_handle = 0;
static hal_dsi_tx_ctrl_handle_t *g_tx_ctrl_handle = 0;

 
static _Bool panel_display_done = 0;
static _Bool sg_system_resume = 0;
static _Bool sg_system_suspend = 0;
static _Bool sg_exit_idle_mode_flag = 0;

static volatile _Bool g_resolution_change = 0;
static uint32_t pps_renew_flag = 0;
static uint32_t pwr_rst_flag = 0;

# 143 "..\\..\\src\\app\\P6A\\p6a_demo.c"

 





uint8_t s_swire_pwm_counter     = 0;

uint16_t rd_51_val,rd_51_val2;

 
static void ap_rstn_pull_high_cb(void *data);
static void ap_rstn_pull_down_cb(void *data);
static void app_mipi_rx_start_cb(void *data);
static void soft_swire_init(void);

 
# 172 "..\\..\\src\\app\\P6A\\p6a_demo.c"





 
static _Bool ap_dcs_read(uint8_t data_type, uint8_t dcs_cmd, uint8_t param)
{
 	if (dcs_cmd == 0x04)
	{
		hal_dsi_rx_ctrl_send_ack_cmd(g_rx_ctrl_handle,
									 DSI_ACK_DT_DCS_LONG_RESPONSE,
									 DSI_VC_0,
									 3, 0x8A,0x80,0x00);
	}
	else if (dcs_cmd == 0xa1)
	{
		hal_dsi_rx_ctrl_send_ack_cmd(g_rx_ctrl_handle,
									 DSI_ACK_DT_DCS_LONG_RESPONSE,
									 DSI_VC_0,
									 13, 0x0C,0x12,0x0C,0xBF,0x00,0x00,0xB7,0x1A,0x14,0x38,0x11,0x20,0x21);
	}
	else if (dcs_cmd == 0xDA)
	{
		hal_dsi_rx_ctrl_send_ack_cmd(g_rx_ctrl_handle,
									 DSI_ACK_DT_DCS_SHORT_RESPONSE_1B,
									 DSI_VC_0,
									 1, 0x8A);
	}
	else if (dcs_cmd == 0xDB)
	{
		hal_dsi_rx_ctrl_send_ack_cmd(g_rx_ctrl_handle,
									 DSI_ACK_DT_DCS_SHORT_RESPONSE_1B,
									 DSI_VC_0,
									 1, 0x80);
	}
	else if (dcs_cmd == 0xDC)
	{
		hal_dsi_rx_ctrl_send_ack_cmd(g_rx_ctrl_handle,
									 DSI_ACK_DT_DCS_SHORT_RESPONSE_1B,
									 DSI_VC_0,
									 1, 0x00);
	}
	else if (dcs_cmd == 0xD8)
	{
		hal_dsi_rx_ctrl_send_ack_cmd(g_rx_ctrl_handle,
									 DSI_ACK_DT_DCS_LONG_RESPONSE,
									 DSI_VC_0,
									 5, 0x0C,0xAC,0x84,0xBE,0xFB);
	}
	else
	{
		uint32_t return_size = hal_dsi_rx_ctrl_get_max_ret_size(g_rx_ctrl_handle);
		hal_dsi_rx_ctrl_send_ack_cmd(g_rx_ctrl_handle,
									 DSI_ACK_DT_DCS_SHORT_RESPONSE_1B,
									 DSI_VC_0,
									 1, 0);
		do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "r[%x] [%d] err!!!!!!\n", "p6a", 229,dcs_cmd, return_size); } while (0);
	}
	

	return 1;	
}

uint8_t pps[128] = {0x11,0x00,0x00,0x89,0x30,0x80,0x09,0x60,0x04,0x38,0x00,0x30,0x02,0x1C,0x02,0x1C,
                        0x02,0x00,0x02,0x0E,0x00,0x20,0x04,0xA6,0x00,0x07,0x00,0x0C,0x02,0x0B,0x02,0x1F,
                        0x18,0x00,0x10,0xF0,0x03,0x0C,0x20,0x00,0x06,0x0B,0x0B,0x33,0x0E,0x1C,0x2A,0x38,
                        0x46,0x54,0x62,0x69,0x70,0x77,0x79,0x7B,0x7D,0x7E,0x01,0x02,0x01,0x00,0x09,0x40,
                        0x09,0xBE,0x19,0xFC,0x19,0xFA,0x19,0xF8,0x1A,0x38,0x1A,0x78,0x1A,0xB6,0x2A,0xF6,
                        0x2B,0x34,0x2B,0x74,0x3B,0x74,0x6B,0xF4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};



 
static _Bool pps_update_handle(uint8_t *pps, uint8_t size, uint32_t pic_width, uint32_t pic_height)
{
	
     
 
    if (pic_width != g_rx_ctrl_handle->base_info.src_w || pic_height != g_rx_ctrl_handle->base_info.src_h)
    {
        hal_dsi_tx_ctrl_set_tear_mode(g_tx_ctrl_handle, TE_USER_MODE);
         
        g_rx_ctrl_handle->base_info.src_w = pic_width;
        g_rx_ctrl_handle->base_info.src_h = pic_height;
         
        g_rx_ctrl_handle->compress_en = 1;  
		if(pic_width > 720)
		{
			g_tx_ctrl_handle->base_info.src_w = pic_width;
			g_tx_ctrl_handle->base_info.src_h = pic_height;
		}

		hal_dsi_rx_ctrl_toggle_resolution(g_rx_ctrl_handle);
    }
	    hal_dsi_tx_ctrl_set_tear_mode(g_tx_ctrl_handle, TE_60HZ_MODE);
    
    return 1;
}









 
static _Bool ap_dcs_set_display_on(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
{


		hal_dsi_tx_ctrl_write_cmd(0x05, 0, 2, 0x29);

    do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "disp on \n", "p6a", 289); } while (0);
    return 1;
}







 
static _Bool ap_dcs_set_display_off(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
{




    do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "disp off %d\n", "p6a", 306,panel_display_done); } while (0);
    return 1;
}







 
void Gpio_swire_output(uint8_t flag, uint8_t num)
{
	uint8_t ii;

	if (flag)
	{
		if (flag ==2)
		{
			hal_gpio_init_output(IO_PAD_AP_SWIRE, IO_LVL_HIGH);	  
			delayMs(2);
		}
		for (ii =0; ii< num; ii++)
		{
			hal_gpio_set_output_data(IO_PAD_AP_SWIRE, IO_LVL_LOW);
			delayUs(10);
			hal_gpio_set_output_data(IO_PAD_AP_SWIRE, IO_LVL_HIGH);
			delayUs(9);
		}
	}
	else
	{
		hal_gpio_init_output(IO_PAD_AP_SWIRE, IO_LVL_LOW);	  
	}
}








 
static _Bool ap_dcs_set_enter_sleep_mode(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
{	


	hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x28);
	delayMs(80);  


	hal_gpio_init_output(( IO_PIN_17 ), IO_LVL_LOW);
	hal_timer_deinit(( TIMER_NUM3 ));
	hal_timer_stop(( TIMER_NUM3 ));	
	     
    hal_dsi_tx_ctrl_set_tear_mode(g_tx_ctrl_handle, TE_STOP_MODE);
	delayMs(41);
	hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x10);
    delayMs(20);	
	     
	 hal_gpio_init_output( ( IO_PIN_15 ), IO_LVL_LOW ); 





     
 


    return 1;
}






 
static _Bool ap_dcs_set_exit_sleep_mode(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
{


    hal_gpio_set_output_data(( IO_PIN_15 ), IO_LVL_HIGH);


# 399 "..\\..\\src\\app\\P6A\\p6a_demo.c"

    do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "exit sleep mode \n", "p6a", 400); } while (0);

    return 1;
}








 

uint8_t value_51H,value_51L;
static _Bool reg53_E8_fg=0;
static _Bool ap_dcs_set_backlight(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
{	
	





		rd_51_val = dcs_packet->packet_param[0];
	rd_51_val <<=8;
	rd_51_val |= dcs_packet->packet_param[1];


	if(rd_51_val == 0x00) {
	
	  rd_51_val2 = 0x04; 
	
	}
	else if((rd_51_val >0x00)&&(rd_51_val <= 0x7FF) ){
	
	  rd_51_val2 = (rd_51_val-0x04)*4091/2043+0x04;   
	
	}
	else if(rd_51_val >=0x7FF) {
	
	  rd_51_val2 = 0xFFF; 
	
	}
		hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0x51, rd_51_val2>>8, rd_51_val2&0x00FF);


    return 1;
}

# 487 "..\\..\\src\\app\\P6A\\p6a_demo.c"






 
static _Bool ap_dcs_set_exit_idle_mode(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
{
    sg_exit_idle_mode_flag = 1;
    hal_dsi_rx_ctrl_set_hw_cmd_filter(g_rx_ctrl_handle, HAL_RX_DCS_FILTER_B, 0x2C, 0x2C);
    do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "exit idle mode,skip 0x2C\n", "p6a", 498); } while (0);
    return 1;
}


static void soft_te_timer_cb(void *data)
{
    

 


        hal_dsi_tx_ctrl_gen_a_tear_signal();
        hal_timer_start(TIMER_NUM2, 16, soft_te_timer_cb, 0);





}

static void soft_te_timer_init()
{

    hal_dsi_tx_ctrl_set_tear_mode(g_tx_ctrl_handle,TE_USER_MODE);
    hal_timer_init(TIMER_NUM2);
    hal_timer_start(TIMER_NUM2, 1, soft_te_timer_cb, 0);
}






 
static _Bool ap_dcs_set_frame_change(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
{
    if (dcs_packet->param_length == 1)
    {
        if (dcs_packet->packet_param[0] == 0x01)
        {
		
            hal_dsi_tx_ctrl_set_tear_mode(g_tx_ctrl_handle, TE_60HZ_MODE);
        }
        else 
        {
		
           hal_dsi_tx_ctrl_set_tear_mode(g_tx_ctrl_handle, TE_120HZ_MODE);
        }
    }

    return 1;
}

static _Bool ap_set_FPS_53(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
{
	uint8_t value_b1 =0;	
	
    value_b1 =  dcs_packet->packet_param[0]; 

	if(value_b1 == 0x38)  
	{
    if(rd_51_val2>=0x88F){ 
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97, 0x11, 0x8F,0xFF);   
	}









	  else if((rd_51_val >0x6FF)&&(rd_51_val <= 0x88F) ){
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97, 0x11, 0x89,0x8F);   
	}
	 else if((rd_51_val >0x4FF)&&(rd_51_val <= 0x6FF) ){
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97, 0x11, 0x86,0xFF);   
	}
	 else{
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97,0x11, 0x83,0xFF);   
	}
	}
	else if(value_b1 == 0x28)  
	{

  
    if(rd_51_val2>=0xDFF){
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97, 0x00, 0x0F,0xFF);   
	}
	else if((rd_51_val >0xBFF)&&(rd_51_val <= 0xDFF) ){
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97, 0x00, 0x0D,0x8F);  
	}
	 else if((rd_51_val >0xA8F)&&(rd_51_val <= 0xBFF) ){
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97, 0x00, 0x0B,0x8F);  
	}
	  else if((rd_51_val >0x88F)&&(rd_51_val <= 0xA8F) ){
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97, 0x00, 0x09,0xFF);  
	}
	  else if((rd_51_val >0x6FF)&&(rd_51_val <= 0x88F) ){
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97, 0x00, 0x07,0x8F);  
	}
	 else if((rd_51_val >0x4FF)&&(rd_51_val <= 0x6FF) ){
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97, 0x00, 0x05,0xFF);  
	}
	 else{
         hal_dsi_tx_ctrl_write_cmd( 0x39, 0, 4, 0x97,0x00, 0x02,0xFF);   
	}
        
	}


    return 1;
}


 

 
static const hal_dcs_execute_entry_t g_cus_rx_dcs_execute_table[] =
{
    {DCS_SET_DISPLAY_ON, ap_dcs_set_display_on, 0},
    {DCS_SET_DISPLAY_OFF, ap_dcs_set_display_off, 1},
    {0x51, ap_dcs_set_backlight, 1},
	{0x53, ap_set_FPS_53, 1},  
    {DCS_ENTER_SLEEP_MODE, ap_dcs_set_enter_sleep_mode, 1},
    {DCS_EXIT_SLEEP_MODE, ap_dcs_set_exit_sleep_mode, 1},





  
    {0, 0, 0}                        
};





 
static void app_tx_panel_reset(void)
{



    hal_gpio_set_output_data(IO_PAD_TD_RSTN, IO_LVL_HIGH);
    delayMs(10);
    hal_gpio_set_output_data(IO_PAD_TD_RSTN, IO_LVL_LOW);
    delayMs(10);
    hal_gpio_set_output_data(IO_PAD_TD_RSTN, IO_LVL_HIGH);

    delayMs(50);

}

static void send_panel_init_code(uint32_t size, uint8_t* data)
{
    uint32_t data_offeset = 0;
    uint8_t data_type;
    uint8_t vc;
    uint8_t data_size;
    uint8_t* p_data;

    while(data_offeset < size)
    {
        data_type = data[data_offeset];
        vc = data[data_offeset + 1];
        data_size = data[data_offeset + 2];
        p_data = &data[data_offeset + 3];
        hal_dsi_tx_ctrl_write_array_cmd(data_type, vc, data_size, p_data);
        data_offeset = data_offeset + data_size + 3;
        delayUs( 100 );
    }
}

const uint8_t panel_init_code[] =
{
0x39, 0, 3, 0x9C, 0xA5, 0xA5,
0x39, 0, 3, 0xFD, 0x5A, 0x5A,
0x39, 0, 2, 0x9F, 0x0F,
0x39, 0, 2, 0xB3, 0x00,	
0x39, 0, 2, 0x9F, 0x01,
0x39, 0, 4, 0xB2, 0x51, 0x04, 0x69,
0x39, 0, 36, 0xB3, 0x01, 0x6F, 0x00, 0x0A, 0x2E, 0x00, 0x01, 0x6F, 0x00, 0x0A, 0x2E, 0x00, 0x01, 0x6F, 0x00, 0x0A, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x6F, 0x00, 0x0A, 0x14, 0x44, 0x1C, 0x1C, 0x1C, 0x18, 0x1C,
0x39, 0, 3, 0xD9, 0x01, 0x1F,
0x39, 0, 4, 0xCF, 0x01, 0x00, 0x00,
0x39, 0, 2, 0xD0, 0x01,
0x39, 0, 2, 0xD3, 0x00,
0x39, 0, 2, 0xD5, 0x03,
0x39, 0, 2, 0x9F, 0x02,
0x39, 0, 26, 0xB2, 0x00, 0xC1, 0x32, 0x10, 0x11, 0x12, 0x12, 0x00, 0x08, 0x78, 0x21, 0x11, 0x14, 0x13, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x21, 0x21, 0x11, 0x1A,	
0x39, 0, 2, 0xB3, 0x0B,
0x39, 0, 14, 0xB4, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  
0x39, 0, 7, 0xB5, 0x00, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F,
0x39, 0, 20, 0xB6, 0x01, 0x00, 0x00, 0x11, 0x11, 0x11, 0x1C, 0x08, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
0x39, 0, 17, 0xB7, 0x00, 0x10, 0x15, 0x12, 0x10, 0x15, 0x00, 0x06, 0x03, 0x03, 0x06, 0x03, 0x03, 0x06, 0x03, 0x03,	
0x39, 0, 14, 0xB8, 0x00, 0x00, 0x00, 0x73, 0x2D, 0x73, 0x2D, 0x73, 0x2D, 0x73, 0x2D, 0x73, 0x2D,
0x39, 0, 9, 0xB9, 0x00, 0x00, 0x50, 0x00, 0x00, 0x17, 0x17, 0x00,
0x39, 0, 9, 0xBA, 0x08, 0xFF, 0x36, 0x03, 0x36, 0x03, 0x11, 0x01,
0x39, 0, 26, 0xBB, 0x00, 0xCD, 0x0F, 0xC3, 0x64, 0x00, 0xCD, 0x0F, 0xC3, 0x64, 0x00, 0xCD, 0x0F, 0xC3, 0x64, 0x00, 0xCD, 0x0F, 0xC3, 0x64, 0x00, 0xCD, 0x64, 0x6E, 0x64,
0x39, 0, 6, 0xBE, 0x5F, 0x16, 0x04, 0x5F, 0x75,
0x39, 0, 6, 0xBF, 0x08, 0x00, 0x10, 0x10, 0x08,
0x39, 0, 17, 0xC1, 0x23, 0x00, 0x24, 0x00, 0x05, 0x00, 0x3D, 0x21, 0x00, 0x3D, 0x00, 0x01, 0x00, 0x3D, 0x00, 0x22,
0x39, 0, 17, 0xC2, 0x23, 0x00, 0x24, 0x00, 0x05, 0x00, 0x3D, 0x21, 0x00, 0x3D, 0x00, 0x01, 0x00, 0x3D, 0x00, 0x22,
0x39, 0, 8, 0xC3, 0x11, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 17, 0xC4, 0x00, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1f, 0x00, 0x00, 0x08,
0x39, 0, 27, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 27, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x55, 0x00, 0x01, 0x00,
0x39, 0, 14, 0xC7, 0x00, 0x1A, 0x25, 0x24, 0x20, 0x00, 0x24, 0x20, 0x24, 0x20, 0x00, 0x20, 0x20,
0x39, 0, 14, 0xC8, 0x00, 0x35, 0x1A, 0x20, 0x20, 0x00, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00,
0x39, 0, 27, 0xC9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 27, 0xCA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 27, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 27, 0xCC, 0x04, 0x3A, 0x3B, 0x1A, 0xCD, 0x00, 0x1A, 0xCD, 0x1A, 0xCD, 0x00, 0x44, 0xBF, 0x00, 0x19, 0xBA, 0x20, 0x68, 0x00, 0x24, 0x68, 0x00, 0x00, 0x00, 0x24, 0x6B,
0x39, 0, 25, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 25, 0xCE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 25, 0xCF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 25, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 25, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 17, 0xD2, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00,
0x39, 0, 17, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 15, 0xD7, 0x44, 0x01, 0x3F, 0x24, 0x56, 0x24, 0x56, 0x01, 0x11, 0x99, 0x0A, 0x00, 0x00, 0x03,
0x39, 0, 26, 0xD8, 0x00, 0x00, 0xC5, 0x9F, 0x40, 0x00, 0x00, 0xC5, 0x9F, 0x40, 0x00, 0x00, 0xC5, 0x9F, 0x40, 0x00, 0x00, 0xC5, 0x9F, 0x40, 0x00, 0x00, 0xC5, 0x00, 0x00,
0x39, 0, 12, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 6, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 26, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 13, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 9, 0xE7, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x22,
0x39, 0, 12, 0xEE, 0x00, 0x00, 0x00, 0xBB, 0x58, 0x08, 0xA2, 0x50, 0x88, 0x88, 0x29,
0x39, 0, 6, 0xEF, 0x00, 0x80, 0x82, 0x80, 0x85,
0x39, 0, 2, 0x9F, 0x03,
0x39, 0, 33, 0xB2, 0x11, 0x00, 0x00, 0x89, 0x30, 0x80, 0x09, 0x60, 0x04, 0x38, 0x00, 0x0C, 0x04, 0x38, 0x04, 0x38, 0x02, 0x00, 0x03, 0x1C, 0x00, 0x20, 0x01, 0x7E, 0x00, 0x0F, 0x00, 0x0C, 0x08, 0xBB, 0x04, 0x3D,
0x39, 0, 33, 0xB3, 0x18, 0x00, 0x10, 0xF0, 0x03, 0x0C, 0x20, 0x00, 0x06, 0x0B, 0x0B, 0x33, 0x0E, 0x1C, 0x2A, 0x38, 0x46, 0x54, 0x62, 0x69, 0x70, 0x77, 0x79, 0x7B, 0x7D, 0x7E, 0x01, 0x02, 0x01, 0x00, 0x09, 0x40,
0x39, 0, 25, 0xB4, 0x09, 0xBE, 0x19, 0xFC, 0x19, 0xFA, 0x19, 0xF8, 0x1A, 0x38, 0x1A, 0x78, 0x1A, 0xB6, 0x2A, 0xF6, 0x2B, 0x34, 0x2B, 0x74, 0x3B, 0x74, 0x6B, 0xF4,
0x39, 0, 2, 0xC0, 0x11,
0x39, 0, 2, 0x9F, 0x04,
0x39, 0, 3, 0xB2, 0x01, 0x80,
0x39, 0, 19, 0xB3, 0x00, 0x00, 0x10, 0x00, 0x30, 0x50, 0x00, 0x70, 0x90, 0x00, 0xB0, 0xF0, 0x11, 0x30, 0x70, 0x12, 0xF0, 0xF0,
0x39, 0, 21, 0xB4, 0x34, 0xF0, 0xF0, 0x56, 0xF0, 0xF0, 0x78, 0xF0, 0xF0, 0xAB, 0xF0, 0xF0, 0xCD, 0xF0, 0xF0, 0xEF, 0xF0, 0xF0, 0x0F, 0xFF,
0x39, 0, 7, 0xB6, 0x11, 0x00, 0x00, 0x0F, 0xF0, 0x10,
0x39, 0, 3, 0xBA, 0x10, 0x00,
0x39, 0, 5, 0xC4, 0x00, 0x10, 0x00, 0x00,
0x39, 0, 20, 0xC5, 0x00, 0x20, 0x88, 0xC1, 0xB2, 0xB2, 0x32, 0x00, 0x4E, 0x56, 0x35, 0x22, 0x22, 0x2A, 0x05, 0x3F, 0x00, 0x20, 0x0F,
0x39, 0, 13, 0xC6, 0x4B, 0x00, 0x90, 0x00, 0x02, 0xD5, 0x00, 0x02, 0xCB, 0x01, 0x10, 0x43,
0x39, 0, 5, 0xC8, 0x2B, 0x2B, 0x00, 0x00,
0x39, 0, 21, 0xC9, 0x0D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x1F, 0x1F,
0x39, 0, 21, 0xCA, 0x0D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x1F, 0x1F,
0x39, 0, 21, 0xCB, 0x0D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x1F, 0x1F,
0x39, 0, 21, 0xCC, 0x0D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x1F, 0x1F,
0x39, 0, 21, 0xCD, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C,
0x39, 0, 21, 0xCE, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C,
0x39, 0, 21, 0xCF, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C,
0x39, 0, 21, 0xD0, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C,
0x39, 0, 21, 0xD1, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C,
0x39, 0, 21, 0xD2, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C,
0x39, 0, 21, 0xD3, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C,
0x39, 0, 21, 0xD4, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C,
0x39, 0, 14, 0xB5, 0x11, 0x17, 0x27, 0x1C, 0xd0, 0x00, 0x64, 0x64, 0x00, 0x16, 0xD1, 0x89, 0x0B,
0x39, 0, 10, 0xF8, 0x3E, 0xAA, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA,
0x39, 0, 10, 0xF9, 0xE3, 0x00, 0x00, 0x00, 0xBB, 0xBB, 0xDD, 0x00, 0x00,
0x39, 0, 10, 0xFA, 0x3E, 0xAA, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA,
0x39, 0, 2, 0xB9, 0x90,
0x39, 0, 2, 0x9F, 0x05,
0x39, 0, 7, 0xB2, 0x24, 0x20, 0x05, 0x0F, 0xFF, 0xFF,
0x39, 0, 9, 0xB3, 0xA0, 0x00, 0x28, 0x00, 0x00, 0x00, 0x3F, 0xFF,
0x39, 0, 13, 0xB4, 0x00, 0x60, 0x0E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x8F,
0x39, 0, 21, 0xB5, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x01, 0x47, 0x01, 0x46, 0x00, 0xC0, 0x00, 0x62, 0x00, 0x31, 0x00, 0x18, 0x00, 0x08,
0x39, 0, 21, 0xB6, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x00, 0x00, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x00, 0x00, 0x0F, 0xFF, 0x00, 0x00,
0x39, 0, 16, 0xB9, 0x71, 0x20, 0x05, 0x78, 0x70, 0x5A, 0x3C, 0x78, 0x70, 0x5A, 0x3C, 0x78, 0x70, 0x5A, 0x3C,
0x39, 0, 2, 0x9F, 0x06,
0x39, 0, 41, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 41, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 21, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x39, 0, 41, 0xB5, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF,
0x39, 0, 41, 0xB6, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF,
0x39, 0, 21, 0xB7, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF,
0x39, 0, 2, 0x9F, 0x04,
0x39, 0, 19, 0xB3, 0x00, 0x00, 0x10, 0x00, 0x30, 0x50, 0x00, 0x70, 0xF0, 0x11, 0x70, 0xF0, 0x23, 0xF0, 0xF0, 0x46, 0xF0, 0xF0,
0x39, 0, 21, 0xB4, 0x8A, 0xF0, 0xF0, 0xCE, 0xF0, 0xF0, 0xFF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF,
0x39, 0, 2, 0x9F, 0x05,
0x39, 0, 21, 0xB5, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x01, 0x47, 0x01, 0x46, 0x00, 0xCD, 0x00, 0x66, 0x00, 0x3A, 0x00, 0x14, 0x00, 0x08,
0x39, 0, 21, 0xB6, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x00, 0x00, 0x0F, 0xFE, 0x07, 0x5F, 0x01, 0x64, 0x00, 0x00, 0x0F, 0xFF, 0x00, 0x00,
0x39, 0, 2, 0x9F, 0x05,
0x39, 0, 2, 0xF9, 0x80,
0x39, 0, 4, 0xFF, 0x00, 0x00, 0x01,
0x39, 0, 2, 0x9F, 0x06,
0x39, 0, 3, 0xFF, 0x00, 0x01,
0x39, 0, 5, 0xFE, 0x01, 0x00, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x02, 0x04, 0xBD, 0x33, 0x62, 0xD5, 0x44, 0x7E, 0xFC, 0x56, 0x69, 0x1C, 0x67, 0xAD, 0x30,
0x39, 0, 18, 0xF2, 0x78, 0xA5, 0x17, 0x88, 0x4E, 0x4E, 0x88, 0x4E, 0x4E, 0x88, 0x4E, 0x4E, 0x88, 0x4E, 0x4E, 0x80, 0x4E,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x02, 0xD5, 0x9D, 0x33, 0x31, 0x9F, 0x44, 0x3D, 0xB5, 0x55, 0x1D, 0xC3, 0x66, 0x4E, 0xC7,
0x39, 0, 18, 0xF4, 0x77, 0x33, 0x9B, 0x77, 0xCE, 0xCE, 0x77, 0xCE, 0xCE, 0x77, 0xCE, 0xCE, 0x77, 0xCE, 0xCE, 0x70, 0xCE,
0x39, 0, 22, 0xF5, 0x12, 0xAB, 0x0F, 0x22, 0x10, 0x11, 0x23, 0x89, 0x8C, 0x44, 0x25, 0x9D, 0x55, 0x4E, 0xD6, 0x67, 0x4D, 0x0B, 0x78, 0xAC, 0x3D,
0x39, 0, 18, 0xF6, 0x89, 0xC1, 0x3E, 0x99, 0x7C, 0x7C, 0x99, 0x7C, 0x7C, 0x99, 0x7C, 0x7C, 0x99, 0x7C, 0x7C, 0x90, 0x7C,
0x39, 0, 2, 0xFF, 0x01,
0x39, 0, 5, 0xFE, 0x01, 0x01, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x02, 0x04, 0x4B, 0x33, 0x05, 0x76, 0x44, 0x19, 0x92, 0x45, 0xF5, 0x9A, 0x66, 0x20, 0x93,
0x39, 0, 18, 0xF2, 0x67, 0xFB, 0x5C, 0x77, 0x8C, 0x8C, 0x77, 0x8C, 0x8C, 0x77, 0x8C, 0x8C, 0x77, 0x8C, 0x8C, 0x70, 0x8C,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x02, 0x04, 0x3E, 0x23, 0xDD, 0x45, 0x34, 0xDF, 0x51, 0x45, 0xAF, 0x49, 0x56, 0xC6, 0x33,
0x39, 0, 18, 0xF4, 0x66, 0x97, 0xF0, 0x77, 0x1B, 0x1B, 0x77, 0x1B, 0x1B, 0x77, 0x1B, 0x1B, 0x77, 0x1B, 0x1B, 0x70, 0x1B,
0x39, 0, 22, 0xF5, 0x11, 0x51, 0xB5, 0x11, 0xB6, 0xB7, 0x23, 0x35, 0x35, 0x34, 0xCD, 0x3C, 0x45, 0xE2, 0x63, 0x56, 0xCF, 0x7F, 0x77, 0x10, 0x90,
0x39, 0, 18, 0xF6, 0x88, 0x04, 0x6D, 0x88, 0xA2, 0xA2, 0x88, 0xA2, 0xA2, 0x88, 0xA2, 0xA2, 0x88, 0xA2, 0xA2, 0x80, 0xA2,
0x39, 0, 2, 0xFF, 0x01,
0x39, 0, 5, 0xFE, 0x01, 0x02, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x01, 0x04, 0x71, 0x23, 0x9F, 0x14, 0x34, 0xB3, 0x27, 0x45, 0x86, 0x1E, 0x56, 0x97, 0x02,
0x39, 0, 18, 0xF2, 0x66, 0x60, 0xB4, 0x66, 0xDF, 0xDF, 0x66, 0xDF, 0xDF, 0x66, 0xDF, 0xDF, 0x66, 0xDF, 0xDF, 0x60, 0xDF,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x01, 0x04, 0xC4, 0x22, 0x81, 0xEB, 0x33, 0x7F, 0xEC, 0x44, 0x44, 0xD2, 0x55, 0x47, 0xAA,
0x39, 0, 18, 0xF4, 0x66, 0x04, 0x54, 0x66, 0x7A, 0x7A, 0x66, 0x7A, 0x7A, 0x66, 0x7A, 0x7A, 0x66, 0x7A, 0x7A, 0x60, 0x7A,
0x39, 0, 22, 0xF5, 0x00, 0x20, 0x84, 0x00, 0x85, 0x86, 0x12, 0xCD, 0xE1, 0x33, 0x72, 0xDE, 0x44, 0x7B, 0xF2, 0x55, 0x57, 0xF9, 0x66, 0x7E, 0xEF,
0x39, 0, 18, 0xF6, 0x77, 0x56, 0xB5, 0x77, 0xE2, 0xE2, 0x77, 0xE2, 0xE2, 0x77, 0xE2, 0xE2, 0x77, 0xE2, 0xE2, 0x70, 0xE2,
0x39, 0, 2, 0xFF, 0x01,
0x39, 0, 5, 0xFE, 0x01, 0x03, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x12, 0x8B, 0x66, 0x33, 0x14, 0x85, 0x34, 0xDE, 0x65, 0x45, 0xD2, 0x2D,
0x39, 0, 18, 0xF2, 0x55, 0x7E, 0xC9, 0x55, 0xEA, 0xEA, 0x55, 0xEA, 0xEA, 0x55, 0xEA, 0xEA, 0x55, 0xEA, 0xEA, 0x50, 0xEA,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x12, 0xCB, 0x53, 0x23, 0xEB, 0x51, 0x34, 0xA3, 0x24, 0x44, 0x8D, 0xE2,
0x39, 0, 18, 0xF4, 0x55, 0x30, 0x74, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x50, 0x95,
0x39, 0, 22, 0xF5, 0x00, 0x00, 0x3D, 0x00, 0x3E, 0x3F, 0x02, 0x40, 0x52, 0x23, 0xE3, 0x4A, 0x34, 0xDE, 0x4B, 0x45, 0xA3, 0x33, 0x56, 0xA8, 0x0E,
0x39, 0, 18, 0xF6, 0x66, 0x63, 0xB2, 0x66, 0xD8, 0xD8, 0x66, 0xD8, 0xD8, 0x66, 0xD8, 0xD8, 0x66, 0xD8, 0xD8, 0x60, 0xD8,
0x39, 0, 2, 0xFF, 0x01,
0x39, 0, 5, 0xFE, 0x01, 0x04, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x02, 0x65, 0x47, 0x33, 0x25, 0xA4, 0x44, 0x08, 0x9E, 0x55, 0x13, 0x78,
0x39, 0, 18, 0xF2, 0x56, 0xD2, 0x22, 0x66, 0x48, 0x48, 0x66, 0x48, 0x48, 0x66, 0x48, 0x48, 0x66, 0x48, 0x48, 0x60, 0x48,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x02, 0xAC, 0x07, 0x23, 0xE2, 0x64, 0x34, 0xC5, 0x56, 0x45, 0xC7, 0x25,
0x39, 0, 18, 0xF4, 0x55, 0x7A, 0xC7, 0x55, 0xE9, 0xE9, 0x55, 0xE9, 0xE9, 0x55, 0xE9, 0xE9, 0x55, 0xE9, 0xE9, 0x50, 0xE9,
0x39, 0, 22, 0xF5, 0x00, 0x00, 0x3A, 0x00, 0x3B, 0x3C, 0x02, 0x3D, 0x27, 0x23, 0xE3, 0x5F, 0x44, 0x04, 0x7E, 0x45, 0xE0, 0x7C, 0x56, 0xFB, 0x67,
0x39, 0, 18, 0xF6, 0x67, 0xC6, 0x1E, 0x77, 0x44, 0x44, 0x77, 0x44, 0x44, 0x77, 0x44, 0x44, 0x77, 0x44, 0x44, 0x70, 0x44,
0x39, 0, 2, 0xFF, 0x01,	
0x39, 0, 5, 0xFE, 0x01, 0x05, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x23, 0x09, 0x39, 0x34, 0xC6, 0x78, 0x45, 0xFB, 0x64,
0x39, 0, 18, 0xF2, 0x56, 0xC3, 0x16, 0x66, 0x3E, 0x3E, 0x66, 0x3E, 0x3E, 0x66, 0x3E, 0x3E, 0x66, 0x3E, 0x3E, 0x60, 0x3E,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x23, 0x6E, 0x25, 0x34, 0x9D, 0x3F, 0x45, 0xB6, 0x1C,
0x39, 0, 18, 0xF4, 0x55, 0x72, 0xC1, 0x55, 0xE5, 0xE5, 0x55, 0xE5, 0xE5, 0x55, 0xE5, 0xE5, 0x55, 0xE5, 0xE5, 0x50, 0xE5,
0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x12, 0xE5, 0xF9, 0x34, 0xD7, 0x61, 0x45, 0xCB, 0x6F, 0x56, 0xF2, 0x62,
0x39, 0, 18, 0xF6, 0x67, 0xC2, 0x18, 0x77, 0x41, 0x41, 0x77, 0x41, 0x41, 0x77, 0x41, 0x41, 0x77, 0x41, 0x41, 0x70, 0x41,
0x39, 0, 2, 0xFF, 0x01,
0x39, 0, 5, 0xFE, 0x01, 0x06, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x01, 0x08, 0xE6, 0x34, 0x26, 0x18, 0x45, 0xAA, 0x1B,
0x39, 0, 18, 0xF2, 0x55, 0x7C, 0xD2, 0x55, 0xFC, 0xFC, 0x55, 0xFC, 0xFC, 0x55, 0xFC, 0xFC, 0x55, 0xFC, 0xFC, 0x50, 0xFC,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x02, 0x3D, 0x75, 0x33, 0x21, 0xE7, 0x44, 0x6C, 0xD4,
0x39, 0, 18, 0xF4, 0x55, 0x30, 0x81, 0x55, 0xA6, 0xA6, 0x55, 0xA6, 0xA6, 0x55, 0xA6, 0xA6, 0x55, 0xA6, 0xA6, 0x50, 0xA6,
0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x11, 0xC9, 0xCA, 0x34, 0x64, 0x0F, 0x45, 0x82, 0x30, 0x56, 0xB9, 0x29,
0x39, 0, 18, 0xF6, 0x66, 0x8A, 0xDD, 0x77, 0x06, 0x06, 0x77, 0x06, 0x06, 0x77, 0x06, 0x06, 0x77, 0x06, 0x06, 0x70, 0x06,
0x39, 0, 2, 0xFF, 0x01,
0x39, 0, 5, 0xFE, 0x01, 0x07, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x13, 0x7B, 0x9B, 0x44, 0x56, 0xD3,
0x39, 0, 18, 0xF2, 0x55, 0x3E, 0x9B, 0x55, 0xC5, 0xC5, 0x55, 0xC5, 0xC5, 0x55, 0xC5, 0xC5, 0x55, 0xC5, 0xC5, 0x50, 0xC5,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0xDC, 0x23, 0x6F, 0x83, 0x44, 0x21, 0x93,
0x39, 0, 18, 0xF4, 0x45, 0xF4, 0x4E, 0x55, 0x73, 0x73, 0x55, 0x73, 0x73, 0x55, 0x73, 0x73, 0x55, 0x73, 0x73, 0x50, 0x73,
0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x33, 0x17, 0xAE, 0x44, 0x3A, 0xF9, 0x55, 0x8B, 0xFF,
0x39, 0, 18, 0xF6, 0x66, 0x62, 0xB8, 0x66, 0xE0, 0xE0, 0x66, 0xE0, 0xE0, 0x66, 0xE0, 0xE0, 0x66, 0xE0, 0xE0, 0x60, 0xE0,
0x39, 0, 2, 0xFF, 0x01,
0x39, 0, 5, 0xFE, 0x01, 0x08, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x00, 0x0A, 0x0B, 0x23, 0xB5, 0xAF,
0x39, 0, 18, 0xF2, 0x44, 0x38, 0xA1, 0x44, 0xCD, 0xCD, 0x44, 0xCD, 0xCD, 0x44, 0xCD, 0xCD, 0x44, 0xCD, 0xCD, 0x40, 0xCD,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x01, 0x0A, 0xC0, 0x23, 0xF3, 0x98,
0x39, 0, 18, 0xF4, 0x44, 0x0C, 0x65, 0x44, 0x8F, 0x8F, 0x44, 0x8F, 0x8F, 0x44, 0x8F, 0x8F, 0x44, 0x8F, 0x8F, 0x40, 0x8F,
0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x01, 0x08, 0x82, 0x34, 0x2E, 0x12, 0x45, 0xB0, 0x2C,
0x39, 0, 18, 0xF6, 0x55, 0x93, 0xEC, 0x66, 0x13, 0x13, 0x66, 0x13, 0x13, 0x66, 0x13, 0x13, 0x66, 0x13, 0x13, 0x60, 0x13,
0x39, 0, 2, 0xFF, 0x01,
0x39, 0, 5, 0xFE, 0x01, 0x09, 0x00, 0x00,
0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x00, 0x0A, 0x0B, 0x00, 0x0C, 0x0D,
0x39, 0, 18, 0xF2, 0x23, 0x73, 0x5A, 0x33, 0xA3, 0xA3, 0x33, 0xA3, 0xA3, 0x33, 0xA3, 0xA3, 0x33, 0xA3, 0xA3, 0x30, 0xA3,
0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x00, 0x0A, 0x0B, 0x02, 0x0C, 0x0A,
0x39, 0, 18, 0xF4, 0x23, 0xDC, 0x60, 0x33, 0x94, 0x94, 0x33, 0x94, 0x94, 0x33, 0x94, 0x94, 0x33, 0x94, 0x94, 0x30, 0x94,
0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x03, 0x0A, 0x03, 0x34, 0xBB, 0x51,
0x39, 0, 18, 0xF6, 0x45, 0xBE, 0x1D, 0x55, 0x47, 0x47, 0x55, 0x47, 0x47, 0x55, 0x47, 0x47, 0x55, 0x47, 0x47, 0x50, 0x47,
0x39, 0, 2, 0xFF, 0x01,
0x39, 0, 2, 0x9F, 0x05,
0x39, 0, 2, 0xF9, 0x00,
0x39, 0, 4, 0xFF, 0x00, 0x00, 0x00,
0x39, 0, 2, 0x9F, 0x06,
0x39, 0, 3, 0xFF, 0x00, 0x00,
0x39, 0, 2, 0x9F, 0x07,
0x39, 0, 8, 0xB2, 0x10, 0x20, 0x20, 0x20, 0x02, 0x00, 0x99,
0x39, 0, 8, 0xB3, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99,
0x39, 0, 8, 0xB4, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99,
0x39, 0, 8, 0xB5, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99,
0x39, 0, 8, 0xB6, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x64,
0x39, 0, 8, 0xB7, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99,
0x39, 0, 8, 0xB8, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99,
0x39, 0, 17, 0xB9, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
0x39, 0, 17, 0xBA, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
0x39, 0, 17, 0xBB, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
0x39, 0, 17, 0xBC, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
0x39, 0, 17, 0xBD, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
0x39, 0, 17, 0xBE, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
0x39, 0, 17, 0xBF, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
0x39, 0, 16, 0xC0, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99, 0x00, 0x64, 0x3F, 0x00, 0x25, 0x17, 0x00, 0x10, 0x0C,
0x39, 0, 16, 0xC1, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99, 0x00, 0x64, 0x3F, 0x00, 0x25, 0x17, 0x00, 0x10, 0x0C,
0x39, 0, 16, 0xC2, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99, 0x00, 0x64, 0x3F, 0x00, 0x25, 0x17, 0x00, 0x10, 0x0C,
0x39, 0, 16, 0xC3, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99, 0x00, 0x64, 0x3F, 0x00, 0x25, 0x17, 0x00, 0x10, 0x0C,
0x39, 0, 7, 0xC4, 0x22, 0x58, 0x58, 0x22, 0x58, 0x58,
0x39, 0, 7, 0xC5, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99,
0x39, 0, 4, 0xC6, 0x00, 0xC8, 0xC8,
0x39, 0, 2, 0x9F, 0x0F,
0x39, 0, 2, 0xF8, 0x00,
0x39, 0, 2, 0x9F, 0x0A,
0x39, 0, 8, 0xB2, 0x1F, 0x00, 0x00, 0x20, 0x01, 0x10, 0x00,
0x39, 0, 46, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00,
0x39, 0, 43, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00,
0x39, 0, 43, 0xBA, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00,
0x39, 0, 2, 0x9F, 0x0B,
0x15, 0, 9, 0xB2, 0x01, 0x2F, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0, 54, 0xB9, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x70, 0x24, 0x0A, 0x6A, 0x13, 0x9A, 0xFA, 0x48, 0x14, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0, 54, 0xBA, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x0A, 0x32, 0x00, 0x00, 0x00, 0x48, 0x38, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0, 20, 0xC8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x08, 0x08, 0x08, 0x08, 0x00, 0x80, 0x80, 0x80, 0x80,	
0x39, 0, 2, 0x48, 0x03,         
0x39, 0, 3, 0x51, 0x00, 0x00,
0x39, 0, 2, 0x53, 0xE0,
0x39, 0, 1, 0x35,

};





 
static void app_init_panel(void)
{
     
    app_tx_panel_reset();




    
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0x9C, 0xA5, 0xA5);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0xFD, 0x5A, 0x5A);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x0F);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xB3, 0x00);	
	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x01);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 4, 0xB2, 0x51, 0x04, 0x69);	
	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 36, 0xB3, 0x01, 0x6F, 0x00, 0x0A, 0x2E, 0x00, 0x01, 0x6F, 0x00, 0x0A, 0x2E, 0x00, 0x01, 0x6F, 0x00, 0x0A, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x6F, 0x00, 0x0A, 0x14, 0x44, 0x1C, 0x1C, 0x1C, 0x18, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0xD9, 0x01, 0x1F);	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 4, 0xCF, 0x01, 0x00, 0x00);	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xD0, 0x01);		

	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xD3, 0x00);		
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xD5, 0x03);		
	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x02);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 26, 0xB2, 0x00, 0xC1, 0x32, 0x10, 0x11, 0x12, 0x12, 0x00, 0x08, 0x78, 0x21, 0x11, 0x14, 0x13, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x21, 0x21, 0x11, 0x1A);	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xB3, 0x0B);   
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 14, 0xB4, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); 
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 7, 0xB5, 0x00, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F);    
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 20, 0xB6, 0x01, 0x00, 0x00, 0x11, 0x11, 0x11, 0x1C, 0x08, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21);

	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xB7, 0x00, 0x10, 0x15, 0x12, 0x10, 0x15, 0x00, 0x06, 0x03, 0x03, 0x06, 0x03, 0x03, 0x06, 0x03, 0x03);
	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 14, 0xB8, 0x00, 0x00, 0x00, 0x73, 0x2D, 0x73, 0x2D, 0x73, 0x2D, 0x73, 0x2D, 0x73, 0x2D);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 9, 0xB9, 0x00, 0x00, 0x50, 0x00, 0x00, 0x17, 0x17, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 9, 0xBA, 0x08, 0xFF, 0x36, 0x03, 0x36, 0x03, 0x11, 0x01);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 26, 0xBB, 0x00, 0xCD, 0x0F, 0xC3, 0x64, 0x00, 0xCD, 0x0F, 0xC3, 0x64, 0x00, 0xCD, 0x0F, 0xC3, 0x64, 0x00, 0xCD, 0x0F, 0xC3, 0x64, 0x00, 0xCD, 0x64, 0x6E, 0x64);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 6, 0xBE, 0x5F, 0x16, 0x04, 0x5F, 0x75);  
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 6, 0xBF, 0x08, 0x00, 0x10, 0x10, 0x08);  
    
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xC1, 0x23, 0x00, 0x24, 0x00, 0x05, 0x00, 0x3D, 0x21, 0x00, 0x3D, 0x00, 0x01, 0x00, 0x3D, 0x00, 0x22);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xC2, 0x23, 0x00, 0x24, 0x00, 0x05, 0x00, 0x3D, 0x21, 0x00, 0x3D, 0x00, 0x01, 0x00, 0x3D, 0x00, 0x22);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 8, 0xC3, 0x11, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xC4, 0x00, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1f, 0x00, 0x00, 0x08);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 27, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 27, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x55, 0x00, 0x01, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 14, 0xC7, 0x00, 0x1A, 0x25, 0x24, 0x20, 0x00, 0x24, 0x20, 0x24, 0x20, 0x00, 0x20, 0x20);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 14, 0xC8, 0x00, 0x35, 0x1A, 0x20, 0x20, 0x00, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 27, 0xC9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 27, 0xCA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 27, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 27, 0xCC, 0x04, 0x3A, 0x3B, 0x1A, 0xCD, 0x00, 0x1A, 0xCD, 0x1A, 0xCD, 0x00, 0x44, 0xBF, 0x00, 0x19, 0xBA, 0x20, 0x68, 0x00, 0x24, 0x68, 0x00, 0x00, 0x00, 0x24, 0x6B);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 25, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 25, 0xCE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 25, 0xCF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 25, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 25, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);

	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xD2, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 15, 0xD7, 0x44, 0x01, 0x3F, 0x24, 0x56, 0x24, 0x56, 0x01, 0x11, 0x99, 0x0A, 0x00, 0x00, 0x03);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 26, 0xD8, 0x00, 0x00, 0xC5, 0x9F, 0x40, 0x00, 0x00, 0xC5, 0x9F, 0x40, 0x00, 0x00, 0xC5, 0x9F, 0x40, 0x00, 0x00, 0xC5, 0x9F, 0x40, 0x00, 0x00, 0xC5, 0x00, 0x00);

	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 12, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 6, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 26, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 13, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 9, 0xE7, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x22);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 12, 0xEE, 0x00, 0x00, 0x00, 0xBB, 0x58, 0x08, 0xA2, 0x50, 0x88, 0x88, 0x29);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 6, 0xEF, 0x00, 0x80, 0x82, 0x80, 0x85);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x03);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 33, 0xB2, 0x11, 0x00, 0x00, 0x89, 0x30, 0x80, 0x09, 0x60, 0x04, 0x38, 0x00, 0x0C, 0x04, 0x38, 0x04, 0x38, 0x02, 0x00, 0x03, 0x1C, 0x00, 0x20, 0x01, 0x7E, 0x00, 0x0F, 0x00, 0x0C, 0x08, 0xBB, 0x04, 0x3D);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 33, 0xB3, 0x18, 0x00, 0x10, 0xF0, 0x03, 0x0C, 0x20, 0x00, 0x06, 0x0B, 0x0B, 0x33, 0x0E, 0x1C, 0x2A, 0x38, 0x46, 0x54, 0x62, 0x69, 0x70, 0x77, 0x79, 0x7B, 0x7D, 0x7E, 0x01, 0x02, 0x01, 0x00, 0x09, 0x40);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 25, 0xB4, 0x09, 0xBE, 0x19, 0xFC, 0x19, 0xFA, 0x19, 0xF8, 0x1A, 0x38, 0x1A, 0x78, 0x1A, 0xB6, 0x2A, 0xF6, 0x2B, 0x34, 0x2B, 0x74, 0x3B, 0x74, 0x6B, 0xF4);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xC0, 0x11);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x04);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0xB2, 0x01, 0x80);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 19, 0xB3, 0x00, 0x00, 0x10, 0x00, 0x30, 0x50, 0x00, 0x70, 0x90, 0x00, 0xB0, 0xF0, 0x11, 0x30, 0x70, 0x12, 0xF0, 0xF0);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xB4, 0x34, 0xF0, 0xF0, 0x56, 0xF0, 0xF0, 0x78, 0xF0, 0xF0, 0xAB, 0xF0, 0xF0, 0xCD, 0xF0, 0xF0, 0xEF, 0xF0, 0xF0, 0x0F, 0xFF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 7, 0xB6, 0x11, 0x00, 0x00, 0x0F, 0xF0, 0x10);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0xBA, 0x10, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xC4, 0x00, 0x10, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 20, 0xC5, 0x00, 0x20, 0x88, 0xC1, 0xB2, 0xB2, 0x32, 0x00, 0x4E, 0x56, 0x35, 0x22, 0x22, 0x2A, 0x05, 0x3F, 0x00, 0x20, 0x0F);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 13, 0xC6, 0x4B, 0x00, 0x90, 0x00, 0x02, 0xD5, 0x00, 0x02, 0xCB, 0x01, 0x10, 0x43);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xC8, 0x2B, 0x2B, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xC9, 0x0D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x1F, 0x1F);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xCA, 0x0D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x1F, 0x1F);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xCB, 0x0D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x1F, 0x1F);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xCC, 0x0D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x1F, 0x1F);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xCD, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xCE, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xCF, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xD0, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xD1, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xD2, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xD3, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xD4, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1C, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 14, 0xB5, 0x11, 0x17, 0x27, 0x1C, 0xd0, 0x00, 0x64, 0x64, 0x00, 0x16, 0xD1, 0x89, 0x0B);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 10, 0xF8, 0x3E, 0xAA, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 10, 0xF9, 0xE3, 0x00, 0x00, 0x00, 0xBB, 0xBB, 0xDD, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 10, 0xFA, 0x3E, 0xAA, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xB9, 0x90);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x05);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 7, 0xB2, 0x24, 0x20, 0x05, 0x0F, 0xFF, 0xFF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 9, 0xB3, 0xA0, 0x00, 0x28, 0x00, 0x00, 0x00, 0x3F, 0xFF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 13, 0xB4, 0x00, 0x60, 0x0E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x8F);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xB5, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x01, 0x47, 0x01, 0x46, 0x00, 0xC0, 0x00, 0x62, 0x00, 0x31, 0x00, 0x18, 0x00, 0x08);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xB6, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x00, 0x00, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x00, 0x00, 0x0F, 0xFF, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 16, 0xB9, 0x71, 0x20, 0x05, 0x78, 0x70, 0x5A, 0x3C, 0x78, 0x70, 0x5A, 0x3C, 0x78, 0x70, 0x5A, 0x3C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x06);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 41, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 41, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 41, 0xB5, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 41, 0xB6, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xB7, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF, 0x01, 0xFF);

	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x04);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 19, 0xB3, 0x00, 0x00, 0x10, 0x00, 0x30, 0x50, 0x00, 0x70, 0xF0, 0x11, 0x70, 0xF0, 0x23, 0xF0, 0xF0, 0x46, 0xF0, 0xF0);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xB4, 0x8A, 0xF0, 0xF0, 0xCE, 0xF0, 0xF0, 0xFF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x05);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xB5, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x01, 0x47, 0x01, 0x46, 0x00, 0xCD, 0x00, 0x66, 0x00, 0x3A, 0x00, 0x14, 0x00, 0x08);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 21, 0xB6, 0x0F, 0xFF, 0x07, 0xFF, 0x03, 0x33, 0x00, 0x00, 0x0F, 0xFE, 0x07, 0x5F, 0x01, 0x64, 0x00, 0x00, 0x0F, 0xFF, 0x00, 0x00);

	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x05);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xF9, 0x80);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 4, 0xFF, 0x00, 0x00, 0x01);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x06);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0xFF, 0x00, 0x01);
	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x02, 0x04, 0xBD, 0x33, 0x62, 0xD5, 0x44, 0x7E, 0xFC, 0x56, 0x69, 0x1C, 0x67, 0xAD, 0x30);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x78, 0xA5, 0x17, 0x88, 0x4E, 0x4E, 0x88, 0x4E, 0x4E, 0x88, 0x4E, 0x4E, 0x88, 0x4E, 0x4E, 0x80, 0x4E);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x02, 0xD5, 0x9D, 0x33, 0x31, 0x9F, 0x44, 0x3D, 0xB5, 0x55, 0x1D, 0xC3, 0x66, 0x4E, 0xC7);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x77, 0x33, 0x9B, 0x77, 0xCE, 0xCE, 0x77, 0xCE, 0xCE, 0x77, 0xCE, 0xCE, 0x77, 0xCE, 0xCE, 0x70, 0xCE);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x12, 0xAB, 0x0F, 0x22, 0x10, 0x11, 0x23, 0x89, 0x8C, 0x44, 0x25, 0x9D, 0x55, 0x4E, 0xD6, 0x67, 0x4D, 0x0B, 0x78, 0xAC, 0x3D);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x89, 0xC1, 0x3E, 0x99, 0x7C, 0x7C, 0x99, 0x7C, 0x7C, 0x99, 0x7C, 0x7C, 0x99, 0x7C, 0x7C, 0x90, 0x7C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x01, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x02, 0x04, 0x4B, 0x33, 0x05, 0x76, 0x44, 0x19, 0x92, 0x45, 0xF5, 0x9A, 0x66, 0x20, 0x93);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x67, 0xFB, 0x5C, 0x77, 0x8C, 0x8C, 0x77, 0x8C, 0x8C, 0x77, 0x8C, 0x8C, 0x77, 0x8C, 0x8C, 0x70, 0x8C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x02, 0x04, 0x3E, 0x23, 0xDD, 0x45, 0x34, 0xDF, 0x51, 0x45, 0xAF, 0x49, 0x56, 0xC6, 0x33);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x66, 0x97, 0xF0, 0x77, 0x1B, 0x1B, 0x77, 0x1B, 0x1B, 0x77, 0x1B, 0x1B, 0x77, 0x1B, 0x1B, 0x70, 0x1B);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x11, 0x51, 0xB5, 0x11, 0xB6, 0xB7, 0x23, 0x35, 0x35, 0x34, 0xCD, 0x3C, 0x45, 0xE2, 0x63, 0x56, 0xCF, 0x7F, 0x77, 0x10, 0x90);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x88, 0x04, 0x6D, 0x88, 0xA2, 0xA2, 0x88, 0xA2, 0xA2, 0x88, 0xA2, 0xA2, 0x88, 0xA2, 0xA2, 0x80, 0xA2);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x02, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x01, 0x04, 0x71, 0x23, 0x9F, 0x14, 0x34, 0xB3, 0x27, 0x45, 0x86, 0x1E, 0x56, 0x97, 0x02);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x66, 0x60, 0xB4, 0x66, 0xDF, 0xDF, 0x66, 0xDF, 0xDF, 0x66, 0xDF, 0xDF, 0x66, 0xDF, 0xDF, 0x60, 0xDF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x01, 0x04, 0xC4, 0x22, 0x81, 0xEB, 0x33, 0x7F, 0xEC, 0x44, 0x44, 0xD2, 0x55, 0x47, 0xAA);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x66, 0x04, 0x54, 0x66, 0x7A, 0x7A, 0x66, 0x7A, 0x7A, 0x66, 0x7A, 0x7A, 0x66, 0x7A, 0x7A, 0x60, 0x7A);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x00, 0x20, 0x84, 0x00, 0x85, 0x86, 0x12, 0xCD, 0xE1, 0x33, 0x72, 0xDE, 0x44, 0x7B, 0xF2, 0x55, 0x57, 0xF9, 0x66, 0x7E, 0xEF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x77, 0x56, 0xB5, 0x77, 0xE2, 0xE2, 0x77, 0xE2, 0xE2, 0x77, 0xE2, 0xE2, 0x77, 0xE2, 0xE2, 0x70, 0xE2);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x03, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x12, 0x8B, 0x66, 0x33, 0x14, 0x85, 0x34, 0xDE, 0x65, 0x45, 0xD2, 0x2D);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x55, 0x7E, 0xC9, 0x55, 0xEA, 0xEA, 0x55, 0xEA, 0xEA, 0x55, 0xEA, 0xEA, 0x55, 0xEA, 0xEA, 0x50, 0xEA);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x12, 0xCB, 0x53, 0x23, 0xEB, 0x51, 0x34, 0xA3, 0x24, 0x44, 0x8D, 0xE2);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x55, 0x30, 0x74, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x50, 0x95);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x00, 0x00, 0x3D, 0x00, 0x3E, 0x3F, 0x02, 0x40, 0x52, 0x23, 0xE3, 0x4A, 0x34, 0xDE, 0x4B, 0x45, 0xA3, 0x33, 0x56, 0xA8, 0x0E);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x66, 0x63, 0xB2, 0x66, 0xD8, 0xD8, 0x66, 0xD8, 0xD8, 0x66, 0xD8, 0xD8, 0x66, 0xD8, 0xD8, 0x60, 0xD8);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x04, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x02, 0x65, 0x47, 0x33, 0x25, 0xA4, 0x44, 0x08, 0x9E, 0x55, 0x13, 0x78);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x56, 0xD2, 0x22, 0x66, 0x48, 0x48, 0x66, 0x48, 0x48, 0x66, 0x48, 0x48, 0x66, 0x48, 0x48, 0x60, 0x48);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x02, 0xAC, 0x07, 0x23, 0xE2, 0x64, 0x34, 0xC5, 0x56, 0x45, 0xC7, 0x25);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x55, 0x7A, 0xC7, 0x55, 0xE9, 0xE9, 0x55, 0xE9, 0xE9, 0x55, 0xE9, 0xE9, 0x55, 0xE9, 0xE9, 0x50, 0xE9);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x00, 0x00, 0x3A, 0x00, 0x3B, 0x3C, 0x02, 0x3D, 0x27, 0x23, 0xE3, 0x5F, 0x44, 0x04, 0x7E, 0x45, 0xE0, 0x7C, 0x56, 0xFB, 0x67);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x67, 0xC6, 0x1E, 0x77, 0x44, 0x44, 0x77, 0x44, 0x44, 0x77, 0x44, 0x44, 0x77, 0x44, 0x44, 0x70, 0x44);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x05, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x23, 0x09, 0x39, 0x34, 0xC6, 0x78, 0x45, 0xFB, 0x64);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x56, 0xC3, 0x16, 0x66, 0x3E, 0x3E, 0x66, 0x3E, 0x3E, 0x66, 0x3E, 0x3E, 0x66, 0x3E, 0x3E, 0x60, 0x3E);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x23, 0x6E, 0x25, 0x34, 0x9D, 0x3F, 0x45, 0xB6, 0x1C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x55, 0x72, 0xC1, 0x55, 0xE5, 0xE5, 0x55, 0xE5, 0xE5, 0x55, 0xE5, 0xE5, 0x55, 0xE5, 0xE5, 0x50, 0xE5);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x12, 0xE5, 0xF9, 0x34, 0xD7, 0x61, 0x45, 0xCB, 0x6F, 0x56, 0xF2, 0x62);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x67, 0xC2, 0x18, 0x77, 0x41, 0x41, 0x77, 0x41, 0x41, 0x77, 0x41, 0x41, 0x77, 0x41, 0x41, 0x70, 0x41);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x06, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x01, 0x08, 0xE6, 0x34, 0x26, 0x18, 0x45, 0xAA, 0x1B);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x55, 0x7C, 0xD2, 0x55, 0xFC, 0xFC, 0x55, 0xFC, 0xFC, 0x55, 0xFC, 0xFC, 0x55, 0xFC, 0xFC, 0x50, 0xFC);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x02, 0x3D, 0x75, 0x33, 0x21, 0xE7, 0x44, 0x6C, 0xD4);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x55, 0x30, 0x81, 0x55, 0xA6, 0xA6, 0x55, 0xA6, 0xA6, 0x55, 0xA6, 0xA6, 0x55, 0xA6, 0xA6, 0x50, 0xA6);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x11, 0xC9, 0xCA, 0x34, 0x64, 0x0F, 0x45, 0x82, 0x30, 0x56, 0xB9, 0x29);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x66, 0x8A, 0xDD, 0x77, 0x06, 0x06, 0x77, 0x06, 0x06, 0x77, 0x06, 0x06, 0x77, 0x06, 0x06, 0x70, 0x06);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x07, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x13, 0x7B, 0x9B, 0x44, 0x56, 0xD3);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x55, 0x3E, 0x9B, 0x55, 0xC5, 0xC5, 0x55, 0xC5, 0xC5, 0x55, 0xC5, 0xC5, 0x55, 0xC5, 0xC5, 0x50, 0xC5);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0xDC, 0x23, 0x6F, 0x83, 0x44, 0x21, 0x93);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x45, 0xF4, 0x4E, 0x55, 0x73, 0x73, 0x55, 0x73, 0x73, 0x55, 0x73, 0x73, 0x55, 0x73, 0x73, 0x50, 0x73);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x33, 0x17, 0xAE, 0x44, 0x3A, 0xF9, 0x55, 0x8B, 0xFF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x66, 0x62, 0xB8, 0x66, 0xE0, 0xE0, 0x66, 0xE0, 0xE0, 0x66, 0xE0, 0xE0, 0x66, 0xE0, 0xE0, 0x60, 0xE0);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x08, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x00, 0x0A, 0x0B, 0x23, 0xB5, 0xAF);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x44, 0x38, 0xA1, 0x44, 0xCD, 0xCD, 0x44, 0xCD, 0xCD, 0x44, 0xCD, 0xCD, 0x44, 0xCD, 0xCD, 0x40, 0xCD);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x01, 0x0A, 0xC0, 0x23, 0xF3, 0x98);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x44, 0x0C, 0x65, 0x44, 0x8F, 0x8F, 0x44, 0x8F, 0x8F, 0x44, 0x8F, 0x8F, 0x44, 0x8F, 0x8F, 0x40, 0x8F);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x01, 0x08, 0x82, 0x34, 0x2E, 0x12, 0x45, 0xB0, 0x2C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x55, 0x93, 0xEC, 0x66, 0x13, 0x13, 0x66, 0x13, 0x13, 0x66, 0x13, 0x13, 0x66, 0x13, 0x13, 0x60, 0x13);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0xFE, 0x01, 0x09, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF1, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x00, 0x0A, 0x0B, 0x00, 0x0C, 0x0D);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF2, 0x23, 0x73, 0x5A, 0x33, 0xA3, 0xA3, 0x33, 0xA3, 0xA3, 0x33, 0xA3, 0xA3, 0x33, 0xA3, 0xA3, 0x30, 0xA3);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF3, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x00, 0x0A, 0x0B, 0x02, 0x0C, 0x0A);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF4, 0x23, 0xDC, 0x60, 0x33, 0x94, 0x94, 0x33, 0x94, 0x94, 0x33, 0x94, 0x94, 0x33, 0x94, 0x94, 0x30, 0x94);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 22, 0xF5, 0x00, 0x00, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0x05, 0x00, 0x06, 0x07, 0x00, 0x08, 0x09, 0x03, 0x0A, 0x03, 0x34, 0xBB, 0x51);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 18, 0xF6, 0x45, 0xBE, 0x1D, 0x55, 0x47, 0x47, 0x55, 0x47, 0x47, 0x55, 0x47, 0x47, 0x55, 0x47, 0x47, 0x50, 0x47);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xFF, 0x01);
	delayMs(1);

	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x05);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xF9, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 4, 0xFF, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x06);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0xFF, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x07);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 8, 0xB2, 0x10, 0x20, 0x20, 0x20, 0x02, 0x00, 0x99);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 8, 0xB3, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 8, 0xB4, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 8, 0xB5, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 8, 0xB6, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x64);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 8, 0xB7, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 8, 0xB8, 0x10, 0x10, 0x10, 0x10, 0x02, 0x00, 0x99);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xB9, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xBA, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xBB, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xBC, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xBD, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xBE, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 17, 0xBF, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 16, 0xC0, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99, 0x00, 0x64, 0x3F, 0x00, 0x25, 0x17, 0x00, 0x10, 0x0C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 16, 0xC1, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99, 0x00, 0x64, 0x3F, 0x00, 0x25, 0x17, 0x00, 0x10, 0x0C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 16, 0xC2, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99, 0x00, 0x64, 0x3F, 0x00, 0x25, 0x17, 0x00, 0x10, 0x0C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 16, 0xC3, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99, 0x00, 0x64, 0x3F, 0x00, 0x25, 0x17, 0x00, 0x10, 0x0C);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 7, 0xC4, 0x22, 0x58, 0x58, 0x22, 0x58, 0x58);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 7, 0xC5, 0x00, 0x99, 0x99, 0x00, 0x99, 0x99);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 4, 0xC6, 0x00, 0xC8, 0xC8);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x0F);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0xF8, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x0A);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 8, 0xB2, 0x1F, 0x00, 0x00, 0x20, 0x01, 0x10, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 46, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 43, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 43, 0xBA, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x9F, 0x0B);
	hal_dsi_tx_ctrl_write_cmd(0x15, 0, 9, 0xB2, 0x01, 0x2F, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x15, 0, 54, 0xB9, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x70, 0x24, 0x0A, 0x6A, 0x13, 0x9A, 0xFA, 0x48, 0x14, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x15, 0, 54, 0xBA, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x0A, 0x32, 0x00, 0x00, 0x00, 0x48, 0x38, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x15, 0, 20, 0xC8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x08, 0x08, 0x08, 0x08, 0x00, 0x80, 0x80, 0x80, 0x80);



	
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x48, 0x03);          
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0x51, 0x00, 0x00);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 2, 0x53, 0xE8);
	hal_dsi_tx_ctrl_write_cmd(0x39, 0, 1, 0x35);
	
	
 	
hal_dsi_tx_ctrl_write_cmd(0x39,0,2,0x9F,0x6);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xCD,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xCE,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,21,0xCF,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xD0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xD1,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,21,0xD2,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xD3,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xD4,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,21,0xD5,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xD6,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xD7,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,21,0xD8,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xD9,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xDA,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,21,0xDB,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xDC,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,41,0xDD,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,21,0xDE,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0);


hal_dsi_tx_ctrl_write_cmd(0x39,0,2,0x9F,0x5);
hal_dsi_tx_ctrl_write_cmd(0x39,0,13,0xB4,0x0,0x60,0xE,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x22,0x8F); 


hal_dsi_tx_ctrl_write_cmd(0x39,0,2,0x9F,0x4);
hal_dsi_tx_ctrl_write_cmd(0x39,0,14,0xB5,0x11,0x17,0x26,0x0A,0x50,0x0,0x71,0x71,0x37,0x2A,0x71,0x2D,0xC1); 
hal_dsi_tx_ctrl_write_cmd(0x39,0,18,0xE0,0x0,0x4F,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0xFF);





hal_dsi_tx_ctrl_write_cmd(0x39,0,10,0xF8,0x3E,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,10,0xF9,0xE3,0x0,0x0,0x0,0xC0,0x90,0x60,0x0,0x0);
hal_dsi_tx_ctrl_write_cmd(0x39,0,10,0xFA,0xFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0);


hal_dsi_tx_ctrl_write_cmd(0x39,0,2,0x9F,0x0A);
hal_dsi_tx_ctrl_write_cmd(0x39,0,2,0xED,0x00);
    








   

	delayMs(60); 
	

}

# 1264 "..\\..\\src\\app\\P6A\\p6a_demo.c"

# 1301 "..\\..\\src\\app\\P6A\\p6a_demo.c"





 
static void app_mipi_rx_init(void)
{
    if (g_rx_ctrl_handle == 0)
    {
         
        g_rx_ctrl_handle = hal_dsi_rx_ctrl_create_handle();
    }
     
    g_rx_ctrl_handle->base_info.src_w = 1080;
    g_rx_ctrl_handle->base_info.src_h = 2400;
    g_rx_ctrl_handle->base_info.dst_w = 1044;
    g_rx_ctrl_handle->base_info.dst_h = 2260;
    g_rx_ctrl_handle->base_info.src_frate = DSI_FRAME_RATE_60HZ;
    g_rx_ctrl_handle->base_info.src_mode = DSI_DATA_CMD_MODE;
    g_rx_ctrl_handle->base_info.dst_mode = DSI_DATA_VIDEO_MODE;
    g_rx_ctrl_handle->rx_color_mode = DSI_RGB888;
    g_rx_ctrl_handle->rx_lanes = DSI_LANE_4;
    g_rx_ctrl_handle->rx_nonburst_models = DSI_NONBURST_EVENT;  
    g_rx_ctrl_handle->compress_en = 1;
    g_rx_ctrl_handle->rx_hsclk_rate = 1450000000;
    g_rx_ctrl_handle->cus_dcs_entry_table = g_cus_rx_dcs_execute_table;  
    g_rx_ctrl_handle->rx_dcs_read_entry = ap_dcs_read;  
	g_rx_ctrl_handle->hight_performan_mode=HIGHT_PERFORMAN_L2;


    g_rx_ctrl_handle->pps_update_entry = pps_update_handle;

	g_rx_ctrl_handle->extra_info.crop_info.enable=1;
	g_rx_ctrl_handle->extra_info.crop_info.top =15;  
	g_rx_ctrl_handle->extra_info.crop_info.right =2;  


     
    if (g_rx_ctrl_handle->compress_en == 1)
    {
        hal_dsi_rx_ctrl_pre_init_pps(g_rx_ctrl_handle, pps, 128);
    }


     
    hal_dsi_rx_ctrl_init(g_rx_ctrl_handle);
	






# 1362 "..\\..\\src\\app\\P6A\\p6a_demo.c"


     
    hal_dsi_rx_ctrl_start(g_rx_ctrl_handle);




	do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "rx init!\n\r", "p6a", 1370); } while (0);
}





 
static void app_mipi_tx_init(void)
{
    if (g_tx_ctrl_handle == 0)
    {
        g_tx_ctrl_handle = hal_dsi_tx_ctrl_create_handle();
    }
    g_tx_ctrl_handle->channel_id = DSI_VC_0;
    g_tx_ctrl_handle->lane_num = DSI_LANE_4;
    g_tx_ctrl_handle->vid_mode = DSI_BURST_MODE;
    g_tx_ctrl_handle->cmd_tx_type = DSI_CMD_TX_LP;
    g_tx_ctrl_handle->dpi_vsa = 2;
    g_tx_ctrl_handle->dpi_vbp = 8;
    g_tx_ctrl_handle->dpi_vfp = 62;
    g_tx_ctrl_handle->dpi_hsa = 2;
    g_tx_ctrl_handle->dpi_hbp = 28;
    g_tx_ctrl_handle->dpi_hfp = 168;
    g_tx_ctrl_handle->base_info.src_w = 1080;
    g_tx_ctrl_handle->base_info.src_h = 2400;
    g_tx_ctrl_handle->base_info.dst_w = 1044;
    g_tx_ctrl_handle->base_info.dst_h = 2260;
    g_tx_ctrl_handle->base_info.src_frate = DSI_FRAME_RATE_60HZ;
    g_tx_ctrl_handle->base_info.src_mode = DSI_DATA_CMD_MODE;
    g_tx_ctrl_handle->base_info.dst_mode = DSI_DATA_VIDEO_MODE;
	g_tx_ctrl_handle->tx_frame_rate=58;

    hal_dsi_tx_ctrl_init(g_tx_ctrl_handle);


     
    hal_dsi_tx_ctrl_set_tear_mode(g_tx_ctrl_handle, TE_60HZ_MODE);

     
    hal_dsi_tx_ctrl_set_overwrite_rgb(0x00, 0x00, 0x00);
	do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "tx init!\n\r", "p6a", 1411); } while (0);
}

# 1429 "..\\..\\src\\app\\P6A\\p6a_demo.c"

void Panel_CCM(void)
{
	ccm_coef_t ccm;
	ccm.coef_c00 = 255;	
	ccm.coef_c01 = 0;
	ccm.coef_c02 = 0;
	ccm.coef_c10 = 0;
	ccm.coef_c11 = 246;	
	ccm.coef_c12 = 0;
	ccm.coef_c20 = 0;
	ccm.coef_c21 = 0;
	ccm.coef_c22 = 247;  

	hal_dsi_tx_ctrl_set_ccm(&ccm);
}

static void soft_swire_start(uint8_t pulse)
{
	do
	{
		hal_gpio_init_output( ( IO_PIN_17 ), IO_LVL_LOW  ); 
		delayUs(10);
		hal_gpio_init_output( ( IO_PIN_17 ), IO_LVL_HIGH ); 
		delayUs(10);
	}while(pulse--);
}

static void soft_swire_timer_callback(void *data)
{
	s_swire_pwm_counter++;
	if( s_swire_pwm_counter < ( 10 ) )
	{
		soft_swire_start(( 37 ));
		hal_timer_start(( TIMER_NUM3 ), 16, soft_swire_timer_callback, 0);
	}
	else
	{
		hal_timer_deinit(( TIMER_NUM3 ));
		hal_timer_stop(( TIMER_NUM3 ));	
		hal_gpio_init_output(( IO_PIN_17 ), IO_LVL_HIGH);
	}
}

static void soft_swire_init(void)
{
	hal_gpio_init_output(( IO_PIN_17 ), IO_LVL_HIGH);
	delayMs(2);
	s_swire_pwm_counter = 0;
	soft_swire_start(( 37 ));
	hal_timer_init(( TIMER_NUM3 ));
    hal_timer_start(( TIMER_NUM3 ), 16, soft_swire_timer_callback, 0);
}






 
static void app_mipi_tx_start(void)
{
	 
	app_init_panel();
	hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x11);
	delayMs(80); 
	 
	hal_dsi_tx_ctrl_start(g_tx_ctrl_handle);
    delayMs(50); 
	hal_gpio_init_output(( IO_PIN_15 ), IO_LVL_HIGH);	
    delayMs(10); 
	soft_swire_init();





    panel_display_done = 1;
    delayMs(50); 
     
    hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x29);	



    do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "tx_start \n", "p6a", 1513); } while (0);
}





 
static void ap_rstn_pull_high_cb(void *data)
{
     
    sg_system_resume = 1;
     
    hal_gpio_set_ap_reset_int(DISABLE, 0, DETECT_RISING_EDGE);
}





 
static void ap_rstn_pull_down_cb(void *data)
{
	 do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "ap_rstn_pull_down_cb\n", "p6a", 1536); } while (0);
    sg_system_suspend = 1;
     
    hal_gpio_set_ap_reset_int(DISABLE, 0, DETECT_RISING_EDGE);

}






 
void app_gpio_init(void)
{
    io_pad_attr_t attrs[] =
    {
        {IO_PIN_8,  PIN8_MODE_GPIO7,     IO_IOE_OUTPUT, IO_LVL_LOW}, 
        {IO_PIN_17, PIN17_MODE_GPIO8,   IO_IOE_OUTPUT, IO_LVL_LOW},  
		 {IO_PIN_15, PIN15_MODE_GPIO4,   IO_IOE_OUTPUT, IO_LVL_LOW},  
   



        {IO_PIN_29, PIN29_MODE_TEAR,    IO_IOE_NONE, IO_LVL_NONE},   

    };
    uint8_t size = sizeof(attrs) / sizeof(io_pad_attr_t);
    hal_gpio_config_pad(attrs, size);
}






 
void app_display_init(void)
{
     
    app_mipi_rx_init();
     
    if (PWR_SEL_VCC == PWR_SEL_VCC)
    {
		
        while (hal_pwr_get_vcc_power_ready() == 0);
    }

     
    app_gpio_init();

     
# 1599 "..\\..\\src\\app\\P6A\\p6a_demo.c"

     
    app_mipi_tx_init();




    app_mipi_tx_start();

}





 
static void app_system_resume(pwr_sleep_mode_e sleep_mode)
{
     
    hal_pwr_exit_sleep_mode();

     
    app_display_init();





    do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "system resume\n", "p6a", 1627); } while (0);
}





 
static void app_system_suspend(pwr_sleep_mode_e sleep_mode)
{

     
    hal_dsi_tx_ctrl_stop(g_tx_ctrl_handle);
    hal_dsi_tx_ctrl_deinit(g_tx_ctrl_handle);
    hal_dsi_rx_ctrl_stop(g_rx_ctrl_handle);
    hal_dsi_rx_ctrl_deinit(g_rx_ctrl_handle);

     
    hal_gpio_init_output(IO_PAD_AP_TE, IO_LVL_LOW);
    panel_display_done = 0;




     
# 1658 "..\\..\\src\\app\\P6A\\p6a_demo.c"





     
    hal_pwr_set_sleep_mode_power(PWR_SLEEP_IN_IOV18);

    if (sleep_mode == PWR_NORMAL_SLEEP_MODE)
    {
         
        hal_gpio_set_ap_reset_int(ENABLE, ap_rstn_pull_high_cb, DETECT_HIGH_LVL);
        hal_pwr_enter_normal_sleep_mode();
		do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "PWR_NORMAL_SLEEP_MODE\n", "p6a", 1671); } while (0);
    }
    else if (sleep_mode == PWR_STOP_SLEEP_MODE)
    {
		do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "PWR_STOP_SLEEP_MODE\n", "p6a", 1675); } while (0);

         
        hal_pwr_set_stop_sleep_wakeup_pin(IO_PAD_AP_RSTN, WUP_RISING_EDGE);
        
        
        io_pad_e wakeup_io = hal_pwr_enter_stop_sleep_mode();
        if (wakeup_io == IO_PAD_AP_RSTN)
        {
            sg_system_resume = 1;
        }
        else
        {
             
            do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "wakeup_io %d FIXME touch wakeup convert to AP\n", "p6a", 1689,wakeup_io); } while (0);
            hal_gpio_set_ap_reset_int(ENABLE, ap_rstn_pull_high_cb, DETECT_HIGH_LVL);
        }
    }
    else
    {
         
        hal_pwr_enter_deep_sleep_mode(WUP_RISING_EDGE, WUP_FALLING_EDGE);
				do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "PWR_DEEP_SLEEP_MODE\n", "p6a", 1697); } while (0);
    }

}





 
static void app_system_process(void)
{

    if (sg_system_suspend)
    {
		do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "app_system_process\n", "p6a", 1712); } while (0);
         
        app_system_suspend(PWR_NORMAL_SLEEP_MODE);
        sg_system_suspend = 0;
    }

    if (sg_system_resume)
    {
         
        app_system_resume(PWR_NORMAL_SLEEP_MODE);
        sg_system_resume = 0;
    }

# 1732 "..\\..\\src\\app\\P6A\\p6a_demo.c"
}







 
void google_p6a_demo(void)
{
     
    hal_pwr_set_main_power(PWR_SEL_VCC);         
     
    app_display_init();
     
# 1755 "..\\..\\src\\app\\P6A\\p6a_demo.c"

    do { tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " "p6a demo init done \n", "p6a", 1756); } while (0);

    while (1)
    {
		
		




         
        while (hal_dsi_rx_ctrl_dcs_async_handler(g_rx_ctrl_handle));

         
  
    }
}
