From 89613a8becf3bedf6f34c252de164eda02bfe4ef Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Thu, 30 May 2024 19:24:40 +0200 Subject: [PATCH] lcd.h added --- mc8051fun.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mc8051fun.h b/mc8051fun.h index ea28017..d07da1d 100644 --- a/mc8051fun.h +++ b/mc8051fun.h @@ -4,6 +4,9 @@ #include #include <8052.h> +#define STC15XX 1 // STC15xx family +#define AT89XX 2 // AT89XX family +#define AT89XX_6T 3 // AT89C89C52 in 6T mode void uart_send_chr(char tx_data); @@ -11,9 +14,16 @@ void uart_send_str(const char *str); void uart_init_(uint8_t timer_init,uint8_t x2); -#define uart_init(baud,x2) \ +#define uart_init_8051(baud,x2) \ + uart_init_(256L-FOSC/12L/(baud*32L/(1<