MCPcopy Create free account
hub / github.com/cinder/Cinder / flush

Method flush

src/cinder/Serial.cpp:370–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370void Serial::flush( bool input, bool output )
371{
372#if defined( CINDER_MAC ) || defined( CINDER_LINUX )
373 int queue;
374 if( input && output )
375 queue = TCIOFLUSH;
376 else if( input )
377 queue = TCIFLUSH;
378 else if( output )
379 queue = TCOFLUSH;
380 else
381 return;
382
383 ::tcflush( mImpl->mFd, queue );
384#elif defined( CINDER_MSW )
385 ::DWORD flags = 0;
386 flags |= ( input ) ? PURGE_RXCLEAR : 0;
387 flags |= ( output ) ? PURGE_TXCLEAR : 0;
388
389 if( input || output )
390 ::PurgeComm( mImpl->mDeviceHandle, flags );
391#endif
392}
393
394} // namespace cinder

Callers 6

setupMethod · 0.45
updateMethod · 0.45
renderCairoFunction · 0.45
renderSvgToTextureFunction · 0.45
renderCairoToTextureFunction · 0.45
log_progressFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected