📄 testled.h
字号:
/*
*******************************************************************************
** COPYRIGHT (C) NEC Electronics Corporation 2008
** NEC ELECTRONICS CONFIDENTIAL AND PROPRIETARY
** All rights reserved by NEC Electronics Corporation.
** Use of copyright notice does not evidence publication.
**
** Filename : LED.h
** Abstract : This file implements the definition
** that relates to the management of the LED lighting.
**
** Device : uPD78F8024
**
** Compiler : NEC/CC78K0
**
*******************************************************************************
*/
#ifndef _MDLED_
#define _MDLED_
/* mnemonic of register related to LED port */
#define PORT_PWM1 P3.3
#define PORT_MODE_PWM1 PM3.3
#define PORT_PWM2 P1.5
#define PORT_MODE_PWM2 PM1.5
#define PORT_PWM3 P1.6
#define PORT_MODE_PWM3 PM1.6
#define PORT_PWM4 P1.7
#define PORT_MODE_PWM4 PM1.7
/* mnemonic of register that relates to 8bit timer used by LED lighting control */
#define TCE51 TMC51.7
#define TMHE0 TMHMD0.7
#define TMHE1 TMHMD1.7
#define TCE50 TMC50.7
/* set value definition of register related to 8bit timer used by LED lighting control */
#define TCL51_INIT_VALUE 0b00000101
#define TMC51_INIT_VALUE 0b01000001
#define TMHMD0_INIT_VALUE 0b00111001
#define CMP00_INIT_VALUE 0xFF
#define TMHMD1_INIT_VALUE 0b00111001
#define CMP01_INIT_VALUE 0xFF
#define TCL50_INIT_VALUE 0b00000101
#define TMC50_INIT_VALUE 0b01000001
/* function prototypes */
void LED1_init(void);
void LED2_init(void);
void LED3_init(void);
void LED4_init(void);
void LED1_set(short shDuty);
void LED2_set(short shDuty);
void LED3_set(short shDuty);
void LED4_set(short shDuty);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -