This commit is contained in:
pvvx 2017-06-28 07:09:45 +03:00
parent b8c699eb1c
commit 3a865fb51d
40 changed files with 293 additions and 463 deletions

View file

@ -34,8 +34,13 @@ void sys_recover_ota_signature(void);
void sys_log_uart_on(void);
void sys_log_uart_off(void);
void sys_adc_calibration(u8 write, u16 *offset, u16 *gain);
u8 sys_is_sdram_power_on(void);
#ifdef CONFIG_SDR_EN
void sys_sdram_off(void);
u8 sys_is_sdram_power_on(void);
#else
#define sys_sdram_off()
#define sys_is_sdram_power_on() (0)
#endif
/**
* @brief system software reset

View file

@ -203,28 +203,16 @@ void sys_reset(void)
(1 << 2)); // SYSRESETREQ
}
#ifdef CONFIG_SDR_EN
u8 sys_is_sdram_power_on(void)
{
#ifdef CONFIG_SDR_EN
// u8 ison = 0;
//#if defined ( __ICCARM__ )
return IsSdrPowerOn();
//#endif
// return ison;
#else
return 0;
#endif
}
void sys_sdram_off(void)
{
#ifdef CONFIG_SDR_EN
//#if defined ( __ICCARM__ )
if (IsSdrPowerOn()) {
SdrPowerOff();
}
//#endif
#endif
}
#endif