----------------------------------------------------------------------------- Open the serial port -----------------------------------------------------------------------------
| 76 | // Open the serial port |
| 77 | //----------------------------------------------------------------------------- |
| 78 | bool SerialControllerImpl::Open |
| 79 | ( |
| 80 | ) |
| 81 | { |
| 82 | // Try to init the serial port |
| 83 | if( !Init( 1 ) ) |
| 84 | { |
| 85 | // Failed. We bail to allow the app a chance to take over, rather than retry |
| 86 | // automatically. Automatic retries only occur after a successful init. |
| 87 | return false; |
| 88 | } |
| 89 | |
| 90 | // Start the read thread |
| 91 | m_pThread = new Thread( "SerialController" ); |
| 92 | m_pThread->Start( SerialReadThreadEntryPoint, this ); |
| 93 | |
| 94 | return true; |
| 95 | } |
| 96 | |
| 97 | //----------------------------------------------------------------------------- |
| 98 | // <SerialControllerImpl::Close> |