Permalink
Browse files

intercom: Reduce sections with disabled interrupts.

  • Loading branch information...
1 parent 52c2788 commit bfae6ff97f7b6cfbccd690bd64c74f6e715f2ba7 @amsler amsler committed with Feb 21, 2011
Showing with 2 additions and 4 deletions.
  1. +1 −2 extruder/intercom.c
  2. +1 −2 intercom.c
View
@@ -118,6 +118,7 @@ void start_send(void) {
uint8_t sreg = SREG;
cli();
intercom_flags = (intercom_flags & ~FLAG_TX_FINISHED) | FLAG_TX_IN_PROGRESS;
+ SREG = sreg;
// set start byte
tx.packet.start = START;
@@ -132,8 +133,6 @@ void start_send(void) {
_tx.data[i] = tx.data[i];
}
- SREG = sreg;
-
// enable transmit pin
enable_transmit();
delay_us(15);
View
@@ -118,6 +118,7 @@ void start_send(void) {
uint8_t sreg = SREG;
cli();
intercom_flags = (intercom_flags & ~FLAG_TX_FINISHED) | FLAG_TX_IN_PROGRESS;
+ SREG = sreg;
// set start byte
tx.packet.start = START;
@@ -132,8 +133,6 @@ void start_send(void) {
_tx.data[i] = tx.data[i];
}
- SREG = sreg;
-
// enable transmit pin
enable_transmit();
delay_us(15);

0 comments on commit bfae6ff

Please sign in to comment.