Merge pull request #1906 from bthebaudeau/fix-cc2538-disabled-lpm-warnings
cc2538: lpm: Fix build warnings with LPM_CONF_ENABLE == 0
This commit is contained in:
commit
4d61e8f997
|
@ -79,6 +79,9 @@ extern rtimer_clock_t lpm_stats[3];
|
||||||
#define LPM_PM2 2
|
#define LPM_PM2 2
|
||||||
/** @} */
|
/** @} */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
typedef bool (*lpm_periph_permit_pm1_func_t)(void);
|
||||||
|
|
||||||
|
#if LPM_CONF_ENABLE
|
||||||
/**
|
/**
|
||||||
* \brief Initialise the LPM module
|
* \brief Initialise the LPM module
|
||||||
*/
|
*/
|
||||||
|
@ -185,8 +188,6 @@ void lpm_exit(void);
|
||||||
* \sa lpm_enter()
|
* \sa lpm_enter()
|
||||||
*/
|
*/
|
||||||
void lpm_set_max_pm(uint8_t pm);
|
void lpm_set_max_pm(uint8_t pm);
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
typedef bool (*lpm_periph_permit_pm1_func_t)(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Register a peripheral function which will get called by the LPM
|
* \brief Register a peripheral function which will get called by the LPM
|
||||||
|
@ -207,12 +208,18 @@ typedef bool (*lpm_periph_permit_pm1_func_t)(void);
|
||||||
void lpm_register_peripheral(lpm_periph_permit_pm1_func_t permit_pm1_func);
|
void lpm_register_peripheral(lpm_periph_permit_pm1_func_t permit_pm1_func);
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Disable the entire module if required */
|
/* Disable the entire module if required */
|
||||||
#if LPM_CONF_ENABLE==0
|
#else
|
||||||
#define lpm_init()
|
#define lpm_init()
|
||||||
#define lpm_enter()
|
#define lpm_enter()
|
||||||
#define lpm_exit()
|
#define lpm_exit()
|
||||||
#define lpm_set_max_pm(...)
|
static inline void
|
||||||
#define lpm_register_peripheral(...)
|
lpm_set_max_pm(uint8_t pm)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
static inline void
|
||||||
|
lpm_register_peripheral(lpm_periph_permit_pm1_func_t permit_pm1_func)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* LPM_H_ */
|
#endif /* LPM_H_ */
|
||||||
|
|
Loading…
Reference in a new issue