1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #ifndef _SOFT_UART_
- #define _SOFT_UART_
-
- #include <avr/io.h>
- #include <avr/interrupt.h>
- #include <stdbool.h>
- #include "../XPLAINBridge.h"
- #include "Config/AppConfig.h"
-
- #define SRX PD0
- #define SRXPIN PIND
- #define SRXPORT PORTD
- #define STX PD1
- #define STXPORT PORTD
- #define STXDDR DDRD
-
- static inline void SoftUART_SetBaud(const uint32_t Baud)
- {
- uint16_t BitTime = ((F_CPU / Baud) - 1);
- OCR1A = BitTime;
- OCR3A = BitTime;
- }
-
- void SoftUART_Init(void);
- #endif
|