changes
This commit is contained in:
parent
d6affd7230
commit
6c832eeb88
@ -27,16 +27,16 @@ static inline void disableDataRegisterEmptyInterrupt() {
|
|||||||
void uartInit() {
|
void uartInit() {
|
||||||
UCA0CTL1 |= UCSWRST;
|
UCA0CTL1 |= UCSWRST;
|
||||||
|
|
||||||
P1SEL = BIT1 + BIT2;
|
P1SEL = BIT1 + BIT2; // select secondary function TX, RX
|
||||||
P1SEL2 = BIT1 + BIT2;
|
P1SEL2 = BIT1 + BIT2; // dti
|
||||||
|
|
||||||
UCA0CTL0 |= UCPEN | UCPAR; // even parity
|
UCA0CTL0 |= UCPEN | UCPAR; // even parity
|
||||||
UCA0CTL1 |= UCSSEL0; // ACLK
|
UCA0CTL1 |= UCSSEL0; // ACLK
|
||||||
|
|
||||||
UCA0BR0 = 13;
|
UCA0BR0 = 13; // divider for 2400@32768
|
||||||
UCA0BR1 = 0;
|
UCA0BR1 = 0;
|
||||||
|
|
||||||
UCA0MCTL = UCBRS1 | UCBRS2;
|
UCA0MCTL = UCBRS1 | UCBRS2; // modulator for 2400@32768
|
||||||
|
|
||||||
UCA0CTL1 &= ~UCSWRST;
|
UCA0CTL1 &= ~UCSWRST;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user