adding (optional) mutex on usage of TxCore, avoid clashing of setCmdEnable
setCmdEnable could in theory be called from multiple threads on a common g_txcore / txcore object such that it would then mess up with what is sent to where. Introducing an optional mutex usage resolves this issue. @elebouli