Transfer a synchronization message to make I2C recovery more robust.

This commit is contained in:
László Monda
2017-10-04 02:24:34 +02:00
parent efb0f982d2
commit c707f0e408
4 changed files with 43 additions and 1 deletions

View File

@@ -65,6 +65,11 @@ void SlaveTxHandler(void)
case SlaveCommand_RequestProperty: {
uint8_t propertyId = RxMessage.data[1];
switch (propertyId) {
case SlaveProperty_Sync: {
memcpy(TxMessage.data, SlaveSyncString, SLAVE_SYNC_STRING_LENGTH);
TxMessage.length = SLAVE_SYNC_STRING_LENGTH;
break;
}
case SlaveProperty_Features: {
uhk_module_features_t *moduleFeatures = (uhk_module_features_t*)&TxMessage.data;
moduleFeatures->keyCount = MODULE_KEY_COUNT;