From a41a195213429882cfb9a5dab7453ca81a74d33b Mon Sep 17 00:00:00 2001 From: Stanislav Marek Date: Wed, 26 Oct 2005 15:51:00 +0000 Subject: [PATCH] LED macro upgraded for EDK2638. darcs-hash:20051026155128-5f899-0b25c8a232c277bd0e0195594f5b108dc99d47c9.gz --- board/h8300/edk2638/defines/system_def_edk2638.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/board/h8300/edk2638/defines/system_def_edk2638.h b/board/h8300/edk2638/defines/system_def_edk2638.h index cd8ede8..6a1a3d9 100644 --- a/board/h8300/edk2638/defines/system_def_edk2638.h +++ b/board/h8300/edk2638/defines/system_def_edk2638.h @@ -184,4 +184,15 @@ __u8 DIO_PFDDR_shaddow; __u8 DIO_PJDDR_shaddow; __u8 PWRCTRL_OUT_shaddow; +#define DEB_LED_INIT() \ + do {\ + *DIO_P1DR &= ~(P1DR_P14DRm | P1DR_P15DRm);\ + SHADDOW_REG_SET(DIO_P1DDR,0x30); /* set P1.4, P1.5 LED output */ \ + } while (0) + +#define DEB_LED_OFF(num) \ + (*DIO_P1DR |= (P1DR_P14DRm << (num)) & (P1DR_P14DRm | P1DR_P15DRm)) +#define DEB_LED_ON(num) \ + (*DIO_P1DR &=~(P1DR_P14DRm << (num)) | ~(P1DR_P14DRm | P1DR_P15DRm)) + #endif /* _SYSTEM_DEF_HW01_H_ */ -- 2.39.2