Set LED pins to output when MB851 is in sleep mode.
This reduces power consumption.
This commit is contained in:
parent
6655c876f2
commit
af8e58e063
3 changed files with 18 additions and 9 deletions
|
@ -40,15 +40,21 @@
|
|||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#include PLATFORM_HEADER
|
||||
#include BOARD_HEADER
|
||||
#include "contiki-conf.h"
|
||||
#include "dev/leds.h"
|
||||
#include "hal/micro/micro-common.h"
|
||||
#include "hal/micro/cortexm3/micro-common.h"
|
||||
|
||||
#define LEDS_PORT *((volatile int32u *)(GPIO_PxOUT_BASE+(GPIO_Px_OFFSET*(LEDS_CONF_PORT/8))))
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
leds_arch_init(void)
|
||||
{
|
||||
LED_CONFIG();
|
||||
halGpioConfig(PORTx_PIN(LEDS_CONF_PORT,LEDS_CONF_RED_PIN),GPIOCFG_OUT);
|
||||
halGpioConfig(PORTx_PIN(LEDS_CONF_PORT,LEDS_CONF_GREEN_PIN),GPIOCFG_OUT);
|
||||
|
||||
LEDS_PORT |= (LEDS_CONF_RED | LEDS_CONF_GREEN);
|
||||
}
|
||||
|
@ -69,4 +75,4 @@ leds_arch_set(unsigned char leds)
|
|||
| ((leds & LEDS_GREEN) ? 0 : LEDS_CONF_GREEN);
|
||||
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue