Show
Ignore:
Timestamp:
08/15/08 19:25:11 (5 months ago)
Author:
David Anderson <dave@…>
Branch:
default
Message:

Make nx_rs485_shutdown only work when the driver is idle.

Shutting down the driver while a communication is in progress is now a
programming error.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • nxos/base/drivers/rs485.c

    r628 r629  
    179179} 
    180180 
    181 bool nx_rs485_stop(void) { 
    182   NX_ASSERT(rs485_state.status != RS485_UNINITIALIZED); 
    183   if (rs485_state.status != RS485_IDLE) { 
    184     return FALSE; 
    185   } 
     181void nx_rs485_shutdown(void) { 
     182  NX_ASSERT(rs485_state.status == RS485_IDLE); 
    186183 
    187184  *AT91C_US0_CR = AT91C_US_RSTTX  |      /* Transmitter reset */ 
     
    193190 
    194191  rs485_state.status = RS485_UNINITIALIZED; 
    195   return TRUE; 
    196192} 
    197193