projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update all demos, projects and bootloaders to indent all function parameters, one...
[pub/USBasp.git]
/
Projects
/
XPLAINBridge
/
Lib
/
SoftUART.h
diff --git
a/Projects/XPLAINBridge/Lib/SoftUART.h
b/Projects/XPLAINBridge/Lib/SoftUART.h
index
a685a6d
..
7203b3a
100644
(file)
--- a/
Projects/XPLAINBridge/Lib/SoftUART.h
+++ b/
Projects/XPLAINBridge/Lib/SoftUART.h
@@
-42,9
+42,6
@@
#include "LightweightRingBuff.h"
/* Macros: */
#include "LightweightRingBuff.h"
/* Macros: */
- #define BAUD 9600
- #define BIT_TIME ((F_CPU + (BAUD / 2)) / BAUD)
-
#define SRX PD0
#define SRXPIN PIND
#define SRXPORT PORTD
#define SRX PD0
#define SRXPIN PIND
#define SRXPORT PORTD
@@
-53,7
+50,16
@@
#define STXPORT PORTD
#define STXDDR DDRD
#define STXPORT PORTD
#define STXDDR DDRD
+ /* Inline Functions: */
+ static inline void SoftUART_SetBaud(const uint32_t Baud)
+ {
+ uint16_t BitTime = ((F_CPU / Baud) - 1);
+
+ OCR1A = BitTime;
+ OCR3A = BitTime;
+ }
+
/* Function Prototypes: */
/* Function Prototypes: */
- void
SoftUART_Init(void);
+ void SoftUART_Init(void);
#endif
\ No newline at end of file
#endif
\ No newline at end of file