mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
arch: cxd56xx: Add CONFIG_ARCH_LEDS_CPU_ACTIVITY to cxd56_idle.c and cxd56_irq.c
Summary: - This commit adds CPU activity LED feature to cxd56_idle.c and cx56_irq.c - An LED for the current CPU will turn off before calling WFI - An LED for the current CPU will turn on when an interrupt happens Impact: - CONFIG_ARCH_LEDS_CPU_ACTIVITY=y only Testing: - defconfigs will be commited later. Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
committed by
Alin Jerpelea
parent
d4d996cc28
commit
ad094552f8
@@ -41,9 +41,9 @@
|
||||
* IDLE state?
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||
#ifdef CONFIG_ARCH_LEDS_CPU_ACTIVITY
|
||||
# define BEGIN_IDLE() board_autoled_off(LED_CPU)
|
||||
# define END_IDLE()
|
||||
#else
|
||||
# define BEGIN_IDLE()
|
||||
# define END_IDLE()
|
||||
|
||||
@@ -27,9 +27,11 @@
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <arch/irq.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "nvic.h"
|
||||
@@ -564,6 +566,10 @@ void up_enable_irq(int irq)
|
||||
|
||||
void arm_ack_irq(int irq)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_LEDS_CPU_ACTIVITY
|
||||
board_autoled_on(LED_CPU);
|
||||
#endif
|
||||
|
||||
/* Check for external interrupt */
|
||||
|
||||
if (irq >= CXD56_IRQ_EXTINT)
|
||||
|
||||
Reference in New Issue
Block a user