STC15W408AS library 0.12.0
Loading...
Searching...
No Matches
Macros | Enumerations
uart1_mode1_timer2_12T.h File Reference
#include <stdint.h>
#include <sys.h>
#include <bits.h>
#include <frequency.h>
#include <interrupt.h>
#include <uart1_shared.h>
#include <uart1_8bit_shared.h>
Include dependency graph for uart1_mode1_timer2_12T.h:

Go to the source code of this file.

Macros

#define uart1_mode1_timer2_12T_init(pins)
 Initialize UART1 in Mode 1 with Timer2 12T configuration.
 
#define uart1_mode1_timer2_12T_start(baudrate)
 Start UART1 communication with standart baudrate value.
 
#define uart1_mode1_timer2_12T_ticks(baudrate)   (65536 - ((((MAIN_Fosc / 12) / baudrate) >> 2) >> get_frequency_divider_scale()))
 Get UART1 ticks for given baudrate and frequency divider scale.
 
#define uart1_mode1_timer2_12T_start_ext(baudrate)
 Start UART1 communication with baudrate value.
 
#define uart1_mode1_timer2_12T_stop   (bit_clr(AUXR, CBIT4))
 Stop UART1 communication and disable Timer2.
 
#define is_uart1_mode1_timer2_12T_started()   (test_if_bit_set(AUXR, SBIT4))
 Is UART1 started?
 

Enumerations

enum  uart1_mode1_timer2_12t_baudrate_t { baudrate_1200 = 0xFF3F , baudrate_2400 = 0xFF9F , baudrate_4800 = 0xFFCF , baudrate_9600 = 0xFFE7 }
 UART1 precalculated baudrates. More...