led/include/public.h

25 lines
524 B
C
Raw Permalink Normal View History

2024-07-15 01:39:23 +08:00
#ifndef _public_H
#define _public_H
// #include "reg52.h"
#include <8052.h>
typedef unsigned int u16;
typedef unsigned char u8;
// 用于自动重启的变量
__sfr __at (0xE7) ISP_CONTR;
#define RESET_PASSWORD_LENGTH 6
extern char __xdata reset_password[RESET_PASSWORD_LENGTH];
extern char __xdata receice_password[RESET_PASSWORD_LENGTH];
2024-07-15 02:58:54 +08:00
#define BEEP P2_5
2024-07-15 01:39:23 +08:00
void delay_10us(u16 ten_us);
void delay_ms(u16 ms);
u8 auto_reset(u8 rec_data);
2024-07-15 02:40:40 +08:00
u8 rotate_left(u8 value, u8 shift);
u8 rotate_right(u8 value, u8 shift);
2024-07-15 01:39:23 +08:00
#endif