add helper to send command to all devices

This commit is contained in:
Kilian Bracher 2024-08-23 17:37:23 +02:00
parent 8e06b991ac
commit 8cead7ac35
Signed by: k.bracher
SSH Key Fingerprint: SHA256:mXpyZkK7RDiJ7qeHCKJX108woM0cl5TrCvNBJASu6lM
1 changed files with 6 additions and 0 deletions

View File

@ -77,6 +77,12 @@ nag_attr static inline HAL_StatusTypeDef ds2482_1w_send_command(ds2482_t * const
return ds2482_1w_write_byte(ds2482, command); return ds2482_1w_write_byte(ds2482, command);
} }
nag_attr static inline HAL_StatusTypeDef ds2482_1w_send_command_all(ds2482_t * const ds2482, uint8_t command) {
HAL_StatusTypeDef status = ds2482_1w_select_all(ds2482);
if (status != HAL_OK) return status;
return ds2482_1w_write_byte(ds2482, command);
}
#undef nag_attr #undef nag_attr
#undef DS2482_1W_ROM_MATCH #undef DS2482_1W_ROM_MATCH