Permalink
Browse files

Fix transmit logic when using different TX_BIT

  • Loading branch information...
1 parent 9482b3f commit 8916d91c924f350df453ed052e7e8a65ff1c1998 @codehero codehero committed Nov 17, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 main.c
View
@@ -182,8 +182,8 @@ void xmit_char(uint8_t val){
while(tx_byte){
/* Output inverted logic (0 is high, 1 is low).
* Output to bit 7 on port 2. */
- register uint16_t tmp = 0x7F + (tx_byte & 0x1);
- tmp &= 0x80;
+ register uint16_t tmp = ~TX_BIT + (tx_byte & 0x1);
+ tmp &= TX_BIT;
P2OUT = tmp | RX_BIT;
/* Use tmp as a delay counter now. */

0 comments on commit 8916d91

Please sign in to comment.