⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bsp.h

📁 NXP LPC系列AMR7的开发程序源码(LCD
💻 H
字号:
/*********************************************************************
 *
 *  IAR PowerPac - RTOS
 *
 *  (c) Copyright IAR Systems 2006.  All rights reserved.
 *
**********************************************************************
----------------------------------------------------------------------
File    : BSP.h
Purpose : BSP (Board support package)
--------  END-OF-HEADER  ---------------------------------------------
*/

#ifndef BSP_H                           /* avoid multiple inclusion */
#define BSP_H

/****** LEDs ********************************************/
#define _LEDS_NUMB              16

/****** LED intensity control ***************************/
#define _LED_INTENSITY_CTRL
#define _LED_INTENSITY_MIN      0x00
#define _LED_INTENSITY_MAX      0xFF
#define _LED_INTENSITY_DEFAULT  0xFF

/****** LEDs IDs ****************************************/
#define _LED1_ID     (1UL <<  0)
#define _LED2_ID     (1UL <<  1)
#define _LED3_ID     (1UL <<  2)
#define _LED4_ID     (1UL <<  3)
#define _LED5_ID     (1UL <<  4)
#define _LED6_ID     (1UL <<  5)
#define _LED7_ID     (1UL <<  6)
#define _LED8_ID     (1UL <<  7)
#define _LED9_ID     (1UL <<  8)
#define _LED10_ID    (1UL <<  9)
#define _LED11_ID    (1UL << 10)
#define _LED12_ID    (1UL << 11)
#define _LED13_ID    (1UL << 12)
#define _LED14_ID    (1UL << 13)
#define _LED15_ID    (1UL << 14)
#define _LED16_ID    (1UL << 15)
#define _LED_ALL_ID  (0x0000FFFF)

/****** Buttons ****************************************/
#define _CAP_BUTTONS_NUMB   12

/****** Buttons IDs ****************************************/
#define _BUT1_ID     (0)
#define _BUT2_ID     (1)
#define _BUT3_ID     (2)
#define _BUT4_ID     (3)
#define _BUT5_ID     (4)
#define _BUT6_ID     (5)
#define _BUT7_ID     (6)
#define _BUT8_ID     (7)
#define _BUT9_ID     (8)
#define _BUT10_ID    (9)
#define _BUT11_ID    (10)
#define _BUT12_ID    (11)

typedef enum _ButtonError_t
{
  BUTT_OK = 0, BUTT_TO_ERROR, BUTT_SHORT_ERROR
} ButtonError_t;

/*********************************************************************
*
*       Functions
*
**********************************************************************/

void BSP_Init(void);

void BSP_IntensityLED(unsigned int Intensity);
void BSP_SetLED(unsigned int Mask);
void BSP_ClrLED(unsigned int Mask);
void BSP_ToggleLED(unsigned int Mask);

ButtonError_t BSP_GetButton(unsigned int Id, unsigned int * pCount);

/********************************************************************/

#endif                                  /* avoid multiple inclusion */

/****** EOF *********************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -