lcd.h added

This commit is contained in:
7u83 2024-05-30 19:24:40 +02:00
parent 31066f37f0
commit 89613a8bec

View File

@ -4,6 +4,9 @@
#include <stdint.h>
#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<<x2)),x2)
#define uart_init_at89xx_6t_(baud,x2) \
uart_init_(256L-FOSC/12L/(baud*16L/(1<<x2)),x2)
#if MCU==AT89XX_6T
#define uart_init(baud,x2) uart_init_at89xx_6t_(baud,x2)
#else
#define uart_init(baud,x2) uart_init_8051(baud,x2)
#endif
#define setbits(var,bits) (var|=bits)
#define unsetbits(var,bits) (var&=(bits^0xff))
@ -35,9 +45,6 @@ extern uint8_t sevenseg_dec_inv[10];
#define at89xx_6t_timer8_init_val(freq) ((256L)-FOSC/6L/freq)
#define STC15XX 1 // STC15xx family
#define AT89XX 2 // AT89XX family
#define AT89XX_6T 3 // AT89C89C52 in 6T mode
#if MCU==AT89XX_6T
#define timer8_init_val(freq) at89xx_6t_timer8_init_val(freq)