#include "hw.h"


extern void Error_Handler( void );


void HwInit( void )
{  
    GpioInit( );
    UartInit( );
    SpiInit( );
}


void HwSetLowPower( void )
{
    SpiDeInit( );
    UartDeInit( );
    //GpioDeInit( );
    
    /* Enter Stop Mode */
    //HAL_PWREx_EnterSTOP2Mode( PWR_STOPENTRY_WFE );
}


/**
  * @brief  This function is executed in case of error occurrence.
  * @param  None
  * @retval None
  */
void Error_Handler( void )
{
    /* USER CODE BEGIN Error_Handler */
    /* User can add his own implementation to report the HAL error return state */
    while( 1 ) 
    {
    }
    /* USER CODE END Error_Handler */ 
}

void HAL_Delay( uint32_t Delay )
{
  Delay_ms(Delay);
}
