added missing mutex for shared scratch buffer

This commit is contained in:
2018-01-06 15:53:56 +01:00
parent 913f431a54
commit 931f6cea59
10 changed files with 63 additions and 40 deletions
+1 -1
View File
@@ -210,7 +210,7 @@ static error_t DI_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command, Pay
case CMD_READ:;
TRY(UU_DI_Read(unit, &packed));
PayloadBuilder pb = pb_start((uint8_t*)unit_tmp512, 64, NULL);
PayloadBuilder pb = pb_start((uint8_t*)unit_tmp512, UNIT_TMP_LEN, NULL);
pb_u16(&pb, packed);
com_respond_buf(frame_id, MSG_SUCCESS, (uint8_t *) unit_tmp512, pb_length(&pb));
return E_SUCCESS;
+1 -1
View File
@@ -380,7 +380,7 @@ error_t UU_I2C_WriteReg(Unit *unit, uint16_t addr, uint8_t regnum, const uint8_t
CHECK_TYPE(unit, &UNIT_I2C);
// we have to insert the address first - needs a buffer (XXX realistically the buffer needs 1-4 bytes + addr)
PayloadBuilder pb = pb_start((uint8_t*)unit_tmp512, 512, NULL);
PayloadBuilder pb = pb_start((uint8_t*)unit_tmp512, UNIT_TMP_LEN, NULL);
pb_u8(&pb, regnum);
pb_buf(&pb, bytes, width);