Skip to content

Commit

Permalink
Fix transmit logic when using different TX_BIT
Browse files Browse the repository at this point in the history
  • Loading branch information
codehero committed Nov 17, 2013
1 parent 9482b3f commit 8916d91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.c
Expand Up @@ -182,8 +182,8 @@ void xmit_char(uint8_t val){
while(tx_byte){ while(tx_byte){
/* Output inverted logic (0 is high, 1 is low). /* Output inverted logic (0 is high, 1 is low).
* Output to bit 7 on port 2. */ * Output to bit 7 on port 2. */
register uint16_t tmp = 0x7F + (tx_byte & 0x1); register uint16_t tmp = ~TX_BIT + (tx_byte & 0x1);
tmp &= 0x80; tmp &= TX_BIT;
P2OUT = tmp | RX_BIT; P2OUT = tmp | RX_BIT;


/* Use tmp as a delay counter now. */ /* Use tmp as a delay counter now. */
Expand Down

0 comments on commit 8916d91

Please sign in to comment.