mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Change STM32 so that stm32_pmstop.c and stm32_pmstandby are built even if CONFIG_PM is not defined
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4502 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -71,7 +71,7 @@ SRCS = $(ASRCS) $(CSRCS)
|
|||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
LDFLAGS = $(ARCHSCRIPT)
|
LDFLAGS = $(ARCHSCRIPT)
|
||||||
EXTRA_LIBS =
|
EXTRA_LIBS ?=
|
||||||
|
|
||||||
LINKLIBS =
|
LINKLIBS =
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
|
|||||||
@@ -76,8 +76,9 @@ ifneq ($(CONFIG_IDLE_CUSTOM),y)
|
|||||||
CHIP_CSRCS += stm32_idle.c
|
CHIP_CSRCS += stm32_idle.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CHIP_CSRCS += stm32_pmstop.c stm32_pmstandby.c
|
||||||
ifeq ($(CONFIG_PM),y)
|
ifeq ($(CONFIG_PM),y)
|
||||||
CHIP_CSRCS += stm32_pminitialize.c stm32_pmstop.c stm32_pmstandby.c
|
CHIP_CSRCS += stm32_pminitialize.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_STM32_ETHMAC),y)
|
ifeq ($(CONFIG_STM32_ETHMAC),y)
|
||||||
|
|||||||
@@ -48,8 +48,6 @@
|
|||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -75,7 +73,9 @@ extern "C" {
|
|||||||
* state activities.
|
* state activities.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM
|
||||||
EXTERN sem_t g_pmsem;
|
EXTERN sem_t g_pmsem;
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
@@ -99,7 +99,8 @@ EXTERN sem_t g_pmsem;
|
|||||||
* errno value is returned to indicate the cause of the failure.
|
* errno value is returned to indicate the cause of the failure.
|
||||||
*
|
*
|
||||||
* Assumptions:
|
* Assumptions:
|
||||||
* The caller holds the PM semaphore (g_pmsem).
|
* The caller holds the PM semaphore (g_pmsem) if this function is used
|
||||||
|
* as part of the NuttX power management logic.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -121,7 +122,8 @@ EXTERN int stm32_pmstop(bool lpds);
|
|||||||
* failure.
|
* failure.
|
||||||
*
|
*
|
||||||
* Assumptions:
|
* Assumptions:
|
||||||
* The caller holds the PM semaphore (g_pmsem).
|
* The caller holds the PM semaphore (g_pmsem) if this function is used
|
||||||
|
* as part of the NuttX power management logic.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -133,5 +135,4 @@ EXTERN int stm32_pmstandby(void);
|
|||||||
#endif
|
#endif
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
|
||||||
#endif /* __ARCH_ARM_SRC_STM32_STM32_PM_H */
|
#endif /* __ARCH_ARM_SRC_STM32_STM32_PM_H */
|
||||||
|
|||||||
@@ -46,8 +46,6 @@
|
|||||||
#include "stm32_pwr.h"
|
#include "stm32_pwr.h"
|
||||||
#include "stm32_pm.h"
|
#include "stm32_pm.h"
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -80,7 +78,8 @@
|
|||||||
* failure.
|
* failure.
|
||||||
*
|
*
|
||||||
* Assumptions:
|
* Assumptions:
|
||||||
* The caller holds the PM semaphore (g_pmsem).
|
* The caller holds the PM semaphore (g_pmsem) if this function is used
|
||||||
|
* as part of the NuttX power management logic.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -112,5 +111,3 @@ int stm32_pmstandby(void)
|
|||||||
asm("WFI");
|
asm("WFI");
|
||||||
return OK; /* Won't get here */
|
return OK; /* Won't get here */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
|
||||||
|
|||||||
@@ -46,8 +46,6 @@
|
|||||||
#include "stm32_pwr.h"
|
#include "stm32_pwr.h"
|
||||||
#include "stm32_pm.h"
|
#include "stm32_pm.h"
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -82,7 +80,8 @@
|
|||||||
* errno value is returned to indicate the cause of the failure.
|
* errno value is returned to indicate the cause of the failure.
|
||||||
*
|
*
|
||||||
* Assumptions:
|
* Assumptions:
|
||||||
* The caller holds the PM semaphore (g_pmsem).
|
* The caller holds the PM semaphore (g_pmsem) if this function is used
|
||||||
|
* as part of the NuttX power management logic.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -117,5 +116,3 @@ int stm32_pmstop(bool lpds)
|
|||||||
asm("WFI");
|
asm("WFI");
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ SRCS = $(ASRCS) $(CSRCS)
|
|||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
LDFLAGS = $(ARCHSCRIPT)
|
LDFLAGS = $(ARCHSCRIPT)
|
||||||
EXTRA_LIBS =
|
EXTRA_LIBS ?=
|
||||||
|
|
||||||
LINKLIBS =
|
LINKLIBS =
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ SRCS = $(ASRCS) $(CSRCS)
|
|||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
LDFLAGS = $(ARCHSCRIPT)
|
LDFLAGS = $(ARCHSCRIPT)
|
||||||
EXTRA_LIBS =
|
EXTRA_LIBS ?=
|
||||||
|
|
||||||
LINKLIBS =
|
LINKLIBS =
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ SRCS = $(ASRCS) $(CSRCS)
|
|||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
LDFLAGS = $(ARCHSCRIPT)
|
LDFLAGS = $(ARCHSCRIPT)
|
||||||
EXTRA_LIBS =
|
EXTRA_LIBS ?=
|
||||||
|
|
||||||
LINKLIBS =
|
LINKLIBS =
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ SRCS = $(ASRCS) $(CSRCS)
|
|||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
LDFLAGS = $(ARCHSCRIPT)
|
LDFLAGS = $(ARCHSCRIPT)
|
||||||
EXTRA_LIBS =
|
EXTRA_LIBS ?=
|
||||||
|
|
||||||
LINKLIBS =
|
LINKLIBS =
|
||||||
LDPATHES = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS)))
|
LDPATHES = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS)))
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ SRCS = $(ASRCS) $(CSRCS)
|
|||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
LDFLAGS = $(ARCHSCRIPT)
|
LDFLAGS = $(ARCHSCRIPT)
|
||||||
EXTRA_LIBS =
|
EXTRA_LIBS ?=
|
||||||
|
|
||||||
LINKLIBS =
|
LINKLIBS =
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
|
|||||||
Reference in New Issue
Block a user